Node-RED nodes for hubitat

Yep!!

6e4b979ee7dc194f4ce43e823086e64d0d4a138d_2_374x500

(sorry for reposting this)

4 Likes

Thanks. I haven't seen this before.

1 Like

Hmm - I may try switching over to the system driver and see if anything changes. I do see temperature and humidity events being published, just not anything else (I have the device node attribute set to "all"). I have an RM automation based on "illuminance" (and is also triggered at a specific time) that works and I was trying to replicate that in Nodered.

Also, your MS6 seems to give different readings for Lux - mine never shows > 50 so I've had to set the low and high values based on trial and error. Is that a function of the driver or configuration? The device page shows that there is a newer version (2.0.1 - I have 2.0.0) but Hubitat Package Manager doesn't show an update.

1 Like

Nice. Looks really clean. My 1st attempt was a Frankenstein monster but it still works. I've done 4 so far. I gotta say though, that black cord is killing me :stuck_out_tongue_winking_eye:

1 Like

Oh it's a mess on the inside. The buck converter just barely fit - you can also get cables with the converter built into the USB type "A" end which makes things a little easier.

Also for my others I go out the bottom rather than the back.

Yep that was my issue too and @dJOS helped me out!

2 Likes

Well - after switching to the HE driver, I'm now seeing Illuminance events! I'm on a C-5, still on 2.2.2.129 waiting patiently for things to settle down in 2.2.4 (particularly the ZooZ thing as I have 2 of their ZEN25s)

2 Likes

Just pair the Zooz with no security (uncheck all the boxes) and you should be good. I have a bunch of different Zen23/24s from V2 thru V4 some with updated firmware some not and they are working for the most part. You might consider leaving any Zigbee devices on your C-5 because, why not? - thats what I am doing.

Note: on my C-7 I have the Zigbee radio disabled, on my C-5 I have the Z-Wave radio disabled, and on my C-4 I have BOTH radios disabled. Using the C-4 for Alexa and other various network cloud things.

Edit: I am only doing this because I have these devices lying around and am interested in reducing system overhead if possible - also one of the reasons for using Node-RED for example.

I'd forgotten that I was using a "request" node with the command "/devices/deviceID" to get the current state of the MS6 on demand in another flow. The strange thing is that it works perfectly on my "live" instance, but not on my "test" instance. I'm on v1.5.2 of node-red-contrib-hubitat on both ("test" is on a Mac, "live" is on RPi4). Node-red v is 1.2.6 on Mac, 1.1.2 on the RPi4)

I spoke too soon. Events were showing for some time but now it's not working any more (nothing showing in debug since about 11:45 AM central).

I only have the C-5. I haven't gotten a clear answer if there is a C-5 issue with the ZooZ devices or it's only with the C-7)

That was my thinking too - I don't have a ton of devices but I use Homebridge to expose all my devices to Apple Home for remote access. And also because it's fun to tinker to with Node-red :grinning:

1 Like

Ah I thought you were migrating to a C-7.. Staying with the C-5 is a good strategy too because eventually / hopefully the migration tool will allow you to move things over directly.

1 Like

The request node / that request still only gets the cached value in the hub. It doesn't poll the device. So that really should not yield any different results than using the node-red device node.

Also, did you make sure that device has been added to that instance of maker API? If you do a request on a device not in maker API you won't get results.

The cached values are fine - I just want to call this once in the morning (sunRise+120) to get the value and turn on the lights if the lux reading is below the threshold. I found that if there was no change in the illuminance, the lights would not turn on until a change triggered the event which could be much later in the day depending on cloud cover.

Yep - it's there. I can see MS6 readings in the debug pane if I restart Nodered, but then it stops after a while. I've checked the Mac settings to confirm that there is no firewall issue, so a bit baffled as to why it works on the RPi and not on the Mac. I can still control lights (tigger them to turn on/off) from the test instance of Nodered.

OK, but the cached value you get from the request node SHOULD be the exact same value as the cached value in a device node (if the node-red integration is working right). I mean it is fine to do it via request node if you want, but seems to be added complexity for no reason.

But in any case, if request node if working for you - proceed. One extra hit on the hub Maker API interface isn't going to kill anything. :slight_smile:

When you restart Node-Red it gets its initial values via a call to the hub (not via POST events). That is different than getting updates as events happen from the hub. Getting initial values does NOT mean your node-red integration is receiving and processing POST events - completely separate/different mechanisms.

It sounds like your POST events aren't working at all...

1 Like

What does your HE Hub config look like in NR?

What does your Maker API config in HE look like?

2 Likes

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