Page 1 of 1

switch SONOFF with MQTT

Posted: Friday 26 May 2017 22:18
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

Re: switch SONOFF with MQTT

Posted: Friday 26 May 2017 23:52
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.

Re: switch SONOFF with MQTT

Posted: Saturday 27 May 2017 0:01
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

Re: switch SONOFF with MQTT

Posted: Saturday 27 May 2017 0:26
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.

Re: switch SONOFF with MQTT

Posted: Saturday 27 May 2017 15:47
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!!

Re: switch SONOFF with MQTT

Posted: Saturday 27 May 2017 16:22
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.