yonatanp / electrasmart-custom-component

Home automation integration with Electra Smart type air conditioners
30 stars 7 forks source link

AC became unavailable, unable to restore #13

Closed adizag closed 3 years ago

adizag commented 3 years ago

Hi

after wifi loss, AC became unavailable. tried to remove the integration from configuration.yaml and restore but it didnt work.

error in HA log: `Log Details (ERROR) Logger: homeassistant.components.climate Source: custom_components/electrasmart/climate.py:282 Integration: Climate (documentation, issues) First occurred: 10:52:10 PM (1 occurrences) Last logged: 10:52:10 PM

electrasmart: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 357, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update await task File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/electrasmart/climate.py", line 288, in update self._renew_sid_if_needed() File "/config/custom_components/electrasmart/climate.py", line 282, in _renew_sid_if_needed self.ac.renew_sid() File "/usr/local/lib/python3.8/site-packages/electrasmart/client.py", line 113, in renew_sid self.sid = generate_sid(self.imei, self.token) File "/usr/local/lib/python3.8/site-packages/electrasmart/client.py", line 85, in generate_sid result = ElectraAPI.post( File "/usr/local/lib/python3.8/site-packages/electrasmart/client.py", line 49, in post assert j['data']['res'] == 0, "invalid res returned from command" AssertionError: invalid res returned from command`

GuyKh commented 3 years ago

@adizag Refresh credential by running electrasmart-auth - to generate new imei and token. Update it in HA and restart

adizag commented 3 years ago

That worked. tnx! what could have made it change?

GuyKh commented 3 years ago

I think this issue is getting much worse when combined with #10

yonatanp commented 3 years ago

Chalking this one as part of the larger token block issue. Closing.