As I said they are not always the same. Right now I'm missing two: one is a flag that I used as a dummy to let the OPII aware if it was "winter" or not (I turned on the switching schedule and stopped automatic irrigation, tings like these). The other one was a "button" as OPII called them, a macro I used to open a roller shutter. But they change almost everytime I reboot the Raspberry and OLB with it), they stay the same if I reboot only the Home Assistant server. I did a couple of test of restarting the OLB service in the beginning but then i gave up.
EDIT: Had to restart tonight after installing ConBee and I noticed some voices in the log of HA. These are just "buttons" that are configured in the OPII but I never actually used them (none of them is one of the ones that disappear); they show up in HA and seem to work fine, so I don't know if it's a real error or if it has connections to my previuos issue.
Dettagli registro (ERROR) Logger: homeassistant.util.logging Source: util/logging.py:141 First occurred: 23:41:24 (4213 occurrences) Last logged: 23:42:22 Exception in availability_message_received when handling msg on 'omnilink/status': 'online' Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/debug_info.py", line 34, in wrapper _log_message(msg) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/debug_info.py", line 24, in _log_message messages = debug_info["entities"][entity_id]["subscriptions"][ KeyError: 'switch.tapfmapri' Exception in availability_message_received when handling msg on 'omnilink/status': 'online' Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/debug_info.py", line 34, in wrapper _log_message(msg) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/debug_info.py", line 24, in _log_message messages = debug_info["entities"][entity_id]["subscriptions"][ KeyError: 'switch.tapcucapri' Exception in availability_message_received when handling msg on 'omnilink/status': 'online' Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/debug_info.py", line 34, in wrapper _log_message(msg) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/debug_info.py", line 24, in _log_message messages = debug_info["entities"][entity_id]["subscriptions"][ KeyError: 'switch.tapsalasxapr' Exception in availability_message_received when handling msg on 'omnilink/status': 'online' Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/debug_info.py", line 34, in wrapper _log_message(msg) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/debug_info.py", line 24, in _log_message messages = debug_info["entities"][entity_id]["subscriptions"][ KeyError: 'switch.tapsaladxapr' Exception in availability_message_received when handling msg on 'omnilink/status': 'online' Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/debug_info.py", line 34, in wrapper _log_message(msg) File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/mqtt/debug_info.py", line 25, in _log_message msg.subscribed_topic KeyError: 'omnilink/status'
EDIT 2: I'm putting all my experience here so I can maybe help someone else who gets the same problems: after a reboot many many units and switches were gone and I couldn't get them back even after many reboots. So I made a couple of tries (cancel the topics with MQTT explorer, monitoring communication). In the end what worked for me is a complete restart of the Mosquitto service with a SSH command. The only downside is that after that in Home assistant the original buttons don't work anymore, I have new istances of them with a trailing _2 (Ie if I had switch.button_to_do_things I now have an entity named switch.button_to_do_things_2).
I have to mention that I also added some buttons to the HAI console in PC ACCESS, and they didn't show up until the moqsuitto restart.
I'll try to dig deeper in the weekend and will leave here my results.