[APP][Pro] Tasmota MQTT

This is not nearly as needed as getting temp-sensors in homey, but I also have a tasmota device which sole purpose is to monitor the status of my kitchen fan. (To manipulate the ventilation system in the house…)
That would also be cool to have available as a device/sensor in homey.
The payload for this is
{“Time”:“2020-12-04T14:38:51”,“Switch1”:“ON”}
(actually ON means OFF in this setup, I couldn’t find out how to invert the signal so the homey device would need to be inverted to show the correct status)

Thanks for the info, it is really helpful. Id field available only for some sensors so it is not really useful for cases when there is a couple of the same sensors connected to the device. Field name from the MQTT payload (DS18B20-1, DS18B20-2 in your data) is much better.
Didn’t really get what you are asking to support in your last post. If you need to invert on/off state of the switch you can use tasmota’s commands “StateText1 ON” and “StateText2 OFF”. This will invert the signal.

What I would like is to make a “sensor” of a tasmota “switch” - like an external switch. (in this particular case I have connected the status-LED of my kitchen ventilator to a IO pin on the ESP8266 and configured tasmota to use this pin as a switch) .
The inverting is solvable other ways, That was just to say that I am a newbie… :))

Interesting :slight_smile: Just by tapping into the LED leads, or are you current-limiting in any way?

Directly. It’s just a status LED, it measured 3V so that should be fine.

Well, if that LED is driven with 20mA or more, you may blow up the GPIO port :sweat_smile: (ESP8266’s can’t sink more than 20mA)

That I don’t know. My friend who actually knows electronics and helped with the project said it would be fine - and it’s been in “production” for 3 weeks now :slight_smile:
But thanx - will ask him if we should do something about this in “next gen” - The WIFI coverage inside a metal kitchen ventilator is not so great so I have ordered a new ESP8266 with support for external antenna.

Hi everybody. Version 0.8.0 is under test now. You can install it here: https://homey.app/en-gb/app/com.paveld.tasmota/Tasmota-MQTT/test/ What is new:

  1. Biggest thing: sensors. Added support for Temperature, Humidity, Dew point, Pressure, Carbon dioxide, Illuminance, Particles in the air parameters (PM2.5 etc), UV index, Frequency and changed the way how the application works with power monitoring (now this data processed same way as for other sensors). If you need any other value of the sensor - let me know.
  2. Improved/optimized a lot of code. The application starts much faster now. Also, these optimizations should make support of the code in the future much easier.
  3. Support for the devices without relays. Previously it was impossible to have a device without a single switch and now you can have tasmota device with sensors only
  4. Added flow card to trigger that activates on new tasmota firmware release (checked once per 24 hours). So you can have for example flow that will show you a notification when you can update your devices.
    This update is the biggest one since the first release. A lot of code was modified and improved so there is a big chance that there will be bugs. Consider this before installing it. I will keep this version in testing for at least a week. If you are using devices with power monitoring (like sonoff pow2) I recommend you to remove then and to add them again in new version (same operation if you rollback to 0.7.2).
3 Likes

Hi again. I can see my both my single DS18B20 connected to a tasmota , my 5pack of DS18B20’s connected to the same Tasmota, and also all values from the tasmota with BME280 sensor. Good work !! If possible
I can not see the before mentioned “switch” sensor i have connected on one of my tasmotas - But you might not have prioritized that… (and that’s totally fine).

Thanks for testing. As for the “switch” sensor, I keep this in my mind but to tell the truth, I don’t even have a good idea how to implement it. Should it be an option or a separate device type? What to do with multi-socket devices? Should this sensor thing be a configurable per socket or just all sockets should be considered as sensors. etc. First I need to resolve this question and only after that I will implement it.

Did you consider configuring your switch (I suppose it is configured as the relay) as a counter? In this case, it is shown like this:
{“StatusSNS”:{“Time”:“2020-12-15T07:28:12”,“COUNTER”:{“C1”:0,“C2”:9}}} (two counter here).
In this case, I can add support for counters in the application so you will get what you want.

Added later: Maybe not as counter but as “Switch” it will also be possible to add support as sensor.

No, its not the relay - it’s just a GPIO pin configured as a switch.
This senses on a signal, and “switches” when something else is turned off or on.
When “High” (gets 3V on GPIO0 ) its ON, when “Low” (get 0V) its OFF.
SO it’s basically just a sensor.

image
Payload is like this:
{“Time”:“2020-12-04T14:38:51”,“Switch1”:“ON”}

Oh, then I totally missed what you asked me to implement. Yes this one should be relatively easy to add I will do it soon

2 Likes

My English just alright, not good… so Thats probably on me. :slightly_smiling_face:
Thanx a lot for the work on this app!

Published version 0.8.1 to test. Added support for sea level pressure and switches as sensors.
Also, I have a question to all: does anybody need support for counters and devices like this: MPR121 Keyboard (with buttons)? Don’t want to spend time on these features if nobody needs them.

1 Like

I really like you app and I am transitioning all my Tuya Wifi devices to Tasmota slowly and hooking them up to Homey directly.
I however ran into a problem with my blinds/curtain switches. They show up as a switch of 3 individual switches, without a proper interface to manage them… Also because the curtain/blinds type is not linked to them (in Homey) Google Home does not recognise these as blinds and "Open " commands are lost.

My switches are all based on this template in Tasmota:

What I’m expecting in Homey is this (based on Tuya Cloud app):

Is there any way you could create support for these. I’d be happy to help with providing info and testing.

Hi, I will see what I can do. Technically this device is 3 individual switches so it’s behavior and MQTT reports really depend on configuration. If it is not reporting something in MQTT that will allow to differ this device from 3 relays switch there is not much I can do. I don’t have these devices on my hand so I will try to build one myself.
It would be really helpful if you will publish MQTT payload for your device. I am mostly interested in StatusSTS and StatusSNS information. To get them open your device web interface => Console and send commands “Status 10” and “Status 11”. Then copy from console answers to these commands. You can replace all private information like your Wi-Fi network or MAC address of your device with *** (I don’t need this information)

Hi, i am new to Homey. Love it so far, just having trouble getting my Sonoff mini DIY with tasmota 9.2 connected to my homey.
I have MQTT broker and client installed and connect. The see my Sonoff mini, but the Tasmota MQTT app does not find it.

I have been searching for hours and trying all kinds of reboots en reinstalls, but just cannot get it to find my sonoff mini…

Hope you guys can help.

Here is my Log file from the MQTT broker:

20201227-22:07:02 initVars called
20201227-22:07:02 PLAIN Config seems valid
20201227-22:07:02 Starting broker…
20201227-22:07:02 brokerSettings: {“port”:1883,“allowNonSecure”:true}
20201227-22:07:02 Mosca server is up and running
20201227-22:07:02 Retreiving broker data failed: Error: ENOENT: no such file or directory, open ‘/userdata/broker-users.json’
20201227-22:07:24 client connected: homey_89ed8677
20201227-22:07:24 Packet published homey_89ed8677
20201227-22:07:24 Packet published 0
20201227-22:07:24 Packet published 0
20201227-22:07:24 Packet published 0
20201227-22:07:24 Packet published 0
20201227-22:08:13 client connected: DVESB2BC80
20201227-22:08:13 Packet published DVESB2BC80
20201227-22:08:13 Packet published Online
20201227-22:08:13 DVESB2BC80 has unsubscribed from topic homeassistant/status
20201227-22:08:13 Packet published
20201227-22:08:13 DVESB2BC80 has subscribed to topic cmnd/tasmota_B2BC80/#
20201227-22:08:13 DVESB2BC80 has subscribed to topic cmnd/tasmotas/#
20201227-22:08:13 DVESB2BC80 has subscribed to topic cmnd/DVESB2BC80_fb/#
20201227-22:08:13 Packet published {“clientId”:“DVESB2BC80”,“topic”:“homeassistant/status”}
20201227-22:08:13 Packet published {“clientId”:“DVESB2BC80”,“topic”:“cmnd/tasmota_B2BC80/#”}
20201227-22:08:13 Packet published {“clientId”:“DVESB2BC80”,“topic”:“cmnd/tasmotas/#”}
20201227-22:08:13 Packet published {“clientId”:“DVESB2BC80”,“topic”:“cmnd/DVESB2BC80_fb/#”}
20201227-22:08:32 Packet published 0
20201227-22:08:32 Packet published 0
20201227-22:08:32 Packet published 0
20201227-22:08:32 Packet published 0
20201227-22:08:33 Packet published {“Status”:{“Module”:1,“DeviceName”:“Tasmota”,“FriendlyName”:[“Tasmota”],“Topic”:“tasmota_B2BC80”,“ButtonTopic”:“0”,“Power”:0,“PowerOnState”:3,“LedState”:1,“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}}
20201227-22:08:33 Packet published {“StatusPRM”:{“Baudrate”:115200,“SerialConfig”:“8N1”,“GroupTopic”:“tasmotas”,“OtaUrl”:“http://ota.tasmota.com/tasmota/release/tasmota.bin.gz",“RestartReason”:"Software/System restart”,“Uptime”:“0T00:11:11”,“StartupUTC”:“2020-12-27T20:57:21”,“Sleep”:50,“CfgHolder”:4617,“BootCount”:10,“BCResetTime”:“2020-12-27T20:21:51”,“SaveCount”:27,“SaveAddress”:“F5000”}}
20201227-22:08:33 Packet published {“StatusFWR”:{“Version”:“9.2.0(tasmota)”,“BuildDateTime”:“2020-12-21T15:03:40”,“Boot”:7,“Core”:“2_7_4_9”,“SDK”:“2.2.2-dev(38a443e)”,“CpuFrequency”:80,“Hardware”:“ESP8285”,“CR”:“359/699”}}
20201227-22:08:33 Packet published {“StatusLOG”:{“SerialLog”:2,“WebLog”:2,“MqttLog”:0,“SysLog”:0,“LogHost”:“”,“LogPort”:514,“SSId”:[“simply_domotics”,“”],“TelePeriod”:300,“Resolution”:“558180C0”,“SetOption”:[“00008009”,“2805C8000100060000005A00000000000000”,“00000000”,“00006000”,“00000000”]}}
20201227-22:08:33 Packet published {“StatusMEM”:{“ProgramSize”:586,“Free”:416,“Heap”:23,“ProgramFlashSize”:1024,“FlashSize”:1024,“FlashChipId”:“144051”,“FlashFrequency”:40,“FlashMode”:3,“Features”:[“00000809”,“8FDAC787”,“04368001”,“000000CF”,“010013C0”,“C000F981”,“00004004”,“00001000”],“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,45”,“Sensors”:“1,2,3,4,5,6”}}
20201227-22:08:33 Packet published {“StatusNET”:{“Hostname”:“tasmota_B2BC80-7296”,“IPAddress”:“192.168.1.174”,“Gateway”:“192.168.1.1”,“Subnetmask”:“255.255.255.0”,“DNSServer”:“192.168.1.1”,“Mac”:“D8:F1:5B:B2:BC:80”,“Webserver”:2,“WifiConfig”:4,“WifiPower”:17.0}}
20201227-22:08:33 Packet published {“StatusMQT”:{“MqttHost”:“192.168.1.172”,“MqttPort”:1883,“MqttClientMask”:“DVES%06X”,“MqttClient”:“DVESB2BC80”,“MqttUser”:“DVES_USER”,“MqttCount”:2,“MAX_PACKET_SIZE”:1200,“KEEPALIVE”:30}}
20201227-22:08:33 Packet published {“StatusTIM”:{“UTC”:“2020-12-27T21:08:32”,“Local”:“2020-12-27T22:08:32”,“StartDST”:“2020-03-29T02:00:00”,“EndDST”:“2020-10-25T03:00:00”,“Timezone”:“+01:00”,“Sunrise”:“08:43”,“Sunset”:“16:59”}}
20201227-22:08:33 Packet published {“StatusSNS”:{“Time”:“2020-12-27T22:08:32”}}
20201227-22:08:33 Packet published {“StatusSTS”:{“Time”:“2020-12-27T22:08:32”,“Uptime”:“0T00:11:11”,“UptimeSec”:671,“Heap”:22,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“MqttCount”:2,“POWER”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“simply_domotics”,“BSSId”:“76:83:C2:13:8F:17”,“Channel”:11,“RSSI”:100,“Signal”:-44,“LinkCount”:1,“Downtime”:“0T00:00:04”}}}
20201227-22:09:03 getUserArray called
20201227-22:09:28 getLogLines called

Here is my config: (sorry only allowd to post 1 image at a time…).

Here is the error i get