Shelly Plus HT still not working in 2022.11.0.dev20221023
The problem
Shelly Plus HT still not working in 2022.11.0.dev20221023. It was reported that it does.
https://github.com/home-assistant/core/issues/76062
On each of my Shelly Plus HT I have enabled Websocket and added the address ws://x.x.x.x:8123/api/shelly/ws where x.x.x.x is the IP of my hass install. I see the Plus HTs reporting into hass now. The temp and humidity show values. After a minute or two they change back to unavailable.
What version of Home Assistant Core has the issue?
2022.11.0.dev20221023
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Shelly
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Please attach diagnostics
Please provide instructions for doing so. I'm going by the GUI here. Whatever you need just tell me how I can get it for you and I will.
From the device card click the 3 dots and select download diagnostics:
Drag the downloaded file into a comment (do not copy past it as it does not show well on GitHub)
Your device is not detect as a battery operated device since it was connected to HA before support was added (from diagnostics "sleep_period": 0. This value was supposed to update itself to the new value, I will reproduce locally and check.
For now, if you can, please remove the device from HA, by using delete from the following page:
After that you can either add it again by IP, or restart Home Assistant and let it discover the device.
You need to manually wake up the device using the button to add it.
Please report back if it solves your issue, than I will work on the sleep period update for older installations.
Thanks.
Will do. I'm also powering them via USB. Does that matter? Behaviour of the device is still the same so I would think not.
Will do. I'm also powering them via USB. Does that matter? Behaviour of the device is still the same so I would think not.
Doesn't matter, it will work the same, device sleeps to prevent internal heating. You still need to wake it up using the button on the back to add it
I meant for your code because technically these aren't battery powered.
This is not going well. I removed all three Plus HTs and restarted hass for good measure. They are being discovered and I can add them. Normally when you click on a Shelly device in the integration it shows "1 device and X entities". It shows nothing for these Plus HTs now. My dashboard is complaining about there not being any entities. I searched in the entities section of the hass GUI. There's nothing. I tried adding by IP as well and the result is the same. I tried downloading diagnostics for you and it downloads a HTML page with "500 Internal Server Error".
What IP did you set in the Shelly websocket? is it the internal Home Assistant address? does it have SSL enabled?
Did you wake the device before adding?, it should show SET on the display
I'm using my hass install's LAN IP in the Shelly web socket. Same subnet that my Plus HTs are in. My hass install does not have SSL enabled. It's on my LAN so I don't care. I wondered about SSL. The Shelly web socket configuration looks like it expects it.
The Plus HT does say set. I added the device, prompts for it's password, I enter it, the Plus HT is added successfully and shows in the list of Shelly devices on the integration. I click on it and it does not show "1 device and X entities" like all the other Shelly devices.
Please add the following to configuration.yaml, restart home assistant, and attach the log, add the device again and attach the log.
logger:
default: info
logs:
aioshelly: debug
homeassistant.components.shelly: debug
Note: it is better to drag the log into the comment (which will add it as an attachment) and not copy paste as it is hard to read logs in GitHub.
Thanks
home-assistant-before-debug.log home-assistant-after-debug.log
I'm testing with garageplusht. The log says something about waiting it to come back online. It's sitting here on my lap with set on the screen the whole time.
Please include the full log from restart up to after adding the device. I have succeeded to reproduce something locally, however I don't see this error in your log, probably because it is filtered by Shelly only.
No need for log for now, I am pretty sure I have reproduced the same problem. A different behaviour in the device, looks like due to the fact that beta firmware update is available and it trigger a different behaviour in the message flow. I blocked internet for my device and succeeded to add it, however it's not a solution and not 100% failproof. I'll update when there is something to test. Thanks for reporting.
Mine are running 0.11.4 and do not show the beta available anymore. Is the message flow still different for that?
Mine are running 0.11.4 and do not show the beta available anymore. Is the message flow still different for that?
If you add the full debug log we can check
The log look similar to mine, but it is cut too soon, the device needs to wakeup again to add the entities (or create an error with the current bug).
I don't think we need another log, if you want you can manually patch aioshelly from my linked PR and test the changes, or just wait for a new dev release with this fix.
Thanks for identifying and helping with debug of this issue 👍