Hoping to find a solution here. I’ve been chewing my keyboard out of frustration since I can’t seem to get simple things to work. I have to say HA and everything around it is extremely complicated to figure out if you’re not a programmer. I’m a networker so struggling with the programming lingo everywhere.
I have HA (not HASS) running on my Syno in a docker container. There I also have Node-Red and Mosquitto running in seperate containers.
HA seems to be working fine, I connected my Hue lights to it and everything shows up automatically on the dahboard. All good there. Now I have a bunch of Shellies I want to connect using MQTT and that’s where I run into issues (probably due to my lack of knowledge of anything over OSI layer4…)
If I check with MQTT explorer, I can see the shellies connect to my broker so the broker is fine and the shellies report to the broker fine. Somehow I can’t get those devices into HA whichever way I try.
in HA -> configuration -> integration - MQTT added but I’m not discovering any devices apparently. If I read about that it’s normal shellies are not discovered but it should show up under entities… which doesn’t happen for me.
https://github.com/StyraHem/ShellyForHASS. Had to install the python scripts manually since I don’t have the community option in my dashboard so also no HACS (I have no idea why I don’t but one issue at the time) As soon as I add “shelly:” to my configuration.yaml I get an error message when starting HA.
Discovery -> Shellies Discovery Script Added the Python_scripts folder and put the script in that folder and added the “minimal configuration” to the configuration.yaml file… yet no entities appear.
Lastly; I have also installed node-red and there I seem to get output from the shellies so the broker really seems to be working so now I’m lost. Anyone got any suggestions? Not trying to be lazy here but the more I read the more confused I get on all of this.
HACS / Community is not included by default and has to be installed. That is why it is not showing for you.
If your mqtt devices don’t report their config in the HA format on a topic that HA is configured to use for discovery (by default: “homeassistant”), then you have to manually configure each device in HA. You can see some examples of that on the HA website components section under the Mqtt sections. You’ll need to modify according to the details you have seen from your devices in mqtt app.
Regarding HASS, sorry, I did mean that I’m not running HASSIO. I’m using HA. Happy to run HASSIO but I’d like to run it on my Synology since I don’t want to run it on a RPI or a NUC. From what I read I cannot get communities on HA, that only works with HASSIO.
Regarding the MQTT devices not reporting their config - should I not first see the MQTT devices under entities like the HUE devices? That’s what I would expect. After that, I can start working out which topics I need to do something with.
Not all devices can be automatically discovered by Home Assistant. The device must advertise its presence on the network (using a known protocol) to be discovered.
For devices that speak MQTT, Home Assistant’s developers have devised a means for them to announce their presence to Home Assistant. It’s called MQTT Discovery and basically it’s a specification for the device to share details about itself. If the device implements this specification, it publishes its details to MQTT topics beginning with the root-topic homeassistant. Home Assistant monitors that root-topic and incorporates any devices it finds there.
If the device does not support Home Assistant’s MQTT Discovery specification, then you manually create a configuration for it (configuration.yaml). It’s not difficult. I have dozens of MQTT-based devices that I’ve configured manually. For example, here’s the config for the switch that controls my pool pump:
Shellies don’t speak “Home Assistant” on their own. So, while they report to MQTT if you set them up that way, they don’t report in a way that Home Assistant can auto discover. This means you either need to use one of the many shelly custom_componets. Or you need to “manually discover” them.
I use the python_script found here to handle this:
You can also just define it in configuration.yaml like this: