Closed wulfithewulf closed 7 months ago
I finally got around to taking a look at this. The issue appears to be caused by a newer version of the tcl mqtt package that is shipped with newer versions of Androwish. If your tablet is using a newer version of Androwish it will come with version 3.1 of the tcl mqtt package, while older tablets have version 2.0.
The newer mqtt package adds support for MQTT 5.0, and also made some minor changes to how connection status is reported. The plugin.tcl file did not work with these updates to how connection status is reported.
This should be fixed now in commit d01575a6bea84552d83028c447d0f0886a4811e2.
My system is as follows:
I installed the plugin on the decent and configured it as described in the docs. I also disabled all battery saving functions I could find.
Issue: The HA auto-discovery messages were not published to the broker. I checked that by subscribing to topic "homeassistant/#" on the broker.
I manipulated the code (as others in the diaspora did), that the messages would be send regardless of connection state in the method
on_con_event
:But that did not work. I also didn't see the loggings from this function in the log. It seems, that this method is never called. Nonetheless the plugin started to publish status messages.
I then added the line
after 1 ::plugins::mqtt::post_connect_publish
at the end ofstart_client
, which worked. After that I removed the line again.