Hello community, some months ago I did a mqtt config to control all my lights with the wall switches and shelly. I have several Shelly 1 v3 and Shelly 2.5. I had to change one of them (Shelly 2.5 model) with a Shelly 2 PM. I did the same config as per other Shelly 2.5 (GUI is quite different, but all data should be there):
So every time the wall switch will be used, HA will receive the input and use an automation to switch on/off the light.
Problem is that currently Iām not able to recognize the Shelly 2 PM in HA, so no automation is triggered.
From the Shelly integration I can see what reported below. Obviously I double/triple checked the username/password. Anyway all other Shelly works perfect.
2023-09-26 08:08:32: New connection from 192.168.2.59:51684 on port 1883.
2023-09-26 08:08:32: Client shelly25-cameretta already connected, closing old connection.
2023-09-26 08:08:32: New client connected from 192.168.2.59:51684 as shelly25-cameretta (p2, c1, k60, u'mqtt_user').
2023-09-26 08:10:03: New connection from 172.30.32.1:57258 on port 1883.
error: received null username or password for unpwd check
2023-09-26 08:10:03: Client auto-F345C7B7-94C0-AAE6-765F-CB2790840739 disconnected, not authorised.
Could someone help me to integrate via mqtt the new shelly 2.5 PM? Cause now I cannot switch on 2 lights in my house
As I wrote, many months are passed (maybe years), is there any other method to integrate Shelly? Currently Iām using the native integration.
If you are using the core Shelly installation why are you setting up mqtt?
Navigate to the local IP address of your Shelly device, Settings >> Connectivity >> Outbound WebSocket and check the box Enable Outbound WebSocket, under server enter the following address:
ws:// + Home_Assistant_local_ip_address:Port + /api/shelly/ws (for example: ws://192.168.1.100:8123/api/shelly/ws), click Apply to save the settings.
Thank you very much, I enabled the Outbound WebSocket and now it works. Sorry, I missed it on documentation. In this way I also disabled the mqtt on new Shelly 2 PM and it still works. I had enabled the mqtt about 2 years ago cause probably HA didnāt support such integration.
Now I have another issue. I tried to disable mqtt on Shelly 1 v3, and add them to the core Shelly integration. I re-created the automation and they work fine from HA, i.e. pressing the switch, the light will be switched on/off. Unfortunately when I use the wall switch there are a long delay so light will be switched off after many seconds. I got an alert on HA that say that cannot communicate with the Shelly and CoIoT should be enabled. I check it and CoIoT is enabled.
There is no Outbound WebSocket on Shelly 1 and for now I rollback to mqtt, but I would like to disable mqtt at all on all my shelly. I donāt understand why I got this issue!
Sure I did it and reboot the shelly, now I restarted also HA and it works! Thank you!
This is what I would like to do, remove the mqtt on HA and shelly, and enable also cloud on shelly.
I did it right now with 1 Shelly and I notice then a very little delay when I press the wall switch compared with mqtt, anyway itās acceptable.
I see, however I noticed a little delay in command execution when I use the wall switch (light toggle) compared with mqtt. Nothing dramatic and I can live with it cause itās a very little delay. Maybe I can try to disable cloud on shelly since I donāt need it and I donāt see any reason to leave it enabled.
However, the most important thing is that now everything work as expected.
Now I needed a couple more to finish the house but they donāt make them anymore it seems. So I bought the upgrade: Shelly 2PM Gen3.
I figured they would work the sameā¦ but the GUI is indeed very different. I tried to set the same settings as my devices in use but when I ālistenā for it, it never shows.
The first suggestion is to use āOutbound websocketā, what does that mean exactly? No longer MQTT? And would that work on my older shellies? I canāt find the settings for that there.
I kind of prefer MQTT, it works blazingfast on my other devices.
And yes, you can completely remove the MQTT integration and use the native Shelly integration instead. I did it and re-configured all my shellies, and now itās much simpler
So, I tried the ānormal wayā and just added them when Home Assistant detected them in my network. It works great, fast and snappy! So no reason to use MQTT anymore I guess.
Did you reconfigure your old shellies that way too then? Because the
āoutbound websocket settingsā are not there? When I tried to use them over the standard integration it was slow to very slow for the Shelly2.5. Did something change then?
Yes, I replaced MQTT with native integration for all my 25 Shellies (Shelly 1 v3, 1PM, 2PM, Shelly EM, etcā¦). Recently I also replaced all my Shellies 1 v3 (7) with Shellies 1 mini where the unicast address is not needed anymore. So, at the end, all my Shellies donāt need anymore MQTT and other additional config. Native integration is all I need to integrate them (except for 2PM and outbound websocket setting).
One year ago, after migration, I had an annoying little delay in command execution when I use the wall switch (about 1 second). Now, this delay is gone, most probably thanks to native integration updated in newest HA release.
Regarding the outbound websocket setting, this is needed, in my case, only on 2PM as reported in official documentation, this is the interesting part:
Generation 2 and 3 devices use the RPC protocol to communicate with the integration. Battery-operated devices (even if USB connected) may need manual outbound WebSocket configuration if Home Assistant cannot correctly determine your instanceās internal URL or the outbound WebSocket was previously configured for a different Home Assistant instance. In this case, navigate to the local IP address of your Shelly device, Settings >> Connectivity >> Outbound WebSocket and check the box Enable Outbound WebSocket