So I’ve been running Home Assistant now for the last 2 years, and things have been pretty solid (minus me breaking stuff )
The primary reason for Home Assistant is to manage a PV Solar System. Here’s an overview of the current flow of data
Inverter < Banana Pi > Data > MQTT > Node-Red > Home Assistant
The Banana Pi runs a small program (solpiplog) which reads data from the inverter and passed this via MQTT over to Home Assistant.
So here’s my big question. What is the best means of getting the data from Node-Red out onto Home Assistant? At the moment, I’ve got the Node-Red companion, and can “create” sensors that public to Home Assistant. But at times, during start up, Home Assistant API doesn’t seem to be up and running, and I get a ton of error logs.
I have played around with exporting all sensor data back into MQTT, and using .yml file to read those sensors, but then I lose the UI options to manage the sensors.
So which on of the two ways, would you guys say is best to use, or what do you use if you’re also running Node-Red and needing to expose data back to Lovelace dashboard?
I use dynamic sensor creation in Node Red, which are for sensors that are not reacted to in HA, because they will not exist before Node Red creates them.
I use the HA nodes to create other sensors in HA from Node Red, which makes them available from boot up.
I have not looked into statistics, but I guess it is mainly a question about getting the format correct, like making sure that the right unit of measurement is used and so on.
This is normal with restarts, it can’t connect to what is not there. It also doesn’t know it’s just HA being restarted. It has no impact on the system.
If you add a unique_id to the yaml it will be managable from the UI
As for nodered, look for the mqtt in node and drag it out to the workspace. Open it and click the little pencil, add your mqtt server info. Enter the topic of the sensor. Connect that to the sensor node. When you first open the node, select the power config you posted above. Do not go to the config page.
On the same page there is an option to add attributes. Direct them to the corresponding message paths.