[Bug] ha-sengledapi fails to load after configuration added and HA restart
Closed this issue · 4 comments
Describe the bug
This repo fails to discover devices
To Reproduce
Steps to reproduce the behavior:
- Follow repos installation steps
- Restart HA
- HA Notifications states "Error during setup of component sengledapi"
Expected behavior
Sengled API to load and find devices
System configuration
System: Unix / TrueNAS plugin (https://github.com/tprelog/iocage-homeassistant)
HA Version: Home Assistant Core 2022.6.5
SengledApi Version: master / 0.2.4?
configuration.yaml
## This configuration.yaml file is provided by the Home Assistant Core iocage-jail for TrueNAS Core
# Learn more at https://www.home-assistant.io/docs/configuration
sengledapi:
username: {redacted}@{redacted}.com
password: {redacted}
country: us
wifi: true
homeassistant:
# https://www.home-assistant.io/docs/configuration/customizing-devices/
customize: !include customize.yaml
# https://www.home-assistant.io/docs/configuration/packages/#create-a-packages-folder
packages: !include_dir_named packages
http:
# https://www.home-assistant.io/integrations/http/#ip_ban_enabled
ip_ban_enabled: False
login_attempts_threshold: 5
## Configure a default setup of Home Assistant Core (frontend, api, etc)
# Learn more at https://www.home-assistant.io/integrations/default_config
default_config:
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
home-assistant.log
Log Details (ERROR)
Logger: homeassistant.setup
Source: util/async_.py:168
First occurred: 2:34:53 PM (1 occurrences)
Last logged: 2:34:53 PM
Error during setup of component sengledapi
Traceback (most recent call last):
File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/sengledapi.py", line 253, in async_do_request
return await Request(url, payload).async_get_response(jsessionId)
File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/devices/request.py", line 57, in async_get_response
data = await resp.json()
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1103, in json
raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://element.cloud.sengled.com/zigbee/device/getDeviceDetails.json')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/home/homeassistant/homeassistant/custom_components/sengledapi/__init__.py", line 64, in async_setup
sengledapi_devices = await sengledapi_account.async_get_devices()
File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/sengledapi.py", line 182, in async_get_devices
data = await self.async_do_request(url, payload, SESSION.jsession_id)
File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/sengledapi.py", line 255, in async_do_request
return Request(url, payload).get_response(jsessionId)
File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/devices/request.py", line 40, in get_response
r = requests.post(self._url, headers=self._header, data=self._payload)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/api.py", line 117, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/adapters.py", line 440, in send
resp = conn.urlopen(
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/local/lib/python3.9/http/client.py", line 1285, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.9/http/client.py", line 1296, in _send_request
self.putrequest(method, url, **skips)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connection.py", line 219, in putrequest
return _HTTPConnection.putrequest(self, method, url, *args, **kwargs)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/homeassistant/util/async_.py", line 180, in protected_loop_func
check_loop(func, strict=strict)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/homeassistant/util/async_.py", line 168, in check_loop
raise RuntimeError(
RuntimeError: Blocking calls must be done in the executor or a separate thread; Use `await hass.async_add_executor_job()`; at custom_components/sengledapi/sengledapi/devices/request.py, line 40: r = requests.post(self._url, headers=self._header, data=self._payload)
Can you turn on debug and let me know the full output during start up?
Here's the full unedited log.
It seems the below might be the cause of this issue?
client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://element.cloud.sengled.com/zigbee/device/getDeviceDetails.json')
2022-06-21 04:45:14 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration kumo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-06-21 04:45:14 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration sengledapi which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-06-21 04:45:14 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2022-06-21 04:45:14 INFO (MainThread) [homeassistant.setup] Setup of domain logger took 0.0 seconds 2022-06-21 04:45:14 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.1 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 1: {'ssdp', 'usb', 'api', 'image', 'diagnostics', 'auth', 'onboarding', 'http', 'config', 'websocket_api', 'lovelace', 'network', 'search', 'zeroconf', 'analytics', 'cloud', 'frontend', 'device_automation', 'person', 'dhcp', 'webhook', 'system_log'} 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up http 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up lovelace 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up device_automation 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain device_automation took 0.0 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up dhcp 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain dhcp took 0.0 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain lovelace took 0.1 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.1 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up api 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain api took 0.0 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up image 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up diagnostics 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up auth 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain auth took 0.0 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up config 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up websocket_api 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain websocket_api took 0.0 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up webhook 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain webhook took 0.0 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain diagnostics took 0.1 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain config took 0.1 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain image took 0.2 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up search 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain search took 0.0 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up analytics 2022-06-21 04:45:15 INFO (SyncWorker_7) [homeassistant.loader] Loaded google_assistant from homeassistant.components.google_assistant 2022-06-21 04:45:15 INFO (SyncWorker_3) [homeassistant.loader] Loaded alexa from homeassistant.components.alexa 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up usb 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain usb took 0.0 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up network 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain network took 0.0 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up person 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain analytics took 0.0 seconds 2022-06-21 04:45:15 INFO (SyncWorker_6) [homeassistant.loader] Loaded camera from homeassistant.components.camera 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up zeroconf 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setting up ssdp 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain ssdp took 0.0 seconds 2022-06-21 04:45:15 INFO (MainThread) [homeassistant.setup] Setup of domain zeroconf took 0.0 seconds 2022-06-21 04:45:15 INFO (SyncWorker_9) [homeassistant.loader] Loaded media_player from homeassistant.components.media_player 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up cloud 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain cloud took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain person took 0.6 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up onboarding 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain onboarding took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up frontend 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'airthings', 'automation', 'logbook', 'tag', 'kumo', 'system_health', 'script', 'remote', 'my', 'wemo', 'media_source', 'mobile_app', 'cast', 'ipp', 'map', 'ecobee', 'trace', 'spotify', 'radio_browser', 'timer', 'tts', 'panel_iframe', 'input_button', 'scene', 'group', 'switch', 'tplink', 'persistent_notification', 'application_credentials', 'input_datetime', 'hacs', 'blueprint', 'counter', 'history', 'sengledapi', 'zone', 'harmony', 'input_number', 'default_config', 'input_select', 'sun', 'input_text', 'energy', 'motioneye', 'input_boolean'} 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up airthings 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain airthings took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up logbook 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up tag 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up kumo 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain kumo took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up system_health 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up remote 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain remote took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up my 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain my took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up media_source 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up map 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain map took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up trace 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain trace took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up radio_browser 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain radio_browser took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up timer 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up panel_iframe 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain panel_iframe took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up input_button 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up scene 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.components.scene] Setting up scene.homeassistant 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up group 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up switch 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain switch took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up application_credentials 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up input_datetime 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up blueprint 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain blueprint took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up counter 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up history 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.devices.bulbs.bulb] SengledApi: Initializing Bulbs 2022-06-21 04:45:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.devices.request] SengledApi: Initializing Request 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up sengledapi 2022-06-21 04:45:16 INFO (MainThread) [custom_components.sengledapi] ------------------------------------------------------------------- Sengled Bulb Home Assistant Integration Created from Config Version: v0.2 This is a custom integration If you have any issues with this you need to open an issue here: https://github.com/jfarmer08/ha-sengledapi ------------------------------------------------------------------- 2022-06-21 04:45:16 INFO (MainThread) [custom_components.sengledapi] Creating new SengledApi component 2022-06-21 04:45:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.sengledapi] Sengled Api initializing. 2022-06-21 04:45:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.sengledapi] Sengled Api initializing async. 2022-06-21 04:45:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.sengledapi] Sengledapi: Login 2022-06-21 04:45:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.sengledapi] SengledApi: Login Request. 2022-06-21 04:45:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.devices.request] SengledApi: Sengled Request initializing. 2022-06-21 04:45:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.devices.request] SengledApi: Get Login Response async. 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up zone 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up input_number 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up input_select 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up sun 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up input_text 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up input_boolean 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 0.4 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain system_health took 0.4 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up wemo 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain wemo took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain media_source took 0.5 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up ipp 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain ipp took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up ecobee 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain ecobee took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain scene took 0.4 seconds 2022-06-21 04:45:16 INFO (SyncWorker_5) [homeassistant.loader] Loaded google_translate from homeassistant.components.google_translate 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up tplink 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up hacs 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain hacs took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up energy 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain energy took 0.0 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain tag took 0.7 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setup of domain application_credentials took 0.6 seconds 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up automation 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.setup] Setting up script 2022-06-21 04:45:16 INFO (MainThread) [homeassistant.components.http] Now listening on port 8123 2022-06-21 04:45:17 INFO (Wemo HTTP Thread) [pywemo.subscribe] Listening on port 8989 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setting up tts 2022-06-21 04:45:17 INFO (MainThread) [custom_components.hacs] ------------------------------------------------------------------- HACS (Home Assistant Community Store) Version: 1.25.5 This is a custom integration If you have any issues with this you need to open an issue here: https://github.com/hacs/integration/issues ------------------------------------------------------------------- 2022-06-21 04:45:17 INFO (SyncWorker_2) [homeassistant.loader] Loaded switch_as_x from homeassistant.components.switch_as_x 2022-06-21 04:45:17 INFO (SyncWorker_7) [homeassistant.loader] Loaded sensor from homeassistant.components.sensor 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain group took 1.2 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain timer took 1.2 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain counter took 1.2 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setting up sensor 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 0.0 seconds 2022-06-21 04:45:17 INFO (MainThread) [custom_components.kumo] Loaded config from KumoCloud server 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 0.7 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain script took 0.7 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain input_button took 1.3 seconds 2022-06-21 04:45:17 INFO (SyncWorker_4) [homeassistant.loader] Loaded notify from homeassistant.components.notify 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain input_datetime took 1.3 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain input_number took 1.0 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setting up motioneye 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain motioneye took 0.0 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook b6e6b8d325b699288a6e245b706b3fbfcc71105dd06fe5a2f6744c70f0be4c59 from 192.168.1.20 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook b6e6b8d325b699288a6e245b706b3fbfcc71105dd06fe5a2f6744c70f0be4c59 from 192.168.1.20 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook b6e6b8d325b699288a6e245b706b3fbfcc71105dd06fe5a2f6744c70f0be4c59 from 192.168.1.20 2022-06-21 04:45:17 INFO (SyncWorker_3) [homeassistant.loader] Loaded climate from homeassistant.components.climate 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setting up harmony 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain harmony took 0.0 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.energy 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain zone took 1.1 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain input_select took 1.1 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain input_text took 1.1 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setting up climate 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain climate took 0.0 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain input_boolean took 1.1 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setting up spotify 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain spotify took 0.0 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setting up mobile_app 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.components.climate] Setting up climate.kumo 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.4 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain mobile_app took 0.0 seconds 2022-06-21 04:45:17 INFO (MainThread) [pykumo.pykumo] Use timeouts=(1.2, 8.0) 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setting up notify 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain notify took 0.0 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook b6e6b8d325b699288a6e245b706b3fbfcc71105dd06fe5a2f6744c70f0be4c59 from 192.168.1.20 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setting up device_tracker 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.mobile_app 2022-06-21 04:45:17 INFO (SyncWorker_4) [homeassistant.loader] Loaded plex from homeassistant.components.plex 2022-06-21 04:45:17 INFO (SyncWorker_3) [homeassistant.loader] Loaded binary_sensor from homeassistant.components.binary_sensor 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.components.notify] Setting up notify.mobile_app 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.motioneye 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.components.switch] Setting up switch.motioneye 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setting up default_config 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setting up camera 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain device_tracker took 0.1 seconds 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setting up binary_sensor 2022-06-21 04:45:17 INFO (MainThread) [homeassistant.setup] Setup of domain binary_sensor took 0.0 seconds 2022-06-21 04:45:17 INFO (SyncWorker_9) [homeassistant.loader] Loaded backup from homeassistant.components.backup 2022-06-21 04:45:17 INFO (MainThread) [custom_components.hacs] Restore started 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.setup] Setting up cast 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.setup] Setup of domain cast took 0.0 seconds 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.mobile_app 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.mobile_app 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.setup] Setup of domain camera took 0.3 seconds 2022-06-21 04:45:18 INFO (MainThread) [custom_components.hacs] Restore done 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.components.camera] Setting up camera.motioneye 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.setup] Setting up backup 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.setup] Setup of domain backup took 0.0 seconds 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.setup] Setting up media_player 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.setup] Setup of domain media_player took 0.0 seconds 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.setup] Setup of domain default_config took 0.5 seconds 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.cast 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.ipp 2022-06-21 04:45:18 INFO (MainThread) [pykumo.pykumo] Unit does not support vane direction 2022-06-21 04:45:18 INFO (MainThread) [pykumo.pykumo] Use timeouts=(1.2, 8.0) 2022-06-21 04:45:18 INFO (MainThread) [custom_components.sengledapi] SengledApi Connected to Sengled account 2022-06-21 04:45:18 INFO (MainThread) [custom_components.sengledapi.sengledapi.devices.request] SengledApi: Sengled Request initializing. 2022-06-21 04:45:18 INFO (MainThread) [custom_components.hacs] Enable category: integration 2022-06-21 04:45:18 INFO (MainThread) [custom_components.hacs] Enable category: plugin 2022-06-21 04:45:18 INFO (MainThread) [custom_components.hacs] Enable category: theme 2022-06-21 04:45:18 INFO (MainThread) [custom_components.hacs] LovelaceMode.STORAGE mode, cache for /hacsfiles/: True 2022-06-21 04:45:18 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.SETUP 2022-06-21 04:45:18 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.WAITING 2022-06-21 04:45:18 INFO (MainThread) [custom_components.hacs] Setup complete, waiting for Home Assistant before startup tasks starts 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.hacs 2022-06-21 04:45:18 INFO (zeroconf-ServiceBrowser-_googlecast._tcp-101915) [homeassistant.components.cast.helpers] Fetched cast details for unknown model 'Chromecast Ultra' manufacturer: 'Google Inc.', type: 'cast'. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+cast%22 2022-06-21 04:45:18 INFO (SyncWorker_3) [homeassistant.loader] Loaded humidifier from homeassistant.components.humidifier 2022-06-21 04:45:18 INFO (SyncWorker_1) [homeassistant.loader] Loaded weather from homeassistant.components.weather 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.ecobee 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.components.climate] Setting up climate.ecobee 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.ecobee 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.setup] Setting up humidifier 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.setup] Setup of domain humidifier took 0.0 seconds 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.setup] Setting up weather 2022-06-21 04:45:18 INFO (MainThread) [homeassistant.setup] Setup of domain weather took 0.0 seconds 2022-06-21 04:45:19 INFO (MainThread) [homeassistant.components.humidifier] Setting up humidifier.ecobee 2022-06-21 04:45:19 INFO (MainThread) [homeassistant.components.weather] Setting up weather.ecobee 2022-06-21 04:45:19 INFO (MainThread) [pykumo.pykumo] Unit does not support vane direction 2022-06-21 04:45:19 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.airthings 2022-06-21 04:45:19 INFO (MainThread) [custom_components.sengledapi.sengledapi.devices.request] SengledApi: Sengled Request initializing. 2022-06-21 04:45:19 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to putrequest inside the event loop. This is causing stability issues. Please report issue to the custom component author for sengledapi doing blocking calls at custom_components/sengledapi/sengledapi/devices/request.py, line 40: r = requests.post(self._url, headers=self._header, data=self._payload) 2022-06-21 04:45:19 ERROR (MainThread) [homeassistant.setup] Error during setup of component sengledapi Traceback (most recent call last): File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/sengledapi.py", line 253, in async_do_request return await Request(url, payload).async_get_response(jsessionId) File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/devices/request.py", line 57, in async_get_response data = await resp.json() File "/usr/local/share/homeassistant/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1103, in json raise ContentTypeError( aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://element.cloud.sengled.com/zigbee/device/getDeviceDetails.json') During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/share/homeassistant/lib/python3.9/site-packages/homeassistant/setup.py", line 235, in _async_setup_component result = await task File "/home/homeassistant/homeassistant/custom_components/sengledapi/__init__.py", line 64, in async_setup sengledapi_devices = await sengledapi_account.async_get_devices() File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/sengledapi.py", line 182, in async_get_devices data = await self.async_do_request(url, payload, SESSION.jsession_id) File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/sengledapi.py", line 255, in async_do_request return Request(url, payload).get_response(jsessionId) File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/devices/request.py", line 40, in get_response r = requests.post(self._url, headers=self._header, data=self._payload) File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/api.py", line 117, in post return request('post', url, data=data, json=json, **kwargs) File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/sessions.py", line 529, in request resp = self.send(prep, **send_kwargs) File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/sessions.py", line 645, in send r = adapter.send(request, **kwargs) File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/adapters.py", line 440, in send resp = conn.urlopen( File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connectionpool.py", line 398, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/usr/local/lib/python3.9/http/client.py", line 1285, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.9/http/client.py", line 1296, in _send_request self.putrequest(method, url, **skips) File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connection.py", line 219, in putrequest return _HTTPConnection.putrequest(self, method, url, *args, **kwargs) File "/usr/local/share/homeassistant/lib/python3.9/site-packages/homeassistant/util/async_.py", line 180, in protected_loop_func check_loop(func, strict=strict) File "/usr/local/share/homeassistant/lib/python3.9/site-packages/homeassistant/util/async_.py", line 168, in check_loop raise RuntimeError( RuntimeError: Blocking calls must be done in the executor or a separate thread; Use `await hass.async_add_executor_job()`; at custom_components/sengledapi/sengledapi/devices/request.py, line 40: r = requests.post(self._url, headers=self._header, data=self._payload) 2022-06-21 04:45:19 INFO (MainThread) [homeassistant.components.remote] Setting up remote.harmony 2022-06-21 04:45:19 INFO (MainThread) [homeassistant.components.switch] Setting up switch.harmony 2022-06-21 04:45:19 INFO (SyncWorker_0) [homeassistant.loader] Loaded select from homeassistant.components.select 2022-06-21 04:45:19 INFO (MainThread) [homeassistant.setup] Setting up select 2022-06-21 04:45:19 INFO (MainThread) [homeassistant.setup] Setup of domain select took 0.0 seconds 2022-06-21 04:45:19 INFO (MainThread) [homeassistant.components.select] Setting up select.harmony 2022-06-21 04:45:22 INFO (MainThread) [homeassistant.setup] Setup of domain tplink took 5.7 seconds 2022-06-21 04:45:22 INFO (SyncWorker_7) [homeassistant.loader] Loaded light from homeassistant.components.light 2022-06-21 04:45:22 INFO (MainThread) [homeassistant.setup] Setting up light 2022-06-21 04:45:22 INFO (MainThread) [homeassistant.setup] Setup of domain light took 0.0 seconds 2022-06-21 04:45:22 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.tplink 2022-06-21 04:45:22 INFO (MainThread) [homeassistant.components.switch] Setting up switch.tplink 2022-06-21 04:45:22 INFO (MainThread) [homeassistant.components.light] Setting up light.tplink 2022-06-21 04:45:22 INFO (MainThread) [homeassistant.components.light] Setting up light.tplink 2022-06-21 04:45:22 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.tplink 2022-06-21 04:45:22 INFO (MainThread) [homeassistant.components.switch] Setting up switch.tplink 2022-06-21 04:45:41 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.spotify 2022-06-21 04:45:42 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 27.93s 2022-06-21 04:45:42 INFO (MainThread) [homeassistant.core] Starting Home Assistant 2022-06-21 04:45:42 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.STARTUP 2022-06-21 04:45:42 INFO (MainThread) [homeassistant.components.zeroconf] Starting Zeroconf broadcast 2022-06-21 04:45:42 INFO (MainThread) [custom_components.hacs] Loading removed repositories 2022-06-21 04:45:42 INFO (SyncWorker_8) [homeassistant.loader] Loaded homekit_controller from homeassistant.components.homekit_controller 2022-06-21 04:45:43 INFO (MainThread) [custom_components.hacs] Loading known repositories 2022-06-21 04:45:43 INFO (MainThread) [custom_components.hacs] Starting recurring background task for downloaded repositories 2022-06-21 04:45:43 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.RUNNING
Then Info logs help, but I really need the Debug logs for this component.
logger:
default: warning
logs:
custom_components.sengledapi: debug
@jfarmer08 Ah, sorry about that. I was conflating "debug" with "the log in general" and didn't realize that I need to set the log level specifically to debug. I didn't realize debug was even an option and figured info and up would catch everything.
I now see
Login Response {'ret': 2, 'msg': '用户名或密码错误', 'customerId': None, 'mobileId': None, 'nick_name': '', 'relative_path': '', 'jsessionId': '', 'ucenterAddr': '', 'appServerAddr': '', 'serAddressess': None, 'privacyPolicyStatus': None}
2022-06-21 07:21:18 DEBUG (MainThread) [custom_components.sengledapi.sengledapi.sengledapi] SengledApi Login {'ret': 2, 'msg': '用户名或密码错误', 'customerId': None, 'mobileId': None, 'nick_name': '', 'relative_path': '', 'jsessionId': '', 'ucenterAddr': '', 'appServerAddr': '', 'serAddressess': None, 'privacyPolicyStatus': None}
Google translating 用户名或密码错误 -> wrong user name or password'
🤦 Sengled uses 2 accounts. One for their "website" and one for the "app". I was using the web when I should have been using the app password... Everything's working now and I can see my devices under entities...
Sorry for the massive time waste. I'm not sure if 'ret': 2
in the login response corresponds with "bad password" but it might be worth throwing a message at the HA notifications saying "Bad username / password" if that's the case.
For any future people reading the issue:
I updated my homeassistant/configuration.yaml
to
logger:
default: warning
logs:
custom_components.sengledapi: debug
With the above changes my home-assistant.log now looks like:
2022-06-21 07:21:14 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration kumo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-06-21 07:21:14 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-06-21 07:21:14 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration sengledapi which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-06-21 07:21:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.devices.bulbs.bulb] SengledApi: Initializing Bulbs
2022-06-21 07:21:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.devices.request] SengledApi: Initializing Request
2022-06-21 07:21:16 INFO (MainThread) [custom_components.sengledapi]
-------------------------------------------------------------------
Sengled Bulb Home Assistant Integration Created from Config
Version: v0.2
This is a custom integration
If you have any issues with this you need to open an issue here:
https://github.com/jfarmer08/ha-sengledapi
-------------------------------------------------------------------
2022-06-21 07:21:16 INFO (MainThread) [custom_components.sengledapi] Creating new SengledApi component
2022-06-21 07:21:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.sengledapi] Sengled Api initializing.
2022-06-21 07:21:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.sengledapi] Sengled Api initializing async.
2022-06-21 07:21:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.sengledapi] Sengledapi: Login
2022-06-21 07:21:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.sengledapi] SengledApi: Login Request.
2022-06-21 07:21:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.devices.request] SengledApi: Sengled Request initializing.
2022-06-21 07:21:16 INFO (MainThread) [custom_components.sengledapi.sengledapi.devices.request] SengledApi: Get Login Response async.
2022-06-21 07:21:18 DEBUG (MainThread) [custom_components.sengledapi.sengledapi.devices.request] SengledApi: Get Login Response {'ret': 2, 'msg': '用户名或密码错误', 'customerId': None, 'mobileId': None, 'nick_name': '', 'relative_path': '', 'jsessionId': '', 'ucenterAddr': '', 'appServerAddr': '', 'serAddressess': None, 'privacyPolicyStatus': None}
2022-06-21 07:21:18 DEBUG (MainThread) [custom_components.sengledapi.sengledapi.sengledapi] SengledApi Login {'ret': 2, 'msg': '用户名或密码错误', 'customerId': None, 'mobileId': None, 'nick_name': '', 'relative_path': '', 'jsessionId': '', 'ucenterAddr': '', 'appServerAddr': '', 'serAddressess': None, 'privacyPolicyStatus': None}
2022-06-21 07:21:18 INFO (MainThread) [custom_components.sengledapi] SengledApi Connected to Sengled account
2022-06-21 07:21:18 DEBUG (MainThread) [custom_components.sengledapi.sengledapi.sengledapi] SengledApi: Get Devices.
2022-06-21 07:21:18 INFO (MainThread) [custom_components.sengledapi.sengledapi.devices.request] SengledApi: Sengled Request initializing.
2022-06-21 07:21:19 INFO (MainThread) [custom_components.sengledapi.sengledapi.devices.request] SengledApi: Sengled Request initializing.
2022-06-21 07:21:19 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to putrequest inside the event loop. This is causing stability issues. Please report issue to the custom component author for sengledapi doing blocking calls at custom_components/sengledapi/sengledapi/devices/request.py, line 40: r = requests.post(self._url, headers=self._header, data=self._payload)
2022-06-21 07:21:19 ERROR (MainThread) [homeassistant.setup] Error during setup of component sengledapi
Traceback (most recent call last):
File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/sengledapi.py", line 253, in async_do_request
return await Request(url, payload).async_get_response(jsessionId)
File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/devices/request.py", line 57, in async_get_response
data = await resp.json()
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1103, in json
raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://element.cloud.sengled.com/zigbee/device/getDeviceDetails.json')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/homeassistant/setup.py", line 235, in _async_setup_component
result = await task
File "/home/homeassistant/homeassistant/custom_components/sengledapi/__init__.py", line 64, in async_setup
sengledapi_devices = await sengledapi_account.async_get_devices()
File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/sengledapi.py", line 182, in async_get_devices
data = await self.async_do_request(url, payload, SESSION.jsession_id)
File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/sengledapi.py", line 255, in async_do_request
return Request(url, payload).get_response(jsessionId)
File "/home/homeassistant/homeassistant/custom_components/sengledapi/sengledapi/devices/request.py", line 40, in get_response
r = requests.post(self._url, headers=self._header, data=self._payload)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/api.py", line 117, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/requests/adapters.py", line 440, in send
resp = conn.urlopen(
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/local/lib/python3.9/http/client.py", line 1285, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.9/http/client.py", line 1296, in _send_request
self.putrequest(method, url, **skips)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/urllib3/connection.py", line 219, in putrequest
return _HTTPConnection.putrequest(self, method, url, *args, **kwargs)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/homeassistant/util/async_.py", line 180, in protected_loop_func
check_loop(func, strict=strict)
File "/usr/local/share/homeassistant/lib/python3.9/site-packages/homeassistant/util/async_.py", line 168, in check_loop
raise RuntimeError(
RuntimeError: Blocking calls must be done in the executor or a separate thread; Use `await hass.async_add_executor_job()`; at custom_components/sengledapi/sengledapi/devices/request.py, line 40: r = requests.post(self._url, headers=self._header, data=self._payload)
2022-06-21 07:22:15 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: media_player.spotify
2022-06-21 07:22:21 WARNING (MainThread) [homeassistant.components.media_player] Setup of media_player platform spotify is taking over 10 seconds.
2022-06-21 07:23:10 ERROR (SyncWorker_2) [spotipy.client] Max Retries reached