Tasmota: Shutter position updates via mqtt are not following previous conventions

Created on 28 Dec 2019  路  4Comments  路  Source: arendst/Tasmota

Have you looked for this feature in other issues and in the docs?
yes

Is your feature request related to a problem? Please describe.
The tasmota adapter in iobroker does not recognize the mqtt messages with topic tele/RESULT.

Currently, the shutter driver sends the following after the shutter stops moving:
tele/tasmota/RESULT = {"Shutter1":{"Position":0,"direction":0}}

Iobroker, for my understanding, expects either stat/RESULT or tele/SENSOR, since that will so far cover all relevant messages. So the shutter driver breaks this convention.

Describe the solution you'd like

Therefore I'd like to request the shutter driver to send:
stat/tasmota/RESULT = {"Shutter1":{"Position":0,"direction":0}}

https://github.com/arendst/Tasmota/blob/development/tasmota/xdrv_27_shutter.ino#L350

Change RESULT_OR_TELE to RESULT_OR_STAT

Describe alternatives you've considered
One could ask the iobroker tasmota adapter to also process tele/RESULT messages, but since this is so far not usual, I'd prefer to adjust the shutter driver.

Additional context
I have tested the above mentioned change, an it's working es expected.

(Please, remember to close the issue when the problem has been addressed)

enhancement

Most helpful comment

I think that the concept of telemetry is to send periodically a summary of variables to the broker. In the other hand, the stat/topic/RESULT is the instant result of an event. In the case of shutters you have an ongoing event with a serie of steps, so seems that the correct path to follow is stat/topic/RESULT for each step, due to those are just the instant result of that ongoing event.

A tele message should be used only for updating the whole status of the Tasmota device IMHO.

So, seems that the request on this issue is aligned to that and to the rest of the drivers:

Therefore I'd like to request the shutter driver to send:
stat/tasmota/RESULT = {"Shutter1":{"Position":0,"direction":0}}

So, IMHO, this change should be implemented.

All 4 comments

Agree, this should be in sync with all other messages. Let me double check

The request was to get updates of the shutterposition and the movement every second the shutter moves. We now have two options. Using the full teleperiod syntax and Post this every second during movement. Or second option is posting the RESULT every second as a stat message. Normally you only get ONE result on a event and not many. Open to discuss with the community what is best in this case. No other driver has this requirement so far.

I thought about publishing events every second. That would be really nice to show, but at least HomeKit seems not to update the GUI for shutters. So the benefit for me would be little.

Anyhow, when publishing intermediate position values, it should be tele/STATE and not RESULT. The iobroker adapter would process that.

Regarding the stat/tasmota/SHUTTER1 value, I agree, this should be fixed in the adapter, as already requested here: https://github.com/ioBroker/ioBroker.sonoff/issues/103

I think that the concept of telemetry is to send periodically a summary of variables to the broker. In the other hand, the stat/topic/RESULT is the instant result of an event. In the case of shutters you have an ongoing event with a serie of steps, so seems that the correct path to follow is stat/topic/RESULT for each step, due to those are just the instant result of that ongoing event.

A tele message should be used only for updating the whole status of the Tasmota device IMHO.

So, seems that the request on this issue is aligned to that and to the rest of the drivers:

Therefore I'd like to request the shutter driver to send:
stat/tasmota/RESULT = {"Shutter1":{"Position":0,"direction":0}}

So, IMHO, this change should be implemented.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jensuffhaus picture jensuffhaus  路  3Comments

grizewald picture grizewald  路  3Comments

JoergZ2 picture JoergZ2  路  3Comments

he-so picture he-so  路  3Comments

wirelesssolution picture wirelesssolution  路  3Comments