Okay, so I found a way how to list retained messages and yes, there are some. I’m using 3 main topic paths:
- stat [output]: status information from the device (turned on/off etc.)
- tele [output]: telemetry information from the device
- cmnd [input]: triggering an action on the client device
When I list the retained topics, then the stat and tele topics are containing retained messages, but not the cmnd ones.
Why I thought, the action is triggered by OH? Because of these two lines from the mosquitto log:
2022-05-02T08:17:12: Received PUBLISH from myMQTTClient (d0, q0, r0, m0, 'cmnd/somfyctl/roomAll', ... (1 bytes))
2022-05-02T08:17:12: Sending PUBLISH to somfy-remote (d0, q0, r0, m0, 'cmnd/somfyctl/roomAll', ... (1 bytes))
In the log “myMQTTClient” is OpenHab, so it is publishing the action to close the rollershutters to the client “somfy-remote”.I have analyzed all places from where this action can be triggered and all are rules. I’ve added info logs into all my rules, to make sure, these are not the ones, which are triggering the action. When this unwanted action is published, I do not see any log from the rule, which could signalize it was executed from there.
BUT, yes, the retained messages theoretically could cause issues when there is an invalid state retained, which is then sometimes sent to OH, which could then react wrongly. I’ll try to double check all my device code to make sure, the messages are not retained, then I’ll clear the broker.