Unable to get Shelly Plus H&T sensor to send Temperature & Humidity info to Home Assistant

Use default TLS.

Also I note in your screen shot you have an error in your address, you have a double slash after your port number.

Thank you again, David. I appreciate your help and followed you guidance. I erased one of the slashes and changed to Default TLS…rebooted the sensor and HA too…unfortunately, still no devices or entities.

Just double checking that you have the full link

:8123/api/shelly/ws

I did check David, it’s complete…thanks again. The mystery still remains.
Perhaps it’s some error in my HA configuration? (created by my lack of knowledge, obviously)
Or could it be some bad configuration of my Shelly H&T Plus MQTT settings?
In the server address I tried both the local HA IP and its FQDN:

There are also TLS settings that I did not try (Shelly H&T Plus settings):

Hello, anyone else wants to help me with this problem? thank you all!

Did you install a MQTT broker ? And the MQTT integration ?
You will still need to provide an Username and Password for your MQTT broker

and run the Shellies discovery script

First of all, you are confusing two ways of integrating a device here. Core Shelly integration does not use MQTT. For core integration, the outbound websocket must be properly configured.

Thank you Maciek,
I don’t know what else to to in what concerns the configuration of the outbound web socket, I’ve tried to follow different advices from this community, with no success.
If you have any advice on how to configure the Websocket correctly, please help.
Thank you again.
Luis

Thank you Francis, yes, I added the MQTT integration and the Mosquitto broker, but I don’t think I have created user/password for that. I’ll try to see how to do that and how to follow your other advices, such as using the Shellies Discovery Script:
I’m not sure if I have the knowledge to do that, tough…

Hello guys,
I’m still looking for a solution to this problem, if someone has any other clues, please help…

Any one able to help here?
Thank you

I think that no one will help you until you describe exactly what plan you have (what you want to achieve) and at what stage you are implementing this plan, what works, what does not work.

Thank you Maciek (should I call you Bieniu?)
Besides all the screen shots included above, what else can I add so you can help me?
The plan was adding the Shelly plus H&T sensor to the HA so I can create an automation to turn on and off an air conditioner depending on the temperature of the room. I initially integrated the Shelly sensor and I could see the temp and humidity info in HA. But the I followed some video showing how to make HA available outside my LAN, using Duckdns and dnsmasq and I achieved that, but at the same time I lost the H&T info in HA. I still see the device itself, but no entities, so the temperature and humidity info cannot be used for the desired automation.
As you can see from the above I’ve tried many things and followed many advices, from websocket configurations to the use of MQTT and mosquitto, even tried to include some scripts like the one suggested (shellies discovery).
My problem is that I don’t know nothing about scripts, code or programming…now I have an expensive sensor that works well in its own proprieatary app (Shelly app) but what I wanted was doing the referred automation in HA.
I probably have done many mistakes already, like copying scripts from github into my HA configuration…to the wrong places or wrong code. Don’t know what else to do…

Tried to insert this script, did not work:

It’s up to you, Maciek is my name, Bieniu is my nickname.

IMO you have tried too much.

I guess you want to configure the device and you don’t care how. For this reason, I would recommend giving up Shellies Discovery because this way is definitely more advanced way. If you use DuckDNS it seems to me (I have never used this addon so I’m not sure) that your HA instance is available at the local IP address and port 8123 and uses SSL. So you need to properly configure WebSocket outbound on your Shelly device using wss:// and set up your device with Shelly core integration. Everything is written in the docs Shelly - Home Assistant

Hello Maciek, as mentioned previously, I also tried to configure the outbound websocket, both by reading the documentation over and over again and trying to follow the advices of those who tried to help me. My trials are documented with screen shots that I’ve published in this post.
I’m completely clueless and lost, after trying so many ways to correctly integrate the Shelly Plus H&T sensor…why wasn’t it easy like the two other shelly devices I installed?

Because this is a sleeping device, it is offline most of the time.

You wrote earlier that HT worked and the entities were visible, then according to some random tutorial you did something and the device does not work. This is a good lesson, if you don’t know what you’re doing, it means you shouldn’t do it because you might break something.

My suggestion is, remove all configurations related to Shellies Discovery, restart HA, set proper websocket outbound on the device, enable debug for Shelly integration, restart HA, configure the device via core integration, wait 10 mins, push button on the device to wake it up, wait 10 mins. After that, attach the HA log files and the diagnostic file here (whole files, not their fragments!).

1 Like

Thank you once more Maciek.
I think I did all your suggestions correctly. I’m trying to upload the two log files I was able to get (hope this was what you were referring to) but I do not know how…should I just cut and paste all the text here? It’s really big…almost 5Mb of text…

Why do you have two logs? And no diagnostic file?
You can simply drag and drop the file into the post.


This is what I got with drag and drop…
I’m going to cut and paste the small diagnostic file (the two log files would fill many screens…):
{“home_assistant”:{“installation_type”:“Home Assistant OS”,“version”:“2024.5.1”,“dev”:false,“hassio”:true,“virtualenv”:false,“python_version”:“3.12.2”,“docker”:true,“arch”:“x86_64”,“timezone”:“Europe/Lisbon”,“os_name”:“Linux”,“os_version”:“6.6.25-haos”,“supervisor”:“2024.04.4”,“host_os”:“Home Assistant OS 12.2”,“docker_version”:“25.0.5”,“chassis”:“vm”,“run_as_root”:true},“custom_components”:{“hacs”:{“documentation”:“https://hacs.xyz/docs/configuration/start",“version”:“1.34.0”,“requirements”:[“aiogithubapi\u003E=22.10.1”]},“ble_monitor”:{“documentation”:“https://github.com/custom-components/ble_monitor”,“version”:“12.10.4”,“requirements”:[“pycryptodomex\u003E=3.18.0”,“janus\u003E=1.0.0”,“aioblescan\u003E=0.2.14”,“btsocket\u003E=0.2.0”,“pyric\u003E=0.1.6.3”]}},“integration_manifest”:{“domain”:“shelly”,“name”:“Shelly”,“codeowners”:[“@balloob”,“@bieniu”,“@thecode”,“@chemelli74”,“@bdraco”],“config_flow”:true,“dependencies”:[“bluetooth”,“http”,“network”],“documentation”:“https://www.home-assistant.io/integrations/shelly”,“integration_type”:“device”,“iot_class”:“local_push”,“loggers”:[“aioshelly”],“quality_scale”:“platinum”,“requirements”:[“aioshelly==9.0.0”],“zeroconf”:[{“type”:“_http._tcp.local.”,“name”:“shelly*”}],“is_built_in”:true},“data”:{“entry”:{“entry_id”:“974ed2fc8f3753b7d716b0d7c324ff9b”,“version”:1,“minor_version”:2,“domain”:“shelly”,“title”:“Shelly_PlusHT”,“data”:{“host”:“192.168.107.35”,“sleep_period”:600,“model”:“SNSN-0013A”,“gen”:2},“options”:{},“pref_disable_new_entities”:false,“pref_disable_polling”:false,“source”:“zeroconf”,“unique_id”:“FCB467265130”,“disabled_by”:null},“device_info”:{“name”:“Shelly_PlusHT”,“model”:“SNSN-0013A”,“sw_version”:“”},“device_settings”:"not initialized”,“device_status”:“not initialized”,“bluetooth”:“not initialized”}}

Post it on hastebin or pastebin and copy the link here.