switch SONOFF with MQTT

Everything about esp8266 and more.

Moderator: leecollings

Post Reply
Stokstaart
Posts: 3
Joined: Friday 26 May 2017 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

switch SONOFF with MQTT

Post by Stokstaart »

hello everyone,
i recently switched from pimatic and i am now trying to find my way in Domoticz.
In Pimatic i managed to get 4 SONOFF switches on MQTT (ESPEASY firmware R120) and i was able to switch them through mqtt.....

Now enter Domoticz, i seem unable to get the right configuration and / rules in place to switch the SONOFF relays. I have one NodeMCU connected with a pir and DHT sensor no problem, plug and play but it's just the switches....

Could anyone point me in the right direction / link a proper tutorial/howto because i am going bonkers here!!!

Thanks!

*)edit typo
User avatar
Westcott
Posts: 423
Joined: Tuesday 09 December 2014 17:04
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: UK - Glos
Contact:

Re: switch SONOFF with MQTT

Post by Westcott »

Hi Stokstaart,
There are several similar topics and a Wiki for Sonoff integration.
No need for MQTT, it works directly.
Might be worthwhile updating to ESPeasy v147.
Zwave - Sigma Z+ stick, Fibaro, Horstmann, Neo Coolcam, EUROtronic
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
Stokstaart
Posts: 3
Joined: Friday 26 May 2017 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: switch SONOFF with MQTT

Post by Stokstaart »

Thanks for the reply Westcott!
So the way to go is to use domoticz http protocol on configuration page, won't the http calls make the system slow? One of the reasons I liked using MQTT was the speed and I was expecting an easy setup seeing the ' domoticz Mqtt option on the configuration page......

I just 'broke' one nodeMCU trying to get things to work so a firmware upgrade was coming anyway :D
User avatar
Westcott
Posts: 423
Joined: Tuesday 09 December 2014 17:04
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: UK - Glos
Contact:

Re: switch SONOFF with MQTT

Post by Westcott »

Hi again,
As far as I can tell, ESPeasy will update Domoticz directly with a JSON call - very fast.
In the other direction you can put the HTTP command to an ESPeasy rule directly into a switch device.
Zwave - Sigma Z+ stick, Fibaro, Horstmann, Neo Coolcam, EUROtronic
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
Stokstaart
Posts: 3
Joined: Friday 26 May 2017 22:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: switch SONOFF with MQTT

Post by Stokstaart »

Thanks Westcott, reflased today and everything seems to working just fine!

Altough i don't understand why there is an Domoticz MQTT option in the ESPEASY firmware if it does not work....??

HTTP seems to be the way to go!!
User avatar
Westcott
Posts: 423
Joined: Tuesday 09 December 2014 17:04
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: UK - Glos
Contact:

Re: switch SONOFF with MQTT

Post by Westcott »

MQTT works OK, it's just another level of complexity.
I think that some things have to use it, otherwise you need to write some custom code.
Zwave - Sigma Z+ stick, Fibaro, Horstmann, Neo Coolcam, EUROtronic
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest