Skip to content

Instantly share code, notes, and snippets.

@ignisf
Last active May 12, 2023 18:08
Show Gist options
  • Save ignisf/d4374fddc368439d1432ad5e8cf6fd5d to your computer and use it in GitHub Desktop.
Save ignisf/d4374fddc368439d1432ad5e8cf6fd5d to your computer and use it in GitHub Desktop.
Nedis WIFIDS10WT Tasmota Configuration
{"NAME":"Nedis WIFIDS10WT","GPIO":[0,107,0,108,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":54}
Module 54
Backlog TuyaMCU 11,4; TuyaMCU 51,51
Backlog SetOption1 1; SetOption65 1; SetOption66 1
Rule1
ON TuyaReceived#Data=55AA000500056A0400010078 DO publish2 stat/%topic%/FIRE OFF ENDON
ON TuyaReceived#Data=55AA000500056A0400010078 DO publish2 stat/%topic%/TEST OFF ENDON
ON TuyaReceived#Data=55AA000500056A0400010078 DO publish2 stat/%topic%/BATTERY OFF ENDON
ON TuyaReceived#Data=55AA000500056A0400010078 DO publish2 stat/%topic%/MUTE OFF ENDON
ON TuyaReceived#Data=55AA000500056A0400010179 DO publish2 stat/%topic%/FIRE ON ENDON
ON TuyaReceived#Data=55AA000500056A0400010179 DO publish2 stat/%topic%/MUTE OFF ENDON
ON TuyaReceived#Data=55AA000500056A040001027A DO publish2 stat/%topic%/FIRE ON ENDON
ON TuyaReceived#Data=55AA000500056A040001027A DO publish2 stat/%topic%/MUTE ON ENDON
ON TuyaReceived#Data=55AA000500056A040001037B DO publish2 stat/%topic%/FIRE ON ENDON
ON TuyaReceived#Data=55AA000500056A040001037B DO publish2 stat/%topic%/TEST ON ENDON
ON TuyaReceived#Data=55AA000500056A040001037B DO publish2 stat/%topic%/MUTE OFF ENDON
ON TuyaReceived#Data=55AA000500056A040001047C DO publish2 stat/%topic%/BATTERY ON ENDON
Rule2
ON system#boot do publish2 homeassistant/binary_sensor/%macaddr%_fire/config {"name":"Office Fire Alarm","state_topic":"stat/%topic%/FIRE","device_class":"smoke","unique_id":"%macaddr%_fire","device":{"connections":[["mac","%macaddr%"]]}} ENDON
ON system#boot do publish2 homeassistant/binary_sensor/%macaddr%_test/config {"name":"Office Fire Alarm Test","state_topic":"stat/%topic%/TEST","icon":"mdi:bell-alert","unique_id":"%macaddr%_test","device":{"connections":[["mac","%macaddr%"]]}} ENDON
ON system#boot do publish2 homeassistant/binary_sensor/%macaddr%_mute/config {"name":"Office Fire Alarm Mute","state_topic":"stat/%topic%/MUTE","icon":"mdi:bell-sleep","unique_id":"%macaddr%_mute","device":{"connections":[["mac","%macaddr%"]]}} ENDON
ON system#boot do publish2 homeassistant/binary_sensor/%macaddr%_battery/config {"name":"Office Fire Alarm Battery","state_topic":"stat/%topic%/BATTERY","device_class":"battery","unique_id":"%macaddr%_battery","device":{"connections":[["mac","%macaddr%"]]}} ENDON
@PaulUitWijchen
Copy link

hi Ignisf,

I have the very same smoke detector flashed in the same way as you and loaded with the same settings as you show at the top of this message. And in HA I do see the topics appear. But rather than the values as you show in the screen shot: "Battery: Normal"; "Fire Alarm: Clear" etc, I have 'Unknown' for all of these values.

If I look in the MQTT exporer, I don't see regular updates from the smoke detector. I guess I should see regular stat/ messages come by, right?

-- Paul

@ignisf
Copy link
Author

ignisf commented May 11, 2023

Hi @PaulUitWijchen, the device works kind of odd like that. The wifi module stays off by default.

It gets turned on when:

  1. there's smoke detected (duh)
  2. when the test button is held (it emits the test message)
  3. when you hit the test button 3 times in one second (this should trigger pairing mode with the original firmware, however pairing is not necessary when you've flashed tasmota)
  4. periodically when low battery is detected (with the relevant low battery message)
  5. weekly to report its condition is normal (with a generic no fire detected message)

When the wifi module gets turned on, the other MCU on the smoke detector sends a message to it using the Tuya protocol. The rules above get triggered only when such a message is received. In other words, try to trigger the test functionality and listen in on your MQTT topic and see what comes in. You will not receive any status updates otherwise.

@ignisf
Copy link
Author

ignisf commented May 11, 2023

Oh and also you should be able to see the raw tuya messages by listening to the tele/%topic%/RESULT topic

@PaulUitWijchen
Copy link

thanks for the reply.
I flash the device again and reloaded the software. If I press the test button then I see in HA a report of the SSID, address and that sort of things, until the red light dims. Still the other Fire Alarm, Battery remains unknown.
In MQTT Exporer I see tele/tasmota_nnn/INFO1 2 and 3 and then
tele/tasmota_313159/STATE, but no result.
So if I press the button, shhould it then also send this message? Or only weekly?
-- Paul

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