Node-RED nodes for hubitat

When I turn on/off a light (from either the Home app or HE dashboard), I do see the event in Nodered, so I guess the POST events does work, just something funky about the MS6.

It looks like the image that you have and I do get the green checkmark on clicking "Configure webhook" and the App IDs match in MakerAPI and Nodered Config node.

AND - today the "request" node is WORKING! The only thing that I can think of is that after I went to look at the config node to confirm that it matched your pic, I clicked on "update" and not "cancel". I thought I had done that yesterday as well, so not sure what changed :man_shrugging:t4:

2 Likes

That's a cool start to the New Year!
The other thing you might want to do is make sure your palette is up to date. I assume you know how to do this but for posterity go to "manage palette" and look for any "update" buttons next to the nodes. You will likely have to restart Node-RED afterwards.

2 Likes

I apologize if this has been asked before, but this is a very long thread!

I have 2 Hubitat hubs (I know, I'm a lightweight!) connected to Node Red and it all works brilliantly.

What I wondered though, is there a way of having nodes coloured differently for each Configuraton Node? I've recently been moving devices from one Hubitat to the other and it would have been really useful in Node Red if one Hub's nodes had been say Light Green and the other one Dark to quickly distinguish which hub they relate to in the flows.

I'm not sure you can do that but dunno - an alternate approach would be to do the naming thing.. like putting a "[hubname] \n " on the front..

Like this.. maybe:

nr278

Requires a bit more effort to maintain though..

2 Likes

I thought @stephen_nutt re-colored his nodes? But that may have been for ALL nodes, not just some - which is not what you asked for.

Seemed like a pain to me, and I think has to be re-done after every upgrade?

1 Like

Yes he did. And at one point of time, I did as well. However, AFAIK, the colors cannot be changed per instance of "node-red-contrib-hubitat"; they would apply to all instances (meaning all Maker API integrations).

2 Likes

Yes, I set it up so that each Hubitat node type is a different color.

image

BUT it's not a pain because you challenged me to create a flow to do it automatically so I click one inject node after every Hubitat Node version update.

Understanding that I know NOTHING about creating nodes, is it possible to make this statement that determines color a conditional based on a value in the node?

image

I assume even if you could, it would require a Node Red restart for the color change to happen.

5 Likes

Also very clever use of the "trigger" node! Have not seen that before..

do you mind sharing that flow. Thanks

1 Like

How and where are you adding that hub name? Is that within Hubitat or Node Red itself?

It's just the "name" property of the node instance in Node-RED. That's why it might be more of a pain to use.. you might see if @fblackburn would consider having an option to prepend the config name in the name property itself in each hub config instance.

Maybe something like this:


I wonder if you could set the color there as well... this whole idea might be more trouble than it's worth though.

note: edited pic to put desired property on appropriate tab

2 Likes

Automatically adding the hub name in front, as you suggest, would be very helpful if it is possible. The colour change was just an idea but any way of distinguishing easily between different hubs works for me. With the amount of hubs some people have a name prefix might be better as they would soon run out of colour options!

1 Like

The other idea maybe would have it as part of the "status" of a node instance..

nr281

just spitballing here.. :baseball:

3 Likes

The hub name would be way too long for my tastes.

BUT, francois could theorhetically always make a user field for a prefix, default to blank, then those that don't want it don't have to use it. :slight_smile:

Would happen even faster if someone did a PR for it in github.

4 Likes

Oh it's a good request "Be able to distinguish nodes from different configs"
With my limited NR experience, I never saw any palette resolving this issue. If any of you have seen this :raised_back_of_hand:

I like the color idea because it keeps the flow clean. I don't know if it's possible, but should be fun to try :slight_smile:
I like the idea of user field for prefix too, but the only small downside, I fear to visually load flows with the same info duplicate under every node.

I'll add this request to github to track it :+1:

6 Likes

@stephen_nutt: While playing with colors, I found an hidden (or not [documentation]) feature of Node-Red

You can use theme in setting to change node's color:

Update settings.js with these values:

    editorTheme: {
       palette: {
          theme: [ // Override node colours - rules test against category/type by RegExp.
              { category: "hubitat", type: "^hubitat hsm$", color: "#f0f" },
              { category: "hubitat", type: "^hubitat hsm-setter$", color: "#ddd" },
              { category: "hubitat", type: "^hubitat device$", color: "#f8f" }
          ]
        }
    }
}

Now I feel sorry for your flow :sweat_smile:

3 Likes

Interesting! Didn't know that.

2 Likes

My color changing process is working just fine as is my entire system (knock on wood). It's not time to start playing with the settings.js file and bringing down my entire home automation system. :smiley:

3 Likes

:confetti_ball: Crisis averted!!! :confetti_ball:
:rofl:

1 Like

Does anyone know what the circle with the line next to my House Lights mean? All of my flows on that page is not working and has dashes around them? I have about ten pages/sheet of flows with different titles and have two pages that are like this? I look around the net but didn't find anything? Thanks

image