fashberg / WThermostatBeca

Open Source firmware replacement for Tuya Wifi Thermostate from Beca and Moes with Home Assistant Autodiscovery
334 stars 69 forks source link

CB3S BK7231N #208

Closed tomik671108 closed 5 months ago

tomik671108 commented 1 year ago

Hi. I purchased BHT-002-GCLW and I have a problem communicating with it.

tomik67@tomik67MINT ~ $ esptool -p /dev/ttyUSB0 -b 460800 read_flash 0x00000 0x100000 originalFirmware1M.bin
esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet content

Inside there is a different CB3S module than yours with the BK7231N chip.

https://developer.tuya.com/en/docs/iot/cb3s?id=Kai94mec0s076

Does anyone have experience with such a case?

openshwprojects commented 1 year ago

OpenBeken runs on BK7231 (and BL602, and W800, and W600, and more..) and supports TuyaMCU well in a scriptable and customizable manner, we can also have custom pages hosted on OBK LittleFS, so it should be possible to support it easily.

Kihltech commented 9 months ago

I have an BHT-002GALW-W / BHT-002-GALW with this CB3S chip, which I'm interested in flashing to this firmware. From what I understand I'm not able to directly use the current firmware. I have a suitable ESP programmer and I can attempt to extract the firmware if that can be usable. I'm also willing to donate one unit to help with the reverse engineering.

Here's a picture of the unit: 20231223_155035

For future reference, I believe two resistors need to be removed to allow flashing: https://www.elektroda.com/rtvforum/topic4003974.html

tomik671108 commented 9 months ago

Hi. The latest TUYA devices are equipped with Beken chips, which cannot be loaded with Tasmota, only OpenBK. Read this entire thread (and others about OpenBK): https://www.elektroda.com/rtvforum/topic4003974.html , see if you are able to backup the original firmware first and then flash OpenBK. Instructions are in the thread. Indeed, resistors Q1 and Q2 need to be desoldered during the first upload of OpenBK, later updates are OnAir. At the same time, you can add an additional connection that will allow you to obtain information about the actual status of the relay. When you are ready, I will show you my thermostat configuration in Home Assistant, and help you with the first configuration of OpenBK.

paravoid commented 9 months ago

For what it's worth, besides OpenBK, you can nowadays flash the Beken chips with ESPHome.

I have a working config here: https://devices.esphome.io/devices/Beca-Thermostat

Note that I did not have to desolder anything to flash, everything just worked.

github-actions[bot] commented 6 months ago

Message to comment on stale issues. If none provided, will not mark issues stale