sockless-coding / panasonic_cc

Panasonic Comfort Cloud - Home Assistant Component
MIT License
137 stars 35 forks source link

panasonic heat pump integration issues #256

Open akwiatkowski opened 1 month ago

akwiatkowski commented 1 month ago

Hello.

I've added integration to HA. Used correct credentials - the same I signed on mobile app and website. I don't know about 2FA and doesn't have it enabled. On mobile app I cannot add more users, and I cannot change important account settings.

I don't see any measurements from heat pump - inside temperature: unavailable.

Firmware: 1.21.1

Logger: custom_components.panasonic_cc.pcomfortcloud.helpers
Source: custom_components/panasonic_cc/pcomfortcloud/helpers.py:27
integration: Panasonic Comfort Cloud ([documentation](https://github.com/sockless-coding/panasonic_cc/), [issues](https://github.com/sockless-coding/panasonic_cc/issues))
First occurred: 16:08:56 (1 occurrences)
Last logged: 16:08:56
Error in get_device Expected status code '200' but received '403' Response body: {"code":4300,"message":"Have no authority to the request"}
Logger: custom_components.panasonic_cc.panasonic
Source: custom_components/panasonic_cc/panasonic.py:86
integration: Panasonic Comfort Cloud ([documentation](https://github.com/sockless-coding/panasonic_cc/), [issues](https://github.com/sockless-coding/panasonic_cc/issues))
First occurred: 16:08:56 (1 occurrences)
Last logged: 16:08:56
Error updating device 5725edf3494187174b34676dc837b41b

Traceback (most recent call last):
  File "/config/custom_components/panasonic_cc/panasonic.py", line 86, in do_update
    data = await self._api.get_device(self.id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 123, in get_device
    json_response = await self.execute_get(self._get_device_status_url(device_guid), "get_device", 200)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 140, in execute_get
    await check_response(response, function_description, expected_status_code)
  File "/config/custom_components/panasonic_cc/pcomfortcloud/helpers.py", line 32, in check_response
    raise exceptions.ResponseError(
custom_components.panasonic_cc.pcomfortcloud.exceptions.ResponseError: (get_device: Expected status code 200, received: 403: {"code":4300,"message":"Have no authority to the request"}
ogger: custom_components.panasonic_cc.pcomfortcloud.helpers
Source: custom_components/panasonic_cc/pcomfortcloud/helpers.py:20
integration: Panasonic Comfort Cloud ([documentation](https://github.com/sockless-coding/panasonic_cc/), [issues](https://github.com/sockless-coding/panasonic_cc/issues))
First occurred: 16:08:57 (1 occurrences)
Last logged: 16:08:57
Error in history Expected status code '200' but received '403' Payload: {'deviceGuid': 'B433623312', 'dataMode': 2, 'date': '20240723', 'osTimezone': '+02:00'} Response body: {"code":4300,"message":"Have no authority to the request"}
Logger: custom_components.panasonic_cc
Source: custom_components/panasonic_cc/__init__.py:92
integration: Panasonic Comfort Cloud ([documentation](https://github.com/sockless-coding/panasonic_cc/), [issues](https://github.com/sockless-coding/panasonic_cc/issues))
First occurred: 16:08:57 (1 occurrences)
Last logged: 16:08:57
Failed to setup device: <CORRECT NAME> (str.format() argument after ** must be a mapping, not PanasonicDeviceInfo)
sockless-coding commented 1 month ago

@akwiatkowski Hi, the error message indicates an access problem (Have no authority to the request). If you enable debug or info log, look for an entry that looks like [custom_components.panasonic_cc] Got X devices where X is the number of devices found, does it say something other than 1? Have you had other devices linked to the account?

I would recommend that you create a new account that home assistant can use, using the same account in both the APP and HA can cause issues.