plugwise / python-plugwise

Plugwise python module for Smiles (Anna, Adam, P1) and Stretch
https://pypi.org/project/plugwise
MIT License
10 stars 9 forks source link

[BUG]: #241

Closed ruute66 closed 1 year ago

ruute66 commented 1 year ago

Describe the bug.

After upgrade HA version 2022.11.1 or 2011.11.2 the Plugwise integration stopt working, and this error: Failed to set up

Log message:

Logger: homeassistant.config_entries Source: components/plugwise/gateway.py:59 First occurred: 19:38:24 (1 occurrences) Last logged: 19:38:24

Error setting up entry Adam for plugwise Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/plugwise/init.py", line 13, in async_setup_entry return await async_setup_entry_gw(hass, entry) File "/usr/src/homeassistant/homeassistant/components/plugwise/gateway.py", line 59, in async_setup_entry_gw api.get_all_devices() File "/usr/local/lib/python3.10/site-packages/plugwise/smile.py", line 160, in get_all_devices self._all_device_data() File "/usr/local/lib/python3.10/site-packages/plugwise/smile.py", line 114, in _all_device_data self.update_for_cooling(self.gw_devices[device_id]) File "/usr/local/lib/python3.10/site-packages/plugwise/smile.py", line 80, in update_for_cooling max_setpoint = self._sched_setpoints[1] IndexError: list index out of range

Expected behavior

no errors and working integration

What version of Home Assistant Core has the issue?

Home Assistant 2022.11.2 Supervisor 2022.10.2 Operating System 9.3 Frontend 20221108.0 - latest

What type of installation are you running?

Home Assistant OS

How and which version of the integration do you have installed?

Home Assistant Core

What kind of Plugwise device is having issues?

Smile: Adam (including Lisa, Tom, Floor)

What firmware version is your Plugwise product at?

3.6.7

Home Assistant Logging (optional)

No response

Diagnostics information

No response

Additional information

No response

bouwew commented 1 year ago

Can you please share the diagnostics info of the Plugwise integration?

ruute66 commented 1 year ago

is not available  

This is de log in the previous (working) version:{  "home_assistant": {    "installation_type": "Home Assistant OS",    "version": "2022.10.5",    "dev": false,    "hassio": true,    "virtualenv": false,    "python_version": "3.10.5",    "docker": true,    "arch": "aarch64",    "timezone": "Europe/Amsterdam",    "os_name": "Linux",    "os_version": "5.15.61-v8",    "supervisor": "2022.10.2",    "host_os": "Home Assistant OS 9.3",    "docker_version": "20.10.18",    "chassis": "embedded",    "run_as_root": true  },  "custom_components": {    "hacs": {      "version": "1.24.5",      "requirements": [        "aiogithubapi>=21.11.0"      ]    }  },  "integration_manifest": {    "domain": "plugwise",    "name": "Plugwise",    "documentation": "https://www.home-assistant.io/integrations/plugwise",    "requirements": [      "plugwise==0.21.4"    ],    "codeowners": [      @.",      @.",      @.",      @."    ],    "zeroconf": [      "_plugwise._tcp.local."    ],    "config_flow": true,    "iot_class": "local_polling",    "loggers": [      "crcmod",      "plugwise"    ],    "is_built_in": true  },  "data": {    "gateway": {      "smile_name": "Adam",      "gateway_id": "a61cffe2806b4b1aaf7748c768f63349",      "heater_id": "78061dfa9fd04318a9b4df712e69261a",      "cooling_present": true,      "notifications": {}    },    "devices": {      "78061dfa9fd04318a9b4df712e69261a": {        "dev_class": "heater_central",        "location": "4e9d442ceca54ff996ce7dca8467d317",        "model": "17.1",        "name": "OpenTherm",        "vendor": "Remeha B.V.",        "maximum_boiler_temperature": {          "setpoint": 44.0,          "lower_bound": 25.0,          "upper_bound": 45.0,          "resolution": 0.01        },        "domestic_hot_water_setpoint": {          "setpoint": 54.0,          "lower_bound": 40.0,          "upper_bound": 60.0,          "resolution": 0.01        },        "binary_sensors": {          "dhw_state": false,          "heating_state": false,          "cooling_state": false,          "flame_state": false        },        "sensors": {          "water_temperature": 24.6,          "intended_boiler_temperature": 0.0,          "modulation_level": 0.0,          "return_temperature": 24.6,          "water_pressure": 1.7,          "outdoor_air_temperature": 7.25        },        "switches": {          "dhw_cm_switch": false        }      },      "a61cffe2806b4b1aaf7748c768f63349": {        "dev_class": "gateway",        "firmware": "3.6.7",        "hardware": "AME Smile 2.0 board",        "location": "4e9d442ceca54ff996ce7dca8467d317",        "mac_address": "D40FB201C418",        "model": "Adam",        "name": "Adam",        "zigbee_mac_address": "000D6F000D5A3DF3",        "vendor": "Plugwise B.V.",        "regulation_mode": "heating",        "regulation_modes": [          "heating",          "off",          "bleeding_cold",          "bleeding_hot",          "cooling"        ],        "binary_sensors": {          "plugwise_notification": false        },        "sensors": {          "outdoor_temperature": 9.19        }      },      "08ad5d11fbae47baa6efe60554c97c7d": {        "dev_class": "thermostat",        "location": "a1658ed2ddfe45ae8f65485093b6550f",        "model": "Anna",        "name": "OpenThermThermostat",        "vendor": "Plugwise B.V.",        "thermostat": {          "setpoint": 20.0,          "lower_bound": 1.0,          "upper_bound": 35.0,          "resolution": 0.01        },        "preset_modes": [          "home",          "asleep",          "away",          "no_frost"        ],        "active_preset": "home",        "available_schedules": [          "Thermostat schedule"        ],        "selected_schedule": "Thermostat schedule",        "last_used": "Thermostat schedule",        "control_state": "off",        "mode": "auto",        "sensors": {          "temperature": 21.5,          "setpoint": 20.0        }      }    }  }}

On Friday, November 11, 2022 at 04:46:28 PM GMT+1, Bouwe Westerdijk ***@***.***> wrote:  

Can you please share the diagnostics info of the Plugwise integration?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

bouwew commented 1 year ago

Ok, thanks!

Two questions: 1) From the data I can see that there is cooling capability, is that correct? 2) I see you have a Thermostat schedule, is that one maybe empty?

ruute66 commented 1 year ago

1 yes I have 'cooling feature' upgrade  2 yes I have an empty schedule Schedule is in Home Assistant  Sent from Yahoo Mail on Android

On Sat, Nov 12, 2022 at 9:12, Bouwe @.***> wrote:

Ok, thanks!

Two questions:

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

bouwew commented 1 year ago

Thanks!

So, the schedule, when you look at it in the Plugwise App, is empty? Strange, there was a bugfix in 2022.11.2 just for that situation. Strange that is doesn't work.

bouwew commented 1 year ago

You can help me by sending me some raw xml-data from your system: can you please capture the xml-data present at http://<adam_ip>/core/domain_objects? Please do this via right-click -> Save as -> .xml

Please send the resulting file to my email: bouwe at westerdijk point info (change this into a real email address).

ruute66 commented 1 year ago

Hoi Bouwe,Schema van zowel Adam als Anna zijn leeg.Hierbij de xml data. Zie bijlage

On Saturday, November 12, 2022 at 03:33:29 PM GMT+1, Bouwe Westerdijk ***@***.***> wrote:  

You can help me by sending me some raw xml-data from your system: can you please capture the xml-data present at http:///core/domain_objects? Please do this via right-click -> Save as -> .xml

Please send the resulting file to my email: bouwe at westerdijk point info (change this into a real email address).

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

ruute66 commented 1 year ago

vorige domain_objects was van de oude versie van HA.Ik weet niet of het uitmaakt, maar hierbij dezelfde domain_objects bij HA versie Home Assistant 2022.11.2

On Saturday, November 12, 2022 at 09:03:55 PM GMT+1, Ruud Verkerk ***@***.***> wrote:  

Hoi Bouwe,Schema van zowel Adam als Anna zijn leeg.Hierbij de xml data. Zie bijlage

On Saturday, November 12, 2022 at 03:33:29 PM GMT+1, Bouwe Westerdijk ***@***.***> wrote:  

You can help me by sending me some raw xml-data from your system: can you please capture the xml-data present at http:///core/domain_objects? Please do this via right-click -> Save as -> .xml

Please send the resulting file to my email: bouwe at westerdijk point info (change this into a real email address).

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

bouwew commented 1 year ago

Bedankt! Ik ga er naar kijken.

Ter info, de Plugwise xml-data is volledig losgekoppeld van HA, de inhoud van de beide gestuurde bestanden is gelijk.

Je schrijft zowel Adam als Anna. Betekend dat je ze beide in de Plugwise App hebt staan? Dat is niet nodig, de enige die je nodig hebt, is de Adam. De Anna is een "slaaf" van de Adam geworden, deze is alleen nog maar een "domme" thermostaat, alle besturing wordt gedaan vanuit de Adam.

Groet, Bouwe

Groet, Bouwe

On Sat, Nov 12, 2022 at 9:49 PM ruute66 @.***> wrote:

vorige domain_objects was van de oude versie van HA.Ik weet niet of het uitmaakt, maar hierbij dezelfde domain_objects bij HA versie Home Assistant 2022.11.2

On Saturday, November 12, 2022 at 09:03:55 PM GMT+1, Ruud Verkerk @.***> wrote:

Hoi Bouwe,Schema van zowel Adam als Anna zijn leeg.Hierbij de xml data. Zie bijlage

On Saturday, November 12, 2022 at 03:33:29 PM GMT+1, Bouwe Westerdijk @.***> wrote:

You can help me by sending me some raw xml-data from your system: can you please capture the xml-data present at http://

/core/domain_objects? Please do this via right-click -> Save as -> .xml Please send the resulting file to my email: bouwe at westerdijk point info (change this into a real email address). — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: ***@***.***> — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you commented.Message ID: ***@***.***>
bouwew commented 1 year ago

@ruute66 I can reproduce your problem with the library-code that's in HA Core at the moment. I also see that the problem is gone with the code that will be in the coming library-update.

ruute66 commented 1 year ago

Thanks!Good work.Is the library update an HA update? Or an Plugwise update?

Sent from Yahoo Mail on Android

On Sun, Nov 13, 2022 at 10:10, Bouwe @.***> wrote:

@ruute66 I can reproduce your problem with the library-code that's in HA Core at the moment. I also see that the problem is gone with the code that will be in the coming library-update.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

bouwew commented 1 year ago

The plugwise library (its code is in this github) is updated. This library is used by the HA Core Plugwise integration and by the Plugwise-beta custom_component https://github.com/plugwise/plugwise-beta

bouwew commented 1 year ago

Should be fixed in HA Core 2022.12.0.