home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.63k stars 30.39k forks source link

Mill integration does not work after migration to new IoT #95424

Closed MichaelHusbyn closed 1 year ago

MichaelHusbyn commented 1 year ago

The problem

Mill is moving to new IoT system and after I did migration in the app HomeAssistant claim all sensors are "Unavailable". They seem to be active in the app

Not sure if this solves it self by waiting or there is something that needs to be changed.

What version of Home Assistant Core has the issue?

core-2023.6.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

mill

Link to integration documentation on our website

https://www.home-assistant.io/integrations/mill/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @danielhiversen, mind taking a look at this issue as it has been labeled with an integration (mill) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `mill` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign mill` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


mill documentation mill source (message by IssueLinks)

zucram commented 1 year ago

I have the same issue. Waited a couple of days to see if it resolves itself but it didn't.

cnestande commented 1 year ago

Same issue for me. I have one Generation 3 unit, which I am able to connect to using Local connection. But I am not able to add Generation 2 devices, and the cloud connectivity is broken.

MichaelHusbyn commented 1 year ago

The API documentation is here: http://mn-be-prod-documentation.s3-website.eu-central-1.amazonaws.com/#/

So is this integration maintained by anyone?

Danielhiversen commented 1 year ago

I am working on supporting the new API: https://github.com/home-assistant/core/compare/mill_new_api?expand=1 It is not ready, but I would greatly appreciate any help testing it.

AndreFjeld commented 1 year ago

Hi,

Seems like the sockets have not been implemented correct in your updated integration. Im testing your new files in the link above. The Wall panel works, but not the Mill WifiSocket. Let me know if you need som extra logfiles :)

` Logger: custom_components.mill.mill_lib Source: custom_components/mill/mill_lib.py:228 Integration: Mill First occurred: 07:39:12 (13 occurrences) Last logged: 07:51:22

Unsupported device, Sockets {'deviceId': 'e9db05ce-f745-4b53-b383-0e6167398611', 'macAddress': '10:97:BD:4B:B1:1C', 'deviceType': {'childType': {'id': '0c8ccb7f-a88c-47c7-922f-9d0ab9dff500', 'name': 'GL-WIFI Socket G3'}, 'parentType': {'id': 'f37176dc-fa09-4a20-b7d3-f16fd1f63169', 'name': 'Sockets'}}, 'isConnected': True, 'customName': 'Spisestue', 'houseId': '4318658d-1438-4f99-9e81-42b1fd6938ac', 'roomId': '77829595-ebde-4d1d-9bc1-d50e50dbfd88', 'controlSource': 'mobile_api', 'isArchived': False, 'isEnabled': True, 'createdAt': '2023-07-09T19:25:53.536Z', 'lastMetrics': {'deviceId': 'e9db05ce-f745-4b53-b383-0e6167398611', 'receivedAt': '2023-07-11T05:35:02.000Z', 'sentAt': '2023-07-11T05:35:02.000Z', 'temperature': 20.5, 'humidity': 41.46, 'currentPower': 0, 'currentOperationMode': 1, 'currentTemperatureTypeInWeeklyProgram': 1, 'controlSignal': 0, 'energyUsage': 0, 'timeSinceHeaterStartup': 122564, 'temperatureAmbient': 24.96, 'openWindowsStatus': 3, 'powerStatus': 1, 'heaterFlag': 0, 'time': 1689053702}, 'deviceSettings': {'reported': {'operation_mode': 'weekly_program', 'override_weekly_program': {'value_type': 'comfort', 'ends_at': -1}, 'regulator_type': 'hysteresis_or_slow_pid', 'weekly_program': {'timers': [{'value_type': 'sleep', 'timestamp': 0}, {'value_type': 'comfort', 'timestamp': 390}, {'value_type': 'away', 'timestamp': 480}, {'value_type': 'comfort', 'timestamp': 960}, {'value_type': 'sleep', 'timestamp': 1320}, {'value_type': 'sleep', 'timestamp': 1440}, {'value_type': 'comfort', 'timestamp': 1830}, {'value_type': 'away', 'timestamp': 1920}, {'value_type': 'comfort', 'timestamp': 2400}, {'value_type': 'sleep', 'timestamp': 2760}, {'value_type': 'sleep', 'timestamp': 2880}, {'value_type': 'comfort', 'timestamp': 3270}, {'value_type': 'away', 'timestamp': 3360}, {'value_type': 'comfort', 'timestamp': 3840}, {'value_type': 'sleep', 'timestamp': 4200}, {'value_type': 'sleep', 'timestamp': 4320}, {'value_type': 'comfort', 'timestamp': 4710}, {'value_type': 'away', 'timestamp': 4800}, {'value_type': 'comfort', 'timestamp': 5280}, {'value_type': 'sleep', 'timestamp': 5640}, {'value_type': 'sleep', 'timestamp': 5760}, {'value_type': 'comfort', 'timestamp': 6150}, {'value_type': 'away', 'timestamp': 6240}, {'value_type': 'comfort', 'timestamp': 6720}, {'value_type': 'sleep', 'timestamp': 7080}, {'value_type': 'sleep', 'timestamp': 7200}, {'value_type': 'comfort', 'timestamp': 7740}, {'value_type': 'sleep', 'timestamp': 8580}, {'value_type': 'sleep', 'timestamp': 8640}, {'value_type': 'comfort', 'timestamp': 9180}, {'value_type': 'sleep', 'timestamp': 10020}]}, 'non_repeatable_timers': {'timers': []}, 'temperature_away': 10, 'temperature_normal': 22, 'temperature_comfort': 20.5, 'temperature_sleep': 17, 'temperature_vacation': 10, 'temperature_last_set': 20.5, 'vacation_mode': {'start_timestamp': 0, 'end_timestamp': 0, 'advanced': False}, 'lock_status': 'no_lock', 'predictive_heating_type': 'off', 'open_window': {'drop_temperature_threshold': 5, 'drop_time_range': 900, 'increase_temperature_threshold': 3, 'increase_time_range': 900, 'max_time': 3600, 'enabled': True, 'activated': False}, 'temperature_calibration_offset': 0, 'temperature_in_independent_mode': 20.5, 'display_unit': 'celsius', 'oil_heater_power_level': None, 'max_heater_power': 1000, 'limited_heating_power': None, 'additional_socket_mode': 'heating', 'pid_parameters': None, 'hysteresis': {'lower': 0.5, 'upper': 1}, 'timezone': 'CET-1CEST,M3.5.0,M10.5.0/3', 'calibration_target_ambient_temperature': None, 'fan_state': None}, 'desired': {'operation_mode': 'weekly_program', 'override_weekly_program': {'value_type': 'comfort', 'ends_at': -1}, 'regulator_type': 'hysteresis_or_slow_pid', 'weekly_program': {'timers': [{'value_type': 'sleep', 'timestamp': 0}, {'value_type': 'comfort', 'timestamp': 390}, {'value_type': 'away', 'timestamp': 480}, {'value_type': 'comfort', 'timestamp': 960}, {'value_type': 'sleep', 'timestamp': 1320}, {'value_type': 'sleep', 'timestamp': 1440}, {'value_type': 'comfort', 'timestamp': 1830}, {'value_type': 'away', 'timestamp': 1920}, {'value_type': 'comfort', 'timestamp': 2400}, {'value_type': 'sleep', 'timestamp': 2760}, {'value_type': 'sleep', 'timestamp': 2880}, {'value_type': 'comfort', 'timestamp': 3270}, {'value_type': 'away', 'timestamp': 3360}, {'value_type': 'comfort', 'timestamp': 3840}, {'value_type': 'sleep', 'timestamp': 4200}, {'value_type': 'sleep', 'timestamp': 4320}, {'value_type': 'comfort', 'timestamp': 4710}, {'value_type': 'away', 'timestamp': 4800}, {'value_type': 'comfort', 'timestamp': 5280}, {'value_type': 'sleep', 'timestamp': 5640}, {'value_type': 'sleep', 'timestamp': 5760}, {'value_type': 'comfort', 'timestamp': 6150}, {'value_type': 'away', 'timestamp': 6240}, {'value_type': 'comfort', 'timestamp': 6720}, {'value_type': 'sleep', 'timestamp': 7080}, {'value_type': 'sleep', 'timestamp': 7200}, {'value_type': 'comfort', 'timestamp': 7740}, {'value_type': 'sleep', 'timestamp': 8580}, {'value_type': 'sleep', 'timestamp': 8640}, {'value_type': 'comfort', 'timestamp': 9180}, {'value_type': 'sleep', 'timestamp': 10020}]}, 'non_repeatable_timers': {'timers': []}, 'temperature_away': 10, 'temperature_normal': 22, 'temperature_comfort': 20.5, 'temperature_sleep': 17, 'temperature_vacation': 10, 'temperature_last_set': 20.5, 'vacation_mode': {'start_timestamp': 0, 'end_timestamp': 0, 'advanced': False}, 'lock_status': 'no_lock', 'predictive_heating_type': 'off', 'open_window': {'drop_temperature_threshold': 5, 'drop_time_range': 900, 'increase_temperature_threshold': 3, 'increase_time_range': 900, 'max_time': 3600, 'enabled': True, 'activated': False}, 'temperature_calibration_offset': None, 'temperature_in_independent_mode': 20.5, 'display_unit': 'celsius', 'oil_heater_power_level': None, 'max_heater_power': None, 'limited_heating_power': None, 'additional_socket_mode': 'heating', 'pid_parameters': None, 'hysteresis': {'lower': 0.5, 'upper': 1}, 'timezone': 'CET-1CEST,M3.5.0,M10.5.0/3', 'calibration_target_ambient_temperature': None, 'fan_state': None}, 'delta': None}, 'energyUsageForCurrentDay': 0} Unsupported device, Sockets {'deviceId': 'e9db05ce-f745-4b53-b383-0e6167398611', 'macAddress': '10:97:BD:4B:B1:1C', 'deviceType': {'childType': {'id': '0c8ccb7f-a88c-47c7-922f-9d0ab9dff500', 'name': 'GL-WIFI Socket G3'}, 'parentType': {'id': 'f37176dc-fa09-4a20-b7d3-f16fd1f63169', 'name': 'Sockets'}}, 'isConnected': True, 'customName': 'Spisestue', 'houseId': '4318658d-1438-4f99-9e81-42b1fd6938ac', 'roomId': '77829595-ebde-4d1d-9bc1-d50e50dbfd88', 'controlSource': 'mobile_api', 'isArchived': False, 'isEnabled': True, 'createdAt': '2023-07-09T19:25:53.536Z', 'lastMetrics': {'deviceId': 'e9db05ce-f745-4b53-b383-0e6167398611', 'receivedAt': '2023-07-11T05:40:03.000Z', 'sentAt': '2023-07-11T05:40:02.000Z', 'temperature': 20.5, 'humidity': 41.08, 'currentPower': 0, 'currentOperationMode': 1, 'currentTemperatureTypeInWeeklyProgram': 1, 'controlSignal': 0, 'energyUsage': 0, 'timeSinceHeaterStartup': 122865, 'temperatureAmbient': 25.01, 'openWindowsStatus': 3, 'powerStatus': 1, 'heaterFlag': 0, 'time': 1689054002}, 'deviceSettings': {'reported': {'operation_mode': 'weekly_program', 'override_weekly_program': {'value_type': 'comfort', 'ends_at': -1}, 'regulator_type': 'hysteresis_or_slow_pid', 'weekly_program': {'timers': [{'value_type': 'sleep', 'timestamp': 0}, {'value_type': 'comfort', 'timestamp': 390}, {'value_type': 'away', 'timestamp': 480}, {'value_type': 'comfort', 'timestamp': 960}, {'value_type': 'sleep', 'timestamp': 1320}, {'value_type': 'sleep', 'timestamp': 1440}, {'value_type': 'comfort', 'timestamp': 1830}, {'value_type': 'away', 'timestamp': 1920}, {'value_type': 'comfort', 'timestamp': 2400}, {'value_type': 'sleep', 'timestamp': 2760}, {'value_type': 'sleep', 'timestamp': 2880}, {'value_type': 'comfort', 'timestamp': 3270}, {'value_type': 'away', 'timestamp': 3360}, {'value_type': 'comfort', 'timestamp': 3840}, {'value_type': 'sleep', 'timestamp': 4200}, {'value_type': 'sleep', 'timestamp': 4320}, {'value_type': 'comfort', 'timestamp': 4710}, {'value_type': 'away', 'timestamp': 4800}, {'value_type': 'comfort', 'timestamp': 5280}, {'value_type': 'sleep', 'timestamp': 5640}, {'value_type': 'sleep', 'timestamp': 5760}, {'value_type': 'comfort', 'timestamp': 6150}, {'value_type': 'away', 'timestamp': 6240}, {'value_type': 'comfort', 'timestamp': 6720}, {'value_type': 'sleep', 'timestamp': 7080}, {'value_type': 'sleep', 'timestamp': 7200}, {'value_type': 'comfort', 'timestamp': 7740}, {'value_type': 'sleep', 'timestamp': 8580}, {'value_type': 'sleep', 'timestamp': 8640}, {'value_type': 'comfort', 'timestamp': 9180}, {'value_type': 'sleep', 'timestamp': 10020}]}, 'non_repeatable_timers': {'timers': []}, 'temperature_away': 10, 'temperature_normal': 22, 'temperature_comfort': 20.5, 'temperature_sleep': 17, 'temperature_vacation': 10, 'temperature_last_set': 20.5, 'vacation_mode': {'start_timestamp': 0, 'end_timestamp': 0, 'advanced': False}, 'lock_status': 'no_lock', 'predictive_heating_type': 'off', 'open_window': {'drop_temperature_threshold': 5, 'drop_time_range': 900, 'increase_temperature_threshold': 3, 'increase_time_range': 900, 'max_time': 3600, 'enabled': True, 'activated': False}, 'temperature_calibration_offset': 0, 'temperature_in_independent_mode': 20.5, 'display_unit': 'celsius', 'oil_heater_power_level': None, 'max_heater_power': 1000, 'limited_heating_power': None, 'additional_socket_mode': 'heating', 'pid_parameters': None, 'hysteresis': {'lower': 0.5, 'upper': 1}, 'timezone': 'CET-1CEST,M3.5.0,M10.5.0/3', 'calibration_target_ambient_temperature': None, 'fan_state': None}, 'desired': {'operation_mode': 'weekly_program', 'override_weekly_program': {'value_type': 'comfort', 'ends_at': -1}, 'regulator_type': 'hysteresis_or_slow_pid', 'weekly_program': {'timers': [{'value_type': 'sleep', 'timestamp': 0}, {'value_type': 'comfort', 'timestamp': 390}, {'value_type': 'away', 'timestamp': 480}, {'value_type': 'comfort', 'timestamp': 960}, {'value_type': 'sleep', 'timestamp': 1320}, {'value_type': 'sleep', 'timestamp': 1440}, {'value_type': 'comfort', 'timestamp': 1830}, {'value_type': 'away', 'timestamp': 1920}, {'value_type': 'comfort', 'timestamp': 2400}, {'value_type': 'sleep', 'timestamp': 2760}, {'value_type': 'sleep', 'timestamp': 2880}, {'value_type': 'comfort', 'timestamp': 3270}, {'value_type': 'away', 'timestamp': 3360}, {'value_type': 'comfort', 'timestamp': 3840}, {'value_type': 'sleep', 'timestamp': 4200}, {'value_type': 'sleep', 'timestamp': 4320}, {'value_type': 'comfort', 'timestamp': 4710}, {'value_type': 'away', 'timestamp': 4800}, {'value_type': 'comfort', 'timestamp': 5280}, {'value_type': 'sleep', 'timestamp': 5640}, {'value_type': 'sleep', 'timestamp': 5760}, {'value_type': 'comfort', 'timestamp': 6150}, {'value_type': 'away', 'timestamp': 6240}, {'value_type': 'comfort', 'timestamp': 6720}, {'value_type': 'sleep', 'timestamp': 7080}, {'value_type': 'sleep', 'timestamp': 7200}, {'value_type': 'comfort', 'timestamp': 7740}, {'value_type': 'sleep', 'timestamp': 8580}, {'value_type': 'sleep', 'timestamp': 8640}, {'value_type': 'comfort', 'timestamp': 9180}, {'value_type': 'sleep', 'timestamp': 10020}]}, 'non_repeatable_timers': {'timers': []}, 'temperature_away': 10, 'temperature_normal': 22, 'temperature_comfort': 20.5, 'temperature_sleep': 17, 'temperature_vacation': 10, 'temperature_last_set': 20.5, 'vacation_mode': {'start_timestamp': 0, 'end_timestamp': 0, 'advanced': False}, 'lock_status': 'no_lock', 'predictive_heating_type': 'off', 'open_window': {'drop_temperature_threshold': 5, 'drop_time_range': 900, 'increase_temperature_threshold': 3, 'increase_time_range': 900, 'max_time': 3600, 'enabled': True, 'activated': False}, 'temperature_calibration_offset': None, 'temperature_in_independent_mode': 20.5, 'display_unit': 'celsius', 'oil_heater_power_level': None, 'max_heater_power': None, 'limited_heating_power': None, 'additional_socket_mode': 'heating', 'pid_parameters': None, 'hysteresis': {'lower': 0.5, 'upper': 1}, 'timezone': 'CET-1CEST,M3.5.0,M10.5.0/3', 'calibration_target_ambient_temperature': None, 'fan_state': None}, 'delta': None}, 'energyUsageForCurrentDay': 0} Unsupported device, Sockets {'deviceId': 'e9db05ce-f745-4b53-b383-0e6167398611', 'macAddress': '10:97:BD:4B:B1:1C', 'deviceType': {'childType': {'id': '0c8ccb7f-a88c-47c7-922f-9d0ab9dff500', 'name': 'GL-WIFI Socket G3'}, 'parentType': {'id': 'f37176dc-fa09-4a20-b7d3-f16fd1f63169', 'name': 'Sockets'}}, 'isConnected': True, 'customName': 'Spisestue', 'houseId': '4318658d-1438-4f99-9e81-42b1fd6938ac', 'roomId': '77829595-ebde-4d1d-9bc1-d50e50dbfd88', 'controlSource': 'mobile_api', 'isArchived': False, 'isEnabled': True, 'createdAt': '2023-07-09T19:25:53.536Z', 'lastMetrics': {'deviceId': 'e9db05ce-f745-4b53-b383-0e6167398611', 'receivedAt': '2023-07-11T05:45:05.000Z', 'sentAt': '2023-07-11T05:45:02.000Z', 'temperature': 20.5, 'humidity': 41.45, 'currentPower': 0, 'currentOperationMode': 1, 'currentTemperatureTypeInWeeklyProgram': 1, 'controlSignal': 0, 'energyUsage': 0, 'timeSinceHeaterStartup': 123165, 'temperatureAmbient': 25.03, 'openWindowsStatus': 3, 'powerStatus': 1, 'heaterFlag': 0, 'time': 1689054302}, 'deviceSettings': {'reported': {'operation_mode': 'weekly_program', 'override_weekly_program': {'value_type': 'comfort', 'ends_at': -1}, 'regulator_type': 'hysteresis_or_slow_pid', 'weekly_program': {'timers': [{'value_type': 'sleep', 'timestamp': 0}, {'value_type': 'comfort', 'timestamp': 390}, {'value_type': 'away', 'timestamp': 480}, {'value_type': 'comfort', 'timestamp': 960}, {'value_type': 'sleep', 'timestamp': 1320}, {'value_type': 'sleep', 'timestamp': 1440}, {'value_type': 'comfort', 'timestamp': 1830}, {'value_type': 'away', 'timestamp': 1920}, {'value_type': 'comfort', 'timestamp': 2400}, {'value_type': 'sleep', 'timestamp': 2760}, {'value_type': 'sleep', 'timestamp': 2880}, {'value_type': 'comfort', 'timestamp': 3270}, {'value_type': 'away', 'timestamp': 3360}, {'value_type': 'comfort', 'timestamp': 3840}, {'value_type': 'sleep', 'timestamp': 4200}, {'value_type': 'sleep', 'timestamp': 4320}, {'value_type': 'comfort', 'timestamp': 4710}, {'value_type': 'away', 'timestamp': 4800}, {'value_type': 'comfort', 'timestamp': 5280}, {'value_type': 'sleep', 'timestamp': 5640}, {'value_type': 'sleep', 'timestamp': 5760}, {'value_type': 'comfort', 'timestamp': 6150}, {'value_type': 'away', 'timestamp': 6240}, {'value_type': 'comfort', 'timestamp': 6720}, {'value_type': 'sleep', 'timestamp': 7080}, {'value_type': 'sleep', 'timestamp': 7200}, {'value_type': 'comfort', 'timestamp': 7740}, {'value_type': 'sleep', 'timestamp': 8580}, {'value_type': 'sleep', 'timestamp': 8640}, {'value_type': 'comfort', 'timestamp': 9180}, {'value_type': 'sleep', 'timestamp': 10020}]}, 'non_repeatable_timers': {'timers': []}, 'temperature_away': 10, 'temperature_normal': 22, 'temperature_comfort': 20.5, 'temperature_sleep': 17, 'temperature_vacation': 10, 'temperature_last_set': 20.5, 'vacation_mode': {'start_timestamp': 0, 'end_timestamp': 0, 'advanced': False}, 'lock_status': 'no_lock', 'predictive_heating_type': 'off', 'open_window': {'drop_temperature_threshold': 5, 'drop_time_range': 900, 'increase_temperature_threshold': 3, 'increase_time_range': 900, 'max_time': 3600, 'enabled': True, 'activated': False}, 'temperature_calibration_offset': 0, 'temperature_in_independent_mode': 20.5, 'display_unit': 'celsius', 'oil_heater_power_level': None, 'max_heater_power': 1000, 'limited_heating_power': None, 'additional_socket_mode': 'heating', 'pid_parameters': None, 'hysteresis': {'lower': 0.5, 'upper': 1}, 'timezone': 'CET-1CEST,M3.5.0,M10.5.0/3', 'calibration_target_ambient_temperature': None, 'fan_state': None}, 'desired': {'operation_mode': 'weekly_program', 'override_weekly_program': {'value_type': 'comfort', 'ends_at': -1}, 'regulator_type': 'hysteresis_or_slow_pid', 'weekly_program': {'timers': [{'value_type': 'sleep', 'timestamp': 0}, {'value_type': 'comfort', 'timestamp': 390}, {'value_type': 'away', 'timestamp': 480}, {'value_type': 'comfort', 'timestamp': 960}, {'value_type': 'sleep', 'timestamp': 1320}, {'value_type': 'sleep', 'timestamp': 1440}, {'value_type': 'comfort', 'timestamp': 1830}, {'value_type': 'away', 'timestamp': 1920}, {'value_type': 'comfort', 'timestamp': 2400}, {'value_type': 'sleep', 'timestamp': 2760}, {'value_type': 'sleep', 'timestamp': 2880}, {'value_type': 'comfort', 'timestamp': 3270}, {'value_type': 'away', 'timestamp': 3360}, {'value_type': 'comfort', 'timestamp': 3840}, {'value_type': 'sleep', 'timestamp': 4200}, {'value_type': 'sleep', 'timestamp': 4320}, {'value_type': 'comfort', 'timestamp': 4710}, {'value_type': 'away', 'timestamp': 4800}, {'value_type': 'comfort', 'timestamp': 5280}, {'value_type': 'sleep', 'timestamp': 5640}, {'value_type': 'sleep', 'timestamp': 5760}, {'value_type': 'comfort', 'timestamp': 6150}, {'value_type': 'away', 'timestamp': 6240}, {'value_type': 'comfort', 'timestamp': 6720}, {'value_type': 'sleep', 'timestamp': 7080}, {'value_type': 'sleep', 'timestamp': 7200}, {'value_type': 'comfort', 'timestamp': 7740}, {'value_type': 'sleep', 'timestamp': 8580}, {'value_type': 'sleep', 'timestamp': 8640}, {'value_type': 'comfort', 'timestamp': 9180}, {'value_type': 'sleep', 'timestamp': 10020}]}, 'non_repeatable_timers': {'timers': []}, 'temperature_away': 10, 'temperature_normal': 22, 'temperature_comfort': 20.5, 'temperature_sleep': 17, 'temperature_vacation': 10, 'temperature_last_set': 20.5, 'vacation_mode': {'start_timestamp': 0, 'end_timestamp': 0, 'advanced': False}, 'lock_status': 'no_lock', 'predictive_heating_type': 'off', 'open_window': {'drop_temperature_threshold': 5, 'drop_time_range': 900, 'increase_temperature_threshold': 3, 'increase_time_range': 900, 'max_time': 3600, 'enabled': True, 'activated': False}, 'temperature_calibration_offset': None, 'temperature_in_independent_mode': 20.5, 'display_unit': 'celsius', 'oil_heater_power_level': None, 'max_heater_power': None, 'limited_heating_power': None, 'additional_socket_mode': 'heating', 'pid_parameters': None, 'hysteresis': {'lower': 0.5, 'upper': 1}, 'timezone': 'CET-1CEST,M3.5.0,M10.5.0/3', 'calibration_target_ambient_temperature': None, 'fan_state': None}, 'delta': None}, 'energyUsageForCurrentDay': 0} Invalid auth token, {"error":{"type":"InvalidAuthTokenError","message":"Invalid authentication token"}} Unsupported device, Sockets {'deviceId': 'e9db05ce-f745-4b53-b383-0e6167398611', 'macAddress': '10:97:BD:4B:B1:1C', 'deviceType': {'childType': {'id': '0c8ccb7f-a88c-47c7-922f-9d0ab9dff500', 'name': 'GL-WIFI Socket G3'}, 'parentType': {'id': 'f37176dc-fa09-4a20-b7d3-f16fd1f63169', 'name': 'Sockets'}}, 'isConnected': True, 'customName': 'Spisestue', 'houseId': '4318658d-1438-4f99-9e81-42b1fd6938ac', 'roomId': '77829595-ebde-4d1d-9bc1-d50e50dbfd88', 'controlSource': 'mobile_api', 'isArchived': False, 'isEnabled': True, 'createdAt': '2023-07-09T19:25:53.536Z', 'lastMetrics': {'deviceId': 'e9db05ce-f745-4b53-b383-0e6167398611', 'receivedAt': '2023-07-11T05:50:04.000Z', 'sentAt': '2023-07-11T05:50:02.000Z', 'temperature': 20.5, 'humidity': 41.2, 'currentPower': 0, 'currentOperationMode': 1, 'currentTemperatureTypeInWeeklyProgram': 1, 'controlSignal': 0, 'energyUsage': 0, 'timeSinceHeaterStartup': 123465, 'temperatureAmbient': 25.07, 'openWindowsStatus': 3, 'powerStatus': 1, 'heaterFlag': 0, 'time': 1689054602}, 'deviceSettings': {'reported': {'operation_mode': 'weekly_program', 'override_weekly_program': {'value_type': 'comfort', 'ends_at': -1}, 'regulator_type': 'hysteresis_or_slow_pid', 'weekly_program': {'timers': [{'value_type': 'sleep', 'timestamp': 0}, {'value_type': 'comfort', 'timestamp': 390}, {'value_type': 'away', 'timestamp': 480}, {'value_type': 'comfort', 'timestamp': 960}, {'value_type': 'sleep', 'timestamp': 1320}, {'value_type': 'sleep', 'timestamp': 1440}, {'value_type': 'comfort', 'timestamp': 1830}, {'value_type': 'away', 'timestamp': 1920}, {'value_type': 'comfort', 'timestamp': 2400}, {'value_type': 'sleep', 'timestamp': 2760}, {'value_type': 'sleep', 'timestamp': 2880}, {'value_type': 'comfort', 'timestamp': 3270}, {'value_type': 'away', 'timestamp': 3360}, {'value_type': 'comfort', 'timestamp': 3840}, {'value_type': 'sleep', 'timestamp': 4200}, {'value_type': 'sleep', 'timestamp': 4320}, {'value_type': 'comfort', 'timestamp': 4710}, {'value_type': 'away', 'timestamp': 4800}, {'value_type': 'comfort', 'timestamp': 5280}, {'value_type': 'sleep', 'timestamp': 5640}, {'value_type': 'sleep', 'timestamp': 5760}, {'value_type': 'comfort', 'timestamp': 6150}, {'value_type': 'away', 'timestamp': 6240}, {'value_type': 'comfort', 'timestamp': 6720}, {'value_type': 'sleep', 'timestamp': 7080}, {'value_type': 'sleep', 'timestamp': 7200}, {'value_type': 'comfort', 'timestamp': 7740}, {'value_type': 'sleep', 'timestamp': 8580}, {'value_type': 'sleep', 'timestamp': 8640}, {'value_type': 'comfort', 'timestamp': 9180}, {'value_type': 'sleep', 'timestamp': 10020}]}, 'non_repeatable_timers': {'timers': []}, 'temperature_away': 10, 'temperature_normal': 22, 'temperature_comfort': 20.5, 'temperature_sleep': 17, 'temperature_vacation': 10, 'temperature_last_set': 20.5, 'vacation_mode': {'start_timestamp': 0, 'end_timestamp': 0, 'advanced': False}, 'lock_status': 'no_lock', 'predictive_heating_type': 'off', 'open_window': {'drop_temperature_threshold': 5, 'drop_time_range': 900, 'increase_temperature_threshold': 3, 'increase_time_range': 900, 'max_time': 3600, 'enabled': True, 'activated': False}, 'temperature_calibration_offset': 0, 'temperature_in_independent_mode': 20.5, 'display_unit': 'celsius', 'oil_heater_power_level': None, 'max_heater_power': 1000, 'limited_heating_power': None, 'additional_socket_mode': 'heating', 'pid_parameters': None, 'hysteresis': {'lower': 0.5, 'upper': 1}, 'timezone': 'CET-1CEST,M3.5.0,M10.5.0/3', 'calibration_target_ambient_temperature': None, 'fan_state': None}, 'desired': {'operation_mode': 'weekly_program', 'override_weekly_program': {'value_type': 'comfort', 'ends_at': -1}, 'regulator_type': 'hysteresis_or_slow_pid', 'weekly_program': {'timers': [{'value_type': 'sleep', 'timestamp': 0}, {'value_type': 'comfort', 'timestamp': 390}, {'value_type': 'away', 'timestamp': 480}, {'value_type': 'comfort', 'timestamp': 960}, {'value_type': 'sleep', 'timestamp': 1320}, {'value_type': 'sleep', 'timestamp': 1440}, {'value_type': 'comfort', 'timestamp': 1830}, {'value_type': 'away', 'timestamp': 1920}, {'value_type': 'comfort', 'timestamp': 2400}, {'value_type': 'sleep', 'timestamp': 2760}, {'value_type': 'sleep', 'timestamp': 2880}, {'value_type': 'comfort', 'timestamp': 3270}, {'value_type': 'away', 'timestamp': 3360}, {'value_type': 'comfort', 'timestamp': 3840}, {'value_type': 'sleep', 'timestamp': 4200}, {'value_type': 'sleep', 'timestamp': 4320}, {'value_type': 'comfort', 'timestamp': 4710}, {'value_type': 'away', 'timestamp': 4800}, {'value_type': 'comfort', 'timestamp': 5280}, {'value_type': 'sleep', 'timestamp': 5640}, {'value_type': 'sleep', 'timestamp': 5760}, {'value_type': 'comfort', 'timestamp': 6150}, {'value_type': 'away', 'timestamp': 6240}, {'value_type': 'comfort', 'timestamp': 6720}, {'value_type': 'sleep', 'timestamp': 7080}, {'value_type': 'sleep', 'timestamp': 7200}, {'value_type': 'comfort', 'timestamp': 7740}, {'value_type': 'sleep', 'timestamp': 8580}, {'value_type': 'sleep', 'timestamp': 8640}, {'value_type': 'comfort', 'timestamp': 9180}, {'value_type': 'sleep', 'timestamp': 10020}]}, 'non_repeatable_timers': {'timers': []}, 'temperature_away': 10, 'temperature_normal': 22, 'temperature_comfort': 20.5, 'temperature_sleep': 17, 'temperature_vacation': 10, 'temperature_last_set': 20.5, 'vacation_mode': {'start_timestamp': 0, 'end_timestamp': 0, 'advanced': False}, 'lock_status': 'no_lock', 'predictive_heating_type': 'off', 'open_window': {'drop_temperature_threshold': 5, 'drop_time_range': 900, 'increase_temperature_threshold': 3, 'increase_time_range': 900, 'max_time': 3600, 'enabled': True, 'activated': False}, 'temperature_calibration_offset': None, 'temperature_in_independent_mode': 20.5, 'display_unit': 'celsius', 'oil_heater_power_level': None, 'max_heater_power': None, 'limited_heating_power': None, 'additional_socket_mode': 'heating', 'pid_parameters': None, 'hysteresis': {'lower': 0.5, 'upper': 1}, 'timezone': 'CET-1CEST,M3.5.0,M10.5.0/3', 'calibration_target_ambient_temperature': None, 'fan_state': None}, 'delta': None}, 'energyUsageForCurrentDay': 0}`

Danielhiversen commented 1 year ago

Thanks. I do not have a socket, but it seems that it provides the same data as a heater, so tried to add support for it now.

AndreFjeld commented 1 year ago

Thanks. I do not have a socket, but it seems that it provides the same data as a heater, so tried to add support for it now.

Cool, it worked. I Think there is a snag in the register where it reads power consumption for readings pr. year. And the year total, don't give any data. I can also see the humidity sensor in your code, but it doesn't show up as a sensor.

image

2023-07-11 19:14:46.694 DEBUG (MainThread) [custom_components.mill.mill_lib] Request houses None 2023-07-11 19:14:46.796 DEBUG (MainThread) [custom_components.mill.mill_lib] Result {"ownHouses":[{"id":"4318658d-1438-4f99-9e81-42b1fd6938ac","name":"Hytta i Trysil","postalCode":"2421","timezone":"Europe/Berlin","ownerId":"","mode":"weekly_program","vacationStartDate":1615098000,"vacationEndDate":0,"vacationTemperature":10,"vacationModeType":"use_vacation_temperature","isVacationModeActive":false,"overrideModeType":"continuous","overrideEndDate":0,"createdAt":"2023-07-09T19:12:51.494Z"}],"sharedHouses":[]} 2023-07-11 19:14:46.797 DEBUG (MainThread) [custom_components.mill.mill_lib] Request houses/4318658d-1438-4f99-9e81-42b1fd6938ac/devices None 2023-07-11 19:14:47.170 DEBUG (MainThread) [custom_components.mill.mill_lib] Result [{"roomId":"4ed98fa0-dacc-49d6-9b7e-c55a696d9836","roomName":"Tv-stue","devices":[{"deviceId":"e377a18d-646c-4f16-ab08-b3fb84bfab74","macAddress":"1C:9D:C2:FD:64:84","deviceType":{"childType":{"id":"93e2b8fc-044c-48aa-a5f0-3f0e4a5f6514","name":"GL-Panel Heater G3"},"parentType":{"id":"27af30e2-69df-4274-8930-93404dcddb41","name":"Heaters"}},"isConnected":true,"customName":"Panelovn Vegg","houseId":"4318658d-1438-4f99-9e81-42b1fd6938ac","roomId":"4ed98fa0-dacc-49d6-9b7e-c55a696d9836","controlSource":"mobile_api","isArchived":false,"isEnabled":true,"createdAt":"2023-07-09T19:13:16.457Z","lastMetrics":{"deviceId":"e377a18d-646c-4f16-ab08-b3fb84bfab74","receivedAt":"2023-07-11T17:10:02.000Z","sentAt":"2023-07-11T17:10:01.000Z","temperature":22,"humidity":0,"currentPower":0,"currentOperationMode":3,"currentTemperatureTypeInWeeklyProgram":0,"controlSignal":0,"energyUsage":149,"timeSinceHeaterStartup":165099,"temperatureAmbient":24.04,"openWindowsStatus":3,"powerStatus":1,"heaterFlag":0,"time":1689095401},"deviceSettings":{"reported":{"operation_mode":"control_individually","override_weekly_program":{"value_type":"comfort","ends_at":-1},"regulator_type":"pid","weekly_program":{"timers":[{"value_type":"sleep","timestamp":0},{"value_type":"comfort","timestamp":390},{"value_type":"away","timestamp":480},{"value_type":"comfort","timestamp":960},{"value_type":"sleep","timestamp":1320},{"value_type":"sleep","timestamp":1440},{"value_type":"comfort","timestamp":1830},{"value_type":"away","timestamp":1920},{"value_type":"comfort","timestamp":2400},{"value_type":"sleep","timestamp":2760},{"value_type":"sleep","timestamp":2880},{"value_type":"comfort","timestamp":3270},{"value_type":"away","timestamp":3360},{"value_type":"comfort","timestamp":3840},{"value_type":"sleep","timestamp":4200},{"value_type":"sleep","timestamp":4320},{"value_type":"comfort","timestamp":4710},{"value_type":"away","timestamp":4800},{"value_type":"comfort","timestamp":5280},{"value_type":"sleep","timestamp":5640},{"value_type":"sleep","timestamp":5760},{"value_type":"comfort","timestamp":6150},{"value_type":"away","timestamp":6240},{"value_type":"comfort","timestamp":6720},{"value_type":"sleep","timestamp":7080},{"value_type":"sleep","timestamp":7200},{"value_type":"comfort","timestamp":7740},{"value_type":"sleep","timestamp":8580},{"value_type":"sleep","timestamp":8640},{"value_type":"comfort","timestamp":9180},{"value_type":"sleep","timestamp":10020}]},"non_repeatable_timers":{"timers":[]},"temperature_away":12,"temperature_normal":22,"temperature_comfort":21,"temperature_sleep":18,"temperature_vacation":10,"temperature_last_set":22,"vacation_mode":{"start_timestamp":0,"end_timestamp":0,"advanced":false},"lock_status":"no_lock","predictive_heating_type":"off","open_window":{"drop_temperature_threshold":5,"drop_time_range":900,"increase_temperature_threshold":3,"increase_time_range":900,"max_time":3600,"enabled":true,"activated":false},"temperature_calibration_offset":0.3,"temperature_in_independent_mode":22,"display_unit":"celsius","oil_heater_power_level":null,"max_heater_power":1050,"limited_heating_power":100,"additional_socket_mode":null,"pid_parameters":{"kp":70,"ki":0,"kd":4500,"kd_filter_N":60,"windup_limit":95},"hysteresis":{"lower":0.5,"upper":1},"timezone":"CET-1CEST,M3.5.0,M10.5.0/3","calibration_target_ambient_temperature":null,"fan_state":null},"desired":{"operation_mode":"control_individually","override_weekly_program":{"value_type":"comfort","ends_at":-1},"regulator_type":"pid","weekly_program":{"timers":[{"value_type":"sleep","timestamp":0},{"value_type":"comfort","timestamp":390},{"value_type":"away","timestamp":480},{"value_type":"comfort","timestamp":960},{"value_type":"sleep","timestamp":1320},{"value_type":"sleep","timestamp":1440},{"value_type":"comfort","timestamp":1830},{"value_type":"away","timestamp":1920},{"value_type":"comfort","timestamp":2400},{"value_type":"sleep","timestamp":2760},{"value_type":"sleep","timestamp":2880},{"value_type":"comfort","timestamp":3270},{"value_type":"away","timestamp":3360},{"value_type":"comfort","timestamp":3840},{"value_type":"sleep","timestamp":4200},{"value_type":"sleep","timestamp":4320},{"value_type":"comfort","timestamp":4710},{"value_type":"away","timestamp":4800},{"value_type":"comfort","timestamp":5280},{"value_type":"sleep","timestamp":5640},{"value_type":"sleep","timestamp":5760},{"value_type":"comfort","timestamp":6150},{"value_type":"away","timestamp":6240},{"value_type":"comfort","timestamp":6720},{"value_type":"sleep","timestamp":7080},{"value_type":"sleep","timestamp":7200},{"value_type":"comfort","timestamp":7740},{"value_type":"sleep","timestamp":8580},{"value_type":"sleep","timestamp":8640},{"value_type":"comfort","timestamp":9180},{"value_type":"sleep","timestamp":10020}]},"non_repeatable_timers":{"timers":[]},"temperature_away":12,"temperature_normal":22,"temperature_comfort":21,"temperature_sleep":18,"temperature_vacation":10,"temperature_last_set":22,"vacation_mode":{"start_timestamp":0,"end_timestamp":0,"advanced":false},"lock_status":"no_lock","predictive_heating_type":"off","open_window":{"drop_temperature_threshold":5,"drop_time_range":900,"increase_temperature_threshold":3,"increase_time_range":900,"max_time":3600,"enabled":true,"activated":false},"temperature_calibration_offset":null,"temperature_in_independent_mode":22,"display_unit":"celsius","oil_heater_power_level":null,"max_heater_power":null,"limited_heating_power":100,"additional_socket_mode":null,"pid_parameters":{"kp":70,"ki":0,"kd":4500,"kd_filter_N":60,"windup_limit":95},"hysteresis":{"lower":0.5,"upper":1},"timezone":"CET-1CEST,M3.5.0,M10.5.0/3","calibration_target_ambient_temperature":null,"fan_state":null},"delta":null},"energyUsageForCurrentDay":22}]},{"roomId":"77829595-ebde-4d1d-9bc1-d50e50dbfd88","roomName":"Spisestue","devices":[{"deviceId":"e9db05ce-f745-4b53-b383-0e6167398611","macAddress":"10:97:BD:4B:B1:1C","deviceType":{"childType":{"id":"0c8ccb7f-a88c-47c7-922f-9d0ab9dff500","name":"GL-WIFI Socket G3"},"parentType":{"id":"f37176dc-fa09-4a20-b7d3-f16fd1f63169","name":"Sockets"}},"isConnected":true,"customName":"Spisestue","houseId":"4318658d-1438-4f99-9e81-42b1fd6938ac","roomId":"77829595-ebde-4d1d-9bc1-d50e50dbfd88","controlSource":"mobile_api","isArchived":false,"isEnabled":true,"createdAt":"2023-07-09T19:25:53.536Z","lastMetrics":{"deviceId":"e9db05ce-f745-4b53-b383-0e6167398611","receivedAt":"2023-07-11T17:10:03.000Z","sentAt":"2023-07-11T17:10:01.000Z","temperature":20.5,"humidity":43.82,"currentPower":0,"currentOperationMode":3,"currentTemperatureTypeInWeeklyProgram":0,"controlSignal":0,"energyUsage":6,"timeSinceHeaterStartup":164264,"temperatureAmbient":24.39,"openWindowsStatus":3,"powerStatus":1,"heaterFlag":0,"time":1689095401},"deviceSettings":{"reported":{"operation_mode":"control_individually","override_weekly_program":{"value_type":"comfort","ends_at":-1},"regulator_type":"hysteresis_or_slow_pid","weekly_program":{"timers":[{"value_type":"sleep","timestamp":0},{"value_type":"comfort","timestamp":390},{"value_type":"away","timestamp":480},{"value_type":"comfort","timestamp":960},{"value_type":"sleep","timestamp":1320},{"value_type":"sleep","timestamp":1440},{"value_type":"comfort","timestamp":1830},{"value_type":"away","timestamp":1920},{"value_type":"comfort","timestamp":2400},{"value_type":"sleep","timestamp":2760},{"value_type":"sleep","timestamp":2880},{"value_type":"comfort","timestamp":3270},{"value_type":"away","timestamp":3360},{"value_type":"comfort","timestamp":3840},{"value_type":"sleep","timestamp":4200},{"value_type":"sleep","timestamp":4320},{"value_type":"comfort","timestamp":4710},{"value_type":"away","timestamp":4800},{"value_type":"comfort","timestamp":5280},{"value_type":"sleep","timestamp":5640},{"value_type":"sleep","timestamp":5760},{"value_type":"comfort","timestamp":6150},{"value_type":"away","timestamp":6240},{"value_type":"comfort","timestamp":6720},{"value_type":"sleep","timestamp":7080},{"value_type":"sleep","timestamp":7200},{"value_type":"comfort","timestamp":7740},{"value_type":"sleep","timestamp":8580},{"value_type":"sleep","timestamp":8640},{"value_type":"comfort","timestamp":9180},{"value_type":"sleep","timestamp":10020}]},"non_repeatable_timers":{"timers":[]},"temperature_away":10.5,"temperature_normal":20.5,"temperature_comfort":20.5,"temperature_sleep":17,"temperature_vacation":10,"temperature_last_set":20.5,"vacation_mode":{"start_timestamp":0,"end_timestamp":0,"advanced":false},"lock_status":"no_lock","predictive_heating_type":"off","open_window":{"drop_temperature_threshold":5,"drop_time_range":900,"increase_temperature_threshold":3,"increase_time_range":900,"max_time":3600,"enabled":true,"activated":false},"temperature_calibration_offset":-3,"temperature_in_independent_mode":20.5,"display_unit":"celsius","oil_heater_power_level":null,"max_heater_power":1000,"limited_heating_power":null,"additional_socket_mode":"heating","pid_parameters":null,"hysteresis":{"lower":0.5,"upper":1},"timezone":"CET-1CEST,M3.5.0,M10.5.0/3","calibration_target_ambient_temperature":null,"fan_state":null},"desired":{"operation_mode":"control_individually","override_weekly_program":{"value_type":"comfort","ends_at":-1},"regulator_type":"hysteresis_or_slow_pid","weekly_program":{"timers":[{"value_type":"sleep","timestamp":0},{"value_type":"comfort","timestamp":390},{"value_type":"away","timestamp":480},{"value_type":"comfort","timestamp":960},{"value_type":"sleep","timestamp":1320},{"value_type":"sleep","timestamp":1440},{"value_type":"comfort","timestamp":1830},{"value_type":"away","timestamp":1920},{"value_type":"comfort","timestamp":2400},{"value_type":"sleep","timestamp":2760},{"value_type":"sleep","timestamp":2880},{"value_type":"comfort","timestamp":3270},{"value_type":"away","timestamp":3360},{"value_type":"comfort","timestamp":3840},{"value_type":"sleep","timestamp":4200},{"value_type":"sleep","timestamp":4320},{"value_type":"comfort","timestamp":4710},{"value_type":"away","timestamp":4800},{"value_type":"comfort","timestamp":5280},{"value_type":"sleep","timestamp":5640},{"value_type":"sleep","timestamp":5760},{"value_type":"comfort","timestamp":6150},{"value_type":"away","timestamp":6240},{"value_type":"comfort","timestamp":6720},{"value_type":"sleep","timestamp":7080},{"value_type":"sleep","timestamp":7200},{"value_type":"comfort","timestamp":7740},{"value_type":"sleep","timestamp":8580},{"value_type":"sleep","timestamp":8640},{"value_type":"comfort","timestamp":9180},{"value_type":"sleep","timestamp":10020}]},"non_repeatable_timers":{"timers":[]},"temperature_away":10.5,"temperature_normal":20.5,"temperature_comfort":20.5,"temperature_sleep":17,"temperature_vacation":10,"temperature_last_set":20.5,"vacation_mode":{"start_timestamp":0,"end_timestamp":0,"advanced":false},"lock_status":"no_lock","predictive_heating_type":"off","open_window":{"drop_temperature_threshold":5,"drop_time_range":900,"increase_temperature_threshold":3,"increase_time_range":900,"max_time":3600,"enabled":true,"activated":false},"temperature_calibration_offset":-3,"temperature_in_independent_mode":20.5,"display_unit":"celsius","oil_heater_power_level":null,"max_heater_power":null,"limited_heating_power":null,"additional_socket_mode":"heating","pid_parameters":null,"hysteresis":{"lower":0.5,"upper":1},"timezone":"CET-1CEST,M3.5.0,M10.5.0/3","calibration_target_ambient_temperature":null,"fan_state":null},"delta":null},"energyUsageForCurrentDay":6}]}] 2023-07-11 19:14:47.177 DEBUG (MainThread) [custom_components.mill] Finished fetching mill data in 0.484 seconds (success: True)

AndreFjeld commented 1 year ago

Hi,

Found another error regarding the consumption sensors. 22kWh shown in the HomeAssistant integration is in reality 0,022kWh in the Mill app. :)

Danielhiversen commented 1 year ago

I am working on the yearly consumption now.

According to the API documentation from mill, the daily consumption should be given in kWh. I do not think that is correct, so will divide it by 1000.

image
AndreFjeld commented 1 year ago

Think i found another bug for the socket. When I push update for the temp for both devices, the Wifi Socket doen't accept the new temperature. It seems like the temp is beeing pushed as the wrong device type.

2023-07-11 20:10:03.432 DEBUG (MainThread) [custom_components.mill.mill_lib] Request devices/e377a18d-646c-4f16-ab08-b3fb84bfab74/settings {'deviceType': 'Heaters', 'enabled': True, 'settings': {'operation_mode': 'control_individually', 'temperature_normal': 10.0}} 2023-07-11 20:10:03.448 DEBUG (MainThread) [custom_components.mill.mill_lib] Request devices/e9db05ce-f745-4b53-b383-0e6167398611/settings {'deviceType': 'Heaters', 'enabled': True, 'settings': {'operation_mode': 'control_individually', 'temperature_normal': 9.0}} 2023-07-11 20:10:03.768 DEBUG (MainThread) [custom_components.mill.mill_lib] Result {"error":{"type":"DeviceTypeMismatchError","message":"Device type of e9db05ce-f745-4b53-b383-0e6167398611 is not the same as provided type of settings"}} 2023-07-11 20:10:03.769 DEBUG (MainThread) [custom_components.mill.mill_lib] Request houses None 2023-07-11 20:10:03.784 DEBUG (MainThread) [custom_components.mill.mill_lib] Result

MichaelHusbyn commented 1 year ago

Thanks for updating. I do really not know how to test component properly but I have managed to get it downloaded and running. I think. I had to remove the old setup and configure again. Then I can see my 3 panels. My 3 panels seems to get data correctly but not looked too deep. They are currently not in use so kw is not counting (it is warm...) What I hope is next is to get the Mill Sense Air integration working

AndreFjeld commented 1 year ago

Thanks for updating. I do really not know how to test component properly but I have managed to get it downloaded and running. I think. I had to remove the old setup and configure again. Then I can see my 3 panels. My 3 panels seems to get data correctly but not looked too deep. They are currently not in use so kw is not counting (it is warm...) What I hope is next is to get the Mill Sense Air integration working

Hi, You can create a folder named "mill" in the custom_components folder in home assistant. Then it will load the files directly from this folder in stead of using the core files.

Download from: https://github.com/home-assistant/core/tree/a3d42fc0aebfbc8bd3c94528dc1d11b41e419546/homeassistant/components/mill

Just remember to add a line at the botom of the manifest, or it wont load. "requirements": ["millheater==0.10.0", "mill-local==0.2.0"], "version": "0.10.1"

Reboot and it will use custom_components files

MichaelHusbyn commented 1 year ago

Thanks for your instructions, almost the same that I figured out, different version number tho, and I used mill_new_api branch. Will update the files and version number on my HA now

AndreFjeld commented 1 year ago

Thanks for your instructions, almost the same that I figured out, different version number tho, and I used mill_new_api branch. Will update the files and version number on my HA now

Version number is changed by me to force the integration to be newer than the one in the Core. Not shure if its needed.

Danielhiversen commented 1 year ago

What I hope is next is to get the Mill Sense Air integration working

It is currently not supported, and I do not have any sense device.

You should see some error log:

Unsupported device, [ device information]

Would be very useful if you could share that device information.

MichaelHusbyn commented 1 year ago

I have enabled debug logging and reloaded, but no "Unsupported device" messages in home-assistant.log file. Perhaps I should look somewhere else? I only see room and house information (++) in the log Update: with the latest update I see more information about the known devices but nothing about unsupported devices

AndreFjeld commented 1 year ago

@Danielhiversen

Hi, It seems like your last code don't remember the Auth token when it updates. Reload of the integrations gets everything working for a while. Then this error comes back.

`Logger: custom_components.mill Source: custom_components/mill/mill_lib.py:130 Integration: Mill First occurred: 14:51:12 (3 occurrences) Last logged: 14:53:12

Unexpected error fetching mill data: {"error":{"type":"InvalidAuthTokenError","message":"Invalid authentication token"}} Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 242, in _async_update_data return await self.update_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/mill/mill_lib.py", line 246, in fetch_heater_and_sensor_data await self.update_devices() File "/config/custom_components/mill/mill_lib.py", line 149, in update_devices homes = await self.get_home_list() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/mill/mill_lib.py", line 142, in get_home_list resp = await self.request("houses") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/mill/mill_lib.py", line 130, in request raise Exception(result) Exception: {"error":{"type":"InvalidAuthTokenError","message":"Invalid authentication token"}}`

Code from commit SHA b86b29ca35c470fad5073d82e2791efc7f7d6fd5

Danielhiversen commented 1 year ago

@MichaelHusbyn I have ordered a mill sense device to have something to test with. It seems that the API only provides Eco2, Tvoc and humidity on room level, and not on device level. How is that in the app. Can you see the value for each sense device?

@AndreFjeld Thanks, should be fixed now.

MichaelHusbyn commented 1 year ago

@Danielhiversen I can create an account, add one mill sense device on it and send credentials to this account to your email. If that helps

MichaelHusbyn commented 1 year ago

To answer your Q: yes every mill sense is listed under “Independent devices”

Danielhiversen commented 1 year ago

@Danielhiversen I can create an account, add one mill sense device on it and send credentials to this account to your email. If that helps

That would be very useful. You can send it to dahoiv gmail.com

Danielhiversen commented 1 year ago

@MichaelHusbyn Thanks ! First version with the sensor support is now ready.

MichaelHusbyn commented 1 year ago

My pleasure, thanks for fixing very fast :) I have installed new version and first look it gets data. Seems like the new api is very detailed, with 2 decimals of the temperature. My fridge is 4.49 celcius, a bit accurate... Cannot remember that it was so in the past. Will test more and report status

AndreFjeld commented 1 year ago

@Danielhiversen Hi,

Change Line 277 in mill_lib.py

From: "deviceType": "Heaters",

To: "deviceType": "Sockets" if isinstance(self.heaters[device_id], Socket) else "Heaters",

This is needed to get the sockets to work when you change temp from the climate entity :) Needed from Change commit SHA: 93b3df5a93ad8b82382692e110280910fd8f2c75

kimmilde commented 1 year ago

Nice work with this new platform migration! Installed the latest commits, but i'm getting a error now

  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 621, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/mill/climate.py", line 125, in async_set_temperature
    await self.coordinator.mill_data_connection.set_heater_temp(
  File "/config/custom_components/mill/mill_lib.py", line 319, in set_heater_temp
    "deviceType": self._find_device_type(device_id),
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mill/mill_lib.py", line 332, in _find_device_type
    if device_id not in self.heaters:
                        ^^^^^^^^^^^^
AttributeError: 'Mill' object has no attribute 'heaters'
Danielhiversen commented 1 year ago

@kimmilde Thanks, fixed now

atleos commented 1 year ago

Hei @Danielhiversen - jeg har samme problem med Home Assistant. Jeg oppgraderte til Home Assistant 2023.7.2 i dag og kjører Mill integrasjon. Vet du når denne fikst kommer tilgjengelig for nedlasting?

Danielhiversen commented 1 year ago

@atleos You can add it as a custom component as described here https://github.com/home-assistant/core/issues/95424#issuecomment-1631448702

atleos commented 1 year ago

Thank you.

One question. Does I need to remove the old integration before I add the new custom component?

Br Atle

fre. 14. jul. 2023, 11:29 skrev Daniel Hjelseth Høyer < @.***>:

@atleos https://github.com/atleos You can add it as a custom component as described here #95424 (comment) https://github.com/home-assistant/core/issues/95424#issuecomment-1631448702

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/95424#issuecomment-1635577428, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGULMQDWSWGTTZOWD2D5J3XQEGQFANCNFSM6AAAAAAZWQ7LA4 . You are receiving this because you were mentioned.Message ID: @.***>

atleos commented 1 year ago

I removed the old Mill integration and add it once again after I have created the mill folder in custom_component with the files in the release.

I have No devices or entries

Status : Misslykket oppsett, prøver på nytt

I have many Mill second generation connected to my account.

fre. 14. jul. 2023, 11:29 skrev Daniel Hjelseth Høyer < @.***>:

@atleos https://github.com/atleos You can add it as a custom component as described here #95424 (comment) https://github.com/home-assistant/core/issues/95424#issuecomment-1631448702

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/95424#issuecomment-1635577428, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGULMQDWSWGTTZOWD2D5J3XQEGQFANCNFSM6AAAAAAZWQ7LA4 . You are receiving this because you were mentioned.Message ID: @.***>

atleos commented 1 year ago

I find the following error message in Home Assistant event

Home Assistant Core Unexpected error fetching mill data: 'NoneType' object has no attribute 'get' 12:17:54 – (FEIL) Mill - meldingen oppstod først ved 11:59:00 og vist 4 ganger

atleos commented 1 year ago

Could it be i have done some wrong in the manifest.json file ?

2023-07-14 11:58:35.641 ERROR (SyncWorker_4) [homeassistant.loader] Error parsing manifest.json file at /config/custom_components/mill/manifest.json: unexpected content after document: line 2 column 1 (char 98243)

MichaelHusbyn commented 1 year ago

My manifest.json, last 2 lines "requirements": ["millheater==0.10.0", "mill-local==0.2.0"], "version": "1.0.0"

kimmilde commented 1 year ago

95424 (comment)

Please read post https://github.com/home-assistant/core/issues/95424#issuecomment-1631448702 again... You have the wrong version

MichaelHusbyn commented 1 year ago

Have tested the integration and seems to work as expected with my devices (heater & sense)

kimmilde commented 1 year ago

On my two gen2 heaters it doesnt say "Heating", always "Idle", even when "CurrentPower > 0"

When heater is HEATING:

"lastMetrics": {
    "deviceId": "xxxx",
    "receivedAt": "2023-07-14T20:37:05.000Z",
    "sentAt": "2023-07-14T20:37:03.000Z",
    "temperature": 20,
    "humidity": 0,
    "currentPower": 600,
    "currentOperationMode": 3,
    "currentTemperatureTypeInWeeklyProgram": -1,
    "controlSignal": 1,
    "energyUsage": 0,
    "timeSinceHeaterStartup": 5226713,
    "temperatureAmbient": 19,
    "openWindowsStatus": 0,
    "powerStatus": 1,
    "heaterFlag": 1,
    "time": 1689367023
},

When heater is IDLE

"lastMetrics": {
    "deviceId": "xxxx",
    "receivedAt": "2023-07-14T20:50:12.000Z",
    "sentAt": "2023-07-14T20:50:10.000Z",
    "temperature": 18,
    "humidity": 0,
    "currentPower": 0,
    "currentOperationMode": 3,
    "currentTemperatureTypeInWeeklyProgram": -1,
    "controlSignal": 0,
    "energyUsage": 139,
    "timeSinceHeaterStartup": 6013629,
    "temperatureAmbient": 21,
    "openWindowsStatus": 0,
    "powerStatus": 1,
    "heaterFlag": 0,
    "time": 1689367810
  },
atleos commented 1 year ago

It not working for me. with this custom component i am not able to log on .

I'll wait for the home assistant core and update and hopfully get this fixed. The heating is not used so much in summertime so I wait.

fre. 14. juli 2023 kl. 22:52 skrev kimmilde @.***>:

On my two gen2 heaters it doesnt say "Heating", always "Idle", even when "CurrentPower > 0"

When heater is HEATING:

"lastMetrics": { "deviceId": "xxxx", "receivedAt": "2023-07-14T20:37:05.000Z", "sentAt": "2023-07-14T20:37:03.000Z", "temperature": 20, "humidity": 0, "currentPower": 600, "currentOperationMode": 3, "currentTemperatureTypeInWeeklyProgram": -1, "controlSignal": 1, "energyUsage": 0, "timeSinceHeaterStartup": 5226713, "temperatureAmbient": 19, "openWindowsStatus": 0, "powerStatus": 1, "heaterFlag": 1, "time": 1689367023 },

When heater is IDLE

"lastMetrics": { "deviceId": "xxxx", "receivedAt": "2023-07-14T20:50:12.000Z", "sentAt": "2023-07-14T20:50:10.000Z", "temperature": 18, "humidity": 0, "currentPower": 0, "currentOperationMode": 3, "currentTemperatureTypeInWeeklyProgram": -1, "controlSignal": 0, "energyUsage": 139, "timeSinceHeaterStartup": 6013629, "temperatureAmbient": 21, "openWindowsStatus": 0, "powerStatus": 1, "heaterFlag": 0, "time": 1689367810 },

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/95424#issuecomment-1636426239, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGULMVRX7VRRI325F436PLXQGWRFANCNFSM6AAAAAAZWQ7LA4 . You are receiving this because you were mentioned.Message ID: @.***>

Danielhiversen commented 1 year ago

@kimmilde Should be fixed now

kimmilde commented 1 year ago

Its working pretty good now @Danielhiversen. Except for one thing. It is not possible to turn off heaters.


Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/mill/climate.py:139
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 00:38:36 (1 occurrences)
Last logged: 00:38:36

[547497899920] 'Heater' object has no attribute 'is_gen1'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 205, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1965, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2005, in _execute_service
    return await cast(
           ^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 848, in entity_service_call
    response_data = task.result()  # pop exception if have
                    ^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1192, in async_request_call
    return await coro
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/mill/climate.py", line 139, in async_set_hvac_mode
    elif hvac_mode == HVACMode.OFF and not heater.is_gen1:
                                           ^^^^^^^^^^^^^^
AttributeError: 'Heater' object has no attribute 'is_gen1'
Danielhiversen commented 1 year ago

@kimmilde Thanks. Should be fixed, but I have not had time to verify

kongjudas commented 1 year ago

Do I understand it correctly that the Sense sensors are no longer supported? I have my house full of them and they've monitored quiet good before the migration.

MichaelHusbyn commented 1 year ago

Mill sense sensors works fine with this version

kimmilde commented 1 year ago

@kimmilde Thanks. Should be fixed, but I have not had time to verify

Its working :) Great work

atleos commented 1 year ago

Is it planned to come with the next home assistant release?

I don't get the custom component method to work. So I wait for the official way to do it.

Now I have deleted the integration in my system.

tir. 18. jul. 2023, 21:33 skrev kimmilde @.***>:

@kimmilde https://github.com/kimmilde Thanks. Should be fixed, but I have not had time to verify

Its working :) Great work

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/95424#issuecomment-1640887516, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGULMSQQIXM2ZQF76I5DIDXQ3QIXANCNFSM6AAAAAAZWQ7LA4 . You are receiving this because you were mentioned.Message ID: @.***>

kongjudas commented 1 year ago

Mill sense sensors works fine with this version

Do you connect them locally somehow? I get the devices but all entities are "unavailable" when connecting to cloud

MichaelHusbyn commented 1 year ago

Mill sense sensors works fine with this version

Do you connect them locally somehow? I get the devices but all entities are "unavailable" when connecting to cloud

All in cloud. I had to logout and login, tried that? Do you see x devices and y entites on the mill integration? They may have changed named in the IoT migration

kongjudas commented 1 year ago

All in cloud. I had to logout and login, tried that? Do you see x devices and y entites on the mill integration? They may have changed named in the IoT migration

I've tried everything in my power. Deleted everything, and added it twice... The last time I only got the heaters, no sensors. By logging out, you mean rebooting HA or the Mill app?

My manifest, btw:

{
  "domain": "mill",
  "name": "Mill",
  "codeowners": ["@danielhiversen"],
  "config_flow": true,
  "documentation": "https://www.home-assistant.io/integrations/mill",
  "iot_class": "local_polling",
  "loggers": ["mill", "mill_local"],
  "requirements": ["millheater==0.10.0", "mill-local==0.2.0"], "version": "0.10.1"
}
MichaelHusbyn commented 1 year ago

Strange, logout will happen when you delete the integration (do not see any other way to do it - unclear with that on my last post) Assume you also have downloaded the components from mill_new_api branch on git. When the component is added a restart of HA is needed. Not that it should not matter, I have the version to 1.0.0 and on a separate line below.

If you enable logging do you see any Mill interesting logging items that could explain that you do not see senors. It may be that you have a configuration that the integration do not detect. I have both heaters and sensors, 21 devices and 99 entities are visible in my HA

atleos commented 1 year ago

I was able to get it innstalled as custom coponent. I am only able to get 2 of my 7 mill heating .

It's some strange with the naming of the unit. I have one named as 'Sofa' in the Mill app, In Home Assistant it have 'Sofa Day consumption'