Air Box WP6003

I was looking for some cheep Air quality sensor, similar to JQ-300, but that wouldn’t relay on the internet connection, when I came across Air Box WP6003 from vson.com.

As it uses Bluetooth I thought I could easily integrated it with ESPHome (like this).

But after capturing some package I’ve noticed that it uses BLE indication and reading directly from the characteristic returns only 0 values. So I think generic integration is probably out of the question.
The data was also very cryptic, but fortunately somebody already did the work of decoding it - https://github.com/zu2/wp6003
(and right as I tip this I see he also uploaded a ESP compatible code)

I don’t have nothing to show yet (I ned to solder the bower cable back first :man_facepalming:), but wanted to share this here if anybody else would find this useful.



2 Likes

Thank you very much!

I just received the same device and I have no idea how to integrate it into Home Assistant

What is the code that you indicate is compatible with ESP?

What are the steps to integrate it?

Thanks in advance
regards

I was hoping I would I could integrate this before I got my new kid, but he beat me to it :slight_smile:
So it will take some time to integrate it with ESPHome.

I’ve done some more analysis of the protocol with zu2, resulting in the removal of some misunderstandings of the sensor communication.
I’ve then managed to modify the code so that it now sends the info to HA, but I doubt I’ll have the time to add this as an integration to ESPHome. I did find one ESPHome costume component that already has BLE client implementation, so this would be a good starting point.

My code is here.

Also, I’ve prepared an environment to play with the sensor more interactively and to have the ability to calibrate the sensor without the app - https://saso5.github.io/WP6003-air-box/

2 Likes

Wow! Thanks for your job!

I’ll try it as soon as I can. I’m going to buy an esp32 board, because the one I had is already taken.

Thanks a lot!

Great job! The browser debugger is awesome. I really look forward to continuing research on connecting the device to the home assistant. I don’t have esp32 yet, and I can’t fully experiment. But I will definitely give feedback. Thank.

I’ve linked the sensor with InfulxDB/Grafana and did some testing.

Looking at the graph it looks like there is only one sensor responsible for producing HCHO, TVOC, and CO2 data.

I’ve also wanted to test if heat has any effect on the sensor so I put some ice underneath the sensor to cool it down to see if affected the other sensor. It might but the effect seemed negligible.

Hello,

Great work on working out the interface, and the chrome debugger.

When you say only one sensor, does that mean it can’t discriminate between HCHO and CO2 for example?

Thank you,
Andy

I think there is only one metal oxide sensor, that detects some forms of VOC gases and then estimates the other values.

The sensor looks similar to this one, but they all look the same so I can’t be sure :man_shrugging:.

CO2 is for sure just an estimate (eCO2) as true CO2 sensors cost a lot more $$.

Incorporation in the same box of an ESP32 mini board with SASO5 software (Great job, Thanks)

1 Like

I know im a lil late to the party. I have 2 of these airboxes and would be great to be able to use them with Home Assistant, you mentioned that the found example was for a esphome costume component, i assume you meant custom lol. does this mean i use the code you have on github as a cpp or .h file in esphome to compile it alongside the rest of the needed packages?

I’ve never created a custom ESPHome component so I don’t know. I think it uses different libs and the data processing/passing to HA would also need to be changed.

Got it, Yea i took a look at making custom components last night, it might just be a matter of altering your existing code, ill take a crack at it, i do appreciate the reply though!

3 Likes

Any news in the integration with esphome?

2 Likes

yes and no, i am working on integrating another component into esphome but will help me do this one too if i can get it done. still not gona be any time soon

Since I coded on this as well I’ll post my git repo for the version I made:

I basically wrapped all the code from saso5 into a cpp class and referenced that in the custom component, but it’s not working properly atm as every other component stops getting data… therefore I assume I created a deadlock somewhere (probably during the BLE connection setup phase), but since I’m a cpp noob and currently not having enough free time I’m hoping someone else might be able to fix my code :grinning_face_with_smiling_eyes:

3 Likes

I managed to fix my codebase so that it’s currently working for two different WP6003’s as custom components. There’s still lot’s of cleanup to do but for the time being feel free to use my repo for inspiration! :smiley:
Also 3 out of 4 times the initial BLE connection seems to be stuck… What worked for me is just resetting the ESP until you get all WP6003s connected properly.

1 Like

Thanks for this custom component. It seems to be working but my readings are unusual compared to an Awair Element I have.

The two readings are correlated by wildly off in scale, other than temperature. The large swings correspond to when I open a window or turn on the AC. I’m curious what other people’s readings look like.

Note: my yaml is a copy/paste of the example with different variables, like WiFi, and one small change to convert TVOC to ppb but otherwise the same.

    - name: "Office - WP6003 TVOC"
      unit_of_measurement: ppb
      accuracy_decimals: 3
      filters:
        - multiply: 1000

Good day, guys
Could you please clarify me how to integrate device to HA? Over Bluetooth or WiFi? I’ve never worked with ESP Home, but I created node as in example and I see in console that WiFi connection failed.

I know this thread is about esp home and home kit, but can someone figure out a solution for Google Assistant? Would love to use this sensor with Google.