djbulsink / panasonic_ac

Panasonic Comfort Cloud HA component
30 stars 16 forks source link

All devices unavailable #41

Open IanAndersonOZ opened 1 year ago

IanAndersonOZ commented 1 year ago

Hello!

If your devices are all unavailable as of this week, and a restart of homeassistant isn't fixing it as usual:

docker container ls -> copy your homeassistant container ID docker exec -it -u root [container ID] sh

Now in the docker shell: pip show pcomfortcloud -> check the location of pcomfort cloud. Likely: /usr/local/lib/python3.9/site-packages, we'll stick to that.

Make a backup of session.py cp /usr/local/lib/python3.9/site-packages/session.py.bak

Edit session.py nano /usr/local/lib/python3.9/site-packages/session.py

modify the function _headers() to read as follows: def _headers(self): return { "X-APP-TYPE": "1", "X-APP-VERSION": "1.19.0", "X-User-Authorization": self._vid, "X-APP-TIMESTAMP": "1", "X-APP-NAME": "Comfort Cloud", "X-CFC-API-KEY": "Comfort Cloud", "User-Agent": "G-RAC", "Accept": "application/json; charset=utf-8", "Content-Type": "application/json; charset=utf-8" }

save, exit docker shell, restart the container (or reboot). Tested and working on my HASS install.

Cheers to user marc2106 for pointing out the panasonic comfort cloud REST call had changed to require additional headers. https://github.com/lostfields/python-panasonic-comfort-cloud/issues/78

JoachimC commented 1 year ago

Please is there a plan/timeline for putting this into an official release?

timovp commented 11 months ago

Created a pull request that solves the issue by upgrading underlying requirements.

skion commented 6 months ago

@IanAndersonOZ Is this resolved for you now with the linked PR?