Controlling a Sonoff relay (Tasmota) with Mycodo

Greetings. This is my first post so bear with me, please. I have several Sonoff relays that I flashed with Tasmota and can control from their web interface. Since I have these already set up it would be very convenient for me to control the relays using Output Configuration: On/Off: MQTT Publish. I cannot figure out what to put where in the Mycodo configuration settings. There is a box labeled “IP” but I cannot click in it or change the text. I insert the IP address in the hostname box. I have figured out that the payload should be “Power1 1” or “Power1 0” for on and off as this is the command I can type in the console on the Sonoff web GUI. I have tried everything labeled with “topic” listed below including the ones that are group and full, etc. Is perhaps the protocol not compatible?

This is what shows up on the information page of the sonoff GUI:

Sonoff Basic Module

Grow Lamp

Program Version 9.3.1(tasmota)
Build Date & Time 2021-03-09T16:12:28
Core/SDK Version 2_7_4_9/2.2.2-dev(38a443e)
Uptime 0T00:22:15
Flash write Count 84 at 0xF8000
Boot Count 14
Restart Reason Software/System restart
Friendly Name 1 Grow Lamp
AP1 SSId (RSSI) dNET (78%, -61 dBm)
Hostname Sonoff-04
MAC Address 80:7D:3A:18:57:FA
IP Address (wifi) 192.168.1.242
Gateway 192.168.1.1
Subnet Mask 255.255.255.0
DNS Server 192.168.1.163
MQTT Host
MQTT Port 1883
MQTT User DVES_USER
MQTT Client DVES_1857FA
MQTT Topic tasmota_%06X
MQTT Group Topic 1 cmnd/tasmotas/
MQTT Full Topic cmnd/tasmota_1857FA/
MQTT Fallback Topic cmnd/DVES_1857FA_fb/
MQTT No Retain Disabled
Emulation Belkin WeMo
ESP Chip Id 1595386
Flash Chip Id 0x146085
Flash Size 1024 kB
Program Flash Size 1024 kB
Program Size 593 kB
Free Program Space 408 kB
Free Memory 25.9 kB

Any assistance getting this to work would be great so I don’t have to wire a junction box with relays.
Thank you for your help!

-Dino

1 Like

And Kyle, I cannot thank you enough for the inspirational tutorial videos and software. Your work has been the impetus for my daughter, son and I to put together our own (modest)


hydroponic system. Just wanted to say thank you!

1 Like

That’s great! I’ll post a How To for controlling a Tasmota device with Mycodo later and post a link to it here.

Check out the new HowTo I created for controlling Tasmota outputs using Mycodo and let me know if you run into any issues.

1 Like

Kyle! Got the mqtt output working with your writeup! This is a huge time saver overall instead of having to wire relays directly to the Pi! I didn’t have the mqtt server running on my Pi and my host was blank in the Tasmota mqtt. Took 5 min and it just works.

-Dino

1 Like