Oops. read the OP, Jason... Sorry.
Thanks for this, very interesting. I configured a few flows, all working nicely. Regarding prioritization of “What’s Next?”, I vote for:
I just installed this, but when I added the Hubitat palette the config node is grayed out. How do I enable the config?
What version of node-red are you on? This is not compatible with Node-Red 0.x. Need to be on 1.x.
I had just recently figured out how to get websocket info into Node Red and was struggling trying to figure out how to do anything with the info. Your nodes seem to have instantly given me an alternative solution so THANK YOU!
Could either @Guffman or @fblackburn give a use case for the below please? Then I might realize it's something that I didn't know I wanted but will now vote for implementation.
1.03
I figured out that if I drag a "device" into the grid, when I double Click it gives me a config window. I did the connection as shown at the top of this post, using API ID 100 (what is this?) and 192.168.4.40, the address for my Hubitat. But I am not showing any devices being populated in the Device drop down.
If I open the Node-Red console in my RPI, it does show changes, such as a motion sensor going active and inactive.
Also, the device I dragged into the grid has a red triangle. If I hover over it, it shows Invalid properties: server & device id
OK, that's the same way I setup the hubitat config too.
The API ID the application ID (in Hubitat) of your Maker API instance.
So go to Hubitat --> Apps.
Click on Maker API
Look at title bar, and you will see the API ID #. It also shows it in the examples at the bottom of the screen.
Ignore that until you get the connection setup and working.
Remember that you also need to enter the auth token on the second tab of the config.
That did the trick. Thanks!
So as a summary for others, in case it helps:
First thing that came to mind after building a flow to set dimmer levels. That feature would let me define only one “command” node for a device, and pass in the desired level to the node (and other dimmer device command nodes if relevant). Way cleaner than defining a “command” node for each desired dimmer level. More for convenience than for functionality.
Same applies for flows including switches / states, and any other device command that requires arguments.
ex: setting a dimmer level according other conditions
@Guffman @JasonJoel No problem for the command/arguments overridden by the input message, I will try to doing it this week
Have you a link in the hubitat doc where it say it an Application ID
? If it the case I will rename it to keep the same name and avoid confusion. And it make more sense to name it Application ID
than API ID
. I just did not know what that number meant
@danfox52 Can you point me what was confusing for you or which part should be improved in the documentation? Did you take a look to the help of the node? I will try to improve it for other people
Here you go:
https://docs.hubitat.com/index.php?title=Hubitat™_Maker_API
Specifically:
Each endpoint url is made up of the following segments: http:// [hub ip address] /apps/api/[app id] /[endpoint path ?access_token=[access_token]
Thus: [app id]
I'm not sure that really makes it less confusing, but it does make it more technically correct. It may be less confusing if you rename it something like "Maker API App ID", instead of just Application ID.
- How to get to the configuration node.
- Where to get the API ID.
- Where to get the token.
I now have it configured, just trying to get my head around making a flow.
Is there a way to get modes from Hubitat into Node Red?
Not with the current set of nodes. I've been using a websocket connection and the following has worked well for me in a function node fed from the HE hub's events socket:
if (msg.source == "LOCATION" && msg.name == "mode") {
global.set("hubitatMode", msg.value)
node.status({fill:"blue",shape:"dot",text: msg.value});
return msg;
}
Once it's seen a mode change, you can get the current mode with:
global.get("hubitatMode")
I'm working on a patch for node-red-contrib-hubitat that adds a "Mode" node similar to the device nodes. It's almost there... will send a PR to @fblackburn when it's done.