StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
619 stars 111 forks source link

shelly pro 4PM not work #585

Closed danygi79 closed 2 years ago

danygi79 commented 2 years ago

Describe the bug

bigjme93 commented 2 years ago

I can confirm that with my new Shelly Pro 4PM, the device is not detected by the integration My other shelly devices are all showing up and the 4PM is running firmware 0.8.1

hakana commented 2 years ago

Yes, we work on that.

bigjme93 commented 2 years ago

If you need anything to help, please let me know

hakana commented 2 years ago

Always need help, what can you help with?

bigjme93 commented 2 years ago

From a coding point i'm little use but if you need anything i can collect from the unit that may help, i'm happy to try and provide it

hakana commented 2 years ago

Having a working version now will be released soon!

hakana commented 2 years ago

@bigjme93 Can you test before I release it?

bigjme93 commented 2 years ago

That was much quicker than expected!

My test bed is not complete at the moment but I can at least check it discovers and is able to switch the outputs I will check this when I get home in around 5 hours unless someone beats me to it :)

bigjme93 commented 2 years ago

@hakana I have a brand new copy of home assistant setup for testing with the new custom component installed, fresh grab from the master branch on github rather than via HACS

My shelly is on but is still not being detected by the integration even after multiple server restarts just in case As before, my other shelly devices have been detected fine

There are a lot of errors like this showing: 2021-11-05T13:10:49.225846465Z 2021-11-05 13:10:49 ERROR (CoAP) [pyShelly] Error receive CoAP 2021-11-05T13:10:49.225886996Z Traceback (most recent call last): 2021-11-05T13:10:49.225892516Z File "/usr/local/lib/python3.9/site-packages/pyShelly/coap.py", line 187, in _loop 2021-11-05T13:10:49.225897056Z self._root.update_block(device_id, device_type, 2021-11-05T13:10:49.225900606Z File "/usr/local/lib/python3.9/site-packages/pyShelly/__init__.py", line 307, in update_block 2021-11-05T13:10:49.225904746Z block.update_coap(data, ipaddr) 2021-11-05T13:10:49.225924496Z File "/usr/local/lib/python3.9/site-packages/pyShelly/block.py", line 101, in update_coap 2021-11-05T13:10:49.225928287Z dev.raise_updated() 2021-11-05T13:10:49.225931697Z File "/usr/local/lib/python3.9/site-packages/pyShelly/base.py", line 45, in raise_updated 2021-11-05T13:10:49.225935737Z callback(self) 2021-11-05T13:10:49.225939007Z File "/config/custom_components/shelly/device.py", line 58, in _updated 2021-11-05T13:10:49.225943527Z self._update_ha_state() 2021-11-05T13:10:49.225947627Z File "/config/custom_components/shelly/device.py", line 51, in _update_ha_state 2021-11-05T13:10:49.225952027Z self.schedule_update_ha_state(True) 2021-11-05T13:10:49.225955457Z File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 610, in schedule_update_ha_state 2021-11-05T13:10:49.225959117Z self.hass.add_job(self.async_update_ha_state(force_refresh)) # type: ignore 2021-11-05T13:10:49.225962867Z AttributeError: 'NoneType' object has no attribute 'add_job' These don't occur on my live integration

If I add a manual config to discovery my pro 4PM by ip i get this error after a while: 2021-11-05T13:13:44.476091584Z 2021-11-05 13:13:44 WARNING (Update loop) [pyShelly] Error, 404 Not Found http://192.168.22.23/settings

This url does indeed return a 404 page not found on the shelly

hakana commented 2 years ago

Please reopen if this still is an issue