Node-RED nodes for hubitat

@thebearmay ... I'm having the same problem as @stephen_nutt. I updated my webhook; received a green check but none of my Hubitat devices status are getting updated in NR. BUT if I restart NR, they all are initially correct until the status changes in HE. Any suggestions/ideas as to the source of my problem?

Generally resaving the webhook information is enough to restart the sync. Now that you've restarted NR, you may want to try the webhook one more time.

1 Like

I've done that as well but does not resolve the problem.

Silly/obvious question maybe but you do have your maker API instance setup properly? POST Url is set correctly etc. Also make sure you do not have "websocket" checked in the NR config under advanced..

Conversely you COULD try websockets just to see if you get anything but it is not recommended and I think you get dup events etc that you would have to handle.

The Hubitat Nodes definitely work (receives events) for my setup and 3 hubs so something is weird. One of my more complicated configurations: HomeAssistant using the Node-RED addon (then talking to HE via HE Nodes) does have issues if I do not restart Node-RED after an update or change to a config.

1 Like

If the values update on initial load, but not after that, it's basically always a webhook/post address problem. Either the post URL is wrong, something on the host is blocking the messages, or other.

One thing that used to happen a lot is that sometimes there would be a space character in the address, which would screw it up. Make sure you don't have any leading or trailing spaces that you didn't intend to be there.

2 Likes

Hi folks - I'm still quite confused on IP and Port configuration. I've got a Maker API instance set up specifically for Ned Red (which is installed under Home Assistant).

See my screenshots with questions below:

In Maker API, is the URL to post device events to supposed to be the IP of the device where HA/Node Red are running? What determines the port? Or should this be the Webhook address?

In the config node in NodeRed, is the Server the address of the Hubitat Hub? Or the address of HA/Node Red? (Why would I need to tell nodered where it's running?) And what is the Port for the server? What should that match?

Then there's the webhook configuration.
Basically I'm unclear where the IPs in both Maker API and Nodered should point, and what should match what. I looked for documentation on this but didn't find it. Did I miss this?

Where is it documented what "correctly" is?

Ah!!! Just found this configuration post from @aaiyar which helps a lot. Where did port 1880 come from? Is that a default value for nodered? And is Port 80 for hubitat required? That's the http port of course, so does that exclude any other integrations that might also use port 80?

1 Like

Yes 1880 is the default port for node-red.

2 Likes

Thanks. And is Port 80 required on the nodered side?

No.

Also 1880 for Node-RED is if you install Node-RED standalone. I don't offhand remember the port number if it is installed under Home Assistant.

1 Like

Yep just like @JBrown said - it's the default. Also, no you do not need to keep the standard port 80... also your "URL to POST device events to" needs an additional path info like this:

http://[ipaddress]:1880/hubitat/webhook

So if I don't use 80, do I need to change something on the HE side to match? I think the webhook config didn't work when I tried something other than 80. But if it doesn't exclude other integrations, I can just stick with 80.

Still 1880 for me... using the Node-RED addon.

1 Like

You have two choices at the Hubitat end. 80 or 8080. The platform listens to both TCP ports.

My earlier post was confusing so I deleted it.. will post some pics of my HA/NR setup.

This is what I meant in my deleted post..

Note1: On the HA/NR config there is an "endpoint" box which is greyed out. This is required on the HE side. Also you probably do not have to use "/hubitat/c7" you could use something else like "/myc7hub" or whatever. I have multiple hubs and Maker instances so use that naming schema. Whatever you do make sure it appears in both places.

Note2: On the HA/NR side you are defining the webhook call so HA and NR will allow access and on the HE side you are telling HE to use the webhook url. Make sure you also have the "POST location events?" toggled on in HE and you hit "configure webhook" when done in NR.

HE = Hubitat Elevation, HA = Home Assistant, NR = Node-RED.

3 Likes

Thanks @erktrek and @aaiyar . Much appreciated.
@fblackburn This is a great app you've developed. It would help if this configuration information were a little more accessible. Setting up the configuration node and maker api instance are clearly critical to this working, but it took quite a bit of hunting around plus a few new questions to find what I needed. Perhaps it was clearer to others who have used this in the past.
Still, rather than having to hunt down hyperlinks and messages in this very long thread, it would be great to document specifically what the IPs and Ports should be on both ends, and the URLs where applicable.
Don't mean to complain when you've done so much work on this - but it's always frustrating when great work is inaccessible due to skimpy documentation.
Michael

1 Like

I have to agree. This little box is amazing. And the node-red integration is awesome. I came into hubitat and node-red knowing nothing. The setup was a pretty steep learning curve. Thankfully, everyone here was really great about helping out with my silly questions. It would be cool to have some kind of simple wiki for those of use coming in with zero knowledge. I will say, in the couple of months I've had it, I've been able to automate things I never would have dreamed of and I'm even writing my own function nodes in node-red now. So, hang in there @hokfujow it'll get easier as you tinker. Unfortunately, it's a very, very deep rabbit hole. :wink:

3 Likes

Agreed,
To figure it out which kind of doc will be useful:

  • A step by step (as the install node image on first post) how to configure node
  • A detailed description of each field in the documentation section of node-red
    Ex, did you notice this little doc?
  • A step-by-step how to get the internal documentation
  • all of them :smile:
2 Likes