Raspberry PI Image for Homebridge + Node-Red

I think I'm OK on the node-red side. I was trying to update the ring plugin for Homebridge and getting this error, so was wondering if the node-red install somehow conflicted with something on the Homebridge side.

Oh.. sorry, I misinterpreted... And you said 'homebridge' twice. Sorry. :frowning:

I don't have any Ring so I can TRY to install it... but don't know if it needs more.

I do have a Honeywell Thermo running on my Production HB.. maybe that will install fully.

Yep, you're right. Same error almost. :frowning:

Thanks for checking this... I will see if the HB folks can shed some light. :crossed_fingers:t3:

I made a new SD card from the Image and installing Homebridge plug-ins went smoothly enough.

My next hypothesis is that a node-red install 'breaks' Homebridge.

1 Like

FWIW, I have node-red and homebridge coexisting just fine .....
node: 12.18.2
npm: 6.14.5

Installed node-red first, But I have been updating homebridge plugins without issue.

(not using HOOBS).

1 Like

That's what I was thinking as well as the problem happened only after the node-red install (I have successfully updated plug-ins before).

I have created an issue on the Homebridge GitHub repository about this (have said that the issue with after the node-red install).

Here is the link in case you want to add to it https://github.com/homebridge/homebridge/issues/2626

I think the issue may be with the preconfigured Homebridge version (not HOOBS) and installing node-red afterwards.

1 Like

Ah - I see. I installed homebridge and homebridge-config-ui-x via npm ...

2 Likes

@csteele @aaiyar - I got a response from the config-ui-x developer on Github today. Here is his response:

Will try this today hopefully and let you know the results :crossed_fingers:t3:

2 Likes

Lots of Errors installing Node-red that way. So I 'installed it' twice.. 2nd time was 'clean'.

But upgrading HB is great. :smiley:

1 Like

I got lots of warnings but things seem to be working. However, I can't figure out how to stop/restart node-red. When I run node-red-stop from the terminal (config-ui-x), it says command not found. I needed to restart node-red because one of my ui-tables on the dashboard doesn't show up until restarted. I finally just used the "restart server" menu option and that worked, but seems a bit drastic!! Also, node-red started automatically after the reboot, so I'm assuming that the node-red service was also installed and activated, right?

I'm half way done with rebuilding an image.

Ok, that version is up at:
http://homebridge.hubitatcommunity.com/rpi/

2 Likes

There is apparently a new version of hb-config now that installs additional node-red components. I could not use node-red-stop, node-red-start etc. so asked the config-ui-x developer if I was doing something wrong. To restart node-red in the current config, he said to use:

And there is the stuff on the hb-config update...

and

I added node-red-[start|stop|restart|reload] into the Image.

pi@homebridge:~$  ls -l /usr/bin/node-*
-rwxr-xr-x 1 root root  328 Jul 12 08:18 /usr/bin/node-red-log
-rwxr-xr-x 1 root root   54 Jul 12 08:18 /usr/bin/node-red-reload
-rwxr-xr-x 1 root root   99 Jul 12 08:18 /usr/bin/node-red-restart
-rwxr-xr-x 1 root root 3419 Jul 12 08:18 /usr/bin/node-red-start
-rwxr-xr-x 1 root root  228 Jul 12 08:18 /usr/bin/node-red-stop

And hb-config also added:

Screen Shot 2020-07-13 at 7.54.04 AM

2 Likes

I actually meant hb-config in the pre-built Homebridge image (the one that is run to install node-red), but this is great!

To build this newer image, I ran hb-config.. which has 3 menu items to update HB pieces. 1 + 2 + 8. I ran them all. I also ran the Install node-red menu item too.

Screen Shot 2020-07-13 at 8.44.16 AM

1 Like

This image has been SUPER useful and has been running great for me on my Pi 4 Model B!
Thank you so very much.

I have a really dumb noobie question however.

I'd like to add Sonos HTTP API to my PI that has your image on it. While I know i can easily get the files on it, and "install --production" & "npm start", (or node server.js). The question I have is how can i make sure that this is running when this image reboots just like how NodeRed and Homebridge are running on reboot?

Thank you.

@aaiyar - any suggestions on the best way to force Sonos HTTP API running on a Raspberry Pi image?

Just chiming in for any other noobs, I ended up using pm2 for running and managing the node service for Sonos HTTP API .

2 Likes

So I've been running this for HomeBridge and for Sonos HTTP for a while, and it has been FANTASTIC.
Thanks you @csteele.

I'm about to plunge into the world of Node-Red soon, but just realized since I'm using the Homebridge Maker API version, and Node-Red uses Maker API... how do I tell Maker API to send to two different URLs?

e.g. for Homebridge I have URL to send device events to by POST set to: http://192.168.0.67:20010/event

Thanks for any suggestions

1 Like