So, I'm new to Node-Red and Hubitat but I have a fair understanding of tech stuff like this. Problem is I cannot get Node-Red to play nice with Hubitat. I used the following video tutorial to set up Node-Red:
When I set up the mode to test the connection to Habitat, I get successfully deployed. But instead of the mode returning a value of "day" (or whatever the mode is) I get "uninitialized" instead. When I check the debug log I get "Unable to initialize mode: Cannot read properties of undefined (reading 'name')".
If it's helpful, I've tried this on two different macs with the same exact result. I've updated everything to the latest versions and I've got the green tick in Node-RED on when I configure the webhook.
Any help or suggestions would be much appreciated.
Is Node Red working to control other devices and just not returning a value for Mode? Please share a screenshot of your Maker API config for Node Red and also the Hubitat Config Node in Node Red. Be sure to hide your access token when sharing.
Strange - I am getting the same thing and I know that my HE/Node-RED config is correct (ALL my automations are in NR). I don't use any "modes" in HE, so had never tried this before.
And I didn't see anything to indicate any errors when I pasted the token into Node-RED. For fun, I entered the token in rather than pasting (making sure to check each character) and I still have the same result.
Also, just for test it, I connected my mac via lan cable and used the new IP that came with that connection. Still no change.
I realized I could get power levels and states of various lights and even the mode for my ring alarm. They don't update very quickly, but they do update.
So, I tinkered the the ModeAPI to to make sure there were actual modes set and that didn't seem to matter. Having said that, once I went into my dashboard and set the mode, it refreshed and tada!
Thanks so much for all the help everyone. I think I'm going to really enjoy tinkering with this project.
I spent several hours trying to solve this bug. Then, after finding your post, I simply selected a mode on the Dashboard, and that solved it.
Thank you!
To be honest, I feel that it was a completely unnecessary and illogical problem, a real time waster.
I’m glad it was helpful. I’ve encountered so many things like this in the last three weeks that this problem seems trivial to me now. I agree, these weird problems seem so off in the weeds from what I’m actually trying to accomplish.
But for an old guy who hasn’t done any programming since the days of turbo c and ms dos, I’m holding my own. I’ve even managed to get my ring contact sensors to tell my nest thermostat what to do! And that was no easy task.