Shelly 2.5 comes life by itself

Hello,
I have a couple of Shelly 2.5 set in rolling shutter mode.
I enabled MQTT and I can drive them correctly using HA and Alexa too (via Haaska).
Unfortunately they from time to time come to life activating the shutter. That is not so nice in the middle of the night (yesterday it happened at 2:30 AM!)
It happens also every time I restart HA.
I cannot figure out why.
Here you are my config of Shellies in HA:

- platform: group
  name: "Tapparelle"
  entities: 
    - cover.tapparella_camera
    - cover.tapparella_cameretta
 
- platform: mqtt
  unique_id: "tapparella_camera"
  name: "Tapparella camera"
  state_topic: "shellies/shellyswitch25-E66CFA/roller/0"   
  command_topic: "shellies/shellyswitch25-E66CFA/roller/0/command"  
  position_topic: "shellies/shellyswitch25-E66CFA/roller/0/pos"
  set_position_topic: "shellies/shellyswitch25-E66CFA/roller/0/commnad/pos"
#  availability_topic: "shellies/shellyswitch25-E66CFA/online"
  payload_available: "true"
  payload_not_available: "false"
  payload_open: "open"
  payload_close: "close"
  payload_stop: "stop"
  state_open: "open"
  state_closed: "close"
  retain: false
  optimistic: false
  qos: 1
  position_open: 100
  position_closed: 0
  value_template: '{{ value.x }}'

- platform: mqtt
  unique_id: "tapparella_cameretta"
  name: "Tapparella cameretta"
  state_topic: "shellies/shellyswitch25-00B763/roller/0"
  command_topic: "shellies/shellyswitch25-00B763/roller/0/command"
  position_topic: "shellies/shellyswitch25-00B763/roller/0/pos"
  set_position_topic: "shellies/shellyswitch25-00B763/roller/0/commnad/pos"
#  availability_topic: "shellies/shellyswitch25-00B763/online"
  payload_available: "true"
  payload_not_available: "false"
  payload_open: "open"
  payload_close: "close"
  payload_stop: "stop"
  state_open: "open"
  state_closed: "close"
  retain: false
  optimistic: false
  qos: 0
  position_open: 100
  position_closed: 0
  value_template: '{{ value.x }}'

Do you have any idea about why they suddenly open the shutter?

Thank You

Regards

In the past, your cover configuration used retain: true.

Now I see they use retain: false. When you made the change did you purge the retained messages stored by the MQTT broker?

Mmmm not explicitly, I just restarted the MQTT broker.
Now I stopped the container running mosquito and deleted the mosquitto.db
I hope this can be enough…

There are other ways to purge retained messages but that also works.

Digiblur https://youtu.be/dbSw6VkI-x4 (~7:20) has a video on retained flags and MQTT Explorer, and getting rid of retain flags in your MQTT broker, for reference purpose, use MQTT Explorer is is amazingly useful for that and other stuff.