Controlling Low voltage relays from Node red/

A thread to explore actuating low voltage devices using ESP relays.
One option is

A second option would be

Which actually looks easier


Has support for Sonoff SV.

The sonoff hardware:

User guide


The ESPyaml stuff is here, be great if you could record any findings here.

Useful links might include





Added the password for MQTT to the config file, and corrected a syntax error to get the config file working.

Next was to test to see if it was working correctly. On a separate Pi opened a mosqitto subscriber using
mosquitto_sub -h -u homeassistant -P <Insert Password> -d -t testTopic

This is the client listening for the messages that were going to be published.
In another window a publisher was started using
mosquitto_pub -h -u homeassistant -P <Insert Password> -d -t testTopic -m "Does this one work?"
This is the one that is publishing the messages for the subscriber to hear.

N.B. I did not like using this method just because the password is published on the screen, in the lines above just replace <Insert Password> with the correct password.

On the subscriber side the output was
Client mosqsub/21212-ethoscope sending CONNECT Client mosqsub/21212-ethoscope received CONNACK Client mosqsub/21212-ethoscope sending SUBSCRIBE (Mid: 1, Topic: testTopic, QoS: 0) Client mosqsub/21212-ethoscope received SUBACK Subscribed (mid: 1): 0 Client mosqsub/21212-ethoscope received PUBLISH (d0, q0, r0, m0, 'testTopic', ... (19 bytes)) Does this one work?

Looking like the MQTT is working.

The next step was to look into reading the MiFlora sensor information over MQTT. I had a quick look around and found a couple of links that might be interesting.

Which looks like it is sending the collected data over MQTT from the miflora sensors.

There is also -

Which looks like it is accomplishing the same thing.

1 Like