Since this is a brand new device, probably others may be interested in more details, so I put here some info on this product for future reference.
At the moment has no support via the Tuya v2 integration (although works with the Tuya app). I was curious if I could install ESPHome on it so I took it apart to see whats inside:
has a TYWE3S Wifi chip. Luckily ESP8266 based so ESPHome/Tasmota should be possible, but if you (like me) were hoping for an ESP32 based device in a relatively nice case to connect external BT sensors then this is not the right device
KQM6600TA seems to be the TVOC sensor, again doesn’t seem to be supported by ESPHome at the moment, google comes up with results in chinese mostly.
the PCB has rather curious markings, like TP1, TP2, TP3, etc. instead of GPIOs that I would expect. Probably I could track them to the pins of the TYWE3S chip by impendance meausurement.
It seems to have a header for connecting dupont wires which looks like an RX/TX/GND/3V3 connector, but its unmarked.
Attached I am sending a few pictures of the PCB and a screenshot from the Tuya app. Will be playing with it a bit further, in the meantime if you have any ideas what to try I am happy to check it out.
In my limited experience TP=test point. In other words somewhere interesting to stick a multimeter or oscilloscope probe. See what you can trace with a continuity probe.
(Sorry for having to split this over multiple posts, but I can only add two links as a new user to this forum, but I figure this is a case when more relevant links are worth it):
This seems like the same device as the the “Tuya Smart Air Box” (v2?).
The device does not come with an USB to Serial chip, so it has to be flashed via a separate serial cable. You might have some luck if you haven’t updated it with tuya-convert (https://github.com/ct-Open-Source/tuya-convert) OTA but my particular device was running a too recent firmware, so I had to flash it the manual way over a serial connection.
Flashing the device:
Compile the ESPHome Tuya configuration for TYWE3S.
This contains an attempt to map the datapoints provided by the MCU to some sensible sensors. Please let me know if these are off, I’ve only tested with the Tuya Smart Air Box.
It was important to set baud_rate: 0 for the logger in the above config, because the TYWE3S uses the serial port to communicate with the Tuya MCU.
Then connected the Dupont cables to my serial programmer.
Upload firmware
Just use ESPHome.
I had to try to flash multiple times before it got through, with various error messages. I ended up taking the command line that ESPHome printed it was using and running it over and over again until it worked (with the baud rate of 460800 instead of the automatically suggested lower 115200)…
## Note on the serial programmer / interface attachment
I used an old serial cable from Adafruit that I had lying around, but there are some newer recommendations available over at https://tasmota.github.io/docs/Getting-Started/#serial-to-usb-adapter.
There are other options here, mentioned in https://tasmota.github.io/docs/TuyaMCU-Devices/#tywe3s-connection-options, but I found just soldering to be easy enough and figured it would be more stable rather than trying to press-fit a jumper header.
## More information:
- https://esphome.io/components/tuya.html
- https://esphome.io/components/sensor/tuya.html
- https://tasmota.github.io/docs/devices/TYWE3S/
- https://tasmota.github.io/docs/TuyaMCU/
- https://tasmota.github.io/docs/TuyaMCU-Devices/
- Data Sheet: https://developer.tuya.com/en/docs/iot/wifie3smodule?id=K9605ua1cx9tv
so the sensor is finally supported in HA 2021.11, so finally I have a better overview of the measured values and it seems none of the values except temperature and humidity change. I have moved the sensor to my bedroom over night and naturally i was expecting the CO2 values to go up during 3 people sleeping there (my daughter usually moves to our bedroom after midnight), but there’s no significant change in the CO2 values that would correspond to the actual behaviour of our household (CO2 values going up when we sleep there and going down when we open the windows)
So, I have the “tuya version” with Zigbee SoC, but everything else is the same (the PCB is v1.1 so some parts are different but the sensors are the same. it is connected through zigbee2mqtt to my HA.)
1, I have absolutely the same values (358-368 ppm jumping ut and down.) for CO2. I’m also curious what is measuring the CO2, if there is only a temperature and humidity sensor and a TVOC sensor (KQM6600TA is only a TVOC sensor, there is no any connection with CO2)
I have a Tuya device with the same sensor but the PCB layout is a little bit different. The linear regulator is placed under the ESP.
Flashing using the pins was always interrupted by writing errors. It was necessary to remove chip reading out the sensors which is on the same serial interface the the programming interface.
The values are also not changing over the time. Lets see, maybe it need some time for calibration.
Finally continued working on this sensor. I share your experience. It seems that sensor datapoint for this sensor is incorrect.
Edit:
Playing with the device a bit more and checking the datapoints it just seems that this device doesn’t have a proper CO₂ measurement. I have a very good air quality sensor which I thought to use to calibrate the BW-AR01 so I was monitoring values coming from all 5 AR01 data points and comparing their changes to the CO₂ changes from the other sensor. No value matched CO₂ going up and down.
I did validate that datapoint 18 is temperature and 19 is humidity.
To test the VOC detection I exposed the sensor to isopropyl alcohol and datapoints 21 and 22 jumped in values.
Datapoint 2 is the only one I didn’t see budge in any scenario. I’m assuming that datapoint 21 is actually VOC and I’m unsure of what 22 and 2 are representing.
Also, for the logger use this config instead of 0 baud_rate:
logger:
hardware_uart: UART0_SWAP
Edit 2:
Looking at the PCB, I don’t see a CO2 measurement sensor. Unfortunately, this device is going to trash in my case.
Thanks a lot to all the contributors in this thread. I used these devices with the localtuya integration for a couple of months now, experiencing all kinds of instabilities. Finaly took the leap and flashed ESP-Home onto one of them following this thread. And it seems to be working great right away. So again, thanks a lot! I’ll flash a couple more of those now…
One question (which will show off my whole inexperince with all of this): What do i need to change in the yaml to turn off the blue LED?
Lifth
Edit Well, seems like i got lucky with the first device suceeding to flash on the second attempt. The remaining 6 were quite a bit more challenging, because of the Tuya MCU making some noise on the TX and RX as mentioned above. I used a ESP-Home, a CP2102 USB to TTL converter in combination with the Jig described here:
Couldn’t find the Baud-Rate setting mentioned above, so i just kept banging my head against the wall with flash-attempts. The only strategy that seemed to help was replugging the USB-Converter and asap clicking the “plugged into this pc”-option.
With the latest ESP-Home Version i changed the device class of DP02 ininthe code provided above from volatile_organic_compounds to volatile_organic_compounds_parts. That gets rid of the annoying warning from the home assistant integration.