Closed leoyangt closed 2 years ago
Try to configure component again. It's most likely API timeout. If problem persists after reconfiguring, restart all devices should be able to fix it.
@osk2 I had reboot host many time still same problem
2022-06-24 08:40:16 INFO (MainThread) [custom_components.panasonic_smart_app] Loading your Panasonic devices. This may takes few minutes to complete. 2022-06-24 08:40:16 INFO (MainThread) [custom_components.panasonic_smart_app.smartApp] Attemping to login... 2022-06-24 08:40:17 DEBUG (MainThread) [custom_components.panasonic_smart_app.smartApp] Making request to https://ems2.panasonic.com.tw/api/userlogin1 with headers {'user-agent': 'okhttp/4.9.1'} and data {'MemId': 'leoyangtaiwan@gmail.com', 'PW': 'axcelis1', 'AppToken': 'D8CBFF4C-2824-4342-B22D-189166FEF503'} 2022-06-24 08:40:22 INFO (MainThread) [custom_components.panasonic_smart_app] Updating device info... 2022-06-24 08:40:22 DEBUG (MainThread) [custom_components.panasonic_smart_app.smartApp] Making request to https://ems2.panasonic.com.tw/api/UserGetRegisteredGwList2 with headers {'cptoken': '2204E692-E7A7-4C16-8713-78C56B610089', 'user-agent': 'okhttp/4.9.1'} and data None 2022-06-24 08:40:24 DEBUG (MainThread) [custom_components.panasonic_smart_app.smartApp] Making request to https://ems2.panasonic.com.tw/api/UserGetInfo with headers {'cptoken': '2204E692-E7A7-4C16-8713-78C56B610089', 'user-agent': 'okhttp/4.9.1'} and data {'name': 'Power', 'from': '2022/06/01', 'unit': 'day', 'max_num': 31} 2022-06-24 08:40:26 DEBUG (MainThread) [custom_components.panasonic_smart_app.smartApp] Making request to https://ems2.panasonic.com.tw/api/DeviceGetInfo with headers {'cptoken': '2204E692-E7A7-4C16-8713-78C56B610089', 'auth': 'B8B7F17593C4FBB069ABFB8FD2DF67DCB6B11766FECF', 'gwid': 'B8B7F17593C4', 'user-agent': 'okhttp/4.9.1'} and data [{'CommandTypes': [{'CommandType': '0x13'}, {'CommandType': '0x14'}, {'CommandType': '0x15'}, {'CommandType': '0x50'}, {'CommandType': '0x54'}, {'CommandType': '0x55'}], 'DeviceID': 1}] 2022-06-24 08:40:28 DEBUG (MainThread) [custom_components.panasonic_smart_app.smartApp] Making request to https://ems2.panasonic.com.tw/api/DeviceGetInfo with headers {'cptoken': '2204E692-E7A7-4C16-8713-78C56B610089', 'auth': 'B8B7F17593C4FBB069ABFB8FD2DF67DCB6B11766FECF', 'gwid': 'B8B7F17593C4', 'user-agent': 'okhttp/4.9.1'} and data [{'CommandTypes': [{'CommandType': '0x61'}, {'CommandType': '0x64'}], 'DeviceID': 1}] 2022-06-24 08:40:30 DEBUG (MainThread) [custom_components.panasonic_smart_app] Finished fetching Panasonic Smart Application data in 8.029 seconds 2022-06-24 08:40:30 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform panasonic_smart_app.sensor: Platform not found (cannot import name 'DEVICE_CLASS_PM25' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)).
What's your HA version?
What's your HA version? @osk2 Rasp-pi4 HA OS 8.1 HA core-2021.7.2
You need to upgrade core to version newer than 2021.9.0. I recommend upgrading to latest version or some entity will not work.
Close as not receiving updates.
Hi Osk2: Tks for your hard work on this project. I got problem on startup after install your code the HACS. Rasp-pi4 HA OS 8.1 HA core-2021.7.2 Here is log 自訂整合產生錯誤。
Logger: homeassistant.config_entries Source: custom_components/panasonic_smart_app/smartApp/init.py:262 Integration: Panasonic Smart App (documentation, issues) First occurred: 16:17:48 (1 occurrences) Last logged: 16:17:48
Error setting up entry "MY ID " for panasonic_smart_app Traceback (most recent call last): File "/config/custom_components/panasonic_smart_app/smartApp/init.py", line 244, in request response = await self._session.request( File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 544, in _request await resp.start(conn) File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 905, in start self._continue = None File "/usr/local/lib/python3.9/site-packages/aiohttp/helpers.py", line 656, in exit raise asyncio.TimeoutError from None asyncio.exceptions.TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/config/custom_components/panasonic_smart_app/init.py", line 42, in async_setup_entry await client.login() File "/config/custom_components/panasonic_smart_app/smartApp/init.py", line 77, in login response = await self.request( File "/config/custom_components/panasonic_smart_app/smartApp/init.py", line 58, in wrapper_call results = await asyncio.gather( File "/config/custom_components/panasonic_smart_app/smartApp/init.py", line 262, in request raise PanasonicDeviceOffline(f"無法連線至裝置,將於下輪更新時重試") custom_components.panasonic_smart_app.smartApp.exceptions.PanasonicDeviceOffline: 無法連線至裝置,將於下輪更新時重試