<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Connect Sonoff running Tasmota]]></title><description><![CDATA[<p dir="auto">Tasmota is a popular open firmware for the Sonoff switches. It features a MQTT interface and I thought it would be good to connect it to Mycontroller.<br />
I couldn't configure Tasmota to publish in a Mysensors compatible format.<br />
Topic is configurable, but the last part and paypload are fixed and would have to be changed in the sourcecode.</p>
<p dir="auto">Messages of Tasmota look like this:</p>
<p dir="auto">00:00:08 MQT: mygateway-in/25/1/1/0/2/RESULT = {"POWER2":"OFF"}<br />
00:00:08 MQT: mygateway-in/25/1/1/0/2/POWER2 = OFF<br />
00:00:09 MQT: mygateway-in/25/1/1/0/2/RESULT = {"POWER1":"OFF"}<br />
00:00:09 MQT: mygateway-in/25/1/1/0/2/POWER1 = OFF<br />
12:00:22 MQT: mygateway-in/25/1/1/0/2/STATE = {"Time":"2018.05.09 12:00:22","Uptime":"0 00:00:15","Vcc":3.499,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"2.4GHz","RSSI":78,"APMac":"46:..."}}<br />
12:02:00 MQT: mygateway-in/25/1/1/0/2/UPTIME = {"Time":"2018.05.09 12:02:00","Uptime":"0 00:01:53"}<br />
12:05:22 MQT: mygateway-in/25/1/1/0/2/STATE = {"Time":"2018.05.09 12:05:22","Uptime":"0 00:05:15","Vcc":3.499,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"2.4GHz","RSSI":82,"APMac":"46:..."}}</p>
<p dir="auto">Any idea what would be the quickest way to make these devices compatible?</p>
<p dir="auto">Communication of Tasmota: <a href="https://github.com/arendst/Sonoff-MQTT-OTA-Arduino/wiki/MQTT-for-Newbies" rel="nofollow ugc">https://github.com/arendst/Sonoff-MQTT-OTA-Arduino/wiki/MQTT-for-Newbies</a></p>
]]></description><link>http://forum.mycontroller.org/topic/299/connect-sonoff-running-tasmota</link><generator>RSS for Node</generator><lastBuildDate>Tue, 18 Aug 2026 02:33:42 GMT</lastBuildDate><atom:link href="http://forum.mycontroller.org/topic/299.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 09 May 2018 12:18:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Connect Sonoff running Tasmota on Fri, 11 May 2018 22:11:50 GMT]]></title><description><![CDATA[<p dir="auto">Found a workaround using Node-Red, for newbies like me this might be helpful:</p>
<p dir="auto">Flash Tasmota to your Sonoff,<br />
set MQTT topic to e.g. sonoff-1234,<br />
full topic to e.g. /smarthome/%prefix%/%topic%/</p>
<p dir="auto">Install Node-Red, add node-red-dashboard.<br />
Drag a MQTT input, set topic to /smarthome/stat/sonoff-1234/POWER<br />
Add a switch, uncheck  "If msg arrives on input, pass through to output:", let it show state of the input, set on payload to String "ON", off payload to "OFF"<br />
Add a MQTT output, set topic to /smarthome/cmnd/sonoff-1234/power</p>
<p dir="auto">Now you should have a working switch on the Node-Red dashboard, it should always show the state of the sonoff.</p>
<p dir="auto">To show the state of the switch in Mycontroller, add a Function and connect it to MQTT input:<br />
if (msg.payload == "ON") {<br />
msg.payload = 1;<br />
} else if(msg.payload == "OFF") {<br />
msg.payload = 0;<br />
}<br />
return msg;</p>
<p dir="auto">There is a replace function for message payloads, you could use that instead.<br />
Connect a MQTT output to the function, set topic to<br />
mygateway-out/&lt;id&gt;/&lt;child-id&gt;/1/0/2</p>
<p dir="auto">This will post the converted on/off message to mysensors format to be read by the mycontroller mqtt gateway.</p>
]]></description><link>http://forum.mycontroller.org/post/1772</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1772</guid><dc:creator><![CDATA[ragflyer]]></dc:creator><pubDate>Fri, 11 May 2018 22:11:50 GMT</pubDate></item><item><title><![CDATA[Reply to Connect Sonoff running Tasmota on Wed, 09 May 2018 15:19:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ragflyer" aria-label="Profile: ragflyer">@<bdi>ragflyer</bdi></a> topic last character and payload should be parsed with a custom provider. Kindly create a feature request on <a href="https://github.com/mycontroller-org/mycontroller/issues" rel="nofollow ugc">GitHub</a> Page.</p>
<p dir="auto">On the ticket add supporting documents for this ticket. I will work on this when I have time.</p>
<p dir="auto">Thank you!</p>
]]></description><link>http://forum.mycontroller.org/post/1763</link><guid isPermaLink="true">http://forum.mycontroller.org/post/1763</guid><dc:creator><![CDATA[jkandasa]]></dc:creator><pubDate>Wed, 09 May 2018 15:19:52 GMT</pubDate></item></channel></rss>