Zigbee2mqtt and Bosch smoke detector

Why to use the expensive Bosch smoke detector?

The big advantage is its very loud siren which can be switch on and off by mqtt commands.

Therefore, I am using one Bosch sensor in a central location in my house. In my rooms I am using less expensive shelly smoke detectors which have a much more silent siren, but in case of an alarm they also trigger the siren of my Bosch smoke detector.

The siren can also be used as a burglary alarm.

The first connection with zigbee2mqtt asks for an installation code. Check the zigbee2mqtt documentation for more information.

[{"id":"3d518d69e922f144","type":"tab","label":"Bosch-smoke-sensor","disabled":false,"info":"","env":[]},{"id":"96a5fbe85bd3cabd","type":"junction","z":"3d518d69e922f144","x":720,"y":200,"wires":[["4a2f63cbf3a6a3f9"]]},{"id":"4a2f63cbf3a6a3f9","type":"junction","z":"3d518d69e922f144","x":1160,"y":200,"wires":[["e68036332bcaade5","dec16daf01cca23f","e7f9e925e367134b","1e6b08f9a19597c2"]]},{"id":"15be0cf19534c54c","type":"junction","z":"3d518d69e922f144","x":720,"y":240,"wires":[["d4bfbc6689f65084"]]},{"id":"28ce7d81bba1d4ac","type":"junction","z":"3d518d69e922f144","x":720,"y":320,"wires":[["78603ff88fac3fd5"]]},{"id":"78603ff88fac3fd5","type":"junction","z":"3d518d69e922f144","x":960,"y":320,"wires":[["dd43fef657ef5b27"]]},{"id":"7a4d6b2ee76a26e0","type":"junction","z":"3d518d69e922f144","x":720,"y":400,"wires":[["f7f0d39f7350593f"]]},{"id":"81738108d75b8862","type":"junction","z":"3d518d69e922f144","x":720,"y":520,"wires":[["14d0baa5081f4d2c"]]},{"id":"dfd79d3f89f30525","type":"junction","z":"3d518d69e922f144","x":720,"y":560,"wires":[["26cc8e85ea31dfcf"]]},{"id":"ae22f634321856c7","type":"junction","z":"3d518d69e922f144","x":720,"y":600,"wires":[["037c38e388b63015"]]},{"id":"bed1556dd9e29f02","type":"junction","z":"3d518d69e922f144","x":720,"y":280,"wires":[["0f2f146a67966493"]]},{"id":"26cc8e85ea31dfcf","type":"junction","z":"3d518d69e922f144","x":960,"y":560,"wires":[["3f02495348bb168f"]]},{"id":"dfbd2348dd743619","type":"junction","z":"3d518d69e922f144","x":1920,"y":500,"wires":[["8b15bc4f1be6cb86"]]},{"id":"8073f9b82045a303","type":"junction","z":"3d518d69e922f144","x":1520,"y":500,"wires":[["dfbd2348dd743619"]]},{"id":"8b213f12ade5763b","type":"junction","z":"3d518d69e922f144","x":420,"y":60,"wires":[["97975615c1b2837d"]]},{"id":"eff5a3128101b5d6","type":"junction","z":"3d518d69e922f144","x":720,"y":480,"wires":[["664feb16cb36c861"]]},{"id":"23ae03272d85dc7e","type":"junction","z":"3d518d69e922f144","x":720,"y":360,"wires":[["b5dde99938c0da16"]]},{"id":"adebc4a6a1b64bf5","type":"junction","z":"3d518d69e922f144","x":720,"y":120,"wires":[["ed877f0d9e4e03ee"]]},{"id":"cec6d80f6a049954","type":"junction","z":"3d518d69e922f144","x":720,"y":160,"wires":[["807daf54f4baaee4"]]},{"id":"e7f9e925e367134b","type":"junction","z":"3d518d69e922f144","x":1240,"y":180,"wires":[["7a9cf4b02e339c5c"]]},{"id":"d0670209f2b6af76","type":"mqtt in","z":"3d518d69e922f144","name":"","topic":"zigbee2mqtt/Bosch-smoke-sensor","qos":"0","datatype":"json","broker":"17af2080.ef347f","nl":false,"rap":true,"rh":0,"inputs":0,"x":180,"y":360,"wires":[["aea751661cd8dcac","8f9819750b94d717","8b213f12ade5763b"]]},{"id":"2de59d42b2a7d4d5","type":"debug","z":"3d518d69e922f144","name":"ac_status","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":780,"y":120,"wires":[]},{"id":"eca2259565a74254","type":"debug","z":"3d518d69e922f144","name":"tamper","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":780,"y":520,"wires":[]},{"id":"80c735ff11090ae3","type":"debug","z":"3d518d69e922f144","name":"supervision_reports","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":810,"y":480,"wires":[]},{"id":"00cd6c7141f9a7f3","type":"debug","z":"3d518d69e922f144","name":"restore_reports","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":800,"y":360,"wires":[]},{"id":"51b2406532eedfe3","type":"debug","z":"3d518d69e922f144","name":"linkquality","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":780,"y":320,"wires":[]},{"id":"d0bbf55543fe3a4b","type":"debug","z":"3d518d69e922f144","name":"battery_low","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":790,"y":280,"wires":[]},{"id":"235d930f69fc05b7","type":"debug","z":"3d518d69e922f144","name":"battery_defect","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":800,"y":240,"wires":[]},{"id":"9d05224614d5bad3","type":"debug","z":"3d518d69e922f144","name":"battery","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":770,"y":200,"wires":[]},{"id":"a4e06254f03d38c1","type":"debug","z":"3d518d69e922f144","name":"trouble","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":770,"y":600,"wires":[]},{"id":"0f53ef2b83b3e97b","type":"debug","z":"3d518d69e922f144","name":"test","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":770,"y":560,"wires":[]},{"id":"26c1bdc0399a5261","type":"mqtt out","z":"3d518d69e922f144","name":"","topic":"zigbee2mqtt/Bosch-smoke-sensor/set","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"17af2080.ef347f","x":1470,"y":840,"wires":[]},{"id":"aea751661cd8dcac","type":"function","z":"3d518d69e922f144","name":"function 13","func":"let p = msg.payload\n\nreturn [\n    {payload : p.ac_status},\n    {payload : p.alarm_state},\n    {payload : p.battery},\n    {payload : p.battery_defect},\n    {payload : p.battery_low},\n    {payload : p.linkquality},\n    {payload : p.restore_reports},\n    {payload : p.smoke},\n    {payload : p.supervision_reports},\n    {payload : p.tamper},\n    {payload : p.test},\n    {payload : p.trouble}\n    ];","outputs":12,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":490,"y":360,"wires":[["2de59d42b2a7d4d5","adebc4a6a1b64bf5"],["e762c443835b8b54","cec6d80f6a049954"],["9d05224614d5bad3","96a5fbe85bd3cabd"],["235d930f69fc05b7","15be0cf19534c54c"],["d0bbf55543fe3a4b","bed1556dd9e29f02"],["51b2406532eedfe3","28ce7d81bba1d4ac"],["00cd6c7141f9a7f3","23ae03272d85dc7e"],["1ed8b4fe86a13841","7a4d6b2ee76a26e0","75609095521fe98c"],["80c735ff11090ae3","eff5a3128101b5d6"],["eca2259565a74254","81738108d75b8862"],["dfd79d3f89f30525","0f53ef2b83b3e97b"],["a4e06254f03d38c1","ae22f634321856c7"]],"outputLabels":["ac_status","battery","battery_defect","battery_low","linkquality","restore_reports","smoke","supervision_reports","tamper","test","trouble","intruder_alarm_state"]},{"id":"b37336bf29a5dd8a","type":"inject","z":"3d518d69e922f144","name":"{\"smoke_alarm_state\":\"ON\"}","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"smoke_alarm_state\":\"ON\"}","payloadType":"json","x":220,"y":780,"wires":[["066fc786598661bd"]]},{"id":"d8285aebe16556a3","type":"inject","z":"3d518d69e922f144","name":"{\"smoke_alarm_state\":\"OFF\"}","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"smoke_alarm_state\":\"OFF\"}","payloadType":"json","x":220,"y":820,"wires":[["066fc786598661bd"]]},{"id":"8f9819750b94d717","type":"debug","z":"3d518d69e922f144","name":"Bosch Sensor","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":500,"y":220,"wires":[]},{"id":"d4bfbc6689f65084","type":"ui_text","z":"3d518d69e922f144","group":"1fb35d5bf758ded1","order":7,"width":0,"height":0,"name":"","label":"Battery-Defekt:","format":"{{msg.payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1120,"y":240,"wires":[]},{"id":"0f2f146a67966493","type":"ui_text","z":"3d518d69e922f144","group":"1fb35d5bf758ded1","order":6,"width":0,"height":0,"name":"","label":"Battery low:","format":"{{msg.payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1110,"y":280,"wires":[]},{"id":"e68036332bcaade5","type":"range","z":"3d518d69e922f144","minin":"0","maxin":"100","minout":"0","maxout":"3","action":"scale","round":false,"property":"payload","name":"volt","x":1290,"y":220,"wires":[["406c114d34f06097"]]},{"id":"183fb6e74e85f6af","type":"ui_text","z":"3d518d69e922f144","group":"1fb35d5bf758ded1","order":4,"width":0,"height":0,"name":"","label":"battery:","format":"{{msg.payload}} Volt","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1620,"y":220,"wires":[]},{"id":"14d0baa5081f4d2c","type":"ui_text","z":"3d518d69e922f144","group":"1fb35d5bf758ded1","order":13,"width":0,"height":0,"name":"","label":"Tamper:","format":"{{msg.payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1100,"y":520,"wires":[]},{"id":"e7d6554f50247b70","type":"ui_text","z":"3d518d69e922f144","group":"1fb35d5bf758ded1","order":8,"width":0,"height":0,"name":"","label":"Test:","format":"{{msg.payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1670,"y":540,"wires":[]},{"id":"037c38e388b63015","type":"ui_text","z":"3d518d69e922f144","group":"1fb35d5bf758ded1","order":14,"width":0,"height":0,"name":"","label":"Trouble:","format":"{{msg.payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1100,"y":600,"wires":[]},{"id":"dec16daf01cca23f","type":"ui_gauge","z":"3d518d69e922f144","name":"","group":"1fb35d5bf758ded1","order":3,"width":0,"height":0,"gtype":"gage","title":"battery:","label":"%","format":"{{msg.payload}}","min":0,"max":"100","colors":["#ee1721","#e6e600","#35f50f"],"seg1":"33","seg2":"66","diff":false,"className":"","x":1300,"y":180,"wires":[]},{"id":"df6586cb4cf7dbbd","type":"ui_gauge","z":"3d518d69e922f144","name":"","group":"1fb35d5bf758ded1","order":1,"width":0,"height":0,"gtype":"gage","title":"Linkquality","label":"%","format":"{{value}}","min":0,"max":"100","colors":["#f50a45","#e6e600","#17fb13"],"seg1":"","seg2":"","diff":false,"className":"","x":1250,"y":320,"wires":[]},{"id":"dd43fef657ef5b27","type":"range","z":"3d518d69e922f144","minin":"0","maxin":"255","minout":"0","maxout":"100","action":"scale","round":true,"property":"payload","name":"","x":1100,"y":320,"wires":[["df6586cb4cf7dbbd"]]},{"id":"8a6195cd5380c457","type":"mqtt out","z":"3d518d69e922f144","name":"","topic":"Bosch-Smoke-Sensor-Smoke-Alarm","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"17af2080.ef347f","x":1430,"y":400,"wires":[]},{"id":"087dbd4b4a4aca63","type":"switch","z":"3d518d69e922f144","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":1210,"y":400,"wires":[["8a6195cd5380c457"]]},{"id":"e182de7172cab350","type":"mqtt in","z":"3d518d69e922f144","name":"","topic":"Bosch-Smoke-Sensor-Alarm-set","qos":"0","datatype":"json","broker":"17af2080.ef347f","nl":false,"rap":true,"rh":0,"inputs":0,"x":1170,"y":840,"wires":[["26c1bdc0399a5261"]]},{"id":"066fc786598661bd","type":"mqtt out","z":"3d518d69e922f144","name":"","topic":"Bosch-Smoke-Sensor-Alarm-set","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"17af2080.ef347f","x":570,"y":840,"wires":[]},{"id":"a2fbb0daefc89910","type":"inject","z":"3d518d69e922f144","name":"{\"intruder_alarm_state\":\"\"}","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"{\"intruder_alarm_state\": \"\"}","payloadType":"json","x":230,"y":920,"wires":[["669749011e23f806"]]},{"id":"e762c443835b8b54","type":"debug","z":"3d518d69e922f144","name":"intruder_alarm_state","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":820,"y":160,"wires":[]},{"id":"b028c79794f5663e","type":"inject","z":"3d518d69e922f144","name":"{\"intruder_alarm_state\":\"OFF\"}","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"alarm_state\": \"OFF\"}","payloadType":"json","x":220,"y":880,"wires":[["066fc786598661bd"]]},{"id":"22e24b6a0f4b62b5","type":"mqtt out","z":"3d518d69e922f144","name":"","topic":"zigbee2mqtt/Bosch-smoke-sensor/get","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"17af2080.ef347f","x":1470,"y":900,"wires":[]},{"id":"2073ece14ec9013a","type":"mqtt in","z":"3d518d69e922f144","name":"","topic":"Bosch-Smoke-Sensor-Alarm-get","qos":"0","datatype":"json","broker":"17af2080.ef347f","nl":false,"rap":true,"rh":0,"inputs":0,"x":1170,"y":900,"wires":[["22e24b6a0f4b62b5"]]},{"id":"669749011e23f806","type":"mqtt out","z":"3d518d69e922f144","name":"","topic":"Bosch-Smoke-Sensor-Alarm-get","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"17af2080.ef347f","x":570,"y":900,"wires":[]},{"id":"3c81a30939ecbd47","type":"function","z":"3d518d69e922f144","name":"function 14","func":"msg.payload = msg.time + \" : \" + \"Rauchmelder Flur-DG Batterie: \" + flow.get('battery_v')  + \" Volt = \" + flow.get('battery_p') + \"%\";\nnode.status({ fill: \"green\", shape: \"dot\", text: msg.payload});\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1850,"y":140,"wires":[["8b15bc4f1be6cb86"]]},{"id":"61fcc4c9c74127c0","type":"change","z":"3d518d69e922f144","name":"HH:mm:ss DD-MM-YYYY","rules":[{"t":"set","p":"time","pt":"msg","to":"$moment().tz(\"Europe/Berlin\").format(\"HH:mm:ss DD-MM-YYYY\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1470,"y":140,"wires":[["eddc92f5aa4dc7de"]]},{"id":"8b15bc4f1be6cb86","type":"mqtt out","z":"3d518d69e922f144","name":"","topic":"send-to-Telegram","qos":"0","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"17af2080.ef347f","x":2090,"y":280,"wires":[]},{"id":"7a9cf4b02e339c5c","type":"change","z":"3d518d69e922f144","name":"","rules":[{"t":"set","p":"battery_p","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1480,"y":180,"wires":[[]]},{"id":"406c114d34f06097","type":"change","z":"3d518d69e922f144","name":"","rules":[{"t":"set","p":"battery_v","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1450,"y":220,"wires":[["183fb6e74e85f6af"]]},{"id":"eddc92f5aa4dc7de","type":"delay","z":"3d518d69e922f144","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1680,"y":140,"wires":[["3c81a30939ecbd47"]]},{"id":"f7f0d39f7350593f","type":"rbe","z":"3d518d69e922f144","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload.smoke","topi":"topic","x":1090,"y":400,"wires":[["087dbd4b4a4aca63"]]},{"id":"3f02495348bb168f","type":"switch","z":"3d518d69e922f144","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":1090,"y":560,"wires":[["7918b44286114dc0"],[]]},{"id":"7918b44286114dc0","type":"change","z":"3d518d69e922f144","name":"HH:mm:ss","rules":[{"t":"set","p":"time","pt":"msg","to":"$moment().tz(\"Europe/Berlin\").format(\"HH:mm:ss\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1250,"y":540,"wires":[["6f0750eaf091b883"]]},{"id":"6f0750eaf091b883","type":"function","z":"3d518d69e922f144","name":"function 15","func":"msg.payload = msg.time + \": \" + \"Rauchmeldertest DG-Flur durchgeführt\"\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1410,"y":540,"wires":[["e7d6554f50247b70","ed0469eca297280f","8073f9b82045a303"]]},{"id":"ed0469eca297280f","type":"delay","z":"3d518d69e922f144","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1300,"y":580,"wires":[["3949adc80418e8b0"]]},{"id":"3949adc80418e8b0","type":"function","z":"3d518d69e922f144","name":"function 16","func":"return{payload: false};","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1490,"y":580,"wires":[["e7d6554f50247b70"]]},{"id":"97975615c1b2837d","type":"change","z":"3d518d69e922f144","name":"HH:mm:ss DD-MM-YYYY","rules":[{"t":"set","p":"time","pt":"msg","to":"$moment().tz(\"Europe/Berlin\").format(\"HH:mm:ss DD-MM-YYYY\")","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":60,"wires":[["a5f8b9344c359715"]]},{"id":"a5f8b9344c359715","type":"function","z":"3d518d69e922f144","name":"function 17","func":"msg.payload = msg.time;\nnode.status({ fill: \"green\", shape: \"dot\", text: msg.time });\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1030,"y":60,"wires":[["3ca4fb8bf03ea462","306abb5463c6e73b"]]},{"id":"3ca4fb8bf03ea462","type":"ui_text","z":"3d518d69e922f144","group":"1fb35d5bf758ded1","order":15,"width":0,"height":0,"name":"","label":"update um:","format":"{{msg.payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1230,"y":80,"wires":[]},{"id":"1dce2b26d3218fd3","type":"function","z":"3d518d69e922f144","name":"init","func":"return null;","outputs":1,"timeout":0,"noerr":0,"initialize":"// Der Code hier wird ausgeführt,\n// wenn der Node gestartet wird\nnode.send({payload:false});","finalize":"","libs":[],"x":1510,"y":620,"wires":[["e7d6554f50247b70"]]},{"id":"1e6b08f9a19597c2","type":"rbe","z":"3d518d69e922f144","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":1290,"y":140,"wires":[["61fcc4c9c74127c0"]]},{"id":"664feb16cb36c861","type":"ui_text","z":"3d518d69e922f144","group":"1fb35d5bf758ded1","order":12,"width":0,"height":0,"name":"","label":"supervision report:","format":"{{msg.payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1130,"y":480,"wires":[]},{"id":"b5dde99938c0da16","type":"ui_text","z":"3d518d69e922f144","group":"1fb35d5bf758ded1","order":11,"width":0,"height":0,"name":"","label":"restore reports:","format":"{{msg.payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1120,"y":360,"wires":[]},{"id":"ed877f0d9e4e03ee","type":"ui_text","z":"3d518d69e922f144","group":"1fb35d5bf758ded1","order":9,"width":0,"height":0,"name":"","label":"ac_Status:","format":"{{msg.payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":970,"y":120,"wires":[]},{"id":"807daf54f4baaee4","type":"ui_text","z":"3d518d69e922f144","group":"1fb35d5bf758ded1","order":10,"width":0,"height":0,"name":"","label":"intruder_alarm_state:","format":"{{msg.payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1060,"y":160,"wires":[]},{"id":"7bc0a9fee3dfd1c1","type":"ui_text","z":"3d518d69e922f144","group":"1fb35d5bf758ded1","order":2,"width":0,"height":0,"name":"alarm","label":"{{topic}}","format":"<font color = {{msg.color}}>{{msg.payload}}{{msg.bild}}</font>","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#fb2d2d","x":1090,"y":440,"wires":[]},{"id":"1ed8b4fe86a13841","type":"function","z":"3d518d69e922f144","name":"alarm","func":"if (msg.payload === true){\n    msg.payload = \"Alarm!!! smoke detected&nbsp&nbsp&nbsp\";\n    msg.color = \"#FF3030\";\n    msg.topic = \"\"\n    msg.bild = '<i class=\"fa fa-fire-extinguisher\" aria-hidden=\"true\"></i>';\n}\nelse{\n    msg.payload = \"no smoke detected&nbsp&nbsp&nbsp\";\n    msg.color = \"green\";\n    msg.topic = \"\";\n    msg.bild = '<i class=\"fa fa-check-circle\" aria-hidden=\"true\"></i>';\n}\n//msg.payload = msg.payload.params[\"smoke:0\"].alarm;\nreturn { className: \"alarm\", color:msg.color, topic:msg.topic, payload: msg.payload, bild: msg.bild};","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":440,"wires":[["7bc0a9fee3dfd1c1"]]},{"id":"543415fe872beaf3","type":"function","z":"3d518d69e922f144","name":"init alarm","func":"return null;","outputs":1,"timeout":0,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is started.\nnode.send({ className: \"alarm\", color: \"green\", topic: \"\", payload: \"no smoke detected&nbsp&nbsp&nbsp\", bild: '<i class=\"fa fa-check-circle\" aria-hidden=\"true\"></i>' });","finalize":"","libs":[],"x":920,"y":420,"wires":[["7bc0a9fee3dfd1c1"]]},{"id":"1fd88df573b82846","type":"ui_template","z":"3d518d69e922f144","group":"696818e9f361e593","name":"Custom Styling alarm background","order":1,"width":"0","height":"0","format":"<style>\n.nr-dashboard-text.alarm{\n    background-color: #e0e0eb !important ;\n    color:black !important;\n}\n.nr-dashboard-switch {\n        background-color:#e0e0eb !important;\n        color:black !important;\n}\n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"global","className":"","x":180,"y":60,"wires":[[]]},{"id":"306abb5463c6e73b","type":"ui_text","z":"3d518d69e922f144","group":"1fb35d5bf758ded1","order":5,"width":0,"height":0,"name":"","label":"wakeup:","format":"{{msg.payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1220,"y":40,"wires":[]},{"id":"75609095521fe98c","type":"debug","z":"3d518d69e922f144","name":"Alarm","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":770,"y":400,"wires":[]},{"id":"17af2080.ef347f","type":"mqtt-broker","broker":"10.0.0.43","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"1fb35d5bf758ded1","type":"ui_group","name":"Bosch SD 2  DGFL","tab":"641485e31be3afd3","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"696818e9f361e593","type":"ui_group","name":"Demo-3","tab":"355ca3bb331997b3","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"641485e31be3afd3","type":"ui_tab","name":"Home-Smoke-Sensors","icon":"dashboard","order":6,"disabled":false,"hidden":false},{"id":"355ca3bb331997b3","type":"ui_tab","name":"Demo","icon":"dashboard","order":3,"disabled":false,"hidden":false}]
2 Likes

wonderful!I had programed with zigbee and use CC2530 cpu at 2013year .zigbee have low-power dissipation.
zigbee can send message through mqtt and maybe need router node zigbee device ?

Have a look at zigbee2mqtt

FYI - I have a couple of Woox R7049 smoke detectors, bought them for €20 a piece, can also control the siren using z2m. Not sure how long they will last (smoke detectors have limited lifetimes)

1 Like

These woox detectors look very similar to the Bosch detector.
And the detectors are 10€ cheaper. :+1: