andrei-tatar / node-red-contrib-smartnora

Node Red Google Home integration
https://smart-nora.eu/
109 stars 24 forks source link

Security node issue #309

Closed Toby-Mills closed 3 weeks ago

Toby-Mills commented 3 weeks ago

Hi @andrei-tatar , I'm trying to implement a flow with the Security node, but I'm struggling, and I see that the documentation for the node is incomplete. Do you know if this node is working correctly?

andrei-tatar commented 3 weeks ago

Hi @Toby-Mills , It should work fine but I admit I never checked it out.

Do you have an example flow of what you're trying to achieve?

Toby-Mills commented 3 weeks ago

Ok cool, I'm trying to pass a message to the node in order to update it. However I'm not sure what should be included in the payload. When I pass it {"isArmed": false} it accepts it, but the alarm status remains 'armed'

andrei-tatar commented 3 weeks ago

this flow works fine for me. I can toggle armed/disarmed.

[{"id":"0cc0c90bccc37286","type":"noraf-security","z":"86c7bfe22f048e9c","devicename":"Security System","roomhint":"","name":"","passthru":false,"nora":"f1e538c1.0315f8","topic":"","twofactor":"off","twofactorpin":"","filter":false,"language":"en","armLevels":[{"n":"home and guarding,SL1","v":"L1"},{"n":"away and guarding,SL2","v":"L2"}],"asyncCmd":false,"outputs":1,"errorifstateunchaged":false,"x":1040,"y":300,"wires":[[]]},{"id":"a51494baece15d35","type":"inject","z":"86c7bfe22f048e9c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"isArmed\": false}","payloadType":"json","x":800,"y":300,"wires":[["0cc0c90bccc37286"]]},{"id":"06d99693a13f0d32","type":"inject","z":"86c7bfe22f048e9c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"isArmed\": true}","payloadType":"json","x":800,"y":260,"wires":[["0cc0c90bccc37286"]]},{"id":"f1e538c1.0315f8","type":"noraf-config","name":"NORA","group":"seceani","twofactor":"off","twofactorpin":"","localexecution":true,"structure":"Seceani","storeStateInContext":true,"disableValidationErrors":false,"sendDeviceNameAndLocation":false}]

image

Toby-Mills commented 3 weeks ago

Thanks @andrei-tatar I tried your flow and it worked fine. I think my problem was elsewhere in my flow. Thanks for the help :)