Please note that this post is a copy of the post from 6 April and is just created due to problem with Google indexing !!!
Node-Red(NR) is Flow-based programming for the Internet of Things.
I have in the past written a lot of posts for Node-RED and the HA implementation makes it easy to interact with HA:s entities.
The best thing is that even if you don't are a skilled programmer, but like logic flows, you can make really advanced things and it really complements the logic that could be made within Home Assistant(HA).
In this post a will do a quick introduction to what is possible with NR together with HA.
Install
Node-RED
Install NR from the "Add-on store" and search for "Node-RED". After the installation activate
- Start on boot
- Watchdog
- Show in sidebar
then go to the ”Configuration” tab, inhibit SSL and then ”Start”.
Node-RED Companion
If you in NR, for example, want to create a temperature entity from some random sensor you also have to install a custom integration using HACS, the "Node-RED Companion". Follow the instructions and then reload HA.
Examples
As an example, check picture, I'm retrieving temperature, with a poll node, from a SONOFF temperature sensor. The resolution is just 0,2 degrees Celsius so taking the average of the last 10 measures I will get more decimals and a smoother output. Then the temperature is sent back to HA with a sensor node
The second flow is getting the temperatures, with a get history node, for the last 60 minutes from the HA database.
.
.
.
To be continued !
No comments:
Post a Comment
Feel free to leave a comment ! ... but due to a lot of spam comments I have to moderate them. Will reply ASAP !