shenxn / ha-dyson

HomeAssitant custom integration for dyson
MIT License
312 stars 59 forks source link

Just upgraded Dyson HA to 0.16.3 on 2022.4 and now won't load #115

Closed atmezferix closed 2 years ago

atmezferix commented 2 years ago

Logger: homeassistant.setup Source: setup.py:162 First occurred: 20:33:37 (1 occurrences) Last logged: 20:33:37

Setup failed for custom integration dyson_local: Unable to import component: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.9/site-packages/libdyson/init.py)

Krocko commented 2 years ago

Same here.

mundschenk-at commented 2 years ago

Looks like the library version was not updated.

sesardelaisla commented 2 years ago

Same here. I rolled back to 0.16.2 and everything is fine for the moment. Looking forward to getting a fix soon. Thanks!

mundschenk-at commented 2 years ago

@Kakise, the latest release of libdyson is from 2021-11-23, the commit adding DysonPurifierHumidifyCoolFormaldehyde is from 2021-11-28.

rkallensee commented 2 years ago

The component is referencing libdyson from Github main branch (https://github.com/shenxn/ha-dyson/blob/v0.16.3/custom_components/dyson_local/manifest.json#L9), that doesn't seem to work.

townsmcp commented 2 years ago

Same error message here with this update. For clarity, I am also running HA 2022.4.0

Flameeyes commented 2 years ago

Same as #116 — this is because of a conflict between dyson_local and dyson_cloud.

townsmcp commented 2 years ago

@Flameeyes nope. I don’t have Dyson Cloud installed but do get this error: Logger: homeassistant.setup Source: setup.py:162 First occurred: 8:40:09 pm (1 occurrences) Last logged: 8:40:09 pm

Setup failed for custom integration dyson_local: Unable to import component: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.9/site-packages/libdyson/init.py)

monsieurlatte commented 2 years ago

Deleted everything and went back to 16.2 and I get this when I go to add in dyson local.

This integration does not support configuration via the UI. If you followed this link from the Home Assistant website, make sure you run the latest version of Home Assistant.

Flameeyes commented 2 years ago

Yeah that seems to be the case because it does not know how to update from the git repo :/

We really need a new release, @Kakise…

monsieurlatte commented 2 years ago

got some of it back, install 16.0 but it's missing temp and such, gonna try to update again to 16.3 and see now.

Flameeyes commented 2 years ago

I can definitely reproduce this. I'm trying to see what's going on.

pip install --upgrade git+https://github.com/shenxn/libdyson@main kept installing an older version, because I think it cached it.

It should have worked if I added --no-cache-dir but it also worked by removing the @main part. Much easier to do if we get a release for libdyson.

mundschenk-at commented 2 years ago

got some of it back, install 16.0 but it's missing temp and such, gonna try to update again to 16.3 and see now.

Rolling back to 0.16.2 should work without deleting the integration, but HACS is a bit finicky sometimes, you have to wait until the UI picker is "editable" again after selecting the version you want before clicking "Download".

monsieurlatte commented 2 years ago

I was only able to roll back to 16.0 to get it to be able to install again. I'm going to try upgrading to 16.2 now, since going back to 16.3 borked it.

Flameeyes commented 2 years ago

You'll need 0.16.3 for temperature sensors to work fine, and even more so you'll need my #117 for the other sensors to show up properly again.

Try this (from a console on the homeassistant container, if using hassio):

pip uninstall libdyson
pip install --no-cache-dir git+https://github.com/shenxn/libdyson@main

that should do the trick.

monsieurlatte commented 2 years ago

I'm a bit of a noob for that kind of stuff, I run mine in a hyper-v install :D

geekofweek commented 2 years ago

You'll need 0.16.3 for temperature sensors to work fine, and even more so you'll need my #117 for the other sensors to show up properly again.

Try this (from a console on the homeassistant container, if using hassio):

pip uninstall libdyson
pip install --no-cache-dir git+https://github.com/shenxn/libdyson@main

that should do the trick.

@Flameeyes this method works, nice find.

Flameeyes commented 2 years ago

I'm a bit of a noob for that kind of stuff, I run mine in a hyper-v install :D

So for hassio I'm using the Portainer add-on — it allows you to open a console to the homeassistant container from the browser. There you should be able to paste the two commands, and it should work.

monsieurlatte commented 2 years ago

I'm a bit of a noob for that kind of stuff, I run mine in a hyper-v install :D

So for hassio I'm using the Portainer add-on — it allows you to open a console to the homeassistant container from the browser. There you should be able to paste the two commands, and it should work.

I forgot about portainer, that works.

Anto79-ops commented 2 years ago

also got this on HA after updating the Dyson plugin on 2022.4:

Logger: homeassistant.setup
Source: setup.py:162
First occurred: 7:14:20 PM (1 occurrences)
Last logged: 7:14:20 PM

Setup failed for custom integration dyson_local: Unable to import component: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.9/site-packages/libdyson/__init__.py)
Anto79-ops commented 2 years ago

Hi @Flameeyes , my integration also broke when going to 0.16.3 in HACS via HAOS do I simply just type

pip uninstall libdyson
pip install --no-cache-dir git+https://github.com/shenxn/libdyson@main

in the terminal line (via terminal), and should this fix it? thanks

EDIT: I tried the above and it said libdyson skipped because its not installed....then went to the next line and it got stuck in some installation loop (with red writting)...so I ctr +C to stop it and restarted HA, but still Dyson Local is broken. Look forward to a fix or instructions. thanks for your hard work, all.

ghost commented 2 years ago

Same here. I rolled back to 0.16.2 and everything is fine for the moment. Looking forward to getting a fix soon. Thanks!

I rolled back but lost most of my sensors. Do you still have all of yours?

BeHappy2021 commented 2 years ago

Try this solution: https://github.com/shenxn/ha-dyson/issues/119#issuecomment-1091214341

Worked for me on HAOS. Everything working again.

ghost commented 2 years ago

Try this solution: https://github.com/shenxn/ha-dyson/issues/119#issuecomment-1091214341

Worked for me on HAOS. Everything working again.

I will - thanks!

ghost commented 2 years ago

Try this solution: https://github.com/shenxn/ha-dyson/issues/119#issuecomment-1091214341

Worked for me on HAOS. Everything working again.

hmm, I think that comment has been deleted?

sesardelaisla commented 2 years ago

I rolled back but lost most of my sensors. Do you still have all of yours?

You are right. Didn't realize that I also lost many entities because I only have a few o them in my dashboards. I am attaching the full list of entities for your reference, where you can see the ones with "not available" red icon:

dyson

Flameeyes commented 2 years ago

You are right. Didn't realize that I also lost many entities because I only have a few o them in my dashboards. I am attaching the full list of entities for your reference, where you can see the ones with "not available" red icon:

That's possibly because you jumped from a very old version. The auto mode switches are gone for months, replaced by the fan percentage/preset_mode properties. The air quality was replaced by separate sensors.

There's a few other for which I have no context, please open a separate issue for those.

sesardelaisla commented 2 years ago

There's a few other for which I have no context, please open a separate issue for those.

Yup. I will definitely have to clean up some entities. However, I haven't joint this issue discussion because I have some unavailable entities, but because the version 0.16.3 does not load at all. Just put that here for @jchhenderson reference. By the way, @jchhenderson, my apologies if such an screenshot led to any misanderstanding.

As long as the integration is updated eventually with no issues reported, I will do the cleaning afterwards. Once I do so, I will open an issue should it be necessary. Cheers!

BeHappy2021 commented 2 years ago

I think I did the link wrong. I'll try again:

https://github.com/shenxn/ha-dyson/issues/119#issuecomment-1091214341

I found DysonPurifierHumidifyCoolFormaldehyde 6 times from 3 files. Carefully deleted each time, rebooted and all working fine.

ghost commented 2 years ago

That's possibly because you jumped from a very old version.

I went from 0.16.2 to 0.16.3 and back to 0.16.2 and lost 5 entities/fan:

BeHappy2021 commented 2 years ago

I went from 0.16.2 to 0.16.3 and back to 0.16.2 and lost 5 entities/fan:

Same happened to me. Then I did the vs-code fix and all of them have come back.

ghost commented 2 years ago

By the way, @jchhenderson, my apologies if such an screenshot led to any misanderstanding.

no apologies necessary! 👍

Flameeyes commented 2 years ago

Do note for all of you who are editing the source that HACS will fail to update if you have modified source files, and you'll have to remove/re-add for that to work.

I would recommend you attempt the pip commands in https://github.com/shenxn/ha-dyson/issues/115#issuecomment-1090833923 rather.

Anto79-ops commented 2 years ago

Do note for all of you who are editing the source that HACS will fail to update if you have modified source files, and you'll have to remove/re-add for that to work.

I would recommend you attempt the pip commands in #115 (comment) rather.

@Flameeyes Thanks, where do I actually write these pip commands if using HAOS?

Kakise commented 2 years ago

I released v0.16.4 which changes back the libdyson api version from the latest version on GitHub to a tag based one, as it was previously. It should fix the problem.

Sorry for not noticing this problem before, I tried this specific update on a fresh install of home assistant because my old one crashed. So I could not notice it.

arifroni commented 2 years ago

i still get the problem, since v 0.16.4 i get this error randomly, but fixed after a restart. since 2 days, this workaround is also not working.

Logger: homeassistant.setup Source: setup.py:162 First occurred: 07:21:09 (2 occurrences) Last logged: 07:21:26

Setup failed for custom integration dyson_cloud: Unable to import component: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.9/site-packages/libdyson/init.py) Setup failed for custom integration dyson_local: Unable to import component: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.9/site-packages/libdyson/init.py)