Hello everyone,
I have an alarm trigger flow setup in node-red but the final bit I can't get to work properly. Through HA this automation works fine; I just haven't figured out the proper node configuration I think in node-red yet. Flow in question:
[{"id":"90ea2a2b.d513c","type":"comment","z":"b1e7abfd.89edc8","name":"Alarm routines","info":"","x":130,"y":220,"wires":[]},{"id":"c3fe4ac8.c8457","type":"server-state-changed","z":"b1e7abfd.89edc8","name":"Armed Home","server":"8b533b83.ade2f8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"alarm_control_panel.home_alarm","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"armed_home","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":280,"wires":[["39903ca9.e4f4dc"],[]]},{"id":"39903ca9.e4f4dc","type":"trigger-state","z":"b1e7abfd.89edc8","name":"alarm triggered","server":"8b533b83.ade2f8","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"alarm_control_panel.home_alarm","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"id":"lnty3363up","targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"triggered"}],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":340,"y":320,"wires":[["b67edd39.9efcf8","ec57792c.5d051","bf78fcb4.2cd94","3cbdfc39.304344","76211d5f.998db4","f29d253a.9d963","6909efb1.c2c65","c3e85006.641598","57de2e22.77ee5","9608199f.cd03e","a0a190ab.5f04b"],[]]},{"id":"b67edd39.9efcf8","type":"api-call-service","z":"b1e7abfd.89edc8","name":"kitchen - on","server":"8b533b83.ade2f8","version":1,"debugenabled":true,"service_domain":"light","service":"turn_on","entityId":"light.kitchen","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":570,"y":100,"wires":[[]]},{"id":"ec57792c.5d051","type":"api-call-service","z":"b1e7abfd.89edc8","name":"office (plug) - on","server":"8b533b83.ade2f8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.kasa_smartplug1","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":580,"y":160,"wires":[[]]},{"id":"bf78fcb4.2cd94","type":"api-call-service","z":"b1e7abfd.89edc8","name":"den (plug) - on","server":"8b533b83.ade2f8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.mini_lights_den","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":580,"y":220,"wires":[[]]},{"id":"3cbdfc39.304344","type":"api-call-service","z":"b1e7abfd.89edc8","name":"porch (exterior) - on","server":"8b533b83.ade2f8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.back_porch","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":590,"y":280,"wires":[[]]},{"id":"26e62ded.f5064a","type":"server-state-changed","z":"b1e7abfd.89edc8","name":"Armed Away","server":"8b533b83.ade2f8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"alarm_control_panel.home_alarm","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"armed_away","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":360,"wires":[["39903ca9.e4f4dc"],[]]},{"id":"76211d5f.998db4","type":"api-call-service","z":"b1e7abfd.89edc8","name":"office 2 - on","server":"8b533b83.ade2f8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.office_2","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":570,"y":340,"wires":[[]]},{"id":"f29d253a.9d963","type":"api-call-service","z":"b1e7abfd.89edc8","name":"room 2 - on","server":"8b533b83.ade2f8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.room_2","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":570,"y":400,"wires":[[]]},{"id":"6909efb1.c2c65","type":"api-call-service","z":"b1e7abfd.89edc8","name":"upstairs - on","server":"8b533b83.ade2f8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.upstairs","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":570,"y":460,"wires":[[]]},{"id":"c3e85006.641598","type":"api-call-service","z":"b1e7abfd.89edc8","name":"stairs (led) - on","server":"8b533b83.ade2f8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.led_stairs","data":"{\"brightness_pct\":\"5\",\"color_name\":\"white\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":580,"y":520,"wires":[[]]},{"id":"1989f2b.9df420d","type":"comment","z":"b1e7abfd.89edc8","name":"Turn on lighting","info":"","x":580,"y":40,"wires":[]},{"id":"8c6e41f9.c83968","type":"comment","z":"b1e7abfd.89edc8","name":"Auditable alerting","info":"","x":580,"y":600,"wires":[]},{"id":"51cf4bba.bc0654","type":"api-call-service","z":"b1e7abfd.89edc8","name":"big dog","server":"8b533b83.ade2f8","version":1,"debugenabled":false,"service_domain":"media_player","service":"play_media","entityId":"media_player.living_room_speaker, media_player.upstairs_speaker","data":"{\"media_content_id\":\"http://10.180.50.20:8123/local/audio/bigdogbarking.mp3\",\"media_content_type\":\"audio/mp3\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":780,"y":660,"wires":[["bce27ec8.d27f58"]]},{"id":"57de2e22.77ee5","type":"api-call-service","z":"b1e7abfd.89edc8","name":"mini's at 100%","server":"8b533b83.ade2f8","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.living_room_speaker, media_player.upstairs_speaker","data":"{\"volume_level\":1}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":580,"y":660,"wires":[["51cf4bba.bc0654"]]},{"id":"bce27ec8.d27f58","type":"delay","z":"b1e7abfd.89edc8","name":"5 minute delay","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":960,"y":660,"wires":[["c8517456.787b08"]]},{"id":"c8517456.787b08","type":"api-call-service","z":"b1e7abfd.89edc8","name":"mini's at 20%","server":"8b533b83.ade2f8","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.living_room_speaker, media_player.upstairs_speaker","data":"{\"volume_level\":0.2}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1170,"y":660,"wires":[[]]},{"id":"9608199f.cd03e","type":"api-call-service","z":"b1e7abfd.89edc8","name":"HA notify","server":"8b533b83.ade2f8","version":1,"debugenabled":false,"service_domain":"notify","service":"notify","entityId":"","data":"{\"message\":\"ALARM! The alarm has been triggered\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":560,"y":780,"wires":[[]]},{"id":"df830195.6b92","type":"comment","z":"b1e7abfd.89edc8","name":"mobile and push alerts","info":"","x":600,"y":740,"wires":[]},{"id":"a0a190ab.5f04b","type":"api-call-service","z":"b1e7abfd.89edc8","name":"pushover","server":"8b533b83.ade2f8","version":1,"debugenabled":false,"service_domain":"notify","service":"pushover","entityId":"","data":"{\"message\":\"ALARM! The alarm has been triggered\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":560,"y":840,"wires":[[]]},{"id":"bae5b818.1c5cc","type":"inject","z":"b1e7abfd.89edc8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":380,"y":660,"wires":[["57de2e22.77ee5"]]},{"id":"8b533b83.ade2f8","type":"server","z":"","name":"Home Assistant","addon":true}]
What do i have wrong in my call service nodes? the volume set and the playing of audio does not work.
Upon being triggered.
- set mini(s) volume to 100%
- play my big dog audio
- after 5 min delay, lower mini(s) to 20%