Problem with Shelly new ht plus sensor

cant thank you enought mate!

I have the same sensor, and it is working fine so far.

I’ve used the ws://192.168.x.y/api/shelly/ws

I’ve seen many trial and error attempts with ws and with wss.

ws = not secured, thus not certifcate required
wss = secured and therefore a certifcate is required.

as long it stays within your network, suggested this is ws.
no certificate selection is needed.

I had the issue that it dropped the status to unknown.
removed it, and re-added it manually from the integration page. and not working stable for at least 2 weeks already.

Followed these instruction,

  1. Once connected and the device was added to HA it was all grayed out like the image 1.
  2. Did a full reboot and it connected up straight away. If you look at the shelly app you will see it connected. Like image 2

Home Assistant 2023.8.3
Supervisor 2023.08.1
Operating System 10.5
Frontend 20230802.1 - latest

Shelly Plus H&T
Firmware: 20230503-095514/v1.13.0-g9aed950


Hope this helps

First experience with Shelly and might be my last. Cannot get HT or HT Plus integrated. None of the fixes from above have worked for me, except I have not tried MQTT and will probably not. I will limit this to HT Plus as that is the thread name.
HA Info:
HA 2023.8.4
Supervisor 2023.08.3
OS 10.5

Shelly Info:
HT Plus Firmware 20230803-125304/1.0.0-gaec0744
HT Plus Build 230803114014-7c705cbd-HEAD

Setup Description:
Using TLS with Lets Encrypt Certificate, internal DNS, internal NTP, FQDN used for both internal and external access with no issues. Verified HT Plus is using internal DNS. HA is in a DMZ and IoT is own network. No issues with traffic between networks seen. Have tried all versions of websocket config (ws://{{myip}8123/api/shelly/ws ssl_ca="*", wss://{myfqdn}:8123/api/shelly/ws ssl_ca= ca.pem and also my Lets Encrypt cert).

Issue:
Device is immediately connected with no entities. Checking HA debug can see http requests getting data and also can see with packet captures but the 8123 port appears to be getting re-transmitted.

I have already asked to return all the Shelly devices I just bought but was going to give this a chance to see if someone can provide some insight of possible issue or troubleshooting tips, this would be appreciated. Thinking I am not going to like the Temp and Humidity sensors for my use but was also wanting to use their EM devices.

Thanks in advance!

Update:
Upgrade came out to HA 2023.9.0 and had an update to Shelly integration that added support to a specific Shelly product. Decided to Update and try again. After update and configuring as outlined both the HT Plus and HT device are working. Still not sure if they will work for me, but at least now I can try them out.

Hello, this seems to be an everlasting problem no metter what HA version people are running.
I’m currently operating on:
Home Assistant 2023.10.3
Supervisor 2023.10.0
Operating System 11.0

I integrate my Shelly H&T plus quite smoothly, but without any data: it becomes a device without entities.

Anyone could find out what’s wrong with this device/integration, why it is so unreliable and how to fix this (for now and for good)?

Thank you

Introduction

I want to start off by expressing my deep appreciation for the contributors to this thread, especially @claessens, whose detailed post provided a foundational guide for my setup. While their guide was immensely useful, some things have changed over the past year—likely due to updates in both Shelly and Home Assistant. Hence, I’ve documented the process that worked for me, hoping to help others navigate the updated setup landscape.

Environment

  • Home Assistant Version: 2023.10.3
  • Shelly Plus H&T Firmware: 20230912-081941/1.0.3-g6176478
  • Hardware: gen2 (SNSN-0013A)

Steps to Follow

  1. Integrate Shelly in Your Network with Shelly App: Initiate by connecting your Shelly H&T Plus to the same network as your Home Assistant. This can be done during the initial onboarding via Bluetooth through the Shelly app.
  2. Find Outbound Websocket Settings: Navigate to Settings > Networks > Outbound Websocket in either the Shelly app or the Shelly Cloud.
  3. Enable Outbound Websocket / “SSL Connectivity”: The straightforward option to enable the websocket was missing in my case. I had to enable an “SSL connectivity” switch and chose “*” from the dropdown menu. Some have opted for a pem file, but this setting worked for me.
  4. Enter WebSocket URL: Next, enter your WebSocket URL. For me, it was ws://192.168.1.157:8123/api/shelly/ws. Hit “Save” afterward.
  5. Wake Up Device: Press the small black button on the back of your Shelly H&T Plus device, next to the batteries. Wait a moment, then press it again.
  6. Trigger Device Reboot: Navigate back to the Shelly app or Shelly Cloud to initiate a device reboot. Wake up the device again using the small black button.
  7. Check WebSocket Connection: At this point, the connection should be established. If it’s not, troubleshoot and resolve the issue before proceeding to the next steps.
  8. Update Home Assistant: Remove any previous integrations of Shelly H&T Plus with Home Assistant if they exist.
  9. Final Steps: Wait for Home Assistant to detect your Shelly H&T Plus and add it as a new integration. I had to reboot Home Assistant to make the new device visible. Be patient, as it took several minutes for the entity and sensors to appear in Home Assistant.
6 Likes

Just got it working, here is a small write up: Go to your Shelly app and select your Shelly H&T Plus device > Settings > Networks > Outbound websocket ? select ca.pem. And write below it ws://192.168.1.xxx:8123/api/shelly/ws Offcourse replace the xxx with your own numbers. Then press save. Now re…

Thank You @claessens
This works…

…be careful with the case sensitivity. I had “/api/Shelly/ws” and not “/api/shelly/sw”

1 Like

Thank you for this guide!

It appeared to work for me, however I cannot get the sensors on my H&T Plus device to trigger home assistant automations.

Is there a special method for creating automations which operate as web socket consumers rather than the usual http polling method?

This fixed the issue for me. Thanks!
(Make sure you see the “connected” on the webhooks section on the shelly device)

After the update to 2024.1, the web hook option doesn’t seem to be working anymore on my 2 Shelly Plus H&T sensors. Did anyone else notice this?
The web GUI shows that it is connected, but nothing is showing up in HA.

Yes I noticed the same! That is the reason I landed on this page. I took this moment to update the firmware on the shelly h&t and after that I deleted the device from HA and then re-added the device.

Everything works as before again. Hope this helps

Fix will be available in HA 2024.1.1.

4 Likes

FWIW, my device didn’t show up in HA until I moved it to the same subnet as HA. I was using a separate IoT network and couldn’t figure out how to make the port adjustments needed when the device is on a different subnet…

Thank you so much. I don’t know why the Shelly integration page (Shelly - Home Assistant) doesn’t mention this. I spent hours trying to get this working and that’s all it was!

You need to open the firewall in your home LAN to allow the port 8123 traffic to pass from the IOT LAN into your HOME LAN, similar to a port forward, but this is in the firewall settings.

Add it then please :pleading_face:

I created Update shelly.markdown for wss protocol by steini86 · Pull Request #30720 · home-assistant/home-assistant.io · GitHub. Was my first PR, so please don’t hesitate to correct me :grinning:

It’s already accepted, great going.

whats the correct one? /shelly not /Shelly right? i changed the url but it keeps changing back to /Shelly
finally managed to do it, you have to the ip and not the name in the url.

with Shelly or shelly? To me it accepted shelly, it found it alone in discovery in home assistant, but keeps in wait with this message


Please wait, starting configuration wizard for the integration

Also I do not understand this


In case your installation is set up to use SSL encryption (HTTP**S** with certificate), an additional `s` needs to be added to the WebSocket protocol,

I mean Sheely are installed locally no? SO I do not understand why shoulf be ssl

Now I received this


Do you want to set up the Shelly H&T Gen3 at 192.168.1.27?

Battery-powered devices that are password protected must be woken up before continuing with setting up.
Battery-powered devices that are not password protected will be added when the device wakes up, you can now manually wake the device up using a button on it or wait for the next data update from the device.

Invalid flow specified

“Invalid flow specified” error