Well done both, Could you summarise what you had to do to get the MakerAPI POST events reliably received into the NR add-on ?
@stephen_nutt can you share how you did you Pico in a flow. I having a issue with the msg? I try payload.Value and others no luck?
@erktrek Thanks but I try those? I attached the flow? I even try to change the payload.value to payload but still no luck? I also had pushed with payload.value?
what does that first switch node contain?
See this post
Essentially you need to have a "/endpoint" prefix to the web hooks so your POST command looks something similar to
In Mrobi's case he also had a password on his NR instance, so he was getting authentication error in his logs. He simply added the "username:pass@ip" format to the url...AND also had to remove special characters from his password.
I personally don't put a pass on my NR instance since it is not exposed to the web and just creates extra headaches with integrations.
@erktrek Here it is? I have try other and it go to the debug?
you do not need to test for pushed if you have it set in your device node.
It's there. Thanks
Do you have the send events checked?
@erktrek I did and now it's working. Thank you so much for your help and insight. Can you tell me about the Toggle node that you are using??
Interestingly I still get a 401 error whenever an event occurs, but even with that error it still works.
[18/Jun/2020:17:24:35 -0300] 401 -(192.168.2.12) POST /endpoint/hubitat/webhook HTTP/1.1 (Apache-HttpClient/4.5.2 (Java/1.8.0_181)) 18 Jun 17:24:35 - [info] [hubitat device:Away] switch: on 18 Jun 17:24:35 - [info] [hubitat device:Away] Attributes refreshed 18 Jun 17:24:35 - [info] [hubitat device:Away] switch: on [18/Jun/2020:17:24:35 -0300] 204 -(192.168.2.12) POST /endpoint/hubitat/webhook HTTP/1.1 (Apache-HttpClient/4.5.2 (Java/1.8.0_181))
it's an old subflow I need to get rid of.. just a switch and some change nodes. A better solution would be a single change node that sets the msg.command with a jsonata expression like this:
payload.value = "on" ? "off" : "on"
I do like to use subflows because it makes editing easier but sometimes you can go too far..
It takes me a lot re-reading to finally understand that I missed to document this feature
You can set the device with
msg.deviceId and that's why from version 1.0.0, device is no more mandatory when you save
Having the name of the device instead of deviceId would required some tradeoff on performance and/or complexify the node configuration. But you can do similar thing with the
request node to fetch all devices and map the name with ID
I finally got node red up. What’s the node for a state switch. “When x contact sensor goes from open to close or vice versa” thanks in advanced
This is great! Now the big question.... can we set multiple devices?
So can I go:
msg.deviceId = "917, 923, 945"
You want to use the "Switch" node for that. If your using Hubitat device nodes, configure the switch node to evaluate the content of "msg.payload.value".
For a contact sensor, the values are "open" and "closed".
I'm new to hubitat nodes, but from what I see you use the device node for the state change, then you need to use a switch node for open/close.
Another great feature to add would be the ability to define the state in the device node. So you could define the state as "on" and then you'd have 2 outputs on the node 1 for true and 1 for false. Basically a built-in switch node
No but you can use the
function node to send multiple messages and/or
split node to do the job