Some help on Android Notifications & NodeRED

Thanks for all that…
So in attempting to implement I spotted an issue… phone isn’t set in the separate flow in the subflow (so re-setting the Silent / DND fails)

I’ve attempted to counteract this by setting a flow variable in the notification message, and then using that in the second flow

However, something odd happens - I now get two follow up messages simply with “command_dnd” and “command_ringer_mode” - like it’s not processing them correctly
image

Not sure why?

[{"id":"68e0e33e7cab988c","type":"subflow","name":"[ALERT] High Priority","info":"","category":"","in":[{"x":280,"y":420,"wires":[{"id":"7deece9af33f0f1f"}]}],"out":[],"env":[],"meta":{},"color":"#DDAA99"},{"id":"6f7a2af12e022da8","type":"api-call-service","z":"68e0e33e7cab988c","name":"Silent Off","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_ringer_mode\",\t    \"data\": {\t        \"command\": \"normal\"\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":660,"y":460,"wires":[["4874f50e45607a4b"]]},{"id":"7deece9af33f0f1f","type":"api-current-state","z":"68e0e33e7cab988c","name":"Poll DND State","server":"3aa13fed.bf745","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.{{ phone }}_do_not_disturb_sensor","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"OriginalDNDState","propertyType":"flow","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":460,"y":420,"wires":[["ae99cd488150ea0b"]]},{"id":"ae64ecc29db84753","type":"api-current-state","z":"68e0e33e7cab988c","name":"Poll Silent State","server":"3aa13fed.bf745","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.{{ phone }}_ringer_mode","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"OriginalSilentState","propertyType":"flow","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":460,"y":460,"wires":[["6f7a2af12e022da8"]]},{"id":"ae99cd488150ea0b","type":"api-call-service","z":"68e0e33e7cab988c","name":"DND Off","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_dnd\",\t    \"data\": {\t        \"command\": \"off\"\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":660,"y":420,"wires":[["ae64ecc29db84753"]]},{"id":"0ddf4fa49bb27a9e","type":"api-call-service","z":"68e0e33e7cab988c","name":"DND Revert","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_dnd\",\t    \"data\": {\t        \"command\": flow.OriginalDNDState\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":560,"wires":[[]]},{"id":"75598dbf308fc2f4","type":"api-call-service","z":"68e0e33e7cab988c","name":"Silent Revert","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_ringer_mode\",\t    \"data\": {\t        \"command\": flow.OriginalSilentState\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":560,"wires":[["3ec912b539a84914"]]},{"id":"3ec912b539a84914","type":"delay","z":"68e0e33e7cab988c","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":800,"y":560,"wires":[["0ddf4fa49bb27a9e"]]},{"id":"4874f50e45607a4b","type":"api-call-service","z":"68e0e33e7cab988c","name":"High Priority Notification","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": msg.noti_msg,\t    \"title\": msg.noti_title,\t    \"data\": {\t        \"ttl\": 0,\t        \"priority\": \"high\",\t        \"media_stream\": \"alarm_stream\",\t        \"channel\": \"Important_Alerts\"\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"message","propertyType":"flow","value":"noti_msg","valueType":"msg"},{"property":"phoneid","propertyType":"flow","value":"phone","valueType":"msg"}],"queue":"none","x":890,"y":460,"wires":[[]]},{"id":"f177e89ff36a705b","type":"server-events","z":"68e0e33e7cab988c","name":"Any phone receives notification with message","server":"3aa13fed.bf745","version":1,"event_type":"mobile_app_notification_received","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"phone","propertyType":"msg","value":"phoneid","valueType":"flow"}],"x":210,"y":560,"wires":[["c2b476e661b4838a"]]},{"id":"c2b476e661b4838a","type":"switch","z":"68e0e33e7cab988c","name":"","property":"payload.event.message","propertyType":"msg","rules":[{"t":"eq","v":"message","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":560,"wires":[["75598dbf308fc2f4"]]},{"id":"93daeca88a951092","type":"debug","z":"68e0e33e7cab988c","name":"debug 10","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":620,"y":640,"wires":[]},{"id":"b603ed5698adb425","type":"debug","z":"68e0e33e7cab988c","name":"debug 11","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":820,"y":640,"wires":[]},{"id":"3aa13fed.bf745","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"},{"id":"886e49ba100bdd3e","type":"subflow:68e0e33e7cab988c","z":"7b2cc8dd2ab2726b","name":"Flood Alert (High Priority) ","env":[{"name":"phone","value":"pocox3","type":"str"},{"name":"title","value":"WARNING! FLOOD DETECTED","type":"str"},{"name":"message","value":"A FLOOD HAS BEEN DETECTED - DO SOMETHING!!!","type":"str"},{"name":"Message Body","value":"A FLOOD HAS BEEN DETECTED - DO SOMETHING!!!","type":"str"},{"name":"PHONE","value":"pocox3","type":"str"}],"x":610,"y":280,"wires":[]},{"id":"6e2e07e7eee7c09c","type":"inject","z":"7b2cc8dd2ab2726b","name":"TEST","props":[{"p":"payload"},{"p":"phone","v":"pocox3","vt":"str"},{"p":"noti_title","v":"WARNING! FLOOD DETECTED","vt":"str"},{"p":"noti_msg","v":"A FLOOD HAS BEEN DETECTED - DO SOMETHING!!!","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":230,"y":280,"wires":[["886e49ba100bdd3e"]]}]

I’m also still unclear on the purpose of this:
image

Replying to myself - adding a Change Node to Set msg.xyz from the flow.xyz and then calling the msg.variable in the Silent / DND reset works
image

So seems that you can’t use flow.xyz within the notify command for some reason!

However, all this seems to be in vein - it still reactivated the silent modes far too fast and the message doesn’t have time to play the notification sounds!
So I’m going to need the delays in there anyway

EDIT And I deleted this line out of interest that I couldn’t work out what it does and it still seems to work - interested if there was a reason for it…:
image

That line is not the issue. You have added the msg.phone line that makes it not work.

I needed to add the line msg.phone - becuase without adding it to that line the msg.object isn’t passed between the two separate flows (within the subflow) becuase they aren’t connected

Without it, the whole call fails because it doesn’t know what {{ phone }} is

It all works now, except the silent still activated before the message notification sound plays

(btw - that msg.topic is / was not causing any issues, but I’m unable to understand the purpose - the only reason I removed it was to see if it broke something so I could see what it did… it seems pointless?)

EDIT: Also, very interestingly, the interaction with DND and Silent is very odd
Setting DND before Silent will always turn on Silent anyway… setting Silent before DND will also do the same unless it was set in a specific order in the UI
If I turn on DND in the UI, it will automatically set ringer to Silent, even if the icon for silent is not reflecting that… very very strange !

It’s the standard setting of those nodes. I just keep them.

But flow.phone is not defind in the flow (I think).

I think if the service calls are generated inside a function node it will be easier to maintain.
I could not edit the service calls notify.mobile_app… thing.

[{"id":"68e0e33e7cab988c","type":"subflow","name":"[ALERT] High Priority","info":"","category":"","in":[{"x":140,"y":420,"wires":[{"id":"fa04c9e113f98e06"}]}],"out":[],"env":[],"meta":{},"color":"#DDAA99"},{"id":"6f7a2af12e022da8","type":"api-call-service","z":"68e0e33e7cab988c","name":"Silent Off","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_ringer_mode\",\t    \"data\": {\t        \"command\": \"normal\"\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":660,"y":460,"wires":[["4874f50e45607a4b"]]},{"id":"7deece9af33f0f1f","type":"api-current-state","z":"68e0e33e7cab988c","name":"Poll DND State","server":"3aa13fed.bf745","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.{{ phone }}_do_not_disturb_sensor","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"OriginalDNDState","propertyType":"flow","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":460,"y":420,"wires":[["ae99cd488150ea0b"]]},{"id":"ae64ecc29db84753","type":"api-current-state","z":"68e0e33e7cab988c","name":"Poll Silent State","server":"3aa13fed.bf745","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.{{ phone }}_ringer_mode","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"OriginalSilentState","propertyType":"flow","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":460,"y":460,"wires":[["6f7a2af12e022da8"]]},{"id":"ae99cd488150ea0b","type":"api-call-service","z":"68e0e33e7cab988c","name":"DND Off","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_dnd\",\t    \"data\": {\t        \"command\": \"off\"\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":660,"y":420,"wires":[["ae64ecc29db84753"]]},{"id":"4874f50e45607a4b","type":"api-call-service","z":"68e0e33e7cab988c","name":"High Priority Notification","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": msg.noti_msg,\t    \"title\": msg.noti_title,\t    \"data\": {\t        \"ttl\": 0,\t        \"priority\": \"high\",\t        \"media_stream\": \"alarm_stream\",\t        \"channel\": \"Important_Alerts\"\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"message","propertyType":"flow","value":"noti_msg","valueType":"msg"},{"property":"phoneid","propertyType":"flow","value":"phone","valueType":"msg"}],"queue":"none","x":890,"y":460,"wires":[[]]},{"id":"f177e89ff36a705b","type":"server-events","z":"68e0e33e7cab988c","name":"Any phone receives notification with message","server":"3aa13fed.bf745","version":1,"event_type":"mobile_app_notification_received","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":210,"y":560,"wires":[["c2b476e661b4838a"]]},{"id":"c2b476e661b4838a","type":"switch","z":"68e0e33e7cab988c","name":"","property":"payload.event.message","propertyType":"msg","rules":[{"t":"eq","v":"message","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":560,"wires":[["979395c83f19705d"]]},{"id":"93daeca88a951092","type":"debug","z":"68e0e33e7cab988c","name":"debug 10","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":620,"y":740,"wires":[]},{"id":"b603ed5698adb425","type":"debug","z":"68e0e33e7cab988c","name":"debug 11","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":820,"y":740,"wires":[]},{"id":"fa04c9e113f98e06","type":"change","z":"68e0e33e7cab988c","name":"","rules":[{"t":"set","p":"phone","pt":"flow","to":"phone","tot":"msg"},{"t":"set","p":"message","pt":"flow","to":"noti_msg","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":260,"y":420,"wires":[["7deece9af33f0f1f"]]},{"id":"979395c83f19705d","type":"function","z":"68e0e33e7cab988c","name":"function 4","func":"msg.payload = {\n    \"domain\": \"notify\",\n    \"service\": \"mobile_app_\" + flow.get(\"phone\"),\n    \"data\": {\n        \"message\": \"command_ringer_mode\",\n        \"data\": {\n            \"command\": flow.get(\"OriginalSilentState\")\n        }\n    }\n}\n\nreturn[msg, null];\n\nmsg.payload = {\n    \"domain\": \"notify\",\n    \"service\": \"mobile_app_\" + flow.get(\"phone\"),\n    \"data\": {\n        \"message\": \"command_dnd\",\n        \"data\": {\n        \"command\": flow.get(\"OriginalDNDState\")\n        }\n    }\n}\nreturn [null, msg];","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":640,"y":560,"wires":[["b4589f680e4ddddb"],["bc7ad6f97ac03ebf"]]},{"id":"b4589f680e4ddddb","type":"api-call-service","z":"68e0e33e7cab988c","name":"Silent Revert","server":"4bbca37b.1700ec","version":5,"debugenabled":false,"domain":"notify","service":"","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":830,"y":520,"wires":[[]]},{"id":"a40bf9d56e16da9d","type":"api-call-service","z":"68e0e33e7cab988c","name":"DND Revert","server":"4bbca37b.1700ec","version":5,"debugenabled":false,"domain":"notify","service":"","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_dnd\",\t    \"data\": {\t        \"command\": flow.OriginalDNDState\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":950,"y":620,"wires":[[]]},{"id":"bc7ad6f97ac03ebf","type":"delay","z":"68e0e33e7cab988c","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":800,"y":620,"wires":[["a40bf9d56e16da9d"]]},{"id":"3aa13fed.bf745","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30},{"id":"4bbca37b.1700ec","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30},{"id":"6e2e07e7eee7c09c","type":"inject","z":"ad594fb84fe6d294","name":"TEST","props":[{"p":"payload"},{"p":"phone","v":"pocox3","vt":"str"},{"p":"noti_title","v":"WARNING! FLOOD DETECTED","vt":"str"},{"p":"noti_msg","v":"A FLOOD HAS BEEN DETECTED - DO SOMETHING!!!","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":330,"y":400,"wires":[["886e49ba100bdd3e"]]},{"id":"886e49ba100bdd3e","type":"subflow:68e0e33e7cab988c","z":"ad594fb84fe6d294","name":"Flood Alert (High Priority) ","env":[{"name":"phone","value":"pocox3","type":"str"},{"name":"title","value":"WARNING! FLOOD DETECTED","type":"str"},{"name":"message","value":"A FLOOD HAS BEEN DETECTED - DO SOMETHING!!!","type":"str"},{"name":"Message Body","value":"A FLOOD HAS BEEN DETECTED - DO SOMETHING!!!","type":"str"},{"name":"PHONE","value":"pocox3","type":"str"}],"x":710,"y":400,"wires":[]}]

Perhaps the event arrives before the actual “play” happens, perhaps you need a smal delay after all…

I believe you actually just need the dnd. But not sure.
I only use dnd.

I think I’ve got the bulk of it figured out now but got some kinda odd behaviour…

In the below - if I run the PersonR test it will actually send the text to speech notification and the silent settings to PersonA as well… I don’t quite understand that - it does it successfully to both, seemingly based upon the previous settings it discovered on the previous run for the correct phone…

I’m really confused by that tho, there doesnt seem to be any way that it can call the other route…
Any ideas?

[{"id":"68e0e33e7cab988c","type":"subflow","name":"[ALERT] High Priority","info":"","category":"","in":[{"x":140,"y":80,"wires":[{"id":"7deece9af33f0f1f"}]}],"out":[{"x":1220,"y":300,"wires":[{"id":"ee78d304315a2321","port":0}]}],"env":[],"meta":{},"color":"#DDAA99"},{"id":"6f7a2af12e022da8","type":"api-call-service","z":"68e0e33e7cab988c","name":"Silent Off","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_ringer_mode\",\t    \"data\": {\t        \"command\": \"normal\"\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":520,"y":120,"wires":[["4874f50e45607a4b"]]},{"id":"7deece9af33f0f1f","type":"api-current-state","z":"68e0e33e7cab988c","name":"Poll DND State","server":"3aa13fed.bf745","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.{{ phone }}_do_not_disturb_sensor","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"OriginalDNDState","propertyType":"flow","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":320,"y":80,"wires":[["ae64ecc29db84753"]]},{"id":"ae64ecc29db84753","type":"api-current-state","z":"68e0e33e7cab988c","name":"Poll Silent State","server":"3aa13fed.bf745","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.{{ phone }}_ringer_mode","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"OriginalSilentState","propertyType":"flow","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":500,"y":80,"wires":[["ae99cd488150ea0b"]]},{"id":"4874f50e45607a4b","type":"api-call-service","z":"68e0e33e7cab988c","name":"High Priority Notification","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": msg.noti_msg,\t    \"title\": msg.noti_title,\t    \"data\": {\t        \"ttl\": 0,\t        \"priority\": \"high\",\t        \"media_stream\": \"alarm_stream\",\t        \"channel\": \"Important_Alerts\"\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"message","propertyType":"flow","value":"noti_msg","valueType":"msg"},{"property":"phoneid","propertyType":"flow","value":"phone","valueType":"msg"}],"queue":"none","x":790,"y":120,"wires":[[]]},{"id":"c2b476e661b4838a","type":"switch","z":"68e0e33e7cab988c","name":"","property":"payload.event.message","propertyType":"msg","rules":[{"t":"eq","v":"message","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":250,"y":300,"wires":[["481b0af32897e51f"]]},{"id":"481b0af32897e51f","type":"change","z":"68e0e33e7cab988c","name":"","rules":[{"t":"set","p":"OriginalSilentState","pt":"msg","to":"OriginalSilentState","tot":"flow"},{"t":"set","p":"OriginalDNDState","pt":"msg","to":"OriginalDNDState","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":300,"wires":[["2d5081995e64e840"]]},{"id":"170ef76595e2d094","type":"server-events","z":"68e0e33e7cab988c","name":"Any phone receives notification with message","server":"3aa13fed.bf745","version":1,"event_type":"mobile_app_notification_received","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"phone","propertyType":"msg","value":"phoneid","valueType":"flow"}],"x":210,"y":260,"wires":[["c2b476e661b4838a"]]},{"id":"2d5081995e64e840","type":"delay","z":"68e0e33e7cab988c","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":560,"y":300,"wires":[["5555d78ec7450b4e"]]},{"id":"ae99cd488150ea0b","type":"api-call-service","z":"68e0e33e7cab988c","name":"DND Off","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_dnd\",\t    \"data\": {\t        \"command\": \"off\"\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":320,"y":120,"wires":[["6f7a2af12e022da8"]]},{"id":"11696f85bed2d2d8","type":"debug","z":"68e0e33e7cab988c","name":"Original DND State","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":370,"y":40,"wires":[]},{"id":"46b5a700747b4991","type":"debug","z":"68e0e33e7cab988c","name":"Original Silent State","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":600,"y":40,"wires":[]},{"id":"5555d78ec7450b4e","type":"api-call-service","z":"68e0e33e7cab988c","name":"Silent Revert","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_ringer_mode\",\t    \"data\": {\t        \"command\": msg.OriginalSilentState\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"OriginalSilentState","valueType":"msg"}],"queue":"none","x":730,"y":300,"wires":[["a683ad83a383541b"]]},{"id":"a683ad83a383541b","type":"delay","z":"68e0e33e7cab988c","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":900,"y":300,"wires":[["ee78d304315a2321"]]},{"id":"33f30e7cf78947f6","type":"debug","z":"68e0e33e7cab988c","name":"Pushed Silent State","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":770,"y":340,"wires":[]},{"id":"ee78d304315a2321","type":"api-call-service","z":"68e0e33e7cab988c","name":"DND Revert","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_dnd\",\t    \"data\": {\t        \"command\": msg.OriginalDNDState\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"OriginalDNDState","valueType":"msg"}],"queue":"none","x":1050,"y":300,"wires":[[]]},{"id":"49325d82a1c6743a","type":"debug","z":"68e0e33e7cab988c","name":"Pushed DND State","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1090,"y":340,"wires":[]},{"id":"4de891d00757754c","type":"server-state-changed","z":"05c4ab44eb759632","name":"Downstairs Leak Detected","server":"3aa13fed.bf745","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.flood_sensor_downstairs_water_alarm_water_leak_detected","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","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"},{"property":"noti_title","propertyType":"msg","value":"WARNING! FLOOD DETECTED","valueType":"str"},{"property":"noti_msg","propertyType":"msg","value":"A FLOOD HAS BEEN DETECTED - DO SOMETHING!!!","valueType":"str"}],"x":150,"y":160,"wires":[["81b80fa6b06745f3"],[]]},{"id":"4d3cb3ea83d3e187","type":"server-state-changed","z":"05c4ab44eb759632","name":"Upstairs Leak Detected","server":"3aa13fed.bf745","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.flood_sensor_upstairs_water_alarm_water_leak_detected","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","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"},{"property":"noti_title","propertyType":"msg","value":"WARNING! FLOOD DETECTED","valueType":"str"},{"property":"noti_msg","propertyType":"msg","value":"A FLOOD HAS BEEN DETECTED - DO SOMETHING!!!","valueType":"str"}],"x":160,"y":200,"wires":[["81b80fa6b06745f3"],[]]},{"id":"439e446b96b4ba84","type":"subflow:68e0e33e7cab988c","z":"05c4ab44eb759632","name":"","x":820,"y":240,"wires":[["2a3ff59fca1c2f85"]]},{"id":"b4be81473e4348e9","type":"subflow:68e0e33e7cab988c","z":"05c4ab44eb759632","name":"","x":820,"y":80,"wires":[["58f5d32dc17fa8d0"]]},{"id":"657d9ec14b054bc7","type":"change","z":"05c4ab44eb759632","name":"PersonA","rules":[{"t":"set","p":"phone","pt":"msg","to":"pocox3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":80,"wires":[["b4be81473e4348e9"]]},{"id":"29cbe9dfdc3246b0","type":"change","z":"05c4ab44eb759632","name":"PersonR","rules":[{"t":"set","p":"phone","pt":"msg","to":"rosalind_s_redmi_note","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":240,"wires":[["439e446b96b4ba84"]]},{"id":"6dede1ed2454cf92","type":"change","z":"05c4ab44eb759632","name":"THIS IS PURELY HERE FOR TIDYING THE FLOW VISUALLY","rules":[{"t":"set","p":"placeholder","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":475,"y":180,"wires":[["657d9ec14b054bc7","29cbe9dfdc3246b0"]],"l":false},{"id":"81b80fa6b06745f3","type":"change","z":"05c4ab44eb759632","name":"THIS IS PURELY HERE FOR TIDYING THE FLOW VISUALLY","rules":[{"t":"set","p":"placeholder","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":345,"y":180,"wires":[["6dede1ed2454cf92","c97d2dff8deda40a"]],"l":false},{"id":"b3c96b873d7b06e4","type":"inject","z":"05c4ab44eb759632","name":"TEST PERSONR","props":[{"p":"payload"},{"p":"noti_title","v":"WARNING! FLOOD DETECTED","vt":"str"},{"p":"noti_msg","v":"A FLOOD HAS BEEN DETECTED - DO SOMETHING!!!","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":220,"y":240,"wires":[["29cbe9dfdc3246b0"]]},{"id":"276b0228d552c289","type":"inject","z":"05c4ab44eb759632","name":"TEST BOTH","props":[{"p":"payload"},{"p":"noti_title","v":"WARNING! FLOOD DETECTED","vt":"str"},{"p":"noti_msg","v":"A FLOOD HAS BEEN DETECTED - DO SOMETHING!!!","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":120,"wires":[["6dede1ed2454cf92"]]},{"id":"48361aa32deff29f","type":"inject","z":"05c4ab44eb759632","name":"TEST PERSONA","props":[{"p":"payload"},{"p":"noti_title","v":"WARNING! FLOOD DETECTED","vt":"str"},{"p":"noti_msg","v":"A FLOOD HAS BEEN DETECTED - DO SOMETHING!!!","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":80,"wires":[["657d9ec14b054bc7"]]},{"id":"2a3ff59fca1c2f85","type":"api-call-service","z":"05c4ab44eb759632","name":"FLOOD - Text To Speech (tts)","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t  \"message\": \"TTS\",\t  \"data\":{\t    \"tts_text\": \"WARNING: The house may have flooded! Please investigate! \",\t    \"media_stream\": \"alarm_stream_max\"\t  }\t}\t","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1090,"y":240,"wires":[[]]},{"id":"58f5d32dc17fa8d0","type":"api-call-service","z":"05c4ab44eb759632","name":"FLOOD - Text To Speech (tts)","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t  \"message\": \"TTS\",\t  \"data\":{\t    \"tts_text\": \"WARNING: The house may have flooded! Please investigate! \",\t    \"media_stream\": \"alarm_stream_max\"\t  }\t}\t","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1090,"y":80,"wires":[[]]},{"id":"3aa13fed.bf745","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]

Edit… Ah, I think it’s becuase of that concern/thought I had way back over determining which phone received the message - it must be pushing the output to both exits of the subflow

Edit2… Looks like it really doesnt like running two of the same subflow in tandem

Well, I think I’ve solved it

[{"id":"d178690e34b286ff","type":"subflow","name":"[ALERT] URGENT","info":"","category":"","in":[{"x":140,"y":100,"wires":[{"id":"8f0e8a29b26e4189"}]}],"out":[{"x":1280,"y":240,"wires":[{"id":"dfa0ae6cfc66bcf4","port":0}]}],"env":[],"meta":{},"color":"#DDAA99"},{"id":"6f45a791be68d8aa","type":"api-call-service","z":"d178690e34b286ff","name":"Silent Off","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_ringer_mode\",\t    \"data\": {\t        \"command\": \"normal\"\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":540,"y":140,"wires":[["8f8e785816d63228"]]},{"id":"8f0e8a29b26e4189","type":"api-current-state","z":"d178690e34b286ff","name":"Poll DND State","server":"3aa13fed.bf745","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.{{ phone }}_do_not_disturb_sensor","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"OriginalDNDState","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":340,"y":100,"wires":[["52c6794a56569025","773615976e060373"]]},{"id":"52c6794a56569025","type":"api-current-state","z":"d178690e34b286ff","name":"Poll Silent State","server":"3aa13fed.bf745","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.{{ phone }}_ringer_mode","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"OriginalSilentState","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":520,"y":100,"wires":[["82b44fd43d720964","39794b229c67c810"]]},{"id":"8f8e785816d63228","type":"api-call-service","z":"d178690e34b286ff","name":"High Priority Notification","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": msg.noti_msg,\t    \"title\": msg.noti_title,\t    \"data\": {\t        \"ttl\": 0,\t        \"priority\": \"high\",\t        \"media_stream\": \"alarm_stream\",\t        \"channel\": \"Important_Alerts\"\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"message","propertyType":"flow","value":"noti_msg","valueType":"msg"},{"property":"phoneid","propertyType":"flow","value":"phone","valueType":"msg"}],"queue":"none","x":810,"y":140,"wires":[["2a61eae89c1c390f"]]},{"id":"71fa3c1971bf2bd0","type":"delay","z":"d178690e34b286ff","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":500,"y":240,"wires":[["15745e1a2d7d134d"]]},{"id":"82b44fd43d720964","type":"api-call-service","z":"d178690e34b286ff","name":"DND Off","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_dnd\",\t    \"data\": {\t        \"command\": \"off\"\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":340,"y":140,"wires":[["6f45a791be68d8aa"]]},{"id":"773615976e060373","type":"debug","z":"d178690e34b286ff","name":"Original DND State","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":390,"y":60,"wires":[]},{"id":"39794b229c67c810","type":"debug","z":"d178690e34b286ff","name":"Original Silent State","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":640,"y":60,"wires":[]},{"id":"15745e1a2d7d134d","type":"api-call-service","z":"d178690e34b286ff","name":"Silent Revert","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_ringer_mode\",\t    \"data\": {\t        \"command\": msg.OriginalSilentState\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"OriginalSilentState","valueType":"msg"}],"queue":"none","x":650,"y":240,"wires":[["0c51d147ef38e932","a62e9fc271f32abd"]]},{"id":"0c51d147ef38e932","type":"delay","z":"d178690e34b286ff","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":820,"y":240,"wires":[["dfa0ae6cfc66bcf4"]]},{"id":"a62e9fc271f32abd","type":"debug","z":"d178690e34b286ff","name":"Pushed Silent State","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":690,"y":280,"wires":[]},{"id":"dfa0ae6cfc66bcf4","type":"api-call-service","z":"d178690e34b286ff","name":"DND Revert","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t    \"message\": \"command_dnd\",\t    \"data\": {\t        \"command\": msg.OriginalDNDState\t    }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"OriginalDNDState","valueType":"msg"}],"queue":"none","x":970,"y":240,"wires":[["28913879b97f9066"]]},{"id":"28913879b97f9066","type":"debug","z":"d178690e34b286ff","name":"Pushed DND State","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1010,"y":280,"wires":[]},{"id":"d2e6b898e4a8271e","type":"server-events","z":"d178690e34b286ff","name":"Any phone receives notification with message","server":"3aa13fed.bf745","version":1,"event_type":"mobile_app_notification_received","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":230,"y":360,"wires":[["6a09ad2de2db7fea"]]},{"id":"007a4ce9eb9998f8","type":"change","z":"d178690e34b286ff","name":"","rules":[{"t":"set","p":"received","pt":"flow","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":690,"y":360,"wires":[[]]},{"id":"2a61eae89c1c390f","type":"switch","z":"d178690e34b286ff","name":"Message Received","property":"received","propertyType":"flow","rules":[{"t":"neq","v":"1","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1050,"y":140,"wires":[["d707f9cf025f758a"],["004065b56cfe3f6d"]]},{"id":"d707f9cf025f758a","type":"delay","z":"d178690e34b286ff","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1050,"y":100,"wires":[["2a61eae89c1c390f"]]},{"id":"004065b56cfe3f6d","type":"change","z":"d178690e34b286ff","name":"Reset Message Watch","rules":[{"t":"set","p":"received","pt":"flow","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1100,"y":180,"wires":[["71fa3c1971bf2bd0"]]},{"id":"6a09ad2de2db7fea","type":"switch","z":"d178690e34b286ff","name":"","property":"payload.event.message","propertyType":"msg","rules":[{"t":"eq","v":"message","vt":"flow"}],"checkall":"true","repair":false,"outputs":1,"x":490,"y":360,"wires":[["007a4ce9eb9998f8"]]},{"id":"4d3cb3ea83d3e187","type":"server-state-changed","z":"05c4ab44eb759632","g":"a30a2fa2027e9c8d","name":"Upstairs Leak Detected","server":"3aa13fed.bf745","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.flood_sensor_upstairs_water_alarm_water_leak_detected","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","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"},{"property":"noti_title","propertyType":"msg","value":"WARNING! FLOOD DETECTED","valueType":"str"},{"property":"noti_msg","propertyType":"msg","value":"A FLOOD HAS BEEN DETECTED - DO SOMETHING!!!","valueType":"str"}],"x":200,"y":200,"wires":[["81b80fa6b06745f3"],[]]},{"id":"4de891d00757754c","type":"server-state-changed","z":"05c4ab44eb759632","g":"a30a2fa2027e9c8d","name":"Downstairs Leak Detected","server":"3aa13fed.bf745","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.flood_sensor_downstairs_water_alarm_water_leak_detected","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","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"},{"property":"noti_title","propertyType":"msg","value":"WARNING! FLOOD DETECTED","valueType":"str"},{"property":"noti_msg","propertyType":"msg","value":"A FLOOD HAS BEEN DETECTED - DO SOMETHING!!!","valueType":"str"}],"x":190,"y":160,"wires":[["81b80fa6b06745f3"],[]]},{"id":"48361aa32deff29f","type":"inject","z":"05c4ab44eb759632","g":"a30a2fa2027e9c8d","name":"TEST BOTH","props":[{"p":"payload"},{"p":"noti_title","v":"WARNING! FLOOD DETECTED","vt":"str"},{"p":"noti_msg","v":"A FLOOD HAS BEEN DETECTED - DO SOMETHING!!!","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":230,"y":80,"wires":[["657d9ec14b054bc7"]]},{"id":"81b80fa6b06745f3","type":"change","z":"05c4ab44eb759632","g":"a30a2fa2027e9c8d","name":"THIS IS PURELY HERE FOR TIDYING THE FLOW VISUALLY","rules":[{"t":"set","p":"placeholder","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":385,"y":180,"wires":[["c97d2dff8deda40a","657d9ec14b054bc7"]],"l":false},{"id":"657d9ec14b054bc7","type":"change","z":"05c4ab44eb759632","g":"a30a2fa2027e9c8d","name":"PersonA","rules":[{"t":"set","p":"phone","pt":"msg","to":"pocox3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":80,"wires":[["f74474caf3d6d088"]]},{"id":"f74474caf3d6d088","type":"subflow:d178690e34b286ff","z":"05c4ab44eb759632","g":"a30a2fa2027e9c8d","name":"","x":590,"y":80,"wires":[["58f5d32dc17fa8d0"]]},{"id":"58f5d32dc17fa8d0","type":"api-call-service","z":"05c4ab44eb759632","g":"a30a2fa2027e9c8d","name":"FLOOD - Text To Speech (tts)","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t  \"message\": \"TTS\",\t  \"data\":{\t    \"tts_text\": \"WARNING: The house may have flooded! Please investigate! \",\t    \"media_stream\": \"alarm_stream_max\"\t  }\t}\t","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":830,"y":80,"wires":[[]]},{"id":"29cbe9dfdc3246b0","type":"change","z":"05c4ab44eb759632","g":"a30a2fa2027e9c8d","name":"PersonR","rules":[{"t":"set","p":"phone","pt":"msg","to":"rosalind_s_redmi_note","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":140,"wires":[["8afdbdbf97e3ad5e"]]},{"id":"8afdbdbf97e3ad5e","type":"subflow:d178690e34b286ff","z":"05c4ab44eb759632","g":"a30a2fa2027e9c8d","name":"","x":930,"y":140,"wires":[["2a3ff59fca1c2f85"]]},{"id":"2a3ff59fca1c2f85","type":"api-call-service","z":"05c4ab44eb759632","g":"a30a2fa2027e9c8d","name":"FLOOD - Text To Speech (tts)","server":"3aa13fed.bf745","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_{{ phone }}","areaId":[],"deviceId":[],"entityId":[],"data":"{\t  \"message\": \"TTS\",\t  \"data\":{\t    \"tts_text\": \"WARNING: The house may have flooded! Please investigate! \",\t    \"media_stream\": \"alarm_stream_max\"\t  }\t}\t","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1170,"y":140,"wires":[[]]},{"id":"3aa13fed.bf745","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]

That said, no idea if it’s because I’ve been testing too much or what but I seem to have clogged something up and I’m not getting any notifications through from HA at all now…! It was working a few minutes ago tho

1 Like