Alarme controlado pelo Node-Red!

Olá Pessoal! Quero deixar aqui um simples tutorial de como adicionar um alarme controlado pelo node-red.

Primeiramente tem que ser adicionado no configuration.yaml

alarm_control_panel:
  - platform: manual
    name: Home Alarm
    code: !secret senha_alarme
    arming_time: 0
    delay_time: 0
    trigger_time: 120
    disarmed:
      trigger_time: 0
    armed_home:
      arming_time: 0
      delay_time: 0
    armed_night:
      arming_time: 0
      delay_time: 0
    armed_away:
      arming_time: 0
      delay_time: 0


Na foto acima mostra os nó que seram editados.


Depois editem cada subflows

[{"id":"ea04d4f7.0dfb58","type":"subflow","name":"Alarme Triggers Away (2)","info":"","category":"","in":[],"out":[{"x":440,"y":40,"wires":[{"id":"db3f730d.2f8c","port":0},{"id":"c6e75db0.5724d","port":0},{"id":"328fb05f.7c90c","port":0},{"id":"4fcc673b.90b328","port":0},{"id":"129573c1.555bac","port":0},{"id":"c0294268.c3823","port":0}]}],"env":[],"meta":{},"color":"#DDAA99","status":{"x":460,"y":240,"wires":[{"id":"db3f730d.2f8c","port":0},{"id":"c6e75db0.5724d","port":0},{"id":"db3f730d.2f8c","port":1},{"id":"c6e75db0.5724d","port":1},{"id":"328fb05f.7c90c","port":0},{"id":"328fb05f.7c90c","port":1},{"id":"4fcc673b.90b328","port":0},{"id":"4fcc673b.90b328","port":1},{"id":"129573c1.555bac","port":0},{"id":"129573c1.555bac","port":1},{"id":"c0294268.c3823","port":0},{"id":"c0294268.c3823","port":1}]}},{"id":"db3f730d.2f8c","type":"server-state-changed","z":"ea04d4f7.0dfb58","name":"Sala P","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.0x00158d000444c096_contact","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":190,"y":80,"wires":[[],[]]},{"id":"c6e75db0.5724d","type":"server-state-changed","z":"ea04d4f7.0dfb58","name":"Cozinha P","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.0x00158d000346bb18_contact","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":200,"y":140,"wires":[[],[]]},{"id":"328fb05f.7c90c","type":"server-state-changed","z":"ea04d4f7.0dfb58","name":"Garagem P","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.0x00158d00040e1b96_contact","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":210,"y":200,"wires":[[],[]]},{"id":"c0294268.c3823","type":"server-state-changed","z":"ea04d4f7.0dfb58","name":"Sala M","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.0x00158d00033a41bc_occupancy","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":210,"y":380,"wires":[[],[]]},{"id":"129573c1.555bac","type":"server-state-changed","z":"ea04d4f7.0dfb58","name":"Cozinha M","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.0x00158d00045f6e89_occupancy","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":200,"y":320,"wires":[[],[]]},{"id":"4fcc673b.90b328","type":"server-state-changed","z":"ea04d4f7.0dfb58","name":"Garagem M","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.0x00158d00045cccd6_occupancy","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":210,"y":260,"wires":[[],[]]},{"id":"16260dda.ee62c2","type":"subflow","name":"Alarme Armado Away? (2)","info":"","category":"","in":[{"x":60,"y":340,"wires":[{"id":"1ff1a086.3143df"},{"id":"4e30f67f.c0d7f8"}]}],"out":[{"x":440,"y":300,"wires":[{"id":"1ff1a086.3143df","port":0}]}],"env":[],"meta":{},"color":"#DDAA99","status":{"x":500,"y":160,"wires":[{"id":"d8715710.c10008","port":0},{"id":"cfcf8410.ce5158","port":0},{"id":"d1727b8d.c7d448","port":0},{"id":"a0c5317d.50bde","port":0},{"id":"1ff1a086.3143df","port":0}]}},{"id":"1ff1a086.3143df","type":"api-current-state","z":"16260dda.ee62c2","name":"Alarm Armed Away?","server":"","version":2,"outputs":2,"halt_if":"armed_away","halt_if_type":"str","halt_if_compare":"is","entity_id":"alarm_control_panel.home_alarm","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":220,"y":320,"wires":[[],[]]},{"id":"d8715710.c10008","type":"poll-state","z":"16260dda.ee62c2","name":"Disarmed?","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":true,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","halt_if":"disarmed","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":200,"y":200,"wires":[[],[]]},{"id":"cfcf8410.ce5158","type":"poll-state","z":"16260dda.ee62c2","name":"Armed Away?","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":true,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","halt_if":"armed_away","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":210,"y":160,"wires":[[],[]]},{"id":"d1727b8d.c7d448","type":"poll-state","z":"16260dda.ee62c2","name":"Armed Home?","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":true,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","halt_if":"armed_home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":210,"y":120,"wires":[[],[]]},{"id":"a0c5317d.50bde","type":"poll-state","z":"16260dda.ee62c2","name":"Disarmed?","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":true,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","halt_if":"disarmed","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":200,"y":80,"wires":[[],[]]},{"id":"4e30f67f.c0d7f8","type":"debug","z":"16260dda.ee62c2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":190,"y":400,"wires":[]},{"id":"ed0ba5cd.8184d8","type":"subflow","name":"Cameras (2)","info":"","category":"","in":[{"x":40,"y":180,"wires":[{"id":"d140171a.8bbd38"},{"id":"8015e638.73e9c8"},{"id":"1d43abf3.d3cff4"},{"id":"36a7b423.92654c"},{"id":"fb77efa6.89232"},{"id":"330b4a3.78ab4b6"}]}],"out":[],"env":[],"meta":{},"color":"#DDAA99"},{"id":"125eb1fa.43a46e","type":"telegrambot-payload","z":"ed0ba5cd.8184d8","name":"TELEGRAM","bot":"","chatId":"","sendMethod":"sendPhoto","payload":"{\n    \"photo\" : \"/config/www/imgs/cameras/Sala.jpg\",\n    \"caption\" : \"SALA\"\n}","x":750,"y":140,"wires":[[]]},{"id":"d140171a.8bbd38","type":"api-call-service","z":"ed0ba5cd.8184d8","name":"Sala","server":"","version":3,"debugenabled":false,"service_domain":"camera","service":"snapshot","entityId":"camera.camera_da_sala_mainstream","data":"{\"filename\":\"/config/www/imgs/cameras/Sala.jpg\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"sala","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":430,"y":140,"wires":[["87a06c89.f5b73"]]},{"id":"87a06c89.f5b73","type":"delay","z":"ed0ba5cd.8184d8","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":580,"y":140,"wires":[["125eb1fa.43a46e"]]},{"id":"1c4c3896.3c8467","type":"telegrambot-payload","z":"ed0ba5cd.8184d8","name":"TELEGRAM","bot":"","chatId":"","sendMethod":"sendPhoto","payload":"{\n    \"photo\" : \"/config/www/imgs/cameras/Cozinha.jpg\",\n    \"caption\" : \"COZINHA\"\n}","x":750,"y":200,"wires":[[]]},{"id":"8015e638.73e9c8","type":"api-call-service","z":"ed0ba5cd.8184d8","name":"Cozinha","server":"","version":3,"debugenabled":false,"service_domain":"camera","service":"snapshot","entityId":"camera.camera_da_cozinha_mainstream","data":"{\"filename\":\"/config/www/imgs/cameras/Cozinha.jpg\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":440,"y":200,"wires":[["a26dd07c.c613d"]]},{"id":"a26dd07c.c613d","type":"delay","z":"ed0ba5cd.8184d8","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":580,"y":200,"wires":[["1c4c3896.3c8467"]]},{"id":"d3add6fc.ada708","type":"telegrambot-payload","z":"ed0ba5cd.8184d8","name":"TELEGRAM","bot":"","chatId":"","sendMethod":"sendPhoto","payload":"{\n    \"photo\" : \"/config/www/imgs/cameras/Garagem.jpg\",\n    \"caption\" : \"GARAGEM\"\n}","x":750,"y":260,"wires":[[]]},{"id":"1d43abf3.d3cff4","type":"api-call-service","z":"ed0ba5cd.8184d8","name":"Garagem","server":"","version":3,"debugenabled":false,"service_domain":"camera","service":"snapshot","entityId":"camera.camera_da_garagem_mainstream","data":"{\"filename\":\"/config/www/imgs/cameras/Garagem.jpg\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":440,"y":260,"wires":[["5ac75328.f7cb4c"]]},{"id":"5ac75328.f7cb4c","type":"delay","z":"ed0ba5cd.8184d8","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":580,"y":260,"wires":[["d3add6fc.ada708"]]},{"id":"7d047275.844e7c","type":"telegrambot-payload","z":"ed0ba5cd.8184d8","name":"TELEGRAM","bot":"","chatId":"","sendMethod":"sendVideo","payload":"{\n    \"video\" : \"/config/www/imgs/cameras/Sala.mp4\",\n    \"caption\" : \"SALA\"\n}","x":730,"y":360,"wires":[[]]},{"id":"36a7b423.92654c","type":"api-call-service","z":"ed0ba5cd.8184d8","name":"Sala","server":"","version":3,"debugenabled":false,"service_domain":"camera","service":"record","entityId":"camera.camera_da_sala_mainstream","data":"{\"filename\":\"/config/www/imgs/cameras/Sala.mp4\",\"duration\":\"15\",\"lookback\":\"15\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":430,"y":360,"wires":[["43579812.a59f98"]]},{"id":"43579812.a59f98","type":"delay","z":"ed0ba5cd.8184d8","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":560,"y":360,"wires":[["7d047275.844e7c"]]},{"id":"6b622e3d.b90f9","type":"telegrambot-payload","z":"ed0ba5cd.8184d8","name":"TELEGRAM","bot":"","chatId":"","sendMethod":"sendVideo","payload":"{\n    \"video\" : \"/config/www/imgs/cameras/Cozinha.mp4\",\n    \"caption\" : \"COZINHA\"\n}","x":730,"y":420,"wires":[[]]},{"id":"fb77efa6.89232","type":"api-call-service","z":"ed0ba5cd.8184d8","name":"Cozinha","server":"","version":3,"debugenabled":false,"service_domain":"camera","service":"record","entityId":"camera.camera_da_cozinha_mainstream","data":"{\"filename\":\"/config/www/imgs/cameras/Cozinha.mp4\",\"duration\":\"15\",\"lookback\":\"15\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":420,"y":420,"wires":[["fcd4aad9.857238"]]},{"id":"fcd4aad9.857238","type":"delay","z":"ed0ba5cd.8184d8","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":560,"y":420,"wires":[["6b622e3d.b90f9"]]},{"id":"aed9d953.4665a8","type":"telegrambot-payload","z":"ed0ba5cd.8184d8","name":"TELEGRAM","bot":"","chatId":"","sendMethod":"sendVideo","payload":"{\n    \"video\" : \"/config/www/imgs/cameras/Garagem.mp4\",\n    \"caption\" : \"GARAGEM\"\n}","x":730,"y":480,"wires":[[]]},{"id":"330b4a3.78ab4b6","type":"api-call-service","z":"ed0ba5cd.8184d8","name":"Garagem","server":"","version":3,"debugenabled":false,"service_domain":"camera","service":"record","entityId":"camera.camera_da_garagem_mainstream","data":"{\"filename\":\"/config/www/imgs/cameras/Garagem.mp4\",\"duration\":\"15\",\"lookback\":\"15\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":420,"y":480,"wires":[["1df19d61.135b23"]]},{"id":"1df19d61.135b23","type":"delay","z":"ed0ba5cd.8184d8","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":560,"y":480,"wires":[["aed9d953.4665a8"]]},{"id":"1ed8b401.144c8c","type":"comment","z":"ed0ba5cd.8184d8","name":"--------------------------- Tirar FOTO ---------------------------","info":"","x":210,"y":80,"wires":[]},{"id":"3e01f67b.13bb1a","type":"comment","z":"ed0ba5cd.8184d8","name":"--------------------------- Grava VIDEO ---------------------------","info":"","x":200,"y":320,"wires":[]},{"id":"1084488c.c859b7","type":"subflow","name":"Alarme Armado Home? (2)","info":"","category":"","in":[{"x":200,"y":320,"wires":[{"id":"74d726a8.a81238"},{"id":"ff722583.c25d98"}]}],"out":[{"x":800,"y":300,"wires":[{"id":"74d726a8.a81238","port":0}]}],"env":[],"meta":{},"color":"#DDAA99","status":{"x":800,"y":220,"wires":[{"id":"74d726a8.a81238","port":0},{"id":"6e0c924a.46c33c","port":0},{"id":"a532dd80.2d96f","port":0},{"id":"d9eb1225.d0863","port":0},{"id":"e779cf37.59029","port":0}]}},{"id":"74d726a8.a81238","type":"api-current-state","z":"1084488c.c859b7","name":"Alarm Armed Home?","server":"","version":2,"outputs":2,"halt_if":"armed_home","halt_if_type":"str","halt_if_compare":"is","entity_id":"alarm_control_panel.home_alarm","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":400,"y":300,"wires":[[],[]]},{"id":"6e0c924a.46c33c","type":"poll-state","z":"1084488c.c859b7","name":"Disarmed?","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":true,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","halt_if":"disarmed","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":380,"y":200,"wires":[[],[]]},{"id":"a532dd80.2d96f","type":"poll-state","z":"1084488c.c859b7","name":"Armed Away?","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":true,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","halt_if":"armed_away","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":390,"y":160,"wires":[[],[]]},{"id":"d9eb1225.d0863","type":"poll-state","z":"1084488c.c859b7","name":"Armed Home?","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":true,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","halt_if":"armed_home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":390,"y":120,"wires":[[],[]]},{"id":"e779cf37.59029","type":"poll-state","z":"1084488c.c859b7","name":"Disarmed?","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":true,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","halt_if":"disarmed","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":380,"y":80,"wires":[[],[]]},{"id":"ff722583.c25d98","type":"debug","z":"1084488c.c859b7","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":370,"y":360,"wires":[]},{"id":"e93fc702.d9dde8","type":"subflow","name":"Alarme Triggers Home (2)","info":"","category":"","in":[],"out":[{"x":320,"y":40,"wires":[{"id":"39b85844.2dc538","port":0},{"id":"f9cf667e.112238","port":0},{"id":"a1e47ac3.846578","port":0},{"id":"e130baa9.be16b8","port":0}]}],"env":[],"meta":{},"color":"#DDAA99","status":{"x":320,"y":160,"wires":[{"id":"39b85844.2dc538","port":0},{"id":"39b85844.2dc538","port":1},{"id":"f9cf667e.112238","port":0},{"id":"f9cf667e.112238","port":1},{"id":"a1e47ac3.846578","port":0},{"id":"a1e47ac3.846578","port":1},{"id":"e130baa9.be16b8","port":0},{"id":"e130baa9.be16b8","port":1}]}},{"id":"39b85844.2dc538","type":"server-state-changed","z":"e93fc702.d9dde8","name":"Sala P","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.0x00158d000444c096_contact","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":70,"y":40,"wires":[[],[]]},{"id":"f9cf667e.112238","type":"server-state-changed","z":"e93fc702.d9dde8","name":"Cozinha P","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.0x00158d000346bb18_contact","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":80,"y":100,"wires":[[],[]]},{"id":"a1e47ac3.846578","type":"server-state-changed","z":"e93fc702.d9dde8","name":"Garagem P","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.0x00158d00040e1b96_contact","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":90,"y":160,"wires":[[],[]]},{"id":"baee43c5.cff84","type":"server-state-changed","z":"e93fc702.d9dde8","name":"Sala M","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.0x00158d00033a41bc_occupancy","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":90,"y":340,"wires":[[],[]]},{"id":"f110029.2758","type":"server-state-changed","z":"e93fc702.d9dde8","name":"Cozinha M","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.0x00158d00045f6e89_occupancy","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":80,"y":280,"wires":[[],[]]},{"id":"e130baa9.be16b8","type":"server-state-changed","z":"e93fc702.d9dde8","name":"Garagem M","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.0x00158d00045cccd6_occupancy","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":90,"y":220,"wires":[[],[]]},{"id":"38e52d85.8c6462","type":"subflow","name":"Triggered (2)","info":"","category":"","in":[{"x":40,"y":40,"wires":[{"id":"8287131d.4b0bc"}]}],"out":[{"x":400,"y":220,"wires":[{"id":"8287131d.4b0bc","port":0}]}],"env":[],"meta":{},"color":"#DDAA99","status":{"x":240,"y":140,"wires":[{"id":"8287131d.4b0bc","port":0},{"id":"f1351ae3.4bb3a8","port":0}]}},{"id":"2eeb6782.6668e8","type":"api-call-service","z":"38e52d85.8c6462","name":"Luzes em 100%","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.magichome_quarto_casal","data":"{\"brightness_pct\":\"100\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":420,"y":40,"wires":[["ecde1ea.da0d6e"]]},{"id":"d53f6c35.f46e8","type":"api-call-service","z":"38e52d85.8c6462","name":"Sirene!","server":"","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.alarme","data":"","dataType":"json","mergecontext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":480,"y":100,"wires":[["1877df5.a48fb21"]]},{"id":"1877df5.a48fb21","type":"stoptimer","z":"38e52d85.8c6462","duration":"3","units":"Minute","payloadtype":"num","payloadval":"0","name":"3min","x":610,"y":100,"wires":[["d10bae0b.969f7"],[]]},{"id":"d10bae0b.969f7","type":"api-call-service","z":"38e52d85.8c6462","name":"Desligar Sirene","server":"","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.alarme","data":"","dataType":"json","mergecontext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":760,"y":100,"wires":[["25a696d.a93ee6a"]]},{"id":"49eab333.8226bc","type":"api-current-state","z":"38e52d85.8c6462","name":"Sirene ainda ligada?","server":"","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.alarme","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":1080,"y":100,"wires":[["fde54cca.0a55d"],[]]},{"id":"fde54cca.0a55d","type":"api-call-service","z":"38e52d85.8c6462","name":"Desligar Sirene","server":"","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.alarme","data":"","dataType":"json","mergecontext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":1280,"y":100,"wires":[["49eab333.8226bc"]]},{"id":"25a696d.a93ee6a","type":"delay","z":"38e52d85.8c6462","name":"1sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":910,"y":100,"wires":[["49eab333.8226bc"]]},{"id":"f863980f.c12148","type":"api-call-service","z":"38e52d85.8c6462","name":"Emergencia Luzes em 100%","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.magichome_quarto_casal","data":"{\"brightness_pct\":\"100\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":980,"y":40,"wires":[["22c3dea.0252722"]]},{"id":"ecde1ea.da0d6e","type":"delay","z":"38e52d85.8c6462","name":"1sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":590,"y":40,"wires":[["22c3dea.0252722"]]},{"id":"22c3dea.0252722","type":"api-current-state","z":"38e52d85.8c6462","name":"Luzes Ligadas?","server":"","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.magichome_quarto_casal","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":760,"y":40,"wires":[[],["f863980f.c12148"]]},{"id":"8287131d.4b0bc","type":"api-current-state","z":"38e52d85.8c6462","name":"Alarm Triggered?","server":"","version":2,"outputs":2,"halt_if":"triggered","halt_if_type":"str","halt_if_compare":"is","entity_id":"alarm_control_panel.home_alarm","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":170,"y":40,"wires":[["2eeb6782.6668e8","d53f6c35.f46e8"],[]]},{"id":"f1351ae3.4bb3a8","type":"server-state-changed","z":"38e52d85.8c6462","name":"Disarmed?","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"alarm_control_panel.home_alarm","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"disarmed","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":220,"wires":[[],[]]},{"id":"3c52317e.de9eee","type":"subflow","name":"House disarmed (2)","info":"","category":"","in":[{"x":40,"y":140,"wires":[{"id":"26c18050.ad67c"}]}],"out":[],"env":[],"meta":{},"color":"#DDAA99","status":{"x":220,"y":240,"wires":[{"id":"26c18050.ad67c","port":1}]}},{"id":"bfda60f7.0b81c","type":"api-call-service","z":"3c52317e.de9eee","name":" Desligue as luzes ligadas","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.magichome_quarto_casal","data":"","dataType":"json","mergecontext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":410,"y":40,"wires":[["a1cea303.cae21"]]},{"id":"e7a6c53e.a19528","type":"api-call-service","z":"3c52317e.de9eee","name":"Alarme foi Desarmado","server":"","version":3,"debugenabled":false,"service_domain":"tts","service":"google_translate_say","entityId":"media_player.google_home_mini","data":"{\"message\":\"O Alarme foi Desarmado.\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":600,"y":160,"wires":[[]]},{"id":"e68d517d.fd241","type":"api-call-service","z":"3c52317e.de9eee","name":"Volume 70%","server":"","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.google_home_mini","data":"{\"volume_level\":0.7}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":160,"wires":[["e7a6c53e.a19528"]]},{"id":"26c18050.ad67c","type":"api-current-state","z":"3c52317e.de9eee","name":"Disarmado?","server":"","version":2,"outputs":2,"halt_if":"disarmed","halt_if_type":"str","halt_if_compare":"is","entity_id":"alarm_control_panel.home_alarm","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":150,"y":140,"wires":[["bfda60f7.0b81c","e68d517d.fd241"],["ce112820.4d8928"]]},{"id":"f8dd0a71.2a99c8","type":"api-call-service","z":"3c52317e.de9eee","name":"Desligar Sirene","server":"","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.alarme","data":"","dataType":"json","mergecontext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":540,"y":220,"wires":[["cb44533.a7229b"]]},{"id":"ce112820.4d8928","type":"api-current-state","z":"3c52317e.de9eee","name":"Sirene?","server":"","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.alarme","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":380,"y":220,"wires":[["f8dd0a71.2a99c8"],[]]},{"id":"83b3ab6b.7b7128","type":"api-current-state","z":"3c52317e.de9eee","name":"Sirene ainda ligada?","server":"","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.magichome_quarto_casal, ","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":860,"y":220,"wires":[["ed8a2140.637fd"],[]]},{"id":"ed8a2140.637fd","type":"api-call-service","z":"3c52317e.de9eee","name":"Desligar Sirene","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.magichome_quarto_casal","data":"","dataType":"json","mergecontext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":1060,"y":220,"wires":[["83b3ab6b.7b7128"]]},{"id":"145bacf5.afc843","type":"api-call-service","z":"3c52317e.de9eee","name":" Desligue as luzes ligadas","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.magichome_quarto_casal","data":"","dataType":"json","mergecontext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":1070,"y":40,"wires":[["3423479c.b14a38"]]},{"id":"3423479c.b14a38","type":"api-current-state","z":"3c52317e.de9eee","name":"Luzes ligadas ainda acesas?","server":"","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.magichome_quarto_casal","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":800,"y":40,"wires":[["145bacf5.afc843"],[]]},{"id":"a1cea303.cae21","type":"delay","z":"3c52317e.de9eee","name":"1sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":590,"y":40,"wires":[["3423479c.b14a38"]]},{"id":"cb44533.a7229b","type":"delay","z":"3c52317e.de9eee","name":"1sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":690,"y":220,"wires":[["83b3ab6b.7b7128"]]},{"id":"a9f3949e.850968","type":"subflow","name":"Armed away (2)","info":"","category":"","in":[{"x":40,"y":20,"wires":[{"id":"a55381cb.9c7c4"}]}],"out":[],"env":[],"meta":{},"color":"#DDAA99","status":{"x":220,"y":180,"wires":[{"id":"a55381cb.9c7c4","port":0},{"id":"a55381cb.9c7c4","port":1},{"id":"2911b08d.b4be","port":0}]}},{"id":"a55381cb.9c7c4","type":"api-current-state","z":"a9f3949e.850968","name":"Armado AUSENTE?","server":"","version":2,"outputs":2,"halt_if":"armed_away","halt_if_type":"str","halt_if_compare":"is","entity_id":"alarm_control_panel.home_alarm","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":180,"y":20,"wires":[["8eafc4ca.4f2b88","f42a2708.bbc808"],["ebce3e3c.ea35"]]},{"id":"d52e67d1.68fe78","type":"api-call-service","z":"a9f3949e.850968","name":"Armado Ausente","server":"","version":3,"debugenabled":false,"service_domain":"tts","service":"google_translate_say","entityId":"media_player.google_home_mini","data":"{\"message\":\"O alarme foi acionado no modo AUSENTE.\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":610,"y":80,"wires":[[]]},{"id":"f42a2708.bbc808","type":"api-call-service","z":"a9f3949e.850968","name":"Volume 70%","server":"","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.google_home_mini","data":"{\"volume_level\":0.7}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":80,"wires":[["d52e67d1.68fe78"]]},{"id":"18f6242.14d4ddc","type":"api-call-service","z":"a9f3949e.850968","name":"Falhar ao acionar o Alarme","server":"","version":3,"debugenabled":false,"service_domain":"tts","service":"google_translate_say","entityId":"media_player.google_home_mini","data":"{\"message\":\"Falhar ao acionar o alarme.\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":600,"y":260,"wires":[[]]},{"id":"ebce3e3c.ea35","type":"api-call-service","z":"a9f3949e.850968","name":"Volume 70%","server":"","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.google_home_mini","data":"{\"volume_level\":0.7}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":260,"wires":[["18f6242.14d4ddc"]]},{"id":"8eafc4ca.4f2b88","type":"api-call-service","z":"a9f3949e.850968","name":"Armado luzes ligar, 30%","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.magichome_quarto_casal","data":"{\"brightness_pct\":30,\"transition\":1.5,\"rgb_color\":[255,0,0]}","dataType":"json","mergecontext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":430,"y":20,"wires":[["d6a9c567.b97038"]]},{"id":"d6a9c567.b97038","type":"delay","z":"a9f3949e.850968","name":"1sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":610,"y":20,"wires":[["e4803373.c8964"]]},{"id":"8bff53a8.66fd2","type":"api-call-service","z":"a9f3949e.850968","name":"Armado luzes ligar, 30%","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.magichome_quarto_casal","data":"{\"brightness_pct\":30,\"transition\":1.5,\"rgb_color\":[255,0,0]}","dataType":"json","mergecontext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":1010,"y":20,"wires":[["e4803373.c8964"]]},{"id":"e4803373.c8964","type":"api-current-state","z":"a9f3949e.850968","name":"Armado luzes ligar?","server":"","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.magichome_quarto_casal","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":780,"y":20,"wires":[[],["8bff53a8.66fd2"]]},{"id":"2911b08d.b4be","type":"poll-state","z":"a9f3949e.850968","name":"Disarmado?","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":true,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","halt_if":"disarmed","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":90,"y":180,"wires":[[],[]]},{"id":"119dd9ff.57a8c6","type":"subflow","name":"Armed Home (2)","info":"","category":"","in":[{"x":40,"y":40,"wires":[{"id":"5e249376.52104c"}]}],"out":[],"env":[],"meta":{},"color":"#DDAA99","status":{"x":220,"y":240,"wires":[{"id":"5e249376.52104c","port":0},{"id":"4b7a2bd9.380d44","port":0}]}},{"id":"45e75e4c.db926","type":"api-call-service","z":"119dd9ff.57a8c6","name":"Armado EM CASA","server":"","version":3,"debugenabled":false,"service_domain":"tts","service":"google_translate_say","entityId":"media_player.google_home_mini","data":"{\"message\":\"Alarme ativado no Modo CASA.\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":650,"y":60,"wires":[[]]},{"id":"a11ba519.6e0a48","type":"api-call-service","z":"119dd9ff.57a8c6","name":"Volume 70%","server":"","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.google_home_mini","data":"{\"volume_level\":0.7}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":60,"wires":[["45e75e4c.db926"]]},{"id":"5e249376.52104c","type":"api-current-state","z":"119dd9ff.57a8c6","name":"Armado CASA?","server":"","version":2,"outputs":2,"halt_if":"armed_home","halt_if_type":"str","halt_if_compare":"is","entity_id":"alarm_control_panel.home_alarm","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":180,"y":40,"wires":[["a11ba519.6e0a48","ee7daa22.9749d8"],["a463be47.1d70d"]]},{"id":"ee7daa22.9749d8","type":"api-call-service","z":"119dd9ff.57a8c6","name":"Armado luzes ligar, 30%","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.magichome_quarto_casal","data":"{\"brightness_pct\":30,\"transition\":1.5,\"rgb_color\":[255,0,0]}","dataType":"json","mergecontext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":490,"y":20,"wires":[["53436039.bd965"]]},{"id":"697ebdb2.e63b24","type":"api-call-service","z":"119dd9ff.57a8c6","name":"Falha ao Acionar o alarme","server":"","version":3,"debugenabled":false,"service_domain":"tts","service":"google_translate_say","entityId":"media_player.google_home_mini","data":"{\"message\":\"Falha ao acionar o alarme.\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":650,"y":120,"wires":[[]]},{"id":"a463be47.1d70d","type":"api-call-service","z":"119dd9ff.57a8c6","name":"Volume 70%","server":"","version":3,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.google_home_mini","data":"{\"volume_level\":0.4}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":430,"y":120,"wires":[["697ebdb2.e63b24"]]},{"id":"bbb3f0ed.a1778","type":"api-call-service","z":"119dd9ff.57a8c6","name":"Ligar luzes, 30%","server":"","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.magichome_quarto_casal","data":"{\"brightness_pct\":30,\"transition\":1.5,\"rgb_color\":[255,0,0]}","dataType":"json","mergecontext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":1050,"y":20,"wires":[["f478dbd7.5cbc98"]]},{"id":"f478dbd7.5cbc98","type":"api-current-state","z":"119dd9ff.57a8c6","name":"luzes ligadas?","server":"","version":2,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.magichome_quarto_casal","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":820,"y":20,"wires":[[],["bbb3f0ed.a1778"]]},{"id":"53436039.bd965","type":"delay","z":"119dd9ff.57a8c6","name":"1sec","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":670,"y":20,"wires":[["f478dbd7.5cbc98"]]},{"id":"4b7a2bd9.380d44","type":"poll-state","z":"119dd9ff.57a8c6","name":"Disarmado?","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":true,"entity_id":"alarm_control_panel.home_alarm","state_type":"str","halt_if":"disarmed","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":90,"y":280,"wires":[[],[]]},{"id":"c5d727e2.db75f8","type":"telegrambot-config","z":"119dd9ff.57a8c6","botname":"jessicacasa_bot","usernames":"","chatIds":"","pollInterval":"300"},{"id":"986d1fba.42a7","type":"tab","label":"Home Security","disabled":false,"info":""},{"id":"24ebdee9.deea02","type":"server-state-changed","z":"986d1fba.42a7","name":"Modo Home Alarm","server":"","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"alarm_control_panel.home_alarm","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":110,"y":100,"wires":[["77343e3c.9688a"]]},{"id":"77343e3c.9688a","type":"switch","z":"986d1fba.42a7","name":"Status de Alarme","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"armed_home","vt":"str"},{"t":"eq","v":"armed_away","vt":"str"},{"t":"eq","v":"disarmed","vt":"str"},{"t":"eq","v":"triggered","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":410,"y":100,"wires":[["30120985.0d9266"],["edf25350.14e"],["870442b6.41e91"],["3dab1caf.7cc504"]]},{"id":"87edb3a8.dd076","type":"comment","z":"986d1fba.42a7","name":"Para Alarme Manual_______________________________","info":"","x":230,"y":40,"wires":[]},{"id":"75e1110a.fbe89","type":"comment","z":"986d1fba.42a7","name":"Automação Disparada________________________________","info":"","x":240,"y":160,"wires":[]},{"id":"30120985.0d9266","type":"subflow:119dd9ff.57a8c6","z":"986d1fba.42a7","name":"Armed Home","env":[],"x":670,"y":20,"wires":[]},{"id":"edf25350.14e","type":"subflow:a9f3949e.850968","z":"986d1fba.42a7","name":"Armed Away","env":[],"x":670,"y":80,"wires":[]},{"id":"870442b6.41e91","type":"subflow:3c52317e.de9eee","z":"986d1fba.42a7","name":"Disarmed","env":[],"x":660,"y":140,"wires":[]},{"id":"3dab1caf.7cc504","type":"subflow:38e52d85.8c6462","z":"986d1fba.42a7","name":"Triggered","env":[],"x":660,"y":200,"wires":[["21a5161f.5389aa"]]},{"id":"ff2e3e8b.034d5","type":"subflow:e93fc702.d9dde8","z":"986d1fba.42a7","name":"Alarme Triggers Home","env":[],"x":620,"y":280,"wires":[["70851764.902358"]]},{"id":"70851764.902358","type":"subflow:1084488c.c859b7","z":"986d1fba.42a7","name":"Alarme Armado Home?","env":[],"x":870,"y":280,"wires":[["c2152c9b.ba704"]]},{"id":"c2152c9b.ba704","type":"api-call-service","z":"986d1fba.42a7","name":"Triggered","server":"","version":3,"debugenabled":false,"service_domain":"alarm_control_panel","service":"alarm_trigger","entityId":"","data":"{\"entity_id\":\"alarm_control_panel.home_alarm\",\"code\":\"0000\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":1080,"y":280,"wires":[[]]},{"id":"815a7068.12cb5","type":"inject","z":"986d1fba.42a7","name":"Armar @23:59p","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"59 23 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"armed_home","payloadType":"str","x":130,"y":240,"wires":[["8af5d132.3ccfe"]]},{"id":"b67c7dea.af84a","type":"inject","z":"986d1fba.42a7","name":"Disarmar @ 7a","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 07 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"disarmed","payloadType":"str","x":140,"y":360,"wires":[["a46a4726.f437d8"]]},{"id":"a46a4726.f437d8","type":"api-call-service","z":"986d1fba.42a7","name":"Disarmado","server":"","version":3,"debugenabled":false,"service_domain":"alarm_control_panel","service":"alarm_disarm","entityId":"","data":"{\"entity_id\":\"alarm_control_panel.home_alarm\",\"code\":\"0000\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":310,"y":360,"wires":[["77343e3c.9688a"]]},{"id":"8af5d132.3ccfe","type":"api-call-service","z":"986d1fba.42a7","name":"Armado Casa","server":"","version":3,"debugenabled":false,"service_domain":"alarm_control_panel","service":"alarm_arm_home","entityId":"","data":"{\"entity_id\":\"alarm_control_panel.home_alarm\",\"code\":\"0000\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":320,"y":240,"wires":[["77343e3c.9688a"]]},{"id":"21a5161f.5389aa","type":"subflow:ed0ba5cd.8184d8","z":"986d1fba.42a7","name":"Cameras","env":[],"x":840,"y":200,"wires":[]},{"id":"a2956613.e953c8","type":"subflow:16260dda.ee62c2","z":"986d1fba.42a7","name":"Alarme Armado Away?","env":[],"x":880,"y":380,"wires":[["68e651d8.43da8"]]},{"id":"68e651d8.43da8","type":"api-call-service","z":"986d1fba.42a7","name":"Triggered","server":"","version":3,"debugenabled":false,"service_domain":"alarm_control_panel","service":"alarm_trigger","entityId":"","data":"{\"entity_id\":\"alarm_control_panel.home_alarm\",\"code\":\"0000\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":1080,"y":380,"wires":[[]]},{"id":"2950f5c7.1dfd4a","type":"subflow:ea04d4f7.0dfb58","z":"986d1fba.42a7","name":"Alarme Triggers Away","env":[],"x":620,"y":380,"wires":[["a2956613.e953c8"]]},{"id":"c799ed0c.9739a","type":"inject","z":"986d1fba.42a7","name":"Armar Ausente","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"armed_away","payloadType":"str","x":120,"y":300,"wires":[["6e047b02.2c24b4"]]},{"id":"6e047b02.2c24b4","type":"api-call-service","z":"986d1fba.42a7","name":"Armado Casa","server":"","version":3,"debugenabled":false,"service_domain":"alarm_control_panel","service":"alarm_arm_away","entityId":"","data":"{\"entity_id\":\"alarm_control_panel.home_alarm\",\"code\":\"0000\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":320,"y":300,"wires":[[]]}]

Fonte: My combination Manual Alarm (YAML) and Node-RED alarm - example, and looking for constructive criticism - #3 by PickleSlice - Node-RED - Home Assistant Community

Não consegui fazer funcionar. Mesmo fazendo os injects manualmente, o alarme não sai da posição “disarm”.

1 Like

Aparece algum erro no debugger ?

Nenhum. Simplesmente, o inject roda normalmente, mas o alarme continua em “disarm”.

1 Like

Vc colocou a senha no Armado casa e desarmado que fica após o inject?

Coloquei sim. Substitui de 0000 para a que eu setei no secrets, também de 4 dígitos…

Atualizando meu caso:

Comentei a linha “code:” no .yaml e o alarme agora tá armando e desarmando.

Depois vou dar uma olhada na documentação do HA, se houve alguma mudança nesse alarme.

1 Like

@Alesson um help por favor:
Pretendo acionar o alarme através do node “Amazon Echo Hub”, porém, para isso preciso o (node call service" - alarm_control_panel) tenha o service alternado entre os states (alarm_arm_night e alarm_disarm ).
Dessa forma, o painel gráfico se alternará em “ativado e desativado”.
Tem alguma sugestõ de como fazer essa alternância entre os states do alarm_control_panel ?
Tks !

image

Como faço para instalar os nós para esse alarme?