logo elektroda
logo elektroda
X
logo elektroda

[BK7238 / T1] TH08E and TH08C LCD Calendar/clock/temperature/humidity

tplewa 432 6
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • White clock with LCD showing date, time, temperature, and humidity

    Hello :)

    I recently bought some Tuya modules to play with, with a view to playing with OpenBK.
    Among them the TH08(??? E ???) and TH08C modules mentioned in the title. The TH08C version has the ability to switch with a button (the number of clicks of the button that normally turns on the backlight) the 12h/24h time format and the temperature units i.e. C and F.

    Both versions are based on the module T1-U-HL (BK7238)

    PCB appearance of the TH08E version (as to this E I am not sure but this is how it was described on Aliexpress):

    Close-up of TH08E PCB with T1-U-HL module and labeled signal paths

    PCB described as "TH08-CBU-BL55072A_V3.8 2025-09-18"


    PCB appearance of the TH08C version (this is how it is described in the user manual):

    TH08C PCB with T1-U-HL module and label TH08_T1-U_V1.2 2025-10-13

    PCB described as "TH08-T1-U_V1.2 2025-10-13"

    In principle, both temperature/humidity sensors are similar in design to the TH08 module with BK7231N already described here:

    [BK7231N ] Interior of TH08 LCD Calendar/clock/temperature/humidity

    At the moment I have uploaded the OpenBK software to the TH08E version (TH08C I have not yet touched and will probably post information about the protocol later). Ot the log data is quite a lot and I don't want to make a fuss with two versions at the moment. As soon as I manage to do something with TH08E I will take up TH08C and see how the communication is with this version....

    So for the moment I am focusing on TH08E i.e. PCB "TH08-CBU-BL55072A_V3.8 2025-09-18"

    Unfortunately, the communication with the TuyaMCU looks a bit different than in the TH08 module described on the forum (BK7231N) - so for the moment it was not possible to move it.

    It is apparent that several packages are missing e.g. 55 AA 00 90 and in the documentation (Tuya Developer) Serial Port Protocol at least I could not find information about package 90....


    Edited Post added after time: ok regarding package 90 I found is this Get cached DP command (0x90) - description here: Basic Features MCU Standard Protocol



    All in all, I've only been playing with OpenBK for a day (managed to rewire the PIR detectors) and I may be mixing things up. I've actually looked at the OpenBK code but I don't yet understand how it works enough to make any modifications myself.

    Maybe colleague @p.kaczmarek2 can advise and help here :) Below what I managed to log regarding TH08E module communication....

    In firmware configured WiFi/MQTT/NTP (this works) and set flags 10, 37, 43 to this disconnected line CEN - here basically behavioural problems with bad communication similar to the TH08 described in the forum....

    Effect:

    The TuyaMCU attempts to commune with the T1-U-HL (BK7238) and after a period of time shuts down its power supply. The date and time on the display is not updated....



    TH08E TuyaMCU communication with original firmware - T: 28.0C H: 26%
    
    Received by WiFi module:
    55 AA	03	00		00 01	00	03	
    HEADER	VER=03	Heartbeat		LEN	00	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	01		00 00		00	
    HEADER	VER=00	Product		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	01		00 37	7B2270223A22623876716D646A6D7073776261703171222C2276223A22312E302E30222C226D223A302C226E223A312C22736D223A307D	57	
    HEADER	VER=03	Product		LEN	{"p":"b8vqmdjmpswbap1q","v":"1.0.0","m":0,"n":1,"sm":0}	CHK	
    
    Received by WiFi module:
    55 AA	03	02		00 00		04	
    HEADER	VER=03	McuConf		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	02		00 00		01	
    HEADER	VER=00	McuConf		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	03		00 01	02	05	
    HEADER	VER=00	WifiState		LEN	02	CHK	
    
    Received by WiFi module:
    55 AA	03	03		00 00		05	
    HEADER	VER=03	WifiState		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	03		00 01	03	06	
    HEADER	VER=00	WifiState		LEN	03	CHK	
    
    Received by WiFi module:
    55 AA	03	03		00 00		05	
    HEADER	VER=03	WifiState		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	03		00 01	04	07	
    HEADER	VER=00	WifiState		LEN	04	CHK	
    
    Received by WiFi module:
    55 AA	03	03		00 00		05	
    HEADER	VER=03	WifiState		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	90		00 04	03091718	D1	
    HEADER	VER=03	Unk		LEN	03091718	CHK	
    
    Received by WiFi module:
    55 AA	03	24		00 00		26	
    HEADER	VER=03	Unk		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	90		00 02	0100	92	
    HEADER	VER=00	Unk		LEN	0100	CHK	
    
    Sent by WiFi module:
    55 AA	00	24		00 01	BB	DF	
    HEADER	VER=00	Unk		LEN	BB	CHK	
    
    Received by WiFi module:
    55 AA	03	1C		00 00		1E	
    HEADER	VER=03	Date		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	1C		00 08	011A01170A342105	BA	
    HEADER	VER=00	Date		LEN	bOk=1 26/1/23 10:52:33	CHK	
    
    Received by WiFi module:
    55 AA	03	22		00 15	090400010017020004000000001802000400000000	82	
    HEADER	VER=03	Unk		LEN	090400010017020004000000001802000400000000	CHK	
    
    Sent by WiFi module:
    55 AA	00	23		00 01	01	24	
    HEADER	VER=00	Unk		LEN	01	CHK	
    
    Received by WiFi module:
    55 AA	03	22		00 15	0102000400000118020200040000001A0304000102	85	
    HEADER	VER=03	Unk		LEN	0102000400000118020200040000001A0304000102	CHK	
    
    Sent by WiFi module:
    55 AA	00	23		00 01	01	24	
    HEADER	VER=00	Unk		LEN	01	CHK	
    



    TuyaMCU communication with original firmware - T: 39.7CC H: 14%
    
    Received by WiFi module:
    55 AA	03	00		00 01	00	03	
    HEADER	VER=03	Heartbeat		LEN	00	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	01		00 00		00	
    HEADER	VER=00	Product		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	01		00 37	7B2270223A22623876716D646A6D7073776261703171222C2276223A22312E302E30222C226D223A302C226E223A312C22736D223A307D	57	
    HEADER	VER=03	Product		LEN	{"p":"b8vqmdjmpswbap1q","v":"1.0.0","m":0,"n":1,"sm":0}	CHK	
    
    Received by WiFi module:
    55 AA	03	02		00 00		04	
    HEADER	VER=03	McuConf		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	02		00 00		01	
    HEADER	VER=00	McuConf		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	03		00 01	02	05	
    HEADER	VER=00	WifiState		LEN	02	CHK	
    
    Received by WiFi module:
    55 AA	03	03		00 00		05	
    HEADER	VER=03	WifiState		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	03		00 01	03	06	
    HEADER	VER=00	WifiState		LEN	03	CHK	
    
    Received by WiFi module:
    55 AA	03	03		00 00		05	
    HEADER	VER=03	WifiState		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	03		00 01	04	07	
    HEADER	VER=00	WifiState		LEN	04	CHK	
    
    Received by WiFi module:
    55 AA	03	03		00 00		05	
    HEADER	VER=03	WifiState		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	90		00 04	03091718	D1	
    HEADER	VER=03	Unk		LEN	03091718	CHK	
    
    Sent by WiFi module:
    55 AA	00	90		00 02	0100	92	
    HEADER	VER=00	Unk		LEN	0100	CHK	
    
    Received by WiFi module:
    55 AA	03	24		00 00		26	
    HEADER	VER=03	Unk		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	24		00 01	BC	E0	
    HEADER	VER=00	Unk		LEN	BC	CHK	
    
    Received by WiFi module:
    55 AA	03	1C		00 00		1E	
    HEADER	VER=03	Date		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	1C		00 08	011A01170A371505	B1	
    HEADER	VER=00	Date		LEN	bOk=1 26/1/23 10:55:21	CHK	
    
    Received by WiFi module:
    55 AA	03	22		00 15	090400010017020004000000001802000400000000	82	
    HEADER	VER=03	Unk		LEN	090400010017020004000000001802000400000000	CHK	
    
    Sent by WiFi module:
    55 AA	00	23		00 01	01	24	
    HEADER	VER=00	Unk		LEN	01	CHK	
    
    Received by WiFi module:
    55 AA	03	22		00 15	010200040000018D020200040000000E0304000102	EE	
    HEADER	VER=03	Unk		LEN	010200040000018D020200040000000E0304000102	CHK	
    
    Sent by WiFi module:
    55 AA	00	23		00 01	01	24	
    HEADER	VER=00	Unk		LEN	01	CHK	
    



    TH08E TuyaMCU communication with original firmware - sensor removed from Tuya account
    
    Received by WiFi module:
    55 AA	03	00		00 01	00	03	
    HEADER	VER=03	Heartbeat		LEN	00	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	01		00 00		00	
    HEADER	VER=00	Product		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	01		00 37	7B2270223A22623876716D646A6D7073776261703171222C2276223A22312E302E30222C226D223A302C226E223A312C22736D223A307D	57	
    HEADER	VER=03	Product		LEN	{"p":"b8vqmdjmpswbap1q","v":"1.0.0","m":0,"n":1,"sm":0}	CHK	
    
    Sent by WiFi module:
    55 AA	00	02		00 00		01	
    HEADER	VER=00	McuConf		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	02		00 00		04	
    HEADER	VER=03	McuConf		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	03		00 00		05	
    HEADER	VER=03	WifiState		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	03		00 01	02	05	
    HEADER	VER=00	WifiState		LEN	02	CHK	
    
    Received by WiFi module:
    55 AA	03	03		00 00		05	
    HEADER	VER=03	WifiState		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	03		00 01	03	06	
    HEADER	VER=00	WifiState		LEN	03	CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	01		00 00		00	
    HEADER	VER=00	Product		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	01		00 37	7B2270223A22623876716D646A6D7073776261703171222C2276223A22312E302E30222C226D223A302C226E223A312C22736D223A307D	57	
    HEADER	VER=03	Product		LEN	{"p":"b8vqmdjmpswbap1q","v":"1.0.0","m":0,"n":1,"sm":0}	CHK	
    
    Received by WiFi module:
    55 AA	03	02		00 00		04	
    HEADER	VER=03	McuConf		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	02		00 00		01	
    HEADER	VER=00	McuConf		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	03		00 00		05	
    HEADER	VER=03	WifiState		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	03		00 01	01	04	
    HEADER	VER=00	WifiState		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    





    In contrast, this is what the communion with OpenBK (TH08E) looks like:

    For autoexec.bat with startDriver tmSensor
    
    startDriver TuyaMCU
    startDriver tmSensor
    startDriver NTP
    ntp_setServer 194.146.251.100
    ntp_timeZoneOfs 1
    


    Log:
    
    Received by WiFi module:
    55 AA	03	01		00 37	7B2270223A22623876716D646A6D7073776261703171222C2276223A22312E302E30222C226D223A302C226E223A312C22736D223A307D	57	
    HEADER	VER=03	Product		LEN	{"p":"b8vqmdjmpswbap1q","v":"1.0.0","m":0,"n":1,"sm":0}	CHK	
    
    Sent by WiFi module:
    55 AA	00	01		00 00		00	
    HEADER	VER=00	Product		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	02		00 00		04	
    HEADER	VER=03	McuConf		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	02		00 01	03	05	
    HEADER	VER=00	McuConf		LEN	03	CHK	
    
    Received by WiFi module:
    55 AA	03	02		00 00		04	
    HEADER	VER=03	McuConf		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	02		00 01	04	06	
    HEADER	VER=00	McuConf		LEN	04	CHK	
    



    and log with autoexec.bat removed startDriver tmSensor :
    
    Received by WiFi module:
    55 AA	03	00		00 01	00	03	
    HEADER	VER=03	Heartbeat		LEN	00	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	01		00 00		00	
    HEADER	VER=00	Product		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	01		00 37	7B2270223A22623876716D646A6D7073776261703171222C2276223A22312E302E30222C226D223A302C226E223A312C22736D223A307D	57	
    HEADER	VER=03	Product		LEN	{"p":"b8vqmdjmpswbap1q","v":"1.0.0","m":0,"n":1,"sm":0}	CHK	
    
    Sent by WiFi module:
    55 AA	00	02		00 00		01	
    HEADER	VER=00	McuConf		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	02		00 00		04	
    HEADER	VER=03	McuConf		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	03		00 00		05	
    HEADER	VER=03	WifiState		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	03		00 01	00	03	
    HEADER	VER=00	WifiState		LEN	00	CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	03		00 00		05	
    HEADER	VER=03	WifiState		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	03		00 01	04	07	
    HEADER	VER=00	WifiState		LEN	04	CHK	
    
    Received by WiFi module:
    55 AA	03	90		00 04	03091718	D1	
    HEADER	VER=03	Unk		LEN	03091718	CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    
    Received by WiFi module:
    55 AA	03	00		00 01	01	04	
    HEADER	VER=03	Heartbeat		LEN	01	CHK	
    
    Sent by WiFi module:
    55 AA	00	00		00 00		FF	
    HEADER	VER=00	Heartbeat		LEN		CHK	
    
    Sent by WiFi module:
    55 AA	00	08		00 00		07	
    HEADER	VER=00	QueryInitStatus		LEN	INVALID date			CHK	
    

    Cool? Ranking DIY
    About Author
    tplewa
    Level 39  
    Offline 
    tplewa wrote 6664 posts with rating 968, helped 222 times. Live in city Warszawa. Been with us since 2003 year.
  • ADVERTISEMENT
  • #2 21817834
    p.kaczmarek2
    Moderator Smart Home
    An interesting device, and with the new BK. More and more of it on the market.

    It's nice to see someone messing about with it, although I myself prefer to use Zigbee for battery-powered devices, WiFi I love for mains-powered ones.

    tuyaMcu_defWiFiState 4 is needed, otherwise the device is waiting on MQTT to report that it is 'connected to the cloud', from what I remember, although I guess blank fields in MQTT are also considered a sign that it doesn't need to be checked.

    I checked your packet 55 AA 03 22 00 15 090400010017020004000000001802000400000000 82 and I can see that it is normally parsed by OBK. You just have to map the dpIDs available there to channels, as you normally do. linkTuyaMCUOutputToChannel
    Screenshot of code editor with TuyaMCU logs and channel mapping function
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 21817840
    tplewa
    Level 39  
    p.kaczmarek2 wrote:
    An interesting device, and one with a new BK. More and more of it on the market.

    Nice to see someone messing around with it, though I myself prefer to use Zigbee for battery-powered devices, WiFi I love for mains-powered ones.


    Yes I know ZigBee works better for such equipment.... ...although this is more fun than any serious home automation hehe. I just put HA on the VM to practice a bit and implement integrations with my BMS.... ...and by the way I got the idea that maybe I could do some light control.

    Unfortunately, from what I've read the ZigBee gateways also have some problems and not everything works under HA, and the server with the virtualisation is in such a place that it was difficult for me to get the antenna out of the ZigBee dongle under USB to have any meaningful range.

    However, there is a network and WiFi (I separated an isolated VLAN just for IoT), and the flat is rented, and the prices of these gadgets on Ali are ridiculously low, so I bought some stuff to play with ;) I will probably still bring up the subject of presence sensors on 5GHz and 24GHz, which I also want to convert to OpenBK.... On the other hand, these temperature sensors are probably more for fun I bought hehe

    And thanks for the info that the 0x22 package is parsed.... in the morning I'll change autoexec and try to map dpId to channels - ehh in addition I didn't check in Tuya what is under given Id so it will have to be described yet (well, you learn) ;) I'll see maybe from firmware backup it can be pulled out....
  • #4 21817844
    p.kaczmarek2
    Moderator Smart Home
    Go ahead and redesign your next device, I'll try to help too.

    Post a firmware backup then we'll try, maybe @divadiow can help.

    I would personally think of a slightly different form of experiment though. There is a BL 55072 there, yes? I can see in one of the pictures. It has I2C after all, you could potentially drive it from the BK itself, and then either power the chip by wire, or already loosely deepsleep in the OBK to run, without fighting with the MCU.

    We don't have a driver for the BL 55072, but one could be made.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 21817856
    tplewa
    Level 39  
    p.kaczmarek2 wrote:
    There is BL 55072, yes?


    Exactly BL55072 going over I2C.

    Here, you could boldly knock out the TuyaMCU and plug directly into the BL55072....
    ...except that the segments would have to be configurable, because from what I checked the displays in those I have are different. Ot the one that has switching has additional AM/PM and C and F segments....

    The price of these thermometers in promotions is not high so you can confidently experiment without any major concerns - just if something goes wrong there is no great financial loss ;)

    Regarding other stuff, i.e. microwave sensors, there will be more fun - I still have to read how to create my own HTML with settings in OpenBK and use RestAPI etc. to configure sensors etc. At the moment it is a black magic for me ;) Ot after reworking a few other things (bulbs, switches, thermometers) I will probably get down to it :)

    As for the firmware, once I've checked where my passwords, ssid etc are sitting to get them out I'll post.


    However, I've now extracted a JSON from the firmware that describes the Id in part, and even though it doesn't have names it's possible to guess something by looking at the data being sent....


    The aforementioned JSON:
    Code: JSON
    Log in, to see the code


    The id itself coincides with the JSON posted by colleague @divadiow in post #241 of the twin thread #241 [BK7231N ] Interior TH08 LCD Calendar/Timer/Temperature/Humidity

    (let me copy this JSON here)
    Code: JSON
    Log in, to see the code




    Well, and here the dissected data posted in an earlier post (data for T: 39.7C H: 14%):

    55 AA 03 22 00 15

    (ID = 9, Val = 0)
    09 04 00 01 00

    (ID = 23, Val = 0)
    17 02 00 04 00 00 00 00

    (ID = 24, Val = 0)
    18 02 00 04 00 00 00 00

    82

    --------------------------------------------------


    55 AA 03 22 00 15

    (ID = 1, Val = 0x018D = 397 = 39.7C)
    01 02 00 04 00 00 01 8D

    (ID = 2, Val = 0x0E = 14%)
    02 02 00 04 00 00 00 0E

    (ID = 3, Val = 02)
    03 04 00 01 02

    EE
  • #6 21818531
    sq3evp
    Level 38  
    Which standard is more economical? Tuya or Zigbee?
    I have some on Tuya, not sure if Zigbee is worth it?
    Radio coverage who has better?
  • ADVERTISEMENT
  • #7 21818668
    tplewa
    Level 39  
    Ok... TH08E works with OpenBK although from what I've noticed sometimes it doesn't download data from NTP and the date and time on the display is erased - there were also a few cases that it sent values equal to zero - although this probably doesn't happen anymore (we'll see how long it works). At the moment added uploading of battery status, temperature and humidity.

    If anyone has such a module, corrections are welcome if you manage to set things up better....
    Similarly, if someone manages to use and send calibration data for the sensor - that is the option available in TuyaMCU (i.e. support for Id 23 and 24)... Unfortunately, at the moment I know too little about OpenBK to implement this - probably when I get to know the software a little better I will do something about it.

    We'll see what the communication with TH08C looks like, that is the version which allows to set time mode 12/24h and temperature units (C/F) using a switch - I'll probably get to it today...


    Settings

    Flags:
    2 10 19 37 51

    autoexec.bat:
    
    startDriver TuyaMCU
    
    tuyaMcu_defWiFiState 4
    
    setChannelType 1 temperature_div10
    linkTuyaMCUOutputToChannel 1 val 1
    
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 2 val 2
    
    setChannelType 3 ReadOnlyLowMidHigh
    setChannelLabel 3 "Battery"
    linkTuyaMCUOutputToChannel 3 val 3
    
    startDriver NTP
    
    ntp_timeZoneOfs 1
    ntp_setServer 194.146.251.100
    waitFor NTPState 1
    




    sq3evp wrote:
    Which standard is more economical? Tuya or Zigbee?
    I have some on Tuya, not sure if it's worth Zigbee?
    Radio range who has a better one?


    Tuya is sort of a cloud based smart home management system something like Google Home, Home Assistant etc. Basically the same functions as Tuya (it's the same app) are offered by several other companies (using all the API created by Tuya) e.g. Smart Life etc.

    ZigBee on the other hand is a way of communication and here devices communicating over ZigBee, WiFi, Bluetooth can work with Tuya/Smart Life. Except that ZigBee needs an additional gateway that connects ZigBee to the network (can be a ZigBee gateway to WiFi or Ethernet). In the same way, some of the functionality that we create in Tuya can be supported by a ZigBee gateway - so there is an advantage and not everything will stop working when the internet connection goes down.

    Personally, however, if I were making a smart home, I would rather base everything possible on a wired installation. However, it is known that such a thing is more likely to happen when building a house or doing a complex overhaul of the electrical system.

    In fact, when I was considering such a system for a house I was thinking of something like Grenton, Ampio or Loxone.

    Although these systems don't quite appeal to me ot lacking, for example, some cool microwave presence sensors.... ...but I have been doing FMCW radars or more complex ones with MIMO on 24GHz and with such a sensor you could, for example, even divide a room into zones and assign system reactions to the zones, and so on. Nowadays it is even easier to realise something like that since, due to the commonness of radars in Automotive, there are a lot of ready-made radars in one chip, and at 120GHz even such where the whole radar + antennas is in the chip, so there is no need to design your own antennas on a PCB as in the case of 24GHz + the need to use quite expensive Teflon laminates (Rogers etc.).

    I also have an idea of using Home Assistant and my own electronics - but this has a disadvantage as it is unusual and basically if something happens to me there is no chance of servicing as opposed to off-the-shelf systems....

    On the other hand if I'm not mistaken Amio is also based on RB Pi + Debian + Node+Red. Loxone again has a processor inside from Rockchip (RK3328) and here too probably Linux etc.

    In principle, you could make such a module with some CPU on a DIN rail yourself + add I/O of some CAN or RS485 for communication with modules, etc. +. possibly some kind of radio e.g. ZigBee....
📢 Listen (AI):
ADVERTISEMENT