I just installed it and I can see the announce and discovry scripts being executed. However, my shellies aren’t visible in HASS. I can see each Shelly repsond to the announce request using mosquitto_sub.
I reinstalled the broker add-on and now it works right away! I probably didn’t enable discovery when I first installed it. Sorry for wasting your time. But thanks anyway.
MQTT documentation is confusing AF to a beginner like me
I’ve tried to run your script but unfortunately it did not work. I’m new to home assistant any python script so I must have made an error somewhere.
I’ve put your script without changing any variable here: /config/python_scripts/shellies_discovery.py
the 2 automations I’ve copy pasted here: /config/automations.yaml
and in /config/configuration.yaml I’ve added: python_script:
but under config --> integration --> mqtt it still tells me that there are no mqtt devices. Using MQTT Explorer app, the shelly mqtt stream is showing up
When I added MQTT to integration I’ve checked the “discovery checkbox”. I have now also added this to configuration.yaml:
mqtt:
discovery: true
discovery_prefix: homeassistant
but it did not make any difference. Do I have to add the “homeassistant” prefix somewhere to the shelly config? or do I have to make any changes to the python script?
yes service mqtt/publish is showing up the same as on your screenshot.
I’m getting this error several times:
2019-06-14 13:02:16 WARNING (Thread-2) [homeassistant.components.mqtt] Disconnected from MQTT (1). Trying to reconnect in 300 s
Where can I find the Shelly Discovery configuration?
I’ve now started from scratch, deleted everything and made a new hassio installation with your script and everything is showing up correctly as it should! Thanks
Another question: I have a shelly 2.5 but each relay is controlling a different room. When going into configuration, integration and mqtt, I can only select an area for the whole shelly 2.5 but I would like to select an area for each relay. How can I do this? Thanks
It seems that it’s not working, while my shellies are. I’ve defined my roller shutter in the cover.yaml file manually and they are available and working.
Previously I had all the shelly discovered as shelly_shsw_...
In the MQTT Integrations I see twice the same shelly
I had this issue once. It occurs when the discovery script is not run for a long period of time and the Shelly software is updated. For some reason HA creates a new device after the update. So far, I don’t know how to eliminate this issue. The solution is to manually remove the device from the device registry with HA stopped (file /config/.storage/core.device_registry).
I have HA always on, just in these 2-3 days I had some issue with electricity, but the NUC is under UPS, so I’ve always (I hope) shutdown it properly and was off for some hours, but never more than 10hrs, not days.
It seems an aggressive method, but if this is the only way I will try to understand it better tomorrow.
When you say HA has to be stopped, you mean to stop via cli like **
hassio ha stop
**
HA is installed in Docker.
Thanks
PS:
You mean to remove all the entries of any shellies like this?
Yes, you have to use hassio ha stop command and remove this device. Shelly2 is on your screenshot but Shelly1 is in JSON. Remove correct device.
After remove the device check the file via https://jsonlint.com and of course before that make a snapshot!!!
You should ignore core.restore_state file.