Skip to content

Instantly share code, notes, and snippets.

@patrickdk77
Last active August 5, 2024 00:12
Show Gist options
  • Save patrickdk77/b687448fecff68d8572ac79a27d07862 to your computer and use it in GitHub Desktop.
Save patrickdk77/b687448fecff68d8572ac79a27d07862 to your computer and use it in GitHub Desktop.
Template
{"NAME":"Tuya Siren","GPIO":[255,107,255,108,255,255,0,0,255,255,255,255,255],"FLAG":0,"BASE":54}
You must activate the template before using any of the tuya commands below.
Recommended rules for tasmota:
rule1 on system#boot backlog tuyasend4 102,0; tuyasend2 103,300; TuyaSend1 117,0 endon
rule1 1
tuyamcu 11,104
This will set the default alarm length (5min), music (0), volume (0 high), and assign relay1 (power1) to the alarm activation.
The alarm length and music doesn't appear to be retained during power cycles.
0x65 Power State 101
55 aa 03 07 00 05 65 04 00 01 04 7c (on usb power)
55 aa 03 07 00 05 65 04 00 01 00 78 (on battery power, 0=full battery maybe (1/2/3 battery level?)
x66 Change Alarm sound
TuyaSend4 102,0 (0 to 11 on mine, other upto 17)
x67 Change Alarm seconds
TuyaSend2 103,10 (1 to 60 on mine, 1800 on another)
x68 Alarm sounding
TuyaSend4 104,0 (off)
TuyaSend4 104,1 (on)
55 aa 03 07 00 05 68 01 00 01 01 79
55 aa 03 07 00 05 71 01 00 01 00 81
x69 tempature reporting (105)
55 aa 03 07 00 08 69 02 00 04 00 00 00 c3 43 (tempature in C*10)
x6a humidity reporting (106)
55 aa 03 07 00 08 6a 02 00 04 00 00 00 3b bc (59%)
x6b temp alarm low in C
TuyaSend4 107,17
55 aa 00 06 00 08 6b 02 00 04 00 00 00 11 8f
x6c temp alarm high in C
TuyaSend4 108,38
55 aa 00 06 00 08 6c 02 00 04 00 00 00 26 a5
x6d set humidity alarm low
TuyaSend4 109,40
55 aa 00 06 00 08 6d 02 00 04 00 00 00 46 c6 low in percent
x6e set humidity alarm high
TuyaSend4 110,80
55 aa 00 06 00 08 6e 02 00 04 00 00 00 50 d1 high in percent
x6f
x70 Change to C and F units
TuyaSend1 112,1 (on)
55 aa 00 06 00 05 70 01 00 01 01 7d (C)
55 aa 00 06 00 05 70 01 00 01 00 7c (F)
x71 alarm temp on and off
TuyaSend1 113,1 (on)
55 aa 00 06 00 05 71 01 00 01 01 7e (on)
55 aa 00 06 00 05 71 01 00 01 00 7d (off)
x72 humidity alarm on/off
TuyaSend1 114,1 (on)
55 aa 00 06 00 05 72 01 00 01 01 7f (on)
55 aa 00 06 00 05 72 01 00 01 00 7e (off)
x73 alarm temp/humidity triggered
0=high tempature
1=high humidity
2=low tempature
3=low humidity
4=?
5=all normal
55 aa 03 07 00 05 73 04 00 01 02 88 (2 tempature alarm)
55 aa 03 07 00 05 73 04 00 01 03 89 (3 humidity alarm)
55 aa 03 07 00 05 73 04 00 01 05 8b (5 all clear)
x74 Alarm db setting (loudness)
TuyaSend1 117,0 (high)
55 aa 00 06 00 05 74 04 00 01 02 85 Low
55 aa 00 06 00 05 74 04 00 01 01 84 secondary
55 aa 00 06 00 05 74 04 00 01 00 83 High
@fribse
Copy link

fribse commented Jul 4, 2021

Hey @patrickdk77
Tell me about it, burning items because you want to tinker :-D
When you write eg. "55 aa 03 07 00 05 68 01 00 01 01 79" is that the codes sent via the UART?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment