[APP][Pro] Tasmota MQTT

I use a couple of these Multi Switch Sonoff flashed with Tasmota. Is it also possible to implement each switch as a single device?

THX

Yes that’s exactly how it suppose to work when I will implement it. Just need to find time for this.

1 Like

Hi,
For some reason I cannot add my LSC door sensors anymore.
In the MQTT client and broker I see the sensor subscribing to the topic,
but when I search for devices, I get a time out after 30000ms message.
I use:
MQTT Broker: v1.0.5
MQTT Client: v 2.2.3
Tasmota MQTT: v 0.6.0

Oh, I did move the contact at the time it was searching for devices so door sensor stays active and can be found.

As a test I removed my LSC Motion sensors also and tried to reconnect them,
but also these devices I cannot re-add them. Only thin a got is the time out message.
What am I doing wrong or is there something wrong in version 0.6.0 or in Homey version 4.2.0?

Log MQTT Client:
Example: stat/ds_achterdeur/POWER: OFF
Example: tele/ds_achterdeur/RESULT: {…}

Log MQTT Broker:
Packet published {“clientId”:“ds_achterdeur_CDAB08”,“topic”,“cmnd/tasmotas/#”}
Packet published {“clientId”:“ds_achterdeur_CDAB08”,“topic”,“cmnd/ds_achterdeur_CDAB08_fb/#”}

Logging looks ok to me.
Also the motionsensors did work before I removed them, but re-adding them is a problem

I hope someone can help me.
Mauro

@Mauro_Chieppa Application written in a way that when you are looking for new devices shouldn’t see 30000ms timeout at all. Application collects data for 20 s and then publish all devices that was found. The only explanation for your situation I can think of is that your Homey is under heavy load and just can’t process application events in time. Try to disable all applications except Tasmota MQTT, MQTT Client and MQTT broker and try to add door sensors again. Also you can check Homey cpu load by using More -> Settings -> General -> System Information -> About -> Load average. If load more then 200% Homey works really slow in this case you will need to remove some applications.

I checked Homey CPU, but last 1 minute is 56% and 5 minute average was 46%.

When I search for devices and do not move my motion sensor or door sensor,
I will get a message that there is no devices found, as expected.
But when I move 1 device once I still get the message time out after 30000ms.

I also flashed the motion sensor and door sensor with newest tasmota lite version,
but also this does not work.

So the application, when searching for devices, the application just checks the topic at that moment and check if the messages contain a new device, correct?

@pavlo: I did some more research, I think the problem and message come from the MQTT Broker app.
This app is giving me the same time out message sometimes.
I restarted this app and managed to add 2 sensors, after that same message appears,
so I think there is something wrong with that app and I’m deinstalling this app and reinstall it to see if that is giving me a solution… to be continued…

@pavlo: I think the MQTT Broker and MQTT Client are conflicting, when restarting these in the correct order let me add other devices, just one motion sensor is cannot be found, but I will try it later today again

@Mauro_Chieppa Thanks for the update. I would recommend you to MQTT broker not on Homey but somewhere else on Raspberry Pi or Synology NAS (if you have one) in this case MQTT client will not interfere with the broker app.

@pavlo: I will try to install a MQTT Broker onto my Synology

@pavlo: I installed a MQTT Broker onto my NAS, reconfigured my Tasmota devices, removed MQTT Broker, MQTT Client and Tasmota MQTT from Homey.
With MQTTBox I see incoming messages published from my devices.
Installed MQTT Client to Homey, configured the client to look at my MQTT Broker on my NAS.
Installed Tasmota MQTT and I also see incoming message in de MQTT Client log.

But when I want to add a new Tasmota device, I get the Time out message again or the message no devices found. I’m a little confused at this moment. To me everything looks fine, why is Tasmota MQTT telling me no devices or giving a time out. Also when I try to often, Tasmota MQTT stays in a loop when searching for devices and after a while no message appears, only a close button…

@pavlo: Yesterday I did some more testing, but because my phone battery did almost die, I switched to my tablet. For some reason on the tablet the strange behavior was gone. On the tablet there was no time out message. At first I got the message that no devices where found, but after moving the door sensor, both sensors were visible and could be added. After that I tried the motion sensors, also here no problems. So for now I use the tablet to add devices.

Phone is a Samsung S9+, so that is not a really old phone and should work perfectly.
Maybe there is a difference between the new Homey tablet version and the Homey mobile version that is causing the problem. Homey mobile app is up-to-date, I will try to remove the app and re-install it.
For now problem is fixed.

Thanks for the update. The only thing I could tell the problem is in timings somewhere. If Tasmota MQTT application stuck on device search it is most likely application is blocked on callback got from MQTT Client but I never saw such application behavior myself. And I don’t think the problem is your phone. My wife’s much older Galaxy S7 works fine under similar conditions.

1 Like

Hi,
I tried your app that seems to be great for my use.
I think it’s well configured :
Mqtt broker on my Synology
Mqtt client installed
Tasmita mqtt installed
Should I remove the device on Sonoff app ?

Here the logs of mqtt client
20200628-19:00:18 Trigger generic card for stat/tasmota/STATUS
20200628-19:00:18 send message to listeners via realtime api
20200628-19:00:18 stat/tasmota/STATUS: {“Status”:{“Module”:1,“FriendlyName”:[“Tasmota”],“Topic”:“tasmota”,“ButtonTopic”:“0”,“Power”:0,“PowerOnState”:3,“LedState”:0,“LedMask”:“FFFF”,“SaveData”:1,“SaveState”:1,“SwitchTopic”:“0”,“SwitchMode”:[0,0,0,0,0,0,0,0],“ButtonRetain”:0,“SwitchRetain”:0,“SensorRetain”:0,“PowerRetain”:0}}
20200628-19:00:18 OnMessage called
20200628-19:00:18 received ‘{“StatusPRM”:{“Baudrate”:115200,“SerialConfig”:“8N1”,“GroupTopic”:“tasmotas”,“OtaUrl”:“http://thehackbox.org/tasmota/release/tasmota.bin",“RestartReason”:"Software/System restart”,“Uptime”:“6T00:52:32”,“StartupUTC”:“2020-06-22T16:07:46”,“Sleep”:50,“CfgHolder”:4617,“BootCount”:37,“BCResetTime”:“2020-03-27T23:50:37”,“SaveCount”:310,“SaveAddress”:“F4000”}}’ on ‘stat/tasmota/STATUS1’
20200628-19:00:18 Trigger generic card for stat/tasmota/STATUS1
20200628-19:00:18 send message to listeners via realtime api
20200628-19:00:18 stat/tasmota/STATUS1: {“StatusPRM”:{“Baudrate”:115200,“SerialConfig”:“8N1”,“GroupTopic”:“tasmotas”,“OtaUrl”:“http://thehackbox.org/tasmota/release/tasmota.bin",“RestartReason”:"Software/System restart”,“Uptime”:“6T00:52:32”,“StartupUTC”:“2020-06-22T16:07:46”,“Sleep”:50,“CfgHolder”:4617,“BootCount”:37,“BCResetTime”:“2020-03-27T23:50:37”,“SaveCount”:310,“SaveAddress”:“F4000”}}
20200628-19:00:18 OnMessage called
20200628-19:00:18 received ‘{“StatusFWR”:{“Version”:“8.2.0(tasmota)”,“BuildDateTime”:“2020-03-20T14:45:23”,“Boot”:31,“Core”:“STAGE”,“SDK”:“2.2.2-dev(38a443e)”,“Hardware”:“ESP8285”,“CR”:“322/699”}}’ on ‘stat/tasmota/STATUS2’
20200628-19:00:18 Trigger generic card for stat/tasmota/STATUS2
20200628-19:00:18 send message to listeners via realtime api
20200628-19:00:18 stat/tasmota/STATUS2: {“StatusFWR”:{“Version”:“8.2.0(tasmota)”,“BuildDateTime”:“2020-03-20T14:45:23”,“Boot”:31,“Core”:“STAGE”,“SDK”:“2.2.2-dev(38a443e)”,“Hardware”:“ESP8285”,“CR”:“322/699”}}
20200628-19:00:18 OnMessage called
20200628-19:00:18 received ‘{“StatusLOG”:{“SerialLog”:2,“WebLog”:2,“MqttLog”:0,“SysLog”:0,“LogHost”:"",“LogPort”:514,“SSId”:[“SFR_709F”,""],“TelePeriod”:300,“Resolution”:“558180C0”,“SetOption”:[“00008009”,“2805C8000100060000005A00000000000000”,“00000000”,“00000000”]}}’ on ‘stat/tasmota/STATUS3’
20200628-19:00:18 Trigger generic card for stat/tasmota/STATUS3
20200628-19:00:18 send message to listeners via realtime api
20200628-19:00:18 stat/tasmota/STATUS3: {“StatusLOG”:{“SerialLog”:2,“WebLog”:2,“MqttLog”:0,“SysLog”:0,“LogHost”:"",“LogPort”:514,“SSId”:[“SFR_709F”,""],“TelePeriod”:300,“Resolution”:“558180C0”,“SetOption”:[“00008009”,“2805C8000100060000005A00000000000000”,“00000000”,“00000000”]}}
20200628-19:00:18 OnMessage called
20200628-19:00:18 received ‘{“StatusMEM”:{“ProgramSize”:577,“Free”:424,“Heap”:24,“ProgramFlashSize”:1024,“FlashSize”:1024,“FlashChipId”:“144051”,“FlashMode”:3,“Features”:[“00000809”,“8FDAE397”,“043683A0”,“000000CD”,“010013C0”,“C000F981”,“00000004”],“Drivers”:“1,2,3,4,5,6,7,8,9,10,12,16,18,19,20,21,22,24,26,27,29,30,35,37”,“Sensors”:“1,2,3,4,5,6”}}’ on ‘stat/tasmota/STATUS4’
20200628-19:00:18 Trigger generic card for stat/tasmota/STATUS4
20200628-19:00:18 send message to listeners via realtime api
20200628-19:00:18 stat/tasmota/STATUS4: {“StatusMEM”:{“ProgramSize”:577,“Free”:424,“Heap”:24,“ProgramFlashSize”:1024,“FlashSize”:1024,“FlashChipId”:“144051”,“FlashMode”:3,“Features”:[“00000809”,“8FDAE397”,“043683A0”,“000000CD”,“010013C0”,“C000F981”,“00000004”],“Drivers”:“1,2,3,4,5,6,7,8,9,10,12,16,18,19,20,21,22,24,26,27,29,30,35,37”,“Sensors”:“1,2,3,4,5,6”}}
20200628-19:00:18 OnMessage called
20200628-19:00:18 received ‘{“StatusNET”:{“Hostname”:“tasmota-7580”,“IPAddress”:“192.168.1.249”,“Gateway”:“192.168.1.1”,“Subnetmask”:“255.255.255.0”,“DNSServer”:“192.168.1.1”,“Mac”:“2C:F4:32:BE:7D:9C”,“Webserver”:2,“WifiConfig”:4,“WifiPower”:17.0}}’ on ‘stat/tasmota/STATUS5’
20200628-19:00:18 Trigger generic card for stat/tasmota/STATUS5
20200628-19:00:18 send message to listeners via realtime api
20200628-19:00:18 stat/tasmota/STATUS5: {“StatusNET”:{“Hostname”:“tasmota-7580”,“IPAddress”:“192.168.1.249”,“Gateway”:“192.168.1.1”,“Subnetmask”:“255.255.255.0”,“DNSServer”:“192.168.1.1”,“Mac”:“2C:F4:32:BE:7D:9C”,“Webserver”:2,“WifiConfig”:4,“WifiPower”:17.0}}
20200628-19:00:18 OnMessage called
20200628-19:00:18 received ‘{“StatusMQT”:{“MqttHost”:“192.168.1.100”,“MqttPort”:1883,“MqttClientMask”:“DVES_%06X”,“MqttClient”:“DVES_BE7D9C”,“MqttUser”:“DVES_USER”,“MqttCount”:2,“MAX_PACKET_SIZE”:1200,“KEEPALIVE”:30}}’ on ‘stat/tasmota/STATUS6’
20200628-19:00:18 Trigger generic card for stat/tasmota/STATUS6
20200628-19:00:18 send message to listeners via realtime api
20200628-19:00:18 stat/tasmota/STATUS6: {“StatusMQT”:{“MqttHost”:“192.168.1.100”,“MqttPort”:1883,“MqttClientMask”:“DVES_%06X”,“MqttClient”:“DVES_BE7D9C”,“MqttUser”:“DVES_USER”,“MqttCount”:2,“MAX_PACKET_SIZE”:1200,“KEEPALIVE”:30}}
20200628-19:00:18 OnMessage called
20200628-19:00:18 received ‘{“StatusTIM”:{“UTC”:“2020-06-28T17:00:18”,“Local”:“2020-06-28T18:00:18”,“StartDST”:“2020-03-29T02:00:00”,“EndDST”:“2020-10-25T03:00:00”,“Timezone”:"+01:00",“Sunrise”:“04:49”,“Sunset”:“20:57”}}’ on ‘stat/tasmota/STATUS7’
20200628-19:00:18 Trigger generic card for stat/tasmota/STATUS7
20200628-19:00:18 send message to listeners via realtime api
20200628-19:00:18 stat/tasmota/STATUS7: {“StatusTIM”:{“UTC”:“2020-06-28T17:00:18”,“Local”:“2020-06-28T18:00:18”,“StartDST”:“2020-03-29T02:00:00”,“EndDST”:“2020-10-25T03:00:00”,“Timezone”:"+01:00",“Sunrise”:“04:49”,“Sunset”:“20:57”}}
20200628-19:00:18 OnMessage called
20200628-19:00:18 received ‘{“StatusSNS”:{“Time”:“2020-06-28T18:00:18”}}’ on ‘stat/tasmota/STATUS10’
20200628-19:00:18 Trigger generic card for stat/tasmota/STATUS10
20200628-19:00:18 send message to listeners via realtime api
20200628-19:00:18 stat/tasmota/STATUS10: {“StatusSNS”:{“Time”:“2020-06-28T18:00:18”}}
20200628-19:00:18 OnMessage called
20200628-19:00:18 received ‘{“StatusSTS”:{“Time”:“2020-06-28T18:00:18”,“Uptime”:“6T00:52:32”,“UptimeSec”:521552,“Heap”:25,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“MqttCount”:2,“POWER”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“SFR_709F”,“BSSId”:“00:06:91:C8:70:A0”,“Channel”:1,“RSSI”:86,“Signal”:-57,“LinkCount”:2,“Downtime”:“0T00:02:27”}}}’ on ‘stat/tasmota/STATUS11’
20200628-19:00:18 Trigger generic card for stat/tasmota/STATUS11
20200628-19:00:18 send message to listeners via realtime api
20200628-19:00:18 stat/tasmota/STATUS11: {“StatusSTS”:{“Time”:“2020-06-28T18:00:18”,“Uptime”:“6T00:52:32”,“UptimeSec”:521552,“Heap”:25,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“MqttCount”:2,“POWER”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“SFR_709F”,“BSSId”:“00:06:91:C8:70:A0”,“Channel”:1,“RSSI”:86,“Signal”:-57,“LinkCount”:2,“Downtime”:“0T00:02:27”}}}
20200628-19:01:08 getLogLines called
20200628-19:04:22 getLogLines called

Sorry.
It’s working very well.
I have to add the device when I’m on my home network. Not outside :slight_smile:

Glad you succeed. Hope you will Enjoy app. And yes you can use it together with Sonoff application Home assistant and any other home automation.

@pavlo, I’m watching this topic for a while now, you’re doing a really good job with helping others out!
Just wanted to let you know I really appreciate what you’re doing!

@Hermann_Stengel Thank you so much for support and kind words :slight_smile:

When i add led bulb it’s works fine in homey, thank you for update. But if i want to redirect it to homekit using plugins it’s detected as a socket and not a light, so no correct icon and no color controls. @pavlo is it possible to fix this?

Hi all,

is there any kind of how to available? I’m struggling to connect the Broker with the Client.

What do I need to enter into the Client config? IP of my Homey or local host?

thx in advance

Daniel

If the broker is running on Homey, you can use either.