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 ), but wanted to share this here if anybody else would find this useful.
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.
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/
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.
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!
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
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!
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.
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.
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.