panasonic_cc icon indicating copy to clipboard operation
panasonic_cc copied to clipboard

integration is not being installed

Open egric opened this issue 1 year ago • 14 comments

I'm installing integration for the first time. From scratch. I successfully completed two-factor authentication via SMS on my phone and connect to the air conditioner without any problems through the app on my phone. But when trying to install the integration, the notorious "Unexpected error creating device" is displayed in the server log:

Could not get groups, trying to re-authenticate Traceback (most recent call last): File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 51, in start_session await self._get_groups() File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 62, in _get_groups self._groups = await self.execute_get( ^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 127, in execute_get response = await self._client.get( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 682, in _request resp = await req.send(conn) ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 733, in send await writer.write_headers(status_line, self.headers) File "/usr/local/lib/python3.12/site-packages/aiohttp/http_writer.py", line 129, in write_headers buf = _serialize_headers(status_line, headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "aiohttp/_http_writer.pyx", line 132, in aiohttp._http_writer._serialize_headers File "aiohttp/_http_writer.pyx", line 109, in aiohttp._http_writer.to_str TypeError: Cannot serialize non-str key None

At the same time, I enter the correct username and password. Since I'm installing integration from scratch, I can't turn on the debugging log. I tried to register it in the configuration.yaml logger: logs: custom_components.panasonic_cc: debug

but did not understand what it gives. But after that, the following appeared in the server log:

"Bad logger message: Unexpected error creating device ((TypeError('Cannot serialize non-str key None'),))"

and

"Getting app version: Cannot connect to host play.google.com:443 ssl:default [Connection reset by peer]"

egric avatar Sep 10 '24 10:09 egric

@egric Hi, the error says that it can not connect to play.google.com can you ping that from HA? Does your HA installation have IPv6 active?

sockless-coding avatar Sep 14 '24 19:09 sockless-coding

The ping is passing. Ipv6 is not in use and is not active

egric avatar Sep 15 '24 05:09 egric

Ok, does https://play.google.com/store/apps/details?id=com.panasonic.ACCsmart work?

sockless-coding avatar Sep 15 '24 08:09 sockless-coding

https://play.google.com/store/apps/details?id=com.panasonic.ACCsmart this link does not open the page in the browser without vpn.

egric avatar Sep 15 '24 08:09 egric

and now, when trying to install the integration, an "unknown error occurred" appears

egric avatar Sep 15 '24 08:09 egric

So your internet connection is restricted? The integration used that link to get the current app version, which is required.

sockless-coding avatar Sep 15 '24 08:09 sockless-coding

in log only that:

Could not get groups, trying to re-authenticate Traceback (most recent call last): File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 51, in start_session await self._get_groups() File "/config/custom_components/panasonic_cc/pcomfortcloud/apiclient.py", line 62, in _get_groups self._groups = await self.execute_get( ^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/panasonic_cc/pcomfortcloud/panasonicsession.py", line 127, in execute_get response = await self._client.get( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 682, in _request resp = await req.send(conn) ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 733, in send await writer.write_headers(status_line, self.headers) File "/usr/local/lib/python3.12/site-packages/aiohttp/http_writer.py", line 129, in write_headers buf = _serialize_headers(status_line, headers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "aiohttp/_http_writer.pyx", line 132, in aiohttp._http_writer._serialize_headers File "aiohttp/_http_writer.pyx", line 109, in aiohttp._http_writer.to_str TypeError: Cannot serialize non-str key None

egric avatar Sep 15 '24 09:09 egric

Yes, you get that error because the version number isn't supplied / is an invalid value.

sockless-coding avatar Sep 15 '24 09:09 sockless-coding

and how do I make sure that the version number is specified?

egric avatar Sep 15 '24 10:09 egric

The integration needs access to https://play.google.com/store/apps/details?id=com.panasonic.ACCsmart how come you can't access the play store?

sockless-coding avatar Sep 15 '24 12:09 sockless-coding

I can to access. But but through vpn only.

egric avatar Sep 15 '24 13:09 egric

Can you enable so HA can go through the VPN as well?

sockless-coding avatar Sep 15 '24 15:09 sockless-coding

Only by running openvpn on the router

egric avatar Sep 15 '24 15:09 egric

Well, if your connection is restricted, you might get more issues with cloud integrations down the line. In order to work this integration needs to access things on:

  • authglb.digital.panasonic.com
  • accsmart.panasonic.com
  • play.google.com

sockless-coding avatar Sep 15 '24 18:09 sockless-coding

Hi there! This issue has been marked as stale due to inactivity. If you believe this is still relevant, please let us know. Otherwise, it will be closed soon.

github-actions[bot] avatar Nov 15 '24 00:11 github-actions[bot]

This issue has been automatically closed due to inactivity. If you still need help, feel free to reopen or create a new issue. Thank you!

github-actions[bot] avatar Nov 22 '24 00:11 github-actions[bot]