Closed qutschwalze closed 11 months ago
The Problem does not exist in 3.2.0
The MQTT library was changed between 3.2.0 and 3.2.1, went from pubsubclient to async-mqtt-client to solve a reconnection problem. 3.2.1 works fine with Mosquitto, must be an incompatibility with ioBroker.
I´am also using a Mosquitto Broker on a separate Docker Container and have no problems.
A quick test with an ioBroker Setup and the mqtt client in ioBroker works also for me. Maybe it has something to do with the mqtt broker from the ioBroker?
I will try to test this also...
so, I have tested with the mqtt broker from ioBroker and this works also fine for me
mqtt.0 | 2023-06-17 10:11:05.350 | info | Client [ESP-Buderus-KM271] publishOnSubscribe send all known states
-- | -- | -- | --
mqtt.0 | 2023-06-17 10:11:05.345 | info | Client [ESP-Buderus-KM271] publishOnSubscribe send all known states
mqtt.0 | 2023-06-17 10:11:05.149 | info | Client [ESP-Buderus-KM271] subscribes on "esp_heizung/setvalue/#" with regex /^mqtt\.0\.esp_heizung\.setvalue(\..*)?/
mqtt.0 | 2023-06-17 10:11:05.149 | info | Client [ESP-Buderus-KM271] subscribes on "esp_heizung/setvalue/#" with regex /^esp_heizung\.setvalue(\..*)?/
mqtt.0 | 2023-06-17 10:11:05.145 | info | Client [ESP-Buderus-KM271] subscribes on "esp_heizung/cmd/#" with regex /^mqtt\.0\.esp_heizung\.cmd(\..*)?/
mqtt.0 | 2023-06-17 10:11:05.145 | info | Client [ESP-Buderus-KM271] subscribes on "esp_heizung/cmd/#" with regex /^esp_heizung\.cmd(\..*)?/
mqtt.0 | 2023-06-17 10:11:05.096 | info | Client [ESP-Buderus-KM271] connected with secret 1686989465093_5403
for now, I don´t know how to help you... At least it seems not to be a general problem. It must be something special with your setup.
OK, I tried it with an other instance. It works out of the box until I create the setvalue topics.
Could you please describe what you exactly do? Then I could try to reproduce it.
@qutschwalze any news here?
Hello, sorry for the late answer. The problem exist also in 3.2.0. As soon as I restart or shut off my ioBroker instance, it switches back to AP mode. I need to login after ioBroker is back and restart the ESP.
ok, so it has something to do with a restart or shutdown of the ioBroker. I will try to do some tests in that direction within the next days and see if I can find out anything.
I can also export my MQTT-Objects with the "setvalues" and my MQTT configuration if you need it.
@qutschwalze please have a look here https://github.com/dewenni/ESP_Buderus_KM271/discussions/38#discussioncomment-6491537
Hi! It works but it does not prevent the problem when ioBroker is down or rebooting. In this case the board resets itself and stays in AP/Setup mode, then I have to reboot the ESP.
Have you disabled both marked settings?
In my Test-Setup also a shutdown and resort works. But If you enable the setting "Eigene States beim verbinden publizieren" then all commands are send more or less at the same time when the connection established.
But the ESP can only handle one command at the same time. After every command the "Log-Mode" of the Loagmatic is activated again and all values are read again.
So I is in general not a good idea to send more than one command at the same time.
Otherwise please attach your ioBroker Settings and export of your objects.
Soo, I updated the ESP to 3.2.3 and rebooted ioBroker, reinstalled MQTT instance and added your changes. For now it seems that fixes the problem! Many thanks!!
Thanks for the feedback and good to hear that it's finally working.
Hi! I updated my board from Daniel from 2.2 to 3.2.1. Everything works except MQTT. I used the same credentials that I used for 2.2 und I can see in my ioBroker installation that the boards connects via MQTT but then it reboots and stays in Accesspoint Mode.
I compiled the firmware by myself und updated it again via OTA with your version.
Thanks!