Node-RED nodes for hubitat

FWIW, I haven’t really modified my automations in months. And have added just 2 or 3 devices in several months.

So maybe there is an endpoint?

P.S. although I do have a new C-7 to setup this month after 2.2.4 is out.

3 Likes

I have 2 of my 3 RPi 4s running & booting off 128 Gb SSDs and got another SSD yesterday for 3rd. I don't trust Micro SD cards after having 2 fail incl the one running Nose Red. After doing 1st, I ran some benchmarks and it was noticeably faster but I didn't notice any difference in my Nose Red automations but they are already fast.

EDIT: my Node Red automations are fast too! Thanx @aaiyar

2 Likes

Okay Rudolph - tis (almost) the season after all! :grinning:

10 Likes

Hi all,

when I reboot my pi with NR installed(not the C7), my flow shows all the hubitat device nodes as uninitialized, and they won't start working until I redeploy or restart flows. I have done some searching but can't find a definitive answer. Obviously if I am rebooting the pi manually, I can just redeploy, but if it's a power cut, not so easy. is there a way of adding a restart/redeploy sequence into the flow, or a better fix for this?

Thanks
James

One last question for now.
Can I load node red on my laptop, do the work on it. Then transfer it to my BI server?

Yes. I transferred flows from my Intel NUC to my Odroid several months ago. I don't remember any hiccups while doing so.

Actually - now that I think about it, I transferred flows twice: Once from an odroid xu4 to the NUC, and then from the NUC to an odroid n2.

1 Like

No anything about this error? It was an error installing chocolatey.

(node:9840) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

And these

C:\Users\gurul>npm install -g --unsafe-perm node-red
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated bcrypt@3.0.8: versions < v5.0.0 do not handle NUL in passwords properly
npm WARN deprecated bcrypt@3.0.6: versions < v5.0.0 do not handle NUL in passwords properly

added 342 packages, and audited 342 packages in 1m

6 packages are looking for funding
run npm fund for details

4 moderate severity vulnerabilities

To address all issues, run:
npm audit fix

Run npm audit for details.

C:\Users\gurul>npm audit fix
npm ERR! code ENOLOCK
npm ERR! audit This command requires an existing lockfile.
npm ERR! audit Try creating one first with: npm i --package-lock-only
npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\gurul\AppData\Local\npm-cache_logs\2020-11-15T16_07_37_645Z-debug.log

Nevermind

How's easy is it to transfer? Thinking about moving off of my pi over the holidays.

Not difficult. I just backed up the entire $HOME/.node-red directory and restored it.

2 Likes

Yep, that's all there is to it.

1 Like

Cool, I already stole your script for that.

1 Like

My TrueNas server has a jail -- think VM -- for node-red. Assuming it works, what else would I need to do to get it to work with hubitat?

You should look at your NR log to see why it cannot be initialized.
When your NR start does it have access to the network? HE is up?

There is a fallback mechanism if device node is not initialized. When a new message will be received by NR and forwarded to the device (uninitialized), then this device will try to re-initialized itself before consuming the event

You can also use this mechanism to add a inject node with a delay (e.g. the time the network goes up) connected to your device nodes ...

But a better alternative is to use the systemStart (originally sent when HE goes up) event to resynchronize all hubitat nodes. e.g. Use inject node to trigger an event with HTTP node. ex:
Screenshot from 2020-11-15 15-11-02
Screenshot from 2020-11-15 15-10-27
Screenshot from 2020-11-15 15-10-18

But again, figure out why you have this issue by looking at logs

2 Likes

You would need to install the hubitat nodes. Should be able to go to palette in node-red and install it there.

I think this is where I am. I literally just enabled the jail and found the node red ip number.

That worked. Appreciate it. Can you point me to the configuration instructions?

Configuring the hubitat nodes? 1st post in this thread.

1 Like

Thanks