Closed hw76 closed 2 years ago
Hi, Please provide debug logs and screenshot(s), you probably have Internet connectivity issues, that's my guess.
Hi, Please provide debug logs and screenshot(s), you probably have Internet connectivity issues, that's my guess.
done.
Well only a restore of older saved backup will solve the issue. So i do not understand how a internet connectivity issue will contribute to this.
Please set it to debug mode,
logger:
default: info
logs:
homeassistant.components.casambi: debug
custom_components.casambi: debug
aiocasambi: debug
The description is very wage, its hard to guess. Most of the time (speaking from experience) its a flaky internet connection.
But the logs looks more like an old api key.
The code base has evolved, the underlying api is now preferring to use user credentials instead of network credentials. You can force the integration to use network credentials. Do do that you need to set the user password to empty string, ("").
light:
- platform: casambi
email: !secret casambi_email
api_key: !secret casambi_api_key
network_password : !secret casambi_network_password # The network password
user_password : ""
Can be that, but its hard to tell without debug logs :slightly_smiling_face:
What is thrown, probably comes from this:
except (asyncio.TimeoutError, aiocasambi.RequestError):
_LOGGER.error("Error connecting to the Casambi")
return False
So either a TimeoutError or RequestError, e.g. network problem or API key error.
More logs will help :slightly_smiling_face:
More logs will help 🙂
Right now I'm trying to get casambi working on my HASS again. Is not going easily. Tried to restore old backup --> No Luck Removed Casambi HACS integration and installed again --> No Luck No trying to go back to backup of last week to get it working again.
gimme a moment and i will enable the logs. ;)
Install it through HACS and make sure its updated (... -> Update information): Installation via HACS (recommended)
It will be very hard for you to install older versions of the integration since it relies on aiocasmbi and every version except the latest aiocasambi has been pulled from pypi. So it will force you to run the latest version of the integration.
The version you want to run is 0.76 and that version uses aiocasambi 0.238
light:
- platform: casambi email: !secret casambi_email api_key: !secret casambi_api_key network_password : !secret casambi_network_password # The network password user_password : ""
If I use integration with HACS I do not have to edit Config.YAML with these lines. Right?
The version you want to run is 0.76 and that version uses aiocasambi 0.238
Roger that!
Sorry, I just do not get it what is going wrong here...
This is what I am doing: 1) I remove the old Casambi intergration from HASS and remove the integration from HACS. 2) I reboot my Pi 3) Then I install casambi trough HACS 4) I install the integration in HASS and type in the email/key and pws in the requested lines
Then reboot and the integration is working and I can operate the lights
But after I edit the config.YAML file for loggin//debugging all my entities of casambi are disconnected
I get the following errors from the logs
I have a long string of cassambi loggings which I cannot understand
The strings (e.g: jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW-1034 are casambi unit ids),
Please don't upload word documents, I don't use word, just upload the raw text instead :slightly_smiling_face:
What false is one of the setups, either the configuration flow or configuration.yaml, probably invalid credentials in one of the setups.
I would suggest you to remove the units in the configuration flow and then set it up through configuration.yaml since you need to set debugging either way.
I have added unique error messages, so please upgrade to version 0.78.
The strings (e.g: jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW-1034 are casambi unit ids), -.
I would suggest you to remove the units in the configuration flow and then set it up through configuration.yaml since you need to set debugging either way.
Are you telling me to programme all the code into the config.yaml file instead of using the GUI? I did not do that yet since it is a lot op work coding. for the 23 casambi entities.
Here is what I did since last post.: I re-installed the addon 0,76 yesterday and it was working fine. Then at 9:13 this morning I upgraded through the HASS GUI to version 0,78 and after reboot lost all entities immediately.
LOG file dump(filtered on casambi)
2022-06-14 08:12:36 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration casambi 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-14 08:13:00 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'homematicip_cloud', 'threshold', 'media_source', 'input_select', 'dsmr', 'netgear', 'scene', 'script', 'application_credentials', 'hue', 'input_number', 'zone', 'mobile_app', 'tts', 'xbox', 'timer', 'persistent_notification', 'my', 'input_text', 'radio_browser', 'trace', 'hacs', 'input_datetime', 'met', 'ipp', 'sensor', 'upnp', 'input_boolean', 'homekit', 'blueprint', 'influxdb', 'sun', 'default_config', 'map', 'template', 'landroid_cloud', 'input_button', 'cpuspeed', 'history', 'system_health', 'synology_dsm', 'samsungtv', 'automation', 'tag', 'buienradar', 'casambi', 'counter', 'energy', 'dlna_dms', 'rpi_power', 'logbook', 'dlna_dmr', 'ffmpeg'} 2022-06-14 08:13:20 INFO (MainThread) [homeassistant.setup] Setting up casambi 2022-06-14 08:13:20 INFO (MainThread) [homeassistant.setup] Setup of domain casambi took 0.0 seconds 2022-06-14 08:13:23 INFO (MainThread) [homeassistant.components.light] Setting up light.casambi 2022-06-14 08:13:24 DEBUG (MainThread) [aiocasambi.controller] Create session called! 2022-06-14 08:13:24 DEBUG (MainThread) [aiocasambi.controller] Creating user session 2022-06-14 08:13:24 DEBUG (MainThread) [aiocasambi.controller] headers: {'Content-type': 'application/json', 'X-Casambi-Key': 'XXXX'} auth: {'email': 'XXX@hotmail.com', 'password': 'XXXX'} 2022-06-14 08:13:24 DEBUG (MainThread) [aiocasambi.controller] Not sending websocket ping, current_time: 1655187204.2926812, last websocket ping: 1655187204.2892747 2022-06-14 08:13:24 DEBUG (MainThread) [aiocasambi.controller] request url: https://door.casambi.com/v1/users/session 2022-06-14 08:13:32 DEBUG (MainThread) [aiocasambi.controller] request: 200 application/json <ClientResponse(https://door.casambi.com/v1/users/session) [200 OK]> 2022-06-14 08:13:32 DEBUG (MainThread) [aiocasambi.controller] create_user_session data from request {'sessionId': 'TkGgj05fOI8mK-J6CzAEiSgEyvEfggjFijtSWQHKHtSLhxbDOwrSpc.bRWwl.XFdtr1qyYGQh.4MavR-dY1edA', 'sites': {'Yfc6h3PrQfJyLTi0a0yEgus9Dgj0uLNn': {'name': 'HW76', 'address': 'harderwijkerweg', 'role': 'ADMIN', 'networks': {'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW': {'id': 'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW', 'mac': '0a617ee36464', 'address': '0a617ee36464', 'name': 'mima lampen', 'type': 'OPEN', 'grade': 'CLASSIC', 'role': 'ADMIN'}}}}, 'networks': {'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW': {'id': 'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW', 'mac': '0a617ee36464', 'address': '0a617ee36464', 'name': 'mima lampen', 'type': 'OPEN', 'grade': 'CLASSIC', 'role': 'ADMIN'}}} 2022-06-14 08:13:32 DEBUG (MainThread) [aiocasambi.controller] network_ids: {'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW'} session_ids: {'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW': 'TkGgj05fOI8mK-J6CzAEiSgEyvEfggjFijtSWQHKHtSLhxbDOwrSpc.bRWwl.XFdtr1qyYGQh.4MavR-dY1edA'} 2022-06-14 08:13:32 DEBUG (MainThread) [aiocasambi.controller] Creating network session 2022-06-14 08:13:32 DEBUG (MainThread) [aiocasambi.controller] headers: {'Content-type': 'application/json', 'X-Casambi-Key': 'XXXX'} auth: {'email': 'XXXXX@hotmail.com', 'password': 'XXXXX'} 2022-06-14 08:13:32 DEBUG (MainThread) [aiocasambi.controller] Not sending websocket ping, current_time: 1655187212.6362295, last websocket ping: 1655187204.2892747 2022-06-14 08:13:32 DEBUG (MainThread) [aiocasambi.controller] request url: https://door.casambi.com/v1/networks/session 2022-06-14 08:13:33 WARNING (MainThread) [homeassistant.components.light] Setup of light platform casambi is taking over 10 seconds. 2022-06-14 08:13:34 DEBUG (MainThread) [aiocasambi.controller] request: 200 application/json <ClientResponse(https://door.casambi.com/v1/networks/session) [200 OK]> 2022-06-14 08:13:34 DEBUG (MainThread) [aiocasambi.controller] create_network_session data from request {'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW': {'address': '0a617ee36464', 2022-06-14 08:13:34 DEBUG (MainThread) [aiocasambi.controller] network_ids: {'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW'} session_ids: {'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW': 'Zo4hk2AuY4TVnlg7RjRnAf8CdLezaxXs70S2YcOzcrab6uC8Bu3.9Gj5pfM-tfunj-R0-8Bzuz6anIoUWBvw1g'} 2022-06-14 08:13:34 DEBUG (MainThread) [aiocasambi.controller] get_network_information request <url: https://door.casambi.com/v1/networks/jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW headers= {'Content-type': 'application/json', 'X-Casambi-Key': 'XXXXX', 'X-Casambi-Session': 'Zo4hk2AuY4TVnlg7RjRnAf8CdLezaxXs70S2YcOzcrab6uC8Bu3.9Gj5pfM-tfunj-R0-8Bzuz6anIoUWBvw1g'}> 2022-06-14 08:13:34 DEBUG (MainThread) [aiocasambi.controller] Not sending websocket ping, current_time: 1655187214.2545433, last websocket ping: 1655187204.2892747 2022-06-14 08:13:34 DEBUG (MainThread) [aiocasambi.controller] request url: https://door.casambi.com/v1/networks/jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW 2022-06-14 08:13:34 ERROR (MainThread) [custom_components.casambi.light] Integrations UI setup: Error connecting to the Casambi 2022-06-14 08:28:44 INFO (MainThread) [homeassistant.components.analytics] Submitted analytics to Home Assistant servers. Information submitted includes {'uuid': 'cfdecba5247e42c8b5497186d8df0f6c', 'version': '2022.6.5', 'installation_type': 'Home Assistant OS', 'supervisor': {'healthy': True, 'supported': True, 'arch': 'aarch64'}, 'operating_system': {'board': 'rpi3-64', 'version': '8.1'}, 'certificate': False, 'integrations': ['netgear', 'scene', 'cloud', 'script', 'application_credentials', 'update', 'persistent_notification', 'my', 'radio_browser', 'cover', 'search', 'binary_sensor', 'input_boolean', 'stream', 'frontend', 'diagnostics', 'notify', 'lovelace', 'samsungtv', 'automation', 'http', 'counter', 'remote', 'image', 'threshold', 'camera', 'network', 'input_number', 'config', 'button', 'xbox', 'usb', 'media_player', 'timer', 'homeassistant', 'alarm_control_panel', 'input_datetime', 'device_tracker', 'webhook', 'influxdb', 'default_config', 'input_button', 'history', 'light', 'switch', 'dlna_dmr', 'homematicip_cloud', 'hue', 'zone', 'mobile_app', 'onboarding', 'climate', 'met', 'homekit', 'vacuum', 'map', 'zeroconf', 'template', 'analytics', 'synology_dsm', 'api', 'tag', 'rpi_power', 'ffmpeg', 'logger', 'dhcp', 'person', 'media_source', 'input_select', 'dsmr', 'device_automation', 'tts', 'ssdp', 'input_text', 'trace', 'auth', 'ipp', 'sensor', 'upnp', 'blueprint', 'websocket_api', 'sun', 'hassio', 'google_translate', 'weather', 'cpuspeed', 'system_health', 'buienradar', 'energy', 'recorder', 'dlna_dms', 'logbook', 'system_log'], 'custom_integrations': [{'domain': 'hacs', 'version': <AwesomeVersion SemVer '1.25.5'>}, {'domain': 'afvalinfo', 'version': <AwesomeVersion SemVer '1.0.7'>}, {'domain': 'landroid_cloud', 'version': <AwesomeVersion SemVer '2.0.3'>}, {'domain': 'casambi', 'version': <AwesomeVersion SimpleVer '0.78'>}], 'addons': [{'slug': 'core_ssh', 'protected': True, 'version': '9.4.0', 'auto_update': False}, {'slug': 'db21ed7f_filebrowser', 'protected': True, 'version': '2.22.1', 'auto_update': True}, {'slug': 'core_duckdns', 'protected': True, 'version': '1.15.0', 'auto_update': False}, {'slug': 'a0d7b954_influxdb', 'protected': True, 'version': '4.5.0', 'auto_update': True}, {'slug': 'core_mariadb', 'protected': True, 'version': '2.4.0', 'auto_update': False}, {'slug': 'a0d7b954_grafana', 'protected': True, 'version': '7.6.0', 'auto_update': True}], 'energy': {'configured': True}, 'state_count': 454, 'automation_count': 11, 'integration_count': 93, 'addon_count': 6, 'user_count': 2}
After the update:
2022-06-14 09:13:04 INFO (MainThread) [homeassistant.components.light] Setting up light.casambi 2022-06-14 09:13:04 DEBUG (MainThread) [custom_components.casambi.light] async_setup_platform CasambiController already created!
No further logging available. sorry if im not specific enough for you. I am not an experienced programmer. But if you bare with me I can get there. ;)
Its easier for you to just add this in your configuration.yaml:
light:
- platform: casambi
email: !secret casambi_email
api_key: !secret casambi_api_key
network_password : !secret casambi_network_password # The network password
user_password : ""
You only have to add this ones and this is what is described in the integrations configuration. What you can do in the gui is to disable individual entities, home assistant is handling that flow not the integration itself.
No logic has been changed in the integration since v0.75, so what you are experience is probably related to either Casambis api or your some other factor (your Internet connection etc.).
This error is probably because of invalid credentials, so please make sure that your credentials are correct
2022-06-14 08:13:34 ERROR (MainThread) [custom_components.casambi.light] Integrations UI setup: Error connecting to the Casambi
You can either test them by following Casambis dev documentation or pip install casambi (pip3 install casambi) and run: import casambi
api_key = 'REPLACEME'
email = 'replaceme@replace.com'
network_password = 'REPLACEME'
user_password = 'REPLACEME'
worker = casambi.Casambi(api_key=api_key, email=email, user_password=user_password, network_password=network_password)
worker.create_user_session()
worker.create_network_session()
worker.ws_open()
print("Turn unit on!")
worker.turn_unit_on(unit_id=1)
time.sleep(60)
print("Turn unit off!")
worker.turn_unit_off(unit_id=1)
time.sleep(60)
And use only one configuration flow, I would prefer you to use configuration.yaml since that is what is described in the projects documentation and the easier method for testing and getting the integration to work. But if you prefer to use the gui for setting up the configuration, use that, just don't use both methods :slightly_smiling_face:
I have released a new version (0.79) with more debug messages, that will hopefully make it easier to debug this issue
So now I am a bit lost here:
looking at the github install procedure I have 2 options
Either i use the GUI integration with HACS --> integration Casambi and reboot Install futher integration with HASS Enter credentials in HASS GUI for Casapbi integration
This option i can get working
OR I do it manually Copy Casambi dir to custom components and reboot Edit Configurtion.yaml with credentials and reboot
this option I cannot get working. (sorry maybe I am a big noob here)
so i continue with the first option and thus leaving out the credentials of the configuration.YAML file...
But leaving IN the debug code
the logfile shows me this:
2022-06-14 22:14:04 INFO (MainThread) [homeassistant.components.light] Setting up light.casambi 2022-06-14 22:14:04 DEBUG (MainThread) [aiocasambi.controller] Create session called! 2022-06-14 22:14:04 DEBUG (MainThread) [aiocasambi.controller] Creating user session 2022-06-14 22:14:04 DEBUG (MainThread) [aiocasambi.controller] create_user_session called 2022-06-14 22:14:04 DEBUG (MainThread) [aiocasambi.controller] create_user_session headers: {'Content-type': 'application/json', 'X-Casambi-Key': 'XXXX'} auth: {'email': 'XXXXX@hotmail.com', 'password': 'XXXX'} 2022-06-14 22:14:04 DEBUG (MainThread) [aiocasambi.controller] Not sending websocket ping, current_time: 1655237644.6653364, last websocket ping: 1655237644.6617897 2022-06-14 22:14:04 DEBUG (MainThread) [aiocasambi.controller] request url: https://door.casambi.com/v1/users/session 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] request: 200 application/json <ClientResponse(https://door.casambi.com/v1/users/session) [200 OK]> <CIMultiDictProxy('Date': 'Tue, 14 Jun 2022 20:14:04 GMT', 'Access-Control-Allow-Origin': '', 'Access-Control-Allow-Methods': 'POST,GET,OPTIONS,PUT,DELETE,HEAD', 'Access-Control-Allow-Headers': '', 'Access-Control-Max-Age': '728000', 'Access-Control-Allow-Credentials': 'true', 'Content-Type': 'application/json; charset=UTF-8', 'Content-Length': '616', 'Server': 'Jetty(9.2.11.v20150529)')> 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] create_user_session data from request {'sessionId': 'onSaW36jrHw-BfAQCOZEu0U6bVrVX0iNneOnYgTI5..B0EEq.uxUt4FDSbB3i-WKvNpGwZQT-C9m3KGM.l-s3w', 'sites': {'Yfc6h3PrQfJyLTi0a0yEgus9Dgj0uLNn': {'name': 'XXX', 'address': 'XXXX', 'role': 'ADMIN', 'networks': {XXX', 'mac': 'XXX', 'address': 'XXX, 'name': 'mima lampen', 'type': 'OPEN', 'grade': 'CLASSIC', 'role': 'ADMIN'}}}}, 'networks': {'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW': {'id': 'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW', 'mac': 'XXX', 'address': XXX', 'name': 'mima lampen', 'type': 'OPEN', 'grade': 'CLASSIC', 'role': 'ADMIN'}}} 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] network_ids: {'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW'} session_ids: {'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW': 'onSaW36jrHw-BfAQCOZEu0U6bVrVX0iNneOnYgTI5..B0EEq.uxUt4FDSbB3i-WKvNpGwZQT-C9m3KGM.l-s3w'} 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] Creating network session 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] create_network_session called 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] create_network_session headers: {'Content-type': 'application/json', 'X-Casambi-Key': 'XXX} auth: {'email': 'XXX@hotmail.com', 'password': 'XXX'} 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] Not sending websocket ping, current_time: 1655237645.0721502, last websocket ping: 1655237644.6617897 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] request url: https://door.casambi.com/v1/networks/session
....
2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] request: 200 application/json <ClientResponse(https://door.casambi.com/v1/networks/session) [200 OK]> <CIMultiDictProxy('Date': 'Tue, 14 Jun 2022 20:14:05 GMT', 'Access-Control-Allow-Origin': '', 'Access-Control-Allow-Methods': 'POST,GET,OPTIONS,PUT,DELETE,HEAD', 'Access-Control-Allow-Headers': '', 'Access-Control-Max-Age': '728000', 'Access-Control-Allow-Credentials': 'true', 'Content-Type': 'application/json; charset=UTF-8', 'Content-Length': '280', 'Server': 'Jetty(9.2.11.v20150529)')> 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] create_network_session: data from request {'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW': {'address': '0a617ee36464', 'grade': 'CLASSIC', 'id': 'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW', 'mac': '0a617ee36464', 'name': 'mima lampen', 'sessionId': 'ft6CP2l-p-HEC1tLlocS9O7xJUCOufGIsT9BHzoOZ.iizrtSrNH51VF6hipRzB4G5CcyszEcSOWk1DR0tKRzHA', 'type': 'OPEN'}} 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] create_network_session: network_ids: {'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW'} session_ids: {'jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW': 'ft6CP2l-p-HEC1tLlocS9O7xJUCOufGIsT9BHzoOZ.iizrtSrNH51VF6hipRzB4G5CcyszEcSOWk1DR0tKRzHA'} 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] initialize called 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] get_network_information called 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] get_network_information request <url: https://door.casambi.com/v1/networks/jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW headers= {'Content-type': 'application/json', 'X-Casambi-Key': 'XXX', 'X-Casambi-Session': 'ft6CP2l-p-HEC1tLlocS9O7xJUCOufGIsT9BHzoOZ.iizrtSrNH51VF6hipRzB4G5CcyszEcSOWk1DR0tKRzHA__'}> 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] Not sending websocket ping, current_time: 1655237645.268996, last websocket ping: 1655237644.6617897 2022-06-14 22:14:05 DEBUG (MainThread) [aiocasambi.controller] request url: https://door.casambi.com/v1/networks/jqzS5OO2sQ6AgifAvC9IbHoXxVEuP3rW
....
and loads of casambi loggings about my Casambi cloud settings and names of the lamps and scenes. which will not include for you.
I did got no errors or warnings.
No, you just install it through HACS and then do the configuration through configurtion.yaml.
The second variant is so install it by copying directory, installing and configuring is not the same thing.
And installing works for you, the two variants of doing the configuration is through the gui or configurtion.yaml.
It doesn't matter which way you do it, long as you don't do both ways.
So you can still do the installation of the integration through HACS and the configuration through configurtion.yaml.
I need to see the debug messages in order to troubleshoot, its fine if you remove names, but I want to see where in the logic flow the integration breaks and what the integration was doing then :slightly_smiling_face:
But if it works now, the problem you where experiencing is probably because that you got an error from the Casambi cloud api during the instantiation phase (start up of Home assistant), and the integration is not doing any retries during that phase.
installed though HACS
It seemed to work for a while.
But always afther an update of another integration and reboot all lights entities are gone and I get the below logging.
2022-06-15 22:55:21 INFO (SyncWorker_6) [homeassistant.loader] Loaded switch from homeassistant.components.switch
2022-06-15 22:55:21 INFO (SyncWorker_3) [homeassistant.loader] Loaded light from homeassistant.components.light
2022-06-15 22:55:22 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.cpuspeed
2022-06-15 22:55:22 INFO (MainThread) [homeassistant.setup] Setting up weather
2022-06-15 22:55:22 INFO (MainThread) [homeassistant.setup] Setup of domain weather took 0.0 seconds
2022-06-15 22:55:22 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.energy
2022-06-15 22:55:22 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform buienradar is taking over 10 seconds.
2022-06-15 22:55:22 INFO (MainThread) [homeassistant.setup] Setup of domain timer took 24.6 seconds
2022-06-15 22:55:22 INFO (MainThread) [homeassistant.setup] Setting up media_player
2022-06-15 22:55:22 INFO (MainThread) [homeassistant.setup] Setup of domain media_player took 0.1 seconds
2022-06-15 22:55:23 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform template is taking over 10 seconds.
2022-06-15 22:55:23 INFO (MainThread) [homeassistant.components.weather] Setting up weather.buienradar
2022-06-15 22:55:23 INFO (SyncWorker_1) [homeassistant.components.rpi_power.binary_sensor] Voltage normalized. Everything is working as intended.
2022-06-15 22:55:23 INFO (MainThread) [homeassistant.setup] Setting up light
2022-06-15 22:55:23 INFO (SyncWorker_2) [homeassistant.loader] Loaded notify from homeassistant.components.notify
2022-06-15 22:55:24 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.samsungtv
2022-06-15 22:55:24 INFO (MainThread) [homeassistant.setup] Setup of domain counter took 17.9 seconds
2022-06-15 22:55:24 INFO (MainThread) [homeassistant.setup] Setup of domain input_text took 27.3 seconds
2022-06-15 22:55:24 INFO (MainThread) [homeassistant.setup] Setup of domain zone took 19.8 seconds
2022-06-15 22:55:24 INFO (MainThread) [homeassistant.setup] Setup of domain camera took 4.5 seconds
2022-06-15 22:55:24 INFO (MainThread) [homeassistant.setup] Setup of domain light took 1.0 seconds
2022-06-15 22:55:25 INFO (MainThread) [homeassistant.setup] Setting up homekit
2022-06-15 22:55:25 INFO (MainThread) [homeassistant.components.camera] Setting up camera.buienradar
2022-06-15 22:55:25 INFO (MainThread) [homeassistant.setup] Setup of domain input_datetime took 20.8 seconds
2022-06-15 22:55:25 INFO (MainThread) [homeassistant.components.light] Setting up light.casambi
2022-06-15 22:55:25 INFO (MainThread) [homeassistant.setup] Setting up mobile_app
2022-06-15 22:55:25 INFO (MainThread) [homeassistant.setup] Setup of domain input_number took 20.8 seconds
2022-06-15 22:55:25 INFO (MainThread) [homeassistant.setup] Setup of domain input_boolean took 20.2 seconds
2022-06-15 22:55:25 INFO (MainThread) [homeassistant.setup] Setup of domain homekit took 0.5 seconds
2022-06-15 22:55:25 DEBUG (MainThread) [aiocasambi.controller] Create session called!
2022-06-15 22:55:25 DEBUG (MainThread) [aiocasambi.controller] Creating user session
2022-06-15 22:55:25 DEBUG (MainThread) [aiocasambi.controller] create_user_session called
2022-06-15 22:55:25 DEBUG (MainThread) [aiocasambi.controller] create_user_session headers: {'Content-type': 'application/json',
'X-Casambi-Key': 'XXX'} auth: {'email': 'XXX@hotmail.com', 'password': 'XXXX'}
2022-06-15 22:55:25 DEBUG (MainThread) [aiocasambi.controller] Not sending websocket ping, current_time: 1655326525.851893, last websocket ping: 1655326525.8478868
2022-06-15 22:55:25 DEBUG (MainThread) [aiocasambi.controller] request url: https://door.casambi.com/v1/users/session
2022-06-15 22:55:29 INFO (MainThread) [homeassistant.setup] Setting up xbox
2022-06-15 22:55:29 INFO (MainThread) [homeassistant.setup] Setup of domain xbox took 0.0 seconds
2022-06-15 22:55:29 INFO (MainThread) [homeassistant.setup] Setting up dlna_dmr
2022-06-15 22:55:29 INFO (MainThread) [homeassistant.setup] Setup of domain dlna_dmr took 0.0 seconds
2022-06-15 22:55:29 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 9.0 seconds
2022-06-15 22:55:30 INFO (MainThread) [homeassistant.setup] Setting up dlna_dms
2022-06-15 22:55:30 INFO (MainThread) [homeassistant.setup] Setup of domain dlna_dms took 0.0 seconds
2022-06-15 22:55:31 INFO (MainThread) [homeassistant.components.weather] Setting up weather.met
2022-06-15 22:55:31 WARNING (MainThread) [homeassistant.config_entries] Config entry 'EPSON WF-3520 Series' for ipp integration not ready yet: Invalid response from API: Timeout occurred while connecting to IPP server.; Retrying in background
2022-06-15 22:55:31 INFO (MainThread) [homeassistant.setup] Setup of domain mobile_app took 5.5 seconds
2022-06-15 22:55:31 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.dlna_dmr
2022-06-15 22:55:31 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.dlna_dmr
2022-06-15 22:55:31 INFO (MainThread) [homeassistant.setup] Setting up automation
2022-06-15 22:55:31 INFO (MainThread) [homeassistant.setup] Setting up notify
2022-06-15 22:55:31 INFO (MainThread) [homeassistant.setup] Setup of domain notify took 0.0 seconds
2022-06-15 22:55:31 INFO (MainThread) [homeassistant.setup] Setup of domain input_select took 33.4 seconds
2022-06-15 22:55:31 INFO (MainThread) [homeassistant.setup] Setup of domain input_button took 33.4 seconds
2022-06-15 22:55:31 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.netgear
2022-06-15 22:55:31 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Hue Bridge 00178876ced9' for hue integration not ready yet: Error connecting to the Hue bridge at 192.168.1.8; Retrying in background
2022-06-15 22:55:31 INFO (MainThread) [homeassistant.setup] Setting up device_tracker
2022-06-15 22:55:31 INFO (MainThread) [homeassistant.setup] Setting up switch
2022-06-15 22:55:31 INFO (MainThread) [homeassistant.setup] Setup of domain switch took 0.0 seconds
2022-06-15 22:55:31 INFO (SyncWorker_5) [homeassistant.loader] Loaded button from homeassistant.components.button
2022-06-15 22:55:32 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.mobile_app
2022-06-15 22:55:32 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.mobile_app
2022-06-15 22:55:32 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.mobile_app
2022-06-15 22:55:32 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.mobile_app
2022-06-15 22:55:32 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.mobile_app
2022-06-15 22:55:32 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.mobile_app
2022-06-15 22:55:32 INFO (MainThread) [homeassistant.setup] Setup of domain device_tracker took 1.0 seconds
2022-06-15 22:55:32 INFO (MainThread) [homeassistant.components.switch] Setting up switch.netgear
2022-06-15 22:55:32 INFO (MainThread) [homeassistant.setup] Setting up button
2022-06-15 22:55:32 INFO (MainThread) [homeassistant.setup] Setup of domain button took 0.0 seconds
2022-06-15 22:55:32 INFO (MainThread) [homeassistant.components.notify] Setting up notify.mobile_app
2022-06-15 22:55:34 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.netgear
2022-06-15 22:55:34 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.mobile_app
2022-06-15 22:55:34 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.mobile_app
2022-06-15 22:55:34 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.mobile_app
2022-06-15 22:55:34 INFO (MainThread) [homeassistant.components.button] Setting up button.netgear
2022-06-15 22:55:34 INFO (MainThread) [custom_components.hacs]
And after a reboot it seems to be working again. :S
I will keep monitoring it for a few days and will let you know how it performs.
Thanks anyways!
I have not had the time to look at all the logs yet, but the only thing I can think of is that one or more request false during the instantiation phase. The integration is making a lot of requests during that phase, it's getting the state for all your casambi units. A restart will probably fix it, if you are lucky.
The best way of fixing this would be to use the undocumented local Bluetooth api instead. It's being reversed https://pypi.org/project/casambi-bt/, but I have not got it to work yet with my setup.
I have not had the time to look at all the logs yet, but the only thing I can think of is that one or more request false during the instantiation phase. The integration is making a lot of requests during that phase, it's getting the state for all your casambi units. A restart will probably fix it, if you are lucky.
The best way of fixing this would be to use the undocumented local Bluetooth api instead. It's being reversed https://pypi.org/project/casambi-bt/, but I have not got it to work yet with my setup.
Last times a reboot did not work. This time to my surprize it did. Controlling direct though BT would be the best solution!
I have not had the time to look at all the logs yet, but the only thing I can think of is that one or more request false during the instantiation phase. The integration is making a lot of requests during that phase, it's getting the state for all your casambi units. A restart will probably fix it, if you are lucky.
The best way of fixing this would be to use the undocumented local Bluetooth api instead. It's being reversed https://pypi.org/project/casambi-bt/, but I have not got it to work yet with my setup.
Last times a reboot did not work. This time to my surprize it did. Controlling direct though BT would be the best solution!
It's the same code that you are executing, so it's probably either a flaky Internet connection or a Casambi server side issue (rate limiting or some kind of error on their side).
I have increased some timers and implemented retries on the start up phase of the integration, this means that its hopefully more stable on start ups, but again integration is depended on the cloud api, so it would be better with the Bluetooth ble integration
It seems more stable now. Thanks
Every day a few times HASS loses ithe casambi light entities.
Reloading the integrations does not fix the problem. The entity status is set on a exclamation mark with a rounded arrow cirkle.
I cannot get the integration working anymore and to fix it the only solution is to restore an old backup.
What is a solution for this?
From the HASS CORE log: 2022-06-13 19:19:37 WARNING (MainThread) [homeassistant.components.light] Setup of light platform casambi is taking over 10 seconds. 2022-06-13 19:19:37 ERROR (MainThread) [custom_components.casambi.light] Error connecting to the Casambi