Why does ioBroker.sonoff tries to set the relay state via "tele/DeviceTopic/POWER"?
Hello,
I am trying to pair my own multiplatform IoT firmware with ioBroker.
I have a question about MQTT protocol for ioBroker
My firmware supports most of Tasmota syntax, so cmnd, etc, are mostly working. I also publish a "tele" json packet periodically.
IObroker is able to detect my device:
but when I try to change the POWER1 or any other switch state, the new state becomes red and my device does not respond.
I looked at the packets with Wireshark:
Suprisingly, the ioBroker seems to be publishing a "tele/DeviceTopic/POWER" instead of "cmnd/DeviceTopic/POWER".
More info about the packet - you can clearly see it's a TELE with POWER ON:

It seems that something is wrong or is missing on my side, but I am unable to determine what.
Can someone experienced in ioBroker inner workings can tell me what would cause the ioBroker to think that "tele" is a command topic? Which Tasmota packet/MQTT support am I missing?
NOTE: I also get:
| sonoff.0 | 2023-01-24 12:05:16.336 | warn | (22540) Client [obk8C112233] Message 125 deleted after 11 retries |
Please post a debug log from sonoff adapter of such a case ... maybe we can see more there
Hello, I may be doing something wrong, but first I changed log level to "silly" in iobroker.json and in 3 minutes I got 6GB log file which was unacceptable, now I am at log level "debug":
And after I see that iobroker received tele from my device, I change POWER2 to true, and then the value is shown in red and in log I got only:
2023-01-24 13:06:36.876 - [33mwarn[39m: sonoff.0 (16572) Client [obk8C112233] Message 19 deleted after 11 retries
2023-01-24 13:06:52.930 - [33mwarn[39m: sonoff.0 (16572) Client [obk8C112233] Message 20 deleted after 11 retries
2023-01-24 13:07:04.976 - [33mwarn[39m: sonoff.0 (16572) Client [obk8C112233] Message 21 deleted after 11 retries
2023-01-24 13:07:08.981 - [33mwarn[39m: sonoff.0 (16572) Client [obk8C112233] Message 22 deleted after 11 retries
2023-01-24 13:07:25.034 - [33mwarn[39m: sonoff.0 (16572) Client [obk8C112233] Message 23 deleted after 11 retries
2023-01-24 13:07:41.078 - [33mwarn[39m: sonoff.0 (16572) Client [obk8C112233] Message 24 deleted after 11 retries
2023-01-24 13:07:57.126 - [33mwarn[39m: sonoff.0 (16572) Client [obk8C112233] Message 25 deleted after 11 retries
2023-01-24 13:08:13.201 - [33mwarn[39m: sonoff.0 (16572) Client [obk8C112233] Message 26 deleted after 11 retries
2023-01-24 13:08:31.259 - [33mwarn[39m: sonoff.0 (16572) Client [obk8C112233] Message 27 deleted after 11 retries
2023-01-24 13:08:45.316 - [33mwarn[39m: sonoff.0 (16572) Client [obk8C112233] Message 28 deleted after 11 retries
2023-01-24 13:09:01.391 - [33mwarn[39m: sonoff.0 (16572) Client [obk8C112233] Message 29 deleted after 11 retries
2023-01-24 13:09:17.447 - [33mwarn[39m: sonoff.0 (16572) Client [obk8C112233] Message 30 deleted after 11 retries
Source:

Am I using log incorrectly?
NOTE: I reboot after each change.
iobroker.json sets the loglevel fort the js-controller, this is not what you want :-)
You want: Admin - Instances - enable expertmode - expnd the sonoff.0 instance, set "loglevel" to debug (silly not needed).
@Apollon77 I will do that right now but I will report now two more findings.
-
It seems that Tasmota devices are also getting "tele/tasDevice/POWER2" with "ON" argument as a command - so the broker is using "tele" instead of "cmnd" ? This is sent when I toggle RELAY on ioBroker GUI

-
When I changed my firmware to process "tele/devName/POWER2" as command with payload as argument, it works, you can see video I uploaded on our forum in this post: https://www.elektroda.com/rtvforum/viewtopic.php?p=20402828#20402828
My question now would be - is it really true, is sonoff iobroker plugin using tele/devName/POWER2 ON to toggle power on on TAS device? Or is my wireshark failing me? Or did I configure something very, very wrong... I am really unable to capture any other packets.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions. Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte enthalten sind bzw. aktualisiert diese. Vielen Dank für Eure Unterstützung.
ich denke ich habe was ähnliches.
` on({id: 'sonoff.0.buero.POWER', change: "any"}, function (obj) {
log('power', "warn");
log(obj, "warn");
});`
`
| 21:04:52.842 | warn | javascript.0 (3468) script.js.Licht.Bewegungsmelder: {'id':'sonoff.0.buero.POWER','newState':{'val':false,'ts':1697396692840,'ack':true,'lc':1697395167743,'from':'system.adapter.sonoff.0','q':0,'user':'system.user.admin'},'oldState':{'val':false,'ts':1697396387793,'ack':true,'lc':1697395167743,'from':'system.adapter.sonoff.0','q':0,'user':'system.user.admin'},'state':{'val':false,'ts':1697396692840,'ack':true,'lc':1697395167743,'from':'system.adapter.sonoff.0','q':0,'user':'system.user.admin'}} |
|---|---|---|
| 21:09:55.846 | warn | javascript.0 (3468) script.js.Licht.Bewegungsmelder: power |
| 21:09:55.847 | warn | javascript.0 (3468) script.js.Licht.Bewegungsmelder: {'id':'sonoff.0.buero.POWER','newState':{'val':false,'ts':1697396995844,'ack':true,'lc':1697395167743,'from':'system.adapter.sonoff.0','q':0,'user':'system.user.admin'},'oldState':{'val':false,'ts':1697396692840,'ack':true,'lc':1697395167743,'from':'system.adapter.sonoff.0','q':0,'user':'system.user.admin'},'state':{'val':false,'ts':1697396995844,'ack':true,'lc':1697395167743,'from':'system.adapter.sonoff.0','q':0,'user':'system.user.admin'}} |
| 21:14:59.835 | warn | javascript.0 (3468) script.js.Licht.Bewegungsmelder: power |
| 21:14:59.835 | warn | javascript.0 (3468) script.js.Licht.Bewegungsmelder: {'id':'sonoff.0.buero.POWER','newState':{'val':false,'ts':1697397299831,'ack':true,'lc':1697395167743,'from':'system.adapter.sonoff.0','q':0,'user':'system.user.admin'},'oldState':{'val':false,'ts':1697396995844,'ack':true,'lc':1697395167743,'from':'system.adapter.sonoff.0','q':0,'user':'system.user.admin'},'state':{'val':false,'ts':1697397299831,'ack':true,'lc':1697395167743,'from':'system.adapter.sonoff.0','q':0,'user':'system.user.admin'}} |
| 21:20:04.879 | warn | javascript.0 (3468) script.js.Licht.Bewegungsmelder: power |
| 21:20:04.879 | warn | javascript.0 (3468) script.js.Licht.Bewegungsmelder: {'id':'sonoff.0.buero.POWER','newState':{'val':false,'ts':1697397604877,'ack':true,'lc':1697395167743,'from':'system.adapter.sonoff.0','q':0,'user':'system.user.admin'},'oldState':{'val':false,'ts':1697397299831,'ack':true,'lc':1697395167743,'from':'system.adapter.sonoff.0','q':0,'user':'system.user.admin'},'state':{'val':false,'ts':1697397604877,'ack':true,'lc':1697395167743,'from':'system.adapter.sonoff.0','q':0,'user':'system.user.admin'}} |
| 21:25:09.879 | warn | javascript.0 (3468) script.js.Licht.Bewegungsmelder: power |
wenn man jetzt auf power einen listener on change "any" dann wird dieser immer wieder getriggert.... je nach anwendung sehr mühsam.