Skip to content

Instantly share code, notes, and snippets.

@patrickdk77
Last active July 16, 2023 14:05
  • Star 11 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
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
@RHeynsZa
Copy link

For anyone looking for the Connex siren, it's the exact same as this device, but without the Temp and Humid sensors. It has 17 chimes, but no volume control

@Bibinsa
Copy link

Bibinsa commented Mar 5, 2021

hmmm spoke too soon, after cycling the power, no sound comes out of it, no matter what commands i send to it, even if i start from the rule1 setting and repeat what i did first time, changing power from off to on does nothing

Hi, did you fix it ?
I just flashed a MCU Product ID: {"p":"ymf4oruxqx0xlogp","v":"1.0.2","m":0} in 9.3.1 with no sound at all...

@chaisaeng
Copy link

hmmm spoke too soon, after cycling the power, no sound comes out of it, no matter what commands i send to it, even if i start from the rule1 setting and repeat what i did first time, changing power from off to on does nothing

Hi, did you fix it ?
I just flashed a MCU Product ID: {"p":"ymf4oruxqx0xlogp","v":"1.0.2","m":0} in 9.3.1 with no sound at all...

Hi, I'm having the same issue. I got rhe same Product ID: {"p":"ymf4oruxqx0xlogp","v":"1.0.2","m":0} and flash it with tuya convert then firmware upgrade to tasmota 9.4.0. There is no sound emited after snding tuyasend command in the console I see the led flashing if TuyaSend4 104,1 enter in the console sending TuyaSend4 104,0 will turn off the flashing led but no sound. are there any solution on making this device work as expect. BTW. I having 2 of the same device and both of then having the same issue no sound.

@chaisaeng
Copy link

hmmm spoke too soon, after cycling the power, no sound comes out of it, no matter what commands i send to it, even if i start from the rule1 setting and repeat what i did first time, changing power from off to on does nothing

Hi, did you fix it ?
I just flashed a MCU Product ID: {"p":"ymf4oruxqx0xlogp","v":"1.0.2","m":0} in 9.3.1 with no sound at all...

Hi, I'm having the same issue. I got rhe same Product ID: {"p":"ymf4oruxqx0xlogp","v":"1.0.2","m":0} and flash it with tuya convert then firmware upgrade to tasmota 9.4.0. There is no sound emited after snding tuyasend command in the console I see the led flashing if TuyaSend4 104,1 enter in the console sending TuyaSend4 104,0 will turn off the flashing led but no sound. are there any solution on making this device work as expect. BTW. I having 2 of the same device and both of then having the same issue no sound.

I have it working without knowing what is the problem. the only thing I did after everything fails is configure mqtt setting on my device to connect to my mqtt server after it restart everything is working like magic. so I'm not sure that this is the real cause of all problem i have or not.

@Bibinsa
Copy link

Bibinsa commented May 23, 2021

hmmm spoke too soon, after cycling the power, no sound comes out of it, no matter what commands i send to it, even if i start from the rule1 setting and repeat what i did first time, changing power from off to on does nothing

Hi, did you fix it ?
I just flashed a MCU Product ID: {"p":"ymf4oruxqx0xlogp","v":"1.0.2","m":0} in 9.3.1 with no sound at all...

Hi, I'm having the same issue. I got rhe same Product ID: {"p":"ymf4oruxqx0xlogp","v":"1.0.2","m":0} and flash it with tuya convert then firmware upgrade to tasmota 9.4.0. There is no sound emited after snding tuyasend command in the console I see the led flashing if TuyaSend4 104,1 enter in the console sending TuyaSend4 104,0 will turn off the flashing led but no sound. are there any solution on making this device work as expect. BTW. I having 2 of the same device and both of then having the same issue no sound.

I have it working without knowing what is the problem. the only thing I did after everything fails is configure mqtt setting on my device to connect to my mqtt server after it restart everything is working like magic. so I'm not sure that this is the real cause of all problem i have or not.

Yes !
You're right !!!
After setting up the MQTT broker, the TuyaSend commands are working.

Good news !

@fribse
Copy link

fribse commented Jul 3, 2021

Hi @patrickdk77
I just got a NEDIS siren, and converted it, and tried out your template, it almost works!
This is great work, thanks!
My only problem is that it looses the selected alarm sound after a reboot.
I've changed the rule to:
rule1 on system#boot backlog tuyasend4 102,11; tuyasend2 103,300; TuyaSend1 117,0 endon
But it still uses alarm sound 0 (which is a doorbell).

I have no idea what you are doing, but it's great :-D
I wonder if it can be converted to ESPHome somehow...

@patrickdk77
Copy link
Author

It can be, just use the esphome tuya module.

I never published any more details on exactly how to set these up with exact instructions cause I killed two of them in the process of making this and didn't bother to buy a 3rd one. So I don't have a way currently to verify my instructions would work if I made them.

These things do not support rechargeable lithium batteries. using 4.2volts fries these things, so you have to stick to the 3.0v batteries.

I assume this is due to the voltage regulator cannot handle 8.4v, but only supports 6v.

@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