Node-RED nodes for hubitat

I don't use node-red inside of HA, sorry. While lots of people do it, I actively recommend against it as it is quirky.

But what you describe is that the POST events are not making it to the node-red instance. Most likely either they are still going to your old node-red, or if you installed a 2nd maker api/changed the original maker api setup for the new node-red then the POST url isn't correct.

I do remember there is a bit of a trick to get the POST url right when running inside of HA, but I don't remember what it was.

Others on here use node-red inside of HA, so I'm sure someone will chime in soon.

3 Likes

I finally got it figured out, thank you.

1 Like

I can't remember reading this in previous 4,200 posts in this thread but any suggestions on things to look at if a Device Node isn't updating? I can't find a common characteristic when it happens (technically doesn't happen). The majority of the Device Nodes are working as expected but a few are not.

I had this too recent on a switch node and motion nkde.
Only way I could resolve it was remove it from MAKERAPI, save, re add. Remove device from flow, initialise and re add!
Bit of a pain tho. And have not worked out why it happens.

I want to say that clicking the configure webhook button seems to clear up things when I have issues.

1 Like

Happens here too.

Yep PITA too.

Will have to give a try next time!

I too have discovered JSONATA - slowly replacing a bunch of function nodes that basically concatenated strings and also replaced a couple of SQL queries that were getting record counts by using $count(payload) which returns the size of the array (aka record count)!

2 Likes

Anyone using node-red-google-node (node-red-node-google (node) - Node-RED)? I had it working with Google calendar but now Google wants the uri to be https:// vs http://. The setup for the node requires getting a clientID and clientSecret via Google oAuth2 services. The node does get that, but the uri is hardcoded as http:// and Google will delete any projects that are not compliant within the next 3 months.

Is there any workaround or an alternative? I essentially need an event in NR when a calendar entry starts and ends but other than this "built-in" node, have not found anything else.

I asked in the Node-RED community and also on Github but have not received any responses.

Thanks!

Have you seen this node?

I no nothing about it but seems like it might work for your use-case. Google does CalDav I think.. although this looks like it uses http auth... mmmmm...

1 Like

Thanks - will check it out. I may have looked at this before, but worth a second look.

Have you moved your project into 'Production' mode? I just leave mine in 'Testing' mode since it's for personal use only.

image

1 Like

I had but moved it back to “Testing” yesterday. It let me change the uri back to http:// but haven’t had a chance to check it out again. Hopefully, Google will let that work forever!

I've had it this way for more than a year so I think it'll be ok!

1 Like

Hmm - I can't seem to get the Google credentials to authenticate. I have an entry in my hosts file but after I click on authenticate and go through the warnings, it comes back with unable to load page.

Does the hosts entry have to have the port (192.168.1. XXX:1880 pointing to node-red.example.com)? It was working at one point but now it's dead :frowning_face:

Try repopulating the clientId and secret. I've found that I have to do that for the secret any time the config node is authenticated.

I finally got it to work. I had forgotten that the authentication step has to be done on the computer that is running Node-RED🤦🏽‍♂️. Once I did that, everything is working

1 Like

A few critical steps for anyone using node-red-google-node

After setting up the project and getting the Client ID/Client Secret (steps are pretty well documented in the node), the following steps will hopefully help you avoid a few headaches.

  1. Make sure that you do the authentication step from the computer that you are running Node-RED on (where the hosts file was modified to include pointing http://node-red.example.com to the local IP). The authentication will NOT be successful otherwise.

  2. After authentication, just click back on to the main flow page. The "Add" button is not active and if you click "Cancel", the Google configuration will be lost. Just stepping off the node configuration pane saves the configuration.

Hope this helps someone down the road!!

1 Like

I’ve searched through this thread and have not been able to find the help I’m looking for.

The question. I have multiple different flows that I want to send device notifications through Hubitat to my phone. In node red you have to specify the text to send and it asks for a string. Is there a way to set a string variable and then pass that string variable to the Hubitat device notification node I have. That way I only have to have one notification Node and could have multiple variables that point to it.

Not sure this is the best way to do this, but what I came up with was to use a subflow for the actual notification device (and I have several subflows depending on what devices I want the notification to get sent to). Then, in any flow i want to send a message to my phone, I have a function block set the msg.arguments = "text that gets sent to phone" and then flow into the subflow to send the message.

image

Here is another example from my temperatures flow that will send a different message depending on which change node gets called: