Problem with Shelly new ht plus sensor

You are specifying a cert file, yet have the webocket set to ws://, try wss://

Hi , I try with wss://192.168.1.XXX:8123/api/shelly/ws but it is not working either .
Sorry for my naive question but I have no knowledge about how to connect through the websocket .
Can you tell me what I have to do or refers me to a web page where I can find the infos ?

That page only refers to add the command wss or ws ://192.168.1.XXX:8123/api/shelly/ws

No information about websocket and how to debug

I am using HA OS with Oracle VirtualBox on Windows 10 . Could this be a problem ?
with ESPHOME , I have no problem to connect to HomeAssistant

I managed to connect to internal ip when choosing * as cert type. wss://192.168.x.x:8123/api/shelly/ws
Boom, entities shows up. Running DuckDNS with Letā€™s Encrypt.

Hey, anyone here having problem with the shelly h&t not sending updates to hass? I needed to change the coap host in the device to add it to home assistant, but it seems that it does not send any updates to home assistant? It works fine in the shelly app.

Iā€™m having similar issues with my h&t plus. Since the update to 2022.12 version I donā€™t seem to be getting updates. Additionally the following log now appears (which is likely related?):

Logger: aiohttp.server
Source: /usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py:403
First occurred: 4:16:22 PM (1 occurrences)
Last logged: 4:16:22 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 332, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 551, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'Invalid method encountered"

EDIT: I also disabled Shelly cloud, so Iā€™m hoping any ā€˜automagicā€™ firmware updates wouldnā€™t occur, in case you were wonderingā€¦

Finally, got the Shelly H&T working fine, & still running 22.11.2 ,but suddenly noticed the Entities went unavaiable. Double checked the device to make sure WebSockets were connected, and everything is still connected. Tried re-installing the integration, and now none of the Entities will come back up.

Any ideas?

Hi, did you manage to see the entities?
Having the same issue trying all combinations. E.g.
{"enable":true,"server":"ws://182.168.x.zz:8123/api/shelly/ws","ssl_ca":"*"}
In the GUI the websocket always shows to be not connected. Guess this is the problem as mentioned before.
I can reach the Shelly with http://192.168.x.yy/rpc/Ws.GetConfig. Following the instruction Outbound websocket should be ws://192.168.x.zz:8123
Whenever I delete the device in HA, it shows up quickly again but w/o entities.
HA 2022.12.4 - Shelly 0.12.0

issue solved

Hi @Upsi Can you share how you solved the issue?

I tried everything listed above.

  • Added the websocket wss:// which shows it is connected.
  • Removed the instance
  • Added it while the H&T plus was in Set mode

Still it doesnā€™t add it with entities, just an empty thingā€¦

Same question to @Upsi how did you get this to work?

Iā€™m at exactly the same point as @DeRRudi77 above.

BR
Yonz

Which cert type? See my post.

Hi,
Iā€™m not using SSL for my HA Instance (accessed over http:// ).
When I run:

http://192.168.x.yy/rpc/Ws.GetConfig

I get:

{"enable":true,"server":"ws://192.168.78.44:8123/api/shelly/ws","ssl_ca":"*"}

For those like @DeRRudi77 that use TLS / SSL: Iā€™ve just managed to connect the devices succesfully by using wss://fqdn.nl:443/api/shelly/ws (Iā€™ve configured Home Assistant on port 443). After configuring the outbound websocket I deleted the existing instance, added it as a new device based on IP adress of the device. After disabling Set mode, the device is listed as device with all the entities and info youā€™d expect in Home Assistant.

1 Like

Hi all!
I have the some problem!!!
My version is 2022.12.1 and is running with SSL.
My question is if I need to configure the HA API, because right now, when i try to invoke the api appear this message ā€œ401: Unauthorizedā€ or this is not the issue why the wss://192.168.x.xx:8123/api/shelly/ws is not working!
thanks in advance

Iā€™m struggling with the same problem here and was hoping this tip would solve it.

Unfortunately not, or not quite yet, because according to Shelly Device the connections, i.e. MQTT and Outgoing Webhook, are OK.

Nevertheless, no data is visible.

However, I found entries in the logs that give an indication that the data is being transferred to HA.

ā€™humidity:0ā€™: {ā€˜idā€™: 0, ā€˜rhā€™: 37.3}
ā€™temperature:0ā€™: {ā€˜idā€™: 0, ā€˜tCā€™: 25.1, ā€˜tFā€™: 77.1}

I am unfortunately at a loss as to what else I can do?

Does anyone else have any ideas?

Related log entries:

2022-12-31 09:46:23.956 DEBUG (MainThread) [aioshelly.wsrpc] Websocket server connection from 81.3.206.104 starting
2022-12-31 09:46:23.961 DEBUG (MainThread) [aioshelly.wsrpc] Websocket server connection from 81.3.206.104 ready
2022-12-31 09:46:23.991 DEBUG (MainThread) [aioshelly.wsrpc] recv(81.3.206.104): {'src': 'shellyplusht-c049ef8ac57c', 'dst': 'ws', 'method': 'NotifyFullStatus', 'params': {'ts': 1672476384.63, 'ble': {}, 'cloud': {'connected': False}, 'devicepower:0': {'id': 0, 'battery': {'V': 5.8, 'percent': 89}, 'external': {'present': False}}, 'ht_ui': {}, 'humidity:0': {'id': 0, 'rh': 32.4}, 'mqtt': {'connected': True}, 'sys': {'mac': 'C049EF8AC57C', 'restart_required': False, 'time': '09:46', 'unixtime': 1672476384, 'uptime': 8, 'ram_size': 235192, 'ram_free': 152596, 'fs_size': 458752, 'fs_free': 131072, 'cfg_rev': 23, 'kvs_rev': 0, 'webhook_rev': 0, 'available_updates': {}, 'wakeup_reason': {'boot': 'deepsleep_wake', 'cause': 'button'}, 'wakeup_period': 7200}, 'temperature:0': {'id': 0, 'tC': 26.7, 'tF': 80.1}, 'wifi': {'sta_ip': '192.168.1.172', 'status': 'got ip', 'ssid': 'Pauli-7490', 'rssi': -67}, 'ws': {'connected': True}}}
2022-12-31 09:46:24.036 DEBUG (MainThread) [aioshelly.wsrpc] recv(81.3.206.104): {'src': 'shellyplusht-c049ef8ac57c', 'dst': 'ws', 'method': 'NotifyStatus', 'params': {'ts': 1672476384.63, 'ws': {'connected': True}}}
2022-12-31 09:46:24.037 DEBUG (MainThread) [aioshelly.wsrpc] recv(81.3.206.104): {'src': 'shellyplusht-c049ef8ac57c', 'dst': 'ws', 'method': 'NotifyStatus', 'params': {'ts': 1672476384.66, 'cloud': {'connected': True}}}
2022-12-31 09:46:26.242 DEBUG (MainThread) [aioshelly.wsrpc] recv(81.3.206.104): {'src': 'shellyplusht-c049ef8ac57c', 'dst': 'ws', 'method': 'NotifyStatus', 'params': {'ts': 1672476386.88, 'sys': {'available_updates': {}}}}

/cipo

Hi all,
I am having the same prob on HA: Shelly HT Plus not synching, nor entities showing up. The idea discussed here is not even possible to me:

Trying to set the outgoing websocket shows ā€œErrorā€ā€¦ no idea why. Already re-installed the sensor, but no effectā€¦

The shelly integration in HA though shows the device, but no entities are being createdā€¦
CleanShot 2022-12-31 at 13.42.42

Maybe somebody can help me?
Happy new year!
Hauke

My setup:
Home Assistant 2022.12.8
Supervisor 2022.12.1
Operating System 9.4
Frontend 20221213.1 - latest

This suggest a problem in the HA Shelly integration.

However I also have an experience that the web socket can be inputted, but that it does not connect (see icon in the upper right corner of the deviceā€™s direct webpage). The latter could also be a Shelly firmware issue.

I have created a detailed ticket at Shelly, as I think this is a firmware issue, because after setting the websocket on the deviceā€™s webpage, the deviceā€™s webpage indicates (icon upper right corner) that the websocket is still not connected to the Home Assistant server.