Hello everyone,
I am creating this thread because I am running into problems with the Shelly Plug S. I have recently ordered four of them and started to integrate them into my IoT Setup via MQTT (since my current setup is entirely MQTT based). Although the MQTT Control works to some degree, there occurs an issue that I couldn't solve on my on. I can toggle the Plugs with "on"/"off"/"toggle" commands and read out data from the mqtt topics as for example the power consumption, however every time I issue an "on"/"off"/"toggle" command in the /command topic the MQTT Connection to the broker is lost (Although the command is executed). Usually it connects again within seconds, which makes it still somewhat usable but sometimes it takes weigh longer (i really can't say wether it's 2 minutes or half an hour, but it's too long to use it as a switch in everyday life), which is just not feasable.
Here are a few specs/description of the enviroment to maybe give a clue what's going wrong:
Mosquitto Broker on Raspberry 4 in LAN (config file appended)
Stable WiFi Connection (about -60dBm)
MQTT authentication via Username/PWD
I know that the Plug disconnects from the MQTT Broker because I read that in the MQTT console/log and the "will" MQTT topic also indicates that the plug went offline. It says:
Received PUBLISH from mqtt-explorer-a70a7a93 (d0, q0, r0, m0, 'shellies/shellyplug-s-BBA771/relay/0/command', ... (6 bytes)) //Sending "toggle" from MQTT Explorer (My Windows MQTT Cleint programm)
1642942995: Sending PUBLISH to shellyplug-s-BBA771 (d0, q0, r0, m0, 'shellies/shellyplug-s-BBA771/relay/0/command', ... (6 bytes))
1642942995: Sending PUBLISH to mqtt-explorer-a70a7a93 (d0, q0, r0, m0, 'shellies/shellyplug-s-BBA771/relay/0/command', ... (6 bytes))
1642942995: Client shellyplug-s-BBA771 disconnected due to protocol error. //That's what I mean
After that the Shelly Plug S reconnects, which is also visible in the logs although i did not include it in this snippet since I'm not sure how relevant that is. However a "whole cycle" of disconnecting and reconnecting is included in the appended log file.
I also tried to use a password without special characters since I read this reccomendation in some other threads when facing similar problems, however nothing changed.
I hope you maybe have a suggestion what to change to fix this.
Thanks in advance.
The appended files: