I found a bunch of great solutions to the problem in the Qingping Air monitor lite homeyscript thread, but it was a little difficult to cobble everything together from all the different solutions from others, so I decided to create this new dedicated thread with a detailed breakdown of everything you need to do to set up your air quality monitor.
First and foremost, you’ll need to have connected your Air Monitor 2 through Qingping Home at the very least and have updated the Air Monitor to the latest firmware version. (The Qingping IoT app may be needed, and I logged in there, but I don’t think it’s necessary for the setup process, so I’d only bother with it if your device is inaccessible in the Qingping Developer Platform for some reason. We’ll talk about that part later.)
0. Assign a static local IP address to your Homey device
Your Homey will function as a local server for the purposes of this integration, so make absolutely sure that you have assigned a static IP address to it in your router settings. There are plenty of guides online for how to do this, so I won’t be going into the details of this process.
For the purposes of this guide, its IP address will be set to 192.168.1.100. If you decide on a different address, MAKE SURE TO USE THAT IN THE FOLLOWING STEPS.
1. Set up Homey apps
1.1. Install required apps
You’ll need to install MQTT Server, MQTT Client (or MQTT apps with equivalent functionality), and Device Capabilities on your Homey device.
1.2. Set up MQTT Server
After installing it, you’ll have to navigate to the MQTT Server app settings in the Homey settings menu, which should look like this:
Click on the Configure button, and you’ll be greeted with the following screen, but with the Users missing; those are what we’ll be adding.
Click on the New User button, and create the two users shown above (AirMonitor2 and MQTTClient). You can set the password to anything you’d like, but I’d personally recommend using a password manager and generating some passwords for each one.
After you’re done with this, you can exit the configuration menu. I’d also recommend restarting the MQTT Server app afterwards.
1.3. Set up MQTT Client
Just as with the MQTT Server, you have to navigate to its settings menu and click on the Configure button. Doing so will bring up this menu:
Here, you’ll simply set things up exactly as shown in my screenshot:
- IP Address: 192.168.1.100
- Port: 8883
- Both checkboxes below these options are checked
- Username: MQTTClient
- Password: the password you set for this user
Before closing this screen, MAKE SURE TO SAVE YOUR CHANGES by scrolling down to the bottom and clicking the Save Settings button.
2. Setting up your virtual device and flow
Thankfully, Device Capabilities makes our job extremely easy here, as you can simply import my entire setup in a few clicks. We’ll start by clicking the New Device button and selecting the Device Capabilities Advanced Virtual Device:
After clicking Connect, you’ll be greeted with the following screen:
After clicking the Importing a TEF button, you’ll need to paste in the following TEF code:
[tef:AVD,FLOWS:"H4sIAAAAAAACA8WZ2XLbPLKAXyXFmjsZv0gQBElVzYX2XbL2JUm5sFK0KJLiosUp38yjzpOcorwodmxHOZVkfCOLAHr5iEY3Wt8ULnYuE00W+EpBaaC4WXz4KxehNoUzRIeHkqXjXEBrhtss9/oNvVsLA23RDfZFNussXKebL68GSZlU+25zsMb9tELi7aGKhotOX8aBud3aeb+zsuKemRAdol20zU3iku7Xuc+PfL49ptQgnZyIcN733JxvcFXkGwcjL3aMQDO+213vbjWSyzfqrb5rzSSPVotGSZWIXTd6dpm1FvnYteaRnlu0rLyX8vz1eOHX8lK393Qv5wkUHZRnnYa3taQOF9f+wVrnscHmQyvp3Qp/ss71e5DfubmNkR/fmdgRnVs+h7l5vt6bse4xf13Nod3Yl/7R9DeyVbnlZp8yinP9yk7m51IzNy07n4vwYuz5y8Ydz20WaGy6xnyWnye6jHyT6diep3nmp8gPjGvzaPevddVOmxMvt9Nuo7pYzLnJorktG5qZLg+3acVfRvM8WqSyER2JXNAYw3mpY3u78Ji7XV43YA7WjzMrz6/vogbXp2a+NpyhWXLduWN+2mjLTo5o6nG0qnQ92lqOSq2h35y36l5zPNiOlrFRHxxa47Gjtch6MmpM+9to1l1MXLW+Rtt14IR3fjLcwuJ+HalO6nij/WhL+ocqo5O1PI5X1rElpkkjmQ7X7eG61e5VehiF/pjg5eEg9mXX6pWGJTVprrSw1D164yluG6VehzqzZQ0P+Ox4h+tm18z1zWgh3VKkz4KYlZpHOK61yGA8a6akBN0Gr92hlRYPm7k+EbVmWOpXiottWAxJVKpfjybbcFTvO/Vb3b+9DcrNZhVdLxNvWxs2ultt0JwfRYmE1e1hobr5hIfpyHCo6DU2fm23qHuqhsjB7aYd2UdGUJu29AXvTMxFuVhqrGYjOUnV3sCvmLhXKhfrwZL124sah4PRqrrZVMNV/boWYDXvxa36cBamo2F/VMN3/naAtkHcb1l02hy3rluN7mA5Gw1GXL1rOunCcMrxq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ZI9XSiw0wHPbxLinLbCRdhfRoLxmyLBMgyICGAqlADZlgDUphJYFEkbUcQMoX18PrAA/omz4aId9pIIRr+DiKpjmO05IIgBAWJEAksYBqDcFoJSYVIEPybyVLH/CSwXRdRLLKb1O7BouqRcYAgI0QlAjEFgq0IHEAsVaZpk3PhJIjnVOH8kjVxyfLxkYsPfwURaiDDKIDA50TMmGrAZp4BARgXSdKzb5sdMwo2m/gkkFx2VL5Fo6m8pOEyETS1LMZRiCBDXBKAaYcA2sGpIJAyLaD9jAo0/wuSSUuiBiY3ezLcP5XfhktK6sHOjJCXew5Kb+Bnfa2gnDjLrmWT/uFln6PHykRXFr283XMQscsPT2oLy0NP5ZCr3TzcHpaB8/vyUii5J+S9S0devypWyCfjpOncQLE3EfiV8drqDPFQsF2SLlwhfpam/ilA/I3zqYrwJUH8H4CVZ+dcAXpRcXgJ8ldX+KkB4BvhdN+tNhvAdhpfk8V9jeNGp+5Lhq+P+rzI0zgwf+ztv8jPe4XdJcvs1fhdl8pf8XpUQf5Wfdeb31Gl5E6D1DsBLKqZfA3hRinsJ8HVy/asE0fc78KEb+iZB9A7BS4qJXyN40RXtVXnye27+GuSmRokGqGkRgLCmAYubKmCqqkFdclNjP6nuv/u14U9UKRddS1+h0X/LxcdkUtUoE4CrggOEbQsQmxlAh4at29DSkKr+BM1z+/ZPkLno1b0KO/g/rD60c9i9/K3rzeDT3gu+C0LlF4+vS97zK476/7AIwWeOT78xvEkQv0Pwkoj6xSpOckMzpQEgxSpATDcBFVgHhEmbq8TSdPqqE/12gLIo8LMWdHS88ZPVOy1oriJmaxRIjdgACQYBwRgBZCBLGJBr2DpHpa8UcLbjT73KLDqzPuBD5X6JmJcv/We98zClnhuvvuuev3yX2aTuY/wWlG9f/E+fPn36crLti1L49EXR4Bfl6ulxGt64yc57HPlugKcRycQ+jqiq+kX54t9nr+ithjsP9r5yf39///X+/wDeFSC9yiUAAA==":/tef]
After pasting it into the input box, simply click on the Read Device button.
After this, you should be presented with a Save button. Click that.
This will create your virtual device in the background and will move you to the next screen, where you’ll be able to import the accompanying Advanced Flow. On this screen, you can specify the name of the flow that will be created (defaults to Qingping Air Monitor 2), after which you’ll have to click the Update Text button to generate your import script.
After this, you need to copy the entire contents of the code box (it should automatically get copied to your clipboard when you click the Update Text button) so that you can run it in the linked API Playground. Keep in mind that if you have multiple Homey devices or have a Cloud Homey instance, you need to make sure the correct one is selected in the dropdown (the correct one being the one you set up the apps on). Then, you simply have to replace the sample code with the code you just copied before clicking the Run button:
This will automatically generate the following flow for you, which should be immediately functional as soon as you set up your device for MQTT:
3. Setting up your Air Monitor for MQTT
As I mentioned at the start, I’ll assume you have already linked your Air Monitor to your account in the Qingping Home app. To proceed, you need to head to the Qingping Developer Platform and log in with the same credentials that you’ve used for the Qingping Home app.
After you’ve successfully logged in, navigate to the Private Configuration tab and click the Add button for the MQTT Configuration:
After clicking the button, you can essentially just copy my setup 1-to-1. Set a name for your device (it has no relevance), select Qingping Air Monitor as the device type, and select Self-built MQTT as the excellently translated “private type”:
After this is done, you’ll have to set the Self-built MQTT Information, so click on that box. Here, you can simply copy my setup again:
Make sure you select MQTT instead of MQTTS in the top dropdown (and the matching 1883 port instead of 8883), as locally signed certificates are not accepted, so your device will not be able to communicate with the MQTT server.
And as you can see, I have also highlighted the {mac} part of the bottom 3 inputs, which is pretty pointless unless you have multiple Qingping devices on your network. I personally only have one, so I have deleted these parts, which left me with the following setup (the setup the imported flow assumes):
If you’d like to keep the device’s MAC address in the Up and Down Topics (Client ID is not checked anywhere in the imported flow), you’ll simply have to change the two MQTT Client flow cards accordingly.
After clicking Confirm on this window and the original one, you’ll have created the following MQTT Configuration:
If you need to change it for some reason going forward, you can simply do so through the three dots in the Management column.
With this step complete, you need to head to the Push Configuration tab to transfer the setup to your device (if you kept the MAC address placeholder previously, this is a great time to grab it):
In the following pop-up, select your device again and click Confirm:
You can now open the settings menu on your Qingping Air Monitor 2 device (the physical one, not the virtual one we created), scroll down to the bottom, and open the Privatization menu. Here, you can check the connection status, refresh it, trigger a RealTime data send at any time, and double-check the MQTT server address you’ve specified.
4. Finishing Up
If you’ve done everything correctly, everything should be working at this point, and the numbers on your new virtual device should be getting updated every second or so. If that’s not the case even after waiting a few minutes and tapping away at the Refresh Connection button in your Privatization settings, you can try factory resetting your device to make sure the changes have been applied.
If the device still doesn’t connect to your MQTT server, you have probably messed up somewhere, so double-check the steps above. If that still doesn’t do it, consider replying to this thread in case I or someone else can help you out. You can also check out the original thread I linked at the start to see if there’s anything there that would be helpful.
With that said, I hope this write-up was helpful for you, and I hope you’ll have a great rest of your day ![]()

















