Anamico / node-red-contrib-alarm

Nodes to build your own home alarm system. Designed to work easily with (but does not require) homekit.
MIT License
24 stars 8 forks source link

change state from change node.. on node-red startup #12

Open dezral opened 5 years ago

dezral commented 5 years ago

if i use 2 "change state" node, one for "homekit" and one from "value" but on the same "panel" the other on does not change.

like if i change one via homekit from off to on.. the on on "value" does not change with it and oppesit.

trying to make a default state with a node-red change node that injects current status if node-red crashes.

macinspak commented 5 years ago

Hi, thanks for raising the issue. Can you please attach a bit more detail on exactly how you have configured it? And what you are experiencing? It's not 100% clear from that initial description. Are you able to maybe export the flows and attach to this issue? Then anyone who looks at it can simply load the flows and understand what is going wrong for you.

Thanks, Andrew

dezral commented 5 years ago

here it is:

[{"id":"7c5a5d87.2ef32c","type":"homekit-service","z":"e55c426f.48f05","isParent":true,"bridge":"","parentService":"","name":"Sec","serviceName":"SecuritySystem","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","characteristicProperties":"{\n \"SecuritySystemTargetState\": {\n \"validValues\": [1, 3]\n }\n}","x":470,"y":140,"wires":[["425d9431.9cbf6c"]]},{"id":"425d9431.9cbf6c","type":"AnamicoAlarmChangeState","z":"e55c426f.48f05","name":"","panel":"","format":"1","x":680,"y":140,"wires":[]},{"id":"dfc318c4.ad407","type":"AnamicoAlarmStateChanged","z":"e55c426f.48f05","name":"","panel":"","format":"1","sendInitialState":false,"x":280,"y":140,"wires":[["7c5a5d87.2ef32c"]]},{"id":"19887c5b.0facdc","type":"inject","z":"e55c426f.48f05","name":"AWAY_ARM HOMEKIT","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":300,"y":200,"wires":[["895dbaba.7c0c28"]]},{"id":"881a89ec.5d778","type":"AnamicoAlarmChangeState","z":"e55c426f.48f05","name":"","panel":"","format":"2","x":740,"y":360,"wires":[]},{"id":"745df68d.57855","type":"inject","z":"e55c426f.48f05","name":"DIsarm HOMEKIT","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":290,"y":240,"wires":[["ce7be2a0.30972"]]},{"id":"895dbaba.7c0c28","type":"change","z":"e55c426f.48f05","name":"1","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"SecuritySystemTargetState\":1,\"SecuritySystemCurrentState\":1}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":200,"wires":[["7c5a5d87.2ef32c"]]},{"id":"ce7be2a0.30972","type":"change","z":"e55c426f.48f05","name":"3","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"SecuritySystemTargetState\":3,\"SecuritySystemCurrentState\":3}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":240,"wires":[["7c5a5d87.2ef32c"]]},{"id":"f0f5af27.a19b7","type":"inject","z":"e55c426f.48f05","name":"DIsarm set alarm from othernode","topic":"","payload":"3","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":330,"y":380,"wires":[["881a89ec.5d778"]]},{"id":"ccf0f258.8ec988","type":"inject","z":"e55c426f.48f05","name":"AWAY_ARM set alarm from othernode","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":350,"y":340,"wires":[["881a89ec.5d778"]]}]