How to store device(Sonoff,s) status in database using node-red?

#1

I want to store device's status e.g
which device connected to mqtt or which device is sending signals(ON,OFF) to mqtt.

0 Likes

#3

What sort of database?
Have a look in flows.nodered.org to see what is available for the database type you want to use.

0 Likes

#4

@Colin i have to store device's ID and Status in database in node-red.
I know node-red support databases e.g MsSql .
But how to integrate it with the sonoffs?

0 Likes

#5

I install mosquitto on my pi and then use OpenHab in the Sonoff 'Controlers' Protocol.
If you look at the thread Coffee pot timer you will see how I set the controler on a SonOff S20 switch. That and the flow should get you pointed in the right direction.

0 Likes

#6

Do you already have the Sonoff's sending data to MQTT? If so then you can use the MQTT In node to get the values into node-red.

0 Likes