Listener for sensor value change and save it in BD

Hello, i will have a utility meter to monitor my power consumption but i want to save it in a tablet.

There is any way to detect any change of value and save it on my tablet? Thanks

Hi and welcome to the forum.

Unfortunately, there is no where near enough info to help you.

Is node-red running on the tablet?

How would you want this value saved - in a file? in a database?

changes can be detected by use of the RBE node.


If you are very new to node-red, can I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Hello. I have many flows in NR.

I have Node-RED running in Home Assistant Addon.
I want save the value in mysql table.

I already have a flow to insert data in a table. But in this case i need any trigger to detect value changes and save it on table.

There is any node listener to detect value changes and start flow to save data?

Where does the value come from(what node)?

Did you look at the rbe node? It can block unless value changes.

I will search about rbe node.

The value comes from entity node (i think is this node to receive the value of sensor)

I already read documentation about RBE node and is this i want.

But how i can start flow automatically when rbe node value changes?

Sorry. I have no idea how this HA entity thing works. If it fires a msg like MQTT does then simply wire it to the rbe node then prepare the SQL then write to database.

Maybe ask on HA forum? Most people here use node-red without HA.

Ok. Thanks about your help