sHedC / homeassistant-mastertherm

Home Assistant Mastertherm Component, to communicate and control heat pumps from Mastertherm
MIT License
6 stars 2 forks source link

Integration is broken after update to HA 2023.12.0 #159

Closed johny-mnemonic closed 9 months ago

johny-mnemonic commented 9 months ago

System Health details

System Information

version core-2023.12.0
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.6
os_name Linux
os_version 6.1.63-haos
arch x86_64
timezone Europe/Prague
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4979 Installed Version | 1.33.0 Stage | running Available Repositories | 1353 Downloaded Repositories | 41 HACS Data | ok
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 11.2 -- | -- update_channel | stable supervisor_version | supervisor-2023.11.6 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 62.3 GB disk_used | 48.5 GB healthy | true supported | true board | ova supervisor_api | ok version_api | ok installed_addons | Check Home Assistant configuration (3.11.0), Terminal & SSH (9.8.1), Mosquitto broker (6.4.0), Portainer (2.0.0), TasmoAdmin (0.28.0), chrony (2.6.2), Grafana (9.1.1), InfluxDB (4.8.0), Traccar (0.23.0), Advanced SSH & Web Terminal (16.0.2), Log Viewer (0.16.0), File editor (5.7.0), Samba share (12.2.0), SQLite Web (4.0.0), Samba Backup (5.2.0), ESPHome (2023.11.6), Nginx Proxy Manager (0.12.3), MariaDB (2.6.1), Piper (1.4.0), Whisper (1.0.0), openWakeWord (1.8.2)
Dashboards dashboards | 1 -- | -- resources | 20 views | 10 mode | storage
Recorder oldest_recorder_run | 23. listopadu 2023 v 02:20 -- | -- current_recorder_run | 6. prosince 2023 v 23:08 estimated_db_size | 4338.72 MiB database_engine | sqlite database_version | 3.41.2
Solcast PV Forecast can_reach_server | ok -- | -- used_requests | 5 rooftop_site_count | 1

Checklist

Describe the issue

Seems like after the update to 2023.12.0 the masterthermconnect package conflicts with the aiohttp package used by the HA itself.

I have tried to manually install that package to see what is going on and here is the result:

homeassistant:/config# pip install masterthermconnect==2.2.9
Looking in indexes: https://pypi.org/simple, https://wheels.home-assistant.io/musllinux-index/
Collecting masterthermconnect==2.2.9
  Downloading masterthermconnect-2.2.9-py3-none-any.whl.metadata (17 kB)
Requirement already satisfied: natsort>=8.3.1 in /usr/local/lib/python3.11/site-packages (from masterthermconnect==2.2.9) (8.4.0)
Collecting aiohttp==3.8.5 (from masterthermconnect==2.2.9)
  Downloading https://wheels.home-assistant.io/musllinux-index/aiohttp-3.8.5-cp311-cp311-musllinux_1_2_x86_64.whl (358 kB)
     ââââââââââââââââââââââââââââââââââââââââ 358.2/358.2 kB 6.1 MB/s eta 0:00:00
Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.8.5->masterthermconnect==2.2.9) (23.1.0)
Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.8.5->masterthermconnect==2.2.9) (3.2.0)
Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.8.5->masterthermconnect==2.2.9) (6.0.4)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.8.5->masterthermconnect==2.2.9) (4.0.3)
Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.8.5->masterthermconnect==2.2.9) (1.9.2)
Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.8.5->masterthermconnect==2.2.9) (1.4.0)
Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.8.5->masterthermconnect==2.2.9) (1.3.1)
Requirement already satisfied: idna>=2.0 in /usr/local/lib/python3.11/site-packages (from yarl<2.0,>=1.0->aiohttp==3.8.5->masterthermconnect==2.2.9) (3.6)
Downloading masterthermconnect-2.2.9-py3-none-any.whl (30 kB)
Installing collected packages: aiohttp, masterthermconnect
  Attempting uninstall: aiohttp
    Found existing installation: aiohttp 3.9.1
    Uninstalling aiohttp-3.9.1:
      Successfully uninstalled aiohttp-3.9.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
homeassistant 2023.12.0 requires aiohttp==3.9.1, but you have aiohttp 3.8.5 which is incompatible.
Successfully installed aiohttp-3.8.5 masterthermconnect-2.2.9
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

Downgrading the aiohttp from 3.9.1 to 3.8.5 is most probably something we don't want and HA doesn't allow for the integration to do.

I have seen you already tried to fix the issue with the aiohttp here but it is only in the 2.2.9-b1 version and not in the 2.2.9 which the integration has as a requirement. Right?

I have manually installed the aiohttp-3.9.1 after installing masterthermconnect-2.2.9 and it seems to work, so hopefully it is just about publishing the new version with the fix applied 🤞

Reproduction steps

Update HA

Logs

2023-12-06 22:17:05.863 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package masterthermconnect==2.2.9: ERROR: Cannot install masterthermconnect==2.2.9 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
2023-12-06 22:17:08.690 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package masterthermconnect==2.2.9: ERROR: Cannot install masterthermconnect==2.2.9 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
2023-12-06 22:17:11.956 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package masterthermconnect==2.2.9: ERROR: Cannot install masterthermconnect==2.2.9 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
2023-12-06 22:17:11.957 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'mastertherm': Requirements for mastertherm not found: ['masterthermconnect==2.2.9'].

Diagnostics dump, if available

N/A

johny-mnemonic commented 9 months ago

Hmm, looks like it will need a bit more love:

homeassistant:/config# pip install masterthermconnect==2.2.9-b1
Looking in indexes: https://pypi.org/simple, https://wheels.home-assistant.io/musllinux-index/
Collecting masterthermconnect==2.2.9-b1
  Downloading masterthermconnect-2.2.9b1-py3-none-any.whl.metadata (17 kB)
Requirement already satisfied: natsort>=8.3.1 in /usr/local/lib/python3.11/site-packages (from masterthermconnect==2.2.9-b1) (8.4.0)
Collecting aiohttp==3.8.5 (from masterthermconnect==2.2.9-b1)
  Downloading https://wheels.home-assistant.io/musllinux-index/aiohttp-3.8.5-cp311-cp311-musllinux_1_2_x86_64.whl (358 kB)
     ââââââââââââââââââââââââââââââââââââââââ 358.2/358.2 kB 6.6 MB/s eta 0:00:00
Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.8.5->masterthermconnect==2.2.9-b1) (23.1.0)
Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.8.5->masterthermconnect==2.2.9-b1) (3.2.0)
Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.8.5->masterthermconnect==2.2.9-b1) (6.0.4)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.8.5->masterthermconnect==2.2.9-b1) (4.0.3)
Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.8.5->masterthermconnect==2.2.9-b1) (1.9.2)
Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.8.5->masterthermconnect==2.2.9-b1) (1.4.0)
Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.8.5->masterthermconnect==2.2.9-b1) (1.3.1)
Requirement already satisfied: idna>=2.0 in /usr/local/lib/python3.11/site-packages (from yarl<2.0,>=1.0->aiohttp==3.8.5->masterthermconnect==2.2.9-b1) (3.6)
Downloading masterthermconnect-2.2.9b1-py3-none-any.whl (30 kB)
Installing collected packages: aiohttp, masterthermconnect
  Attempting uninstall: aiohttp
    Found existing installation: aiohttp 3.9.1
    Uninstalling aiohttp-3.9.1:
      Successfully uninstalled aiohttp-3.9.1
  Attempting uninstall: masterthermconnect
    Found existing installation: masterthermconnect 2.2.9
    Uninstalling masterthermconnect-2.2.9:
      Successfully uninstalled masterthermconnect-2.2.9
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
homeassistant 2023.12.0 requires aiohttp==3.9.1, but you have aiohttp 3.8.5 which is incompatible.
Successfully installed aiohttp-3.8.5 masterthermconnect-2.2.9b1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

homeassistant:/config# pip install aiohttp==3.9.1
Looking in indexes: https://pypi.org/simple, https://wheels.home-assistant.io/musllinux-index/
Collecting aiohttp==3.9.1
  Downloading https://wheels.home-assistant.io/musllinux-index/aiohttp-3.9.1-cp311-cp311-musllinux_1_2_x86_64.whl (410 kB)
     ââââââââââââââââââââââââââââââââââââââââ 410.8/410.8 kB 20.5 MB/s eta 0:00:00
Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.9.1) (23.1.0)
Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.9.1) (6.0.4)
Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.9.1) (1.9.2)
Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.9.1) (1.4.0)
Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.11/site-packages (from aiohttp==3.9.1) (1.3.1)
Requirement already satisfied: idna>=2.0 in /usr/local/lib/python3.11/site-packages (from yarl<2.0,>=1.0->aiohttp==3.9.1) (3.6)
Installing collected packages: aiohttp
  Attempting uninstall: aiohttp
    Found existing installation: aiohttp 3.8.5
    Uninstalling aiohttp-3.8.5:
      Successfully uninstalled aiohttp-3.8.5
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
masterthermconnect 2.2.9b1 requires aiohttp==3.8.5; python_version < "3.12", but you have aiohttp 3.9.1 which is incompatible.
Successfully installed aiohttp-3.9.1

homeassistant:/config# pip list | grep -P '(aiohttp|masterthermconnect)'
aiohttp                          3.9.1
aiohttp-cors                     0.7.0
aiohttp-fast-url-dispatcher      0.3.0
aiohttp-retry                    2.8.3
aiohttp-socks                    0.7.1
aiohttp-zlib-ng                  0.1.1
masterthermconnect               2.2.9b1

Even the 2.2.9-b1 still requires aiohttp==3.8.5 for python 3.11 🤔 Ah, I see, there was second commit which changed it from aiohttp>=3.8.5 to aiohttp==3.8.5.

valentapat commented 9 months ago

I have the same problem, waiting for a solution

discodancerstu commented 9 months ago

Same here, integration not loaded

sHedC commented 9 months ago

Got it I think I know what it is if they moved to a later python versoin in HASS have to check.

discodancerstu commented 9 months ago

Ok thanks, please let us know if you need any more info to get it fixed!

sHedC commented 9 months ago

It will be fixed soon it was just about the aiohttp versions they broke supporting python 12, I was trying to keep aligned with HASS versions just missed this update.

sHedC commented 9 months ago

Will be in next release 1.1.8 just have to create the release.

sHedC commented 9 months ago

Sorry for the delay, had some issues with the new experimental features in pytest socket.

johny-mnemonic commented 9 months ago

Thanks for the quick fix!

sHedC commented 9 months ago

Thanks for notifying I missed the update to the Aiohttp to a non beta verison

valentapat commented 9 months ago

I don't understand, I see version 1.1.9, can i update? I have the previous homeassistant core restored from a backup. How do i have to proceed now ?

sHedC commented 9 months ago

I updated to 1.1.8 to fix the issue but set the version only allowed for 2023.12.0, so what I did with 1.1.9 was allow upgrade of the masterthermconnect to 1.1.9 before upgrading to 2023.12.0.

1.1.9 works on both 2023.11.0 and higher.

sHedC commented 9 months ago

Upgrade masterthirm first before home assistant, but it works if you update home assistant first anyway.

valentapat commented 9 months ago

thanks