Thanks @JBrown, I thought I did try that b4 (from your link back to dan.t's reply on the other thread) and didn't work, but it did this time for some reason .
I've got a couple follow up questions from here:
this query took about 30 seconds to 1 min before it came out, is that normal? or is that just showing how busy my hubitat is? (don't have that many devices) less than 20 definitely.
how can I extract just the power value from this attribute? I tried using debug on payload.power and that didn't work. I tried parsing it and that still came out with the same payload output. I just wanna aim for certain device then extract the power value from it. if possible.
thanks guys.
I'll give it ago, the reason why I'm thinking that it might be the hub is because when i click the inject/timestamp, the http request has "requesting" under it and stayed there for 15 seconds, then it came up with the payload after it finished.
EDITED: rebooted, same thing on the http request...maybe because it's docker version?
0.0.17 Works as described so far. Thanks for the continued improvement!!!
Edit: Webhook config didn't work for me. Not sure if it is because I already had Hubitat configured or not but this is what I got when I clicked "Configure webhook":
Was I actually supposed to type something in the box? (EDIT: Yes I was.) The text in there, although 'light grey', made me think it would put that in if I didn't type anything else in the box. And that is the correct IP/port of my node-red server.
You need to set the attribute property in the input message of the device node to receive the current value. Otherwise if you want to set temperature with the command node, you can add arguments property to the input message to set the desired value
Can you confirm that topic property solve your issue or you want the real device name (not the node name)?
Yeah, it's only a placeholder and you need to retype the same thing if it's right. I thought it was confusing to use the placeholder for default value, but you prove me wrong
Hard to visualize, but maybe take the output from the event, run it through a change node? In the change block do a set msg.payload.x to whatever you want. Note, that adding subvariables to a payload only works if the payload is already in json format. If payload is just a single value, you can't use the change block to add additional subvariables unless you overwrite the whole msg.payload with json.
It's a switch (virtual switch). How do I poll Hubitat?
Here's what happens. I have the output from the switch going through a function node into a Boolean node.
Everytime I re-deploy my flows, the Boolean node "forgets" the state of the switch. So ideally, I need something that saves the state of the switch in the Boolean node.
Here I'm doing it manually, but you could do it on a timer, or any other condition you can calculate. The change block sets msg.attribute to "switch".
If you feed a Hubitat event block with a message telling it what attribute to fetch, it will.
Yeah, initialization can be tricky. Can write it to flow/context variables, and the read them back in at startup - but that is kind of a pain. I most often lean towards doing a 1-time manual poll. Basically an inject node set to trigger only once after load.
Like this:
Here is the kick-start I use on mode based lighting, to ensure everything is kosher after a restart: