My new try at MQTT using a Shelly 2.5 Relay - Can't get a response to "announce" but will get status updates

Hello, everyone.
This is my new try at MQTT and I’m using a Shelly 2.5 Relay to get started (the plan is that, if this works, expand the same relay model to the whole house).

The thing, though, is that I can’t get a response to “announce” but will get status updates from the relay just fine when listening for the topic.

I’ve followed the instructions from the official shelly documentation and everything seems to line up, but I just can’t get anything from the announce, which means I can’t get the id and proceed with the config I saw on this page:

This is the official Shelly documentation I’ve followed for MQTT:

And finally, I’m attaching a screenshot of what I see on my Home Assistant:

To those who understand this better than I do, could I kindly ask you for your guidance, please?

Thank you all very much!

See the shellies discovery script

Going down the rabbit hole, now. I’ve never used scripts, so I’ll try to configure it and see how I go.

So, I’ve followed all the steps, configured Python Scripts (for the first time) tested them out and edited the automations.yaml file, in accordance with the script description, but when running it (I’ve restarted HA 3x before running it), here’s what I’m getting:

I went with the minimal configuration from the official doc here:

This is what my folder structure looks like:
image

And finally, here’s what my automations.yaml file looks like:

Any ideas to help a Noob out?
Thank you very much for your assistance once again.

You should not run the script. It should be triggered by a HA restart.

Turns out that the device simply appeared on my list of devices (no notification or anything), so it seems to be working now.

Now, on to learn how to use automations with MQTT…

Thanks!

1 Like

Coming back to this topic, as I’ve purchased 2 new Shelly relays to test them out, but they’re second gen.
I’ve installed the “Shellies Discovery Gen2” script following the instructions, but the 2 new devices (1x Shelly Plus 1PM and 1x Shelly Plus 2P"M) just won’t show up at all.

Would anyone know if these scripts are exclusive (aka: they can’t both be installed at the same time)?

Thank you.

Is there a certain reason that you are not using the Shelly integration?

I was using MQTT exclusively with all my devices but now use the integration as it makes everything so much easier.

Thanks for the question.
I have a segregated network, where my IoT devices live in a local-only network without access to the internet or other networks, but I do bridge their access to my Home Assistant server, which lives in an IoT network with access to the internet.

By doing some research here before I started testing these Shelly devices, I saw a lot of comments recommending MQTT when using segregated networks as the HA integration doesn’t work well with that setup, apparently.

If that has changed, I’d love to give that a try and stop burning neurons (whatever little I have left) trying to make this MQTT setup work for these Shelly devices.

Thank you.

I have a similar network setup and as long as you allow access to the HA server, the integration works great.

EDIT

I would also advise to use your devices hostnames instead of IPs (unless you like static IPs) as it makes it a lot easier if the DHCP leases change.

Thank you, mate.

I’m definitely following that route, now, and I have these IoT devices with Fixed IPs via my DHCP server (tied to their MAC address), anyway, so nothing really bothers me with this approach.

MQTT just has proven to be way too much of a hassle for this. With the integration, it was plug and play, and thus far everything seems to be working in my test environment, so I’ll just plug it to the real environment in soon and see how it goes.
Thanks again.

Good to hear!

Automate on!

DaviBoi