Versioner sammenlignet

Nøgle

  • Linjen blev tilføjet.
  • Denne linje blev fjernet.
  • Formatering blev ændret.

After seeing some of the stuff my colleague Martin has done with Node-RED (NR), I wanted to switch to oit, despite my KISS strategy, and NR Node-RED just introduces another device to mange.

Installling Node-RED

But, starting it on Docker on my Home Laptop (also used for Home Assistant on Docker and Plex Media Server):

Kodeblok
mkdir /opt/node-red
docker run -d --restart unless-stopped --network=host -v /opt/node-red:/data --name nodered nodered/node-red

And it was running on http://sparrow:1880. I saw some wierd stuff in the start, until i pressed "Deploy" the first time, after that every thing has just bee working.

...

Setting the browser to http://nodered.mos-eisley.dk it hirs hits my Confluence Server (in a Datacenter) and the Apache2 on it proxies it to http://cantina,mos-eisley.dk:10901890 (Home laptop), and the Apache2 on it proxies it to sparrow:1880 (the Docker container on the Home Laptop)

On both Apache2 I have IP Restrictions:

...

With this setup I can use it from xxx.xxx.xxx.xxx and yyy.yyy.yyy.yyy that represents some well known adresses like work and fiber.


Adding Node-RED To Home Assistant

In Node-RED, under Settings → Pallette - Add "node-red-contrib-home-assistant-websocket":

Image Added

In Home Assistant, Add "Node-RED Companion":

Image Added