docbobo / home-assistant-miele

Home Assistant support for Miele@home connected appliances
37 stars 16 forks source link

Error during setup of component miele #10

Open Saboti opened 5 years ago

Saboti commented 5 years ago

Hello docbobo,

since a few days the component it not longer working. After the Home Assistant Start i get following Error. he authentication token is recived successfully.

019-05-02 13:00:08 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for miele which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2019-05-02 13:00:11 ERROR (MainThread) [custom_components.miele.miele_at_home] Failed to retrieve devices: 401 2019-05-02 13:00:11 ERROR (MainThread) [homeassistant.setup] Error during setup of component miele Traceback (most recent call last): File "/opt/homeassistant/lib/python3.6/site-packages/homeassistant/setup.py", line 153, in _async_setup_component hass, processed_config) File "/home/homeassistant/.homeassistant/custom_components/miele/__init__.py", line 130, in async_setup hass.data[DOMAIN][DATA_DEVICES] = _to_dict(client.get_devices(lang)) File "/home/homeassistant/.homeassistant/custom_components/miele/__init__.py", line 98, in _to_dict for item in items: TypeError: 'NoneType' object is not iterable

Regards Tobias

ReneNulschDE commented 5 years ago

I’ve the same problem and tested this with postman against the API. Looks like an error on the Miele side. Each request returns an 401.

SalkinDK commented 5 years ago

@Saboti @ReneNulschDE are you guys still seeing this problem?

I am trying to setup this very promising component, but after several other problems i am seing the error. :(

ReneNulschDE commented 5 years ago

Yes, the problem is not solved on the Miele servers. I've sent them an email.

kloknibor commented 5 years ago

For me at was working in the past but now got the same issue when setting up :

019-05-09 14:02:57 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.2742337968] 'NoneType' object is not subscriptable Traceback (most recent call last): File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service connection.context(msg)) File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1138, in async_call self._execute_service(handler, service_call)) File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__ yield self # This tells Task to wait for completion. File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup future.result() File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result raise self._exception File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step result = coro.throw(exc) File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1160, in _execute_service await handler.func(service_call) File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/configurator/__init__.py", line 221, in async_handle_service_call call.data.get(ATTR_FIELDS, {})) File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__ yield self # This tells Task to wait for completion. File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup future.result() File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result raise self._exception File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step result = coro.send(None) File "/home/homeassistant/.homeassistant/custom_components/miele/__init__.py", line 79, in miele_configuration_callback await async_setup(hass, config) File "/home/homeassistant/.homeassistant/custom_components/miele/__init__.py", line 130, in async_setup hass.data[DOMAIN][DATA_DEVICES] = _to_dict(client.get_devices(lang)) File "/home/homeassistant/.homeassistant/custom_components/miele/miele_at_home.py", line 38, in get_devices home_devices = self._get_devices_raw(lang) File "/home/homeassistant/.homeassistant/custom_components/miele/miele_at_home.py", line 24, in _get_devices_raw if self._session.refresh_token(): File "/home/homeassistant/.homeassistant/custom_components/miele/miele_at_home.py", line 128, in refresh_token refresh_token=self._token['refresh_token']) TypeError: 'NoneType' object is not subscriptable

kloknibor commented 5 years ago

and after reboot/restart I get the same error as above.

SalkinDK commented 5 years ago

Yes, the problem is not solved on the Miele servers. I've sent them an email.

May i ask what you wrote and to what email. My though was that if we all wrote the same email to them maybe they would see that it is a real problem. Maybe with a link to this issue and the homeassistant thread.?

SalkinDK commented 5 years ago

I just restarted my HA because of another sensor, and now i see all the miele sensors :smile: So i think the api is up and running again??

Roemer commented 5 years ago

Same here. Restarted HA and now the sensors are back.

SalkinDK commented 5 years ago

Starting to see alot of errors in the log about the miele component :(

2019-05-27 18:28:04 ERROR (SyncWorker_19) [custom_components.miele.miele_at_home] Failed to retrieve devices: 504 2019-05-27 18:28:04 ERROR (SyncWorker_19) [custom_components.miele] Did not receive Miele devices 2019-05-27 18:50:56 ERROR (SyncWorker_17) [custom_components.miele.miele_at_home] Failed to retrieve devices: 500 2019-05-27 18:50:56 ERROR (SyncWorker_17) [custom_components.miele] Did not receive Miele devices 2019-05-27 19:16:11 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 192.168.1.183 2019-05-27 19:17:07 ERROR (SyncWorker_5) [custom_components.miele.miele_at_home] Failed to retrieve devices: 500 2019-05-27 19:17:07 ERROR (SyncWorker_5) [custom_components.miele] Did not receive Miele devices 2019-05-27 19:26:58 ERROR (SyncWorker_7) [custom_components.miele.miele_at_home] Failed to retrieve devices: 500 2019-05-27 19:26:58 ERROR (SyncWorker_7) [custom_components.miele] Did not receive Miele devices 2019-05-27 19:33:31 ERROR (SyncWorker_19) [custom_components.miele.miele_at_home] Failed to retrieve devices: 504 2019-05-27 19:33:31 ERROR (SyncWorker_19) [custom_components.miele] Did not receive Miele devices 2019-05-27 19:34:12 ERROR (SyncWorker_14) [custom_components.miele.miele_at_home] Failed to retrieve devices: 504 2019-05-27 19:34:12 ERROR (SyncWorker_14) [custom_components.miele] Did not receive Miele devices 2019-05-27 20:00:31 ERROR (SyncWorker_2) [custom_components.miele.miele_at_home] Failed to retrieve devices: 504 2019-05-27 20:00:31 ERROR (SyncWorker_2) [custom_components.miele] Did not receive Miele devices 2019-05-27 20:11:47 ERROR (SyncWorker_10) [custom_components.miele.miele_at_home] Failed to retrieve devices: 504 2019-05-27 20:11:47 ERROR (SyncWorker_10) [custom_components.miele] Did not receive Miele devices 2019-05-27 20:12:05 ERROR (SyncWorker_15) [custom_components.miele.miele_at_home] Failed to retrieve devices: 504 2019-05-27 20:12:05 ERROR (SyncWorker_15) [custom_components.miele] Did not receive Miele devices 2019-05-27 20:13:00 ERROR (MainThread) [custom_components.miele] Miele device not found: 000148727212 2019-05-27 20:13:00 ERROR (MainThread) [custom_components.miele.binary_sensor] Miele device not found: 000148727212 2019-05-27 20:13:00 ERROR (MainThread) [custom_components.miele.binary_sensor] Miele device not found: 000148727212 2019-05-27 20:13:00 ERROR (MainThread) [custom_components.miele.binary_sensor] Miele device not found: 000148727212 2019-05-27 20:13:00 ERROR (MainThread) [custom_components.miele.sensor] Miele device disappeared: 000148727212 2019-05-27 20:13:00 ERROR (MainThread) [custom_components.miele.sensor] Miele device disappeared: 000148727212 2019-05-27 20:13:00 ERROR (MainThread) [custom_components.miele.sensor] Miele device disappeared: 000148727212 2019-05-27 20:13:00 ERROR (MainThread) [custom_components.miele.sensor] Miele device disappeared: 000148727212 2019-05-27 20:13:00 ERROR (MainThread) [custom_components.miele.sensor] Miele device disappeared: 000148727212 2019-05-27 20:13:00 ERROR (MainThread) [custom_components.miele.sensor] Miele device disappeared: 000148727212 2019-05-27 20:13:00 ERROR (MainThread) [custom_components.miele.sensor] Miele device disappeared: 000148727212 2019-05-27 20:13:00 ERROR (MainThread) [custom_components.miele.sensor] Miele device disappeared: 000148727212 2019-05-27 20:13:00 ERROR (MainThread) [custom_components.miele.sensor] Miele device disappeared: 000148727212 2019-05-27 20:13:00 ERROR (MainThread) [custom_components.miele.sensor] Miele device disappeared: 000148727212 2019-05-27 20:18:12 ERROR (SyncWorker_14) [custom_components.miele.miele_at_home] Failed to retrieve devices: 504 2019-05-27 20:18:12 ERROR (SyncWorker_14) [custom_components.miele] Did not receive Miele devices

All my sensors are still there and are updating. Just irritating to see all the errors in the log.

system info, hassio on rpi

arch aarch64
dev false
docker true
hassio true
os_name Linux
python_version 3.7.3
timezone xxxx
version 0.93.2
virtualenv false
Saboti commented 5 years ago

seems like we could close this issue? On my Side everything is working.