-
Notifications
You must be signed in to change notification settings - Fork 4.9k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TuyaMCU MQTT topics vary depending on data reporting trigger #15225
Comments
Have HA to send a 'teleperiod' command instead of a 'sensor 10' to receive a tele/../SENSOR message instead |
How would I do that? From my understanding the Furthermore, I'd like to keep this open in order to discuss on possible solutions on the tasmota side. |
I'd expect the |
The problem is HA not sending the right command Why overloading again and again the embedded software that runs on a constraint MCU to solve issues in the software that runs on computer with much more ressources? |
I'm not exactly sure why tasmota sends the data the way it does, the message looks like this: // topic = tele/tasmota_kinderzimmer_thermostat/SENSOR
{"Time":"2022-03-26T00:22:13","TuyaSNS":{"Temperature":23.5,"TempSet":200},"TempUnit":"C"} Since tasmota does not provide preconfigured devices for Tuya thermostats, my best guess is that this format is simply the result of me manually binding that data (also note that tasmota reports the set temperature as 200°C, because the TuyaMCU uses 200 for 20.0, 215 for 21.5 and so on)
I'd agree if this wasn't the result of data being sent in an inconsistent way. Thinking about it, maybe it would make sense for sensor data to be included in the result returned by the |
You get 20.5 for
Where do you see inconstancy here ? |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
PROBLEM DESCRIPTION
I'm using TuyaMCU based thermostats with tasmota in homeasisstant with the MQTT integration. When homeassistant restarts (or reloads entities), it seems to trigger the tasmota MQTT status reporting.
This results in the current data being spit out on the
stat/tasmota_kinderzimmer_thermostat/STATUS10
topic using the following format:However, when the thermostat temperature is changed using
TuyaSend2 2,240
(set target temperature to 24.0) or buttons on the thermostat, the following message is received ontele/tasmota_kinderzimmer_thermostat/SENSOR
:This now leads to problems in homeassistant, as the topic is different and the data is not recognized anymore. The probably technically correct way of retrieving the information would be to subscribe to the
tele/tasmota_kinderzimmer_thermostat/SENSOR
topic, however, when homeassistant is reloading all entities and requests information usingstatus 10
, this results in the thermostat not displaying the current data.To sum up:
status 10
(homeassistant initial status request), the required data is sent onstat/tasmota_kinderzimmer_thermostat/STATUS10
.tele/tasmota_kinderzimmer_thermostat/SENSOR
(in a different format too...).While this behavior is logical, it creates the issue of either waiting for the teleperiod to trigger once (so that homeassistant receives data on
tele/tasmota_thermostat/SENSOR
or to subscribe tostat/tasmota_kinderzimmer_thermostat/STATUS10
and thus not receiving notifications on external changes. This situation is somewhat suboptimal.See differently phrased explanation for the same problem here: #2567 (comment)
REQUESTED INFORMATION
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:-- Not applicable
Status 0
:weblog
to 4 and then, when you experience your issue, provide the output of the Console log:-- Not applicable
TO REPRODUCE
EXPECTED BEHAVIOUR
Unclear, however, there are multiple solutions:
SetOption59
) for Tuya SNStele/.../SENSOR
topic onStatus 10
stat/.../STATUS10
on TuyaSNS changesSCREENSHOTS
Homeassistant display (missing data) before initial

tele/.../SENSOR
is received:ADDITIONAL CONTEXT
This seems to have been somewhat discussed in #2567 (especially #2567 (comment)), though only scratching the surface and not addressing the root cause.
I'm not really aware of a workaround at the moment, and this seems somewhat simple to fix. In case we can decide on a solution, I'd be happy to contribute the required code to implement it.
The text was updated successfully, but these errors were encountered: