[APP][Pro] Tasmota MQTT

The app is really complex. I’m currently trying to change it so it supports it. But I’m not sure if it breaks something down the road.

I’ll tag you once I get a working version.

Edit:

So the app works using the topic as an identifier. And it will be really hard to find a way to predict the right topic if the topic is unknown.

E.g. These are the topics with prefixes

home/tasmota/tele/steckdose02/STATE
tele/steckdose02/STATE
steckdose02/tele/STATE

And it will be really hard to make a algorithm to filter out everything “unnecessary”. Currently, it works with a three-part topic. And it can switch topic and prefix to look what is the a known topic (tele, stat) and take the other one as the device name

topic prefix messageTyp
tele steckdose02 STATE
stat steckdose02 STATE
steckdose02 tele STATE → would be switched to tele, steckdose, STATE

And I can’t find a way without user input to filter e.g. /home/tasmota/… or everything else.

Tl;dr: I can’t find a way to make it work in the current state of the app.

Hmm. This part: (line 252)

 for (let topic in this.topics) {
            this.subscribeTopic(this.topics[topic] + "/#");
            this.subscribeTopic("+/" + this.topics[topic] + "/#");
        }

Subscribes to the topics, then line 176:

  this.topics = ["stat", "tele"];

Seem to define the topic. Would it not be that easy to add it before the topics, i.e (for example).

this.topics = [“home/tasmota/stat”, “home/tasmota/tele”];

I did try something different, but no joy, and not sure why…

When I receive a tasmota MQTT message, I re-publish it without the “home/tasmota/” so it looks exactly as a default tasmota device, however, homey does not discover the devices…

That is not the problem of the app. It’s on the deeper end.

Since the app generates everything dynamically what the device can do and can’t do, it’s really complex.
And I would to change the app on the ground up how it works. And without knowing the subject that well I will not rewrite this app. There are around 6k devices using this app with the default topic/prefix combo.
So it easiest way would be to change your topics to the default.

1 Like

Ok, not ideal situation, as I will need to reprogram all my custom scripts and that would take forever. But I will have a look what I can do myself

I am new to homey pro, I guess one cannot alter the program on the Homey Pro device to play around with it?

You can, spkesDE just shared with you GitHUB links, you can download then and install via CLI (search for CLI install).
Still I would say, modifying your scripts might be easier, or ? :wink:

I guess yes.Will see how much work is involved. Thanks for all the help so far

1 Like

Thanks, I overlook on the information given. Yes, it will give the updated on each type of changed value.

Hi @spkesDE , I know you will be not happy if I ask, but I will try :slight_smile:
As my Sonoff R2 POW died, I ordered replacement Sonoff Dual R3 v2 (R2 is EOL). Flashed Tasmota on it, seeing a lot of values but unfortunately not in Homey.

Do you think it could be “easily” extended by additional “sensors” ?

Homey - eg. missing current, active power, apparent and reactive power (at least current of active power would be useful)
note : might be pain, as I see it’s reported per switch ;-(


obrazek

Tasmota web

Worst case I would setup MQTT device or maybe DC device and configure it via mqtt but if I could avoid such potential point of failure, would be great.

If anyhow useful, I sent diag - fe782aaa-0aef-499c-ad61-66a4af48d060

MQTT Broker packet details

Packet published {"Time":"2023-06-16T15:59:38","Switch1":"ON","Switch2":"ON","ENERGY":{"TotalStartTime":"1970-01-01T00:00:00","Total":0.086,"Yesterday":0.000,"Today":0.086,"Period":[2,0],"Power":[19,0],"ApparentPower":[57,0],"ReactivePower":[54,0],"Factor":[0.33,0.00],"Voltage":244,"Current":[0.235,0.000],"BL09XX":{"Temperature":44.2}},"TempUnit":"C"}

Thank you.

:pleading_face: :pleading_face: :pleading_face:

Once I find time, I can add these. Not sure how to manage dual socket

1 Like

Thank you, appreciated :slight_smile: Just clarification, dual socket is recognized (switch1, switch2), just not the sensor values on those dual sockets - Power":[19,0],“ApparentPower”:[57,0],“ReactivePower”:[54,0],“Factor”:[0.33,0.00]

1 Like

In case someone will be looking for some solution, in case you have some Tasmota device which provides some sensor data which is not supported eg. by given implementation, seems Device Capabilities can provide easily workaround.

Like in case of Dual R3, parsing JSON MQTT message is working quite well…

Not full example just to get idea how to parse JSON and path (I didn’t know myself).

And resulting device which works aside of Tasmota one :
obrazek

Eg. Voltage and Temperature is taken directly from Tasmota implementation (means no need to include them into flows, parsing MQTT JSON etc.) :

obrazek

obrazek

obrazek

3 Likes

Hello, please i have a 4ch relay and would like to named the channels, is it possible to do it? Or can i add this switch separately? Thank you

You can have workaround using Device capabilities app, like I described above, it’s similar concept

Hey @Adam_P,
I’m not sure how I could implement this. I think this is not possible with the current way how this apps and the homey sdk works.

I have this on my to-do list. I didn’t forget your feature request @Sharkys, as my favorite app breaker :laughing: But I really didn’t find any time nor motivation for this, since this app still requires a ton of work to meet my standards. The Codebase is still a freaking mess…

3 Likes

hi @spkesDE

i have a problem while adding a tasmoto rgb led.
I can add any device I want except this Athom GU10 lamp.

when the config is like this:

GPIO # Component
GPIO00 None
GPIO01 None
GPIO02 None
GPIO03 None
GPIO04 PWM 1
GPIO05 PWM 4
GPIO09 None
GPIO10 None
GPIO12 PWM 2
GPIO13 PWM 5
GPIO14 PWM 3
GPIO15 None
GPIO16 None
GPIO17 None

it is not possible to add the lamp. when I remove now one GPIO config and set it to none, doesn’t matter which one, it will be found. Do you have a solution for my problem?

it is this kind of LED. Thanks a lot

on my homey pro 2019, when I added similar lamps a year ago, in the past everything was working fine with these kind of bulbs.

i also tried older versions of tasmota (tested 10-13) but that didn’t effect the pairing process…

Could you restart the app, try to pair the bulb with and without the gpio config and then send a diagnostics report?

1 Like

Hi, Im switching over to the Tasmota MQTT app for all my sonoff devices which I flashed to TASMOTA.
Everything was working quite nice and fast, however I don’t know how to get the temperature reading from a temp sensor which I connected to SONOFF TH (10/16) module.

I can see it comming in, in the MQTT logs:

20230812-19:49:32   received '{"Time":"2023-08-12T20:49:32","DS18B20":{"Temperature":23.9},"TempUnit":"C"}' on 'tele/hottubpomp/SENSOR'

The device works as a switch, so can turn the hottubpomp on/off via Homey, but cannot do anything with the measured temperature, since its not available.

What am I doing wrong?

Thnx

I really don’t know why it won’t add the Sensor to the device.

Could you install the latest test version, re-add the device, and send me a diagnostics report?

Thanks that test version worked apparently!
Now figuring out the temperature values in combination with the flows.

Thanks again.

@spkesDE would you know please, why minimum refresh interval is set to 3 min max? I wonder why this restriction (I know it’s not set by you but previous author, just wondering). Thank you