HEIMAN HS2WD-E siren use case - switch #628
Unanswered
remussamoila
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am testing this HEIMAN HS2WD-E siren, that is recognized by Zigbee2MQTT flawlessly.
Unfortunately, the homekit app shows that the Siren is incompatible, showing the battery level and charging state.
In order to use the device, I configured this plugin for homebridge (https://github.com/arachnetech/homebridge-mqttthing) with two switches, one for on and one for off triggering and it is fairly working with this kind of messages*.
Is there any way to alter the configuration in order to use a single switch for starting and stopping the siren?
I am thinking that it should read the warning status and send the appropriate set message.
Also, I thing that the GetOn and GetOnline topics are not the correct ones, but I don't know how to correct them at the moment.
*)
{
"type": "switch",
"name": "SirenON",
"caption": "HEIMAN Siren",
"mqttPubOptions": {
"retain": true
},
"topics": {
"getOn": {
"topic": "zigbee2mqtt/Siren",
"apply": "return JSON.parse(message).alarm ? true : false;"
},
"setOn": {
"topic": "zigbee2mqtt/Siren/set",
"apply": "return JSON.stringify({warning: message == 'emergency' ? {"warning": { "mode": "emergency", "level": "high", "strobe_level": "high", "strobe": true, "strobe_duty_cycle": 10, "duration": 5 }} : {"warning": { "mode": "stop", "strobe": false, "duration": 1 }} })"
},
"getOnline": {
"topic": "zigbee2mqtt/Siren/set",
"apply": "return JSON.parse(message).battery_low ? false : true;"
}
},
"turnOffAfterms": "1",
"manufacturer": "Heiman",
"model": "HS2WD-E",
"firmwareRevision": "2021.2.19",
"accessory": "mqttthing"
},
{
"type": "switch",
"name": "SirenOFF",
"caption": "HEIMAN Siren",
"mqttPubOptions": {
"retain": true
},
"topics": {
"getOn": {
"topic": "zigbee2mqtt/Siren",
"apply": "return JSON.parse(message).alarm ? true : false;"
},
"setOn": {
"topic": "zigbee2mqtt/Siren/set",
"apply": "return JSON.stringify({"warning": { "mode": "stop", "strobe": false, "duration": 1 }})"
},
"getOnline": {
"topic": "zigbee2mqtt/Siren/set",
"apply": "return JSON.parse(message).battery_low ? false : true;"
}
},
"turnOffAfterms": "1",
"manufacturer": "Heiman",
"model": "HS2WD-E",
"firmwareRevision": "2021.2.19",
"accessory": "mqttthing"
}
Beta Was this translation helpful? Give feedback.
All reactions