shenxn / ha-dyson

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

{"message":"Invalid handler specified"} #173

Open giushd opened 1 year ago

giushd commented 1 year ago

Please help me, when i launch Dyson cloud i receive this message Italian language :

Impossibile caricare il flusso di configurazione: {"message":"Invalid handler specified"}

giushd commented 1 year ago

the same Dyson local Config flow could not be loaded: {“message”:“Invalid handler specified”}

derDeno commented 1 year ago

same over here for both

derDeno commented 1 year ago

Error log says

Error occurred loading configuration flow for integration dyson_cloud: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.10/site-packages/libdyson/__init__.py)

giushd commented 1 year ago

Are u sure to have DysonPurifierHumidifyCoolFormaldehyde ? i have hp06 (formaaldeide) but dosn't work. .. i chose simply hot+cool and it work.

giushd commented 1 year ago

Solved. Config flow could not be loaded: {“message”:“Invalid handler specified”}

nimitiz86 commented 1 year ago

{"message":"Invalid handler specified"}

Ciao, ho visto la tua soluzione ma non mi è molto chiara, potresti aiutarmi?

grazie

giushd commented 1 year ago

Ciao, se posso volentieri Cosa non ti è chiaro?

nimitiz86 commented 1 year ago

Ciao, se posso volentieri Cosa non ti è chiaro?

Intanto grazie per la risposta :) Brevemente ho fatto una installazione del HACS e tutto ok, poi quando ho fatto il nuovo aggiornamento di HA mi ha dato quell'errore che ha dato pure a te. Per risolverlo ho dovuto caricare un Backup.

Ora non credo farò l'aggiornamento.

giushd commented 1 year ago

Ciao, quell'errore a me lo ha dato quando ho installato il modulo per il Dyson. L'aggiornamento dell' HACS era invece andato a buon fine. Ora ho anche io diversi aggiornamenti pendenti ma... visto che ora funziona tutto .. non tocco nulla :)

BerlinBased commented 1 year ago

Similar issues with Dyson local and Dyson cloud.

After adding and downloading the integrations https://github.com/shenxn/ha-dyson and https://github.com/shenxn/ha-dyson-cloud, I tried to configure Dyson local or cloud but the following error appeared:

The Config flow could not be loaded: {“message”:“Invalid handler specified”}

This is the HA logfile about the issue:

Logger: homeassistant.config_entries Source: config_entries.py:834 First occurred: 10:16:01 (2 occurrences) Last logged: 10:16:06

Error occurred loading configuration flow for integration dyson_cloud: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.10/site-packages/libdyson/init.py) Error occurred loading configuration flow for integration dyson_local: cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson' (/usr/local/lib/python3.10/site-packages/libdyson/init.py)

GitPetri commented 1 year ago

Similar issues with Dyson local and Dyson cloud.

After adding and downloading the integrations https://github.com/shenxn/ha-dyson and https://github.com/shenxn/ha-dyson-cloud, I tried to configure Dyson local or cloud but the following error appeared:

Dyson cloud is not actively updated and it messes things up: image

TerrorSource commented 1 year ago

Solved. Config flow could not be loaded: {“message”:“Invalid handler specified”}

  • Deleted integrations in hack.
  • Deleted directories in custom component (with terminal).
  • Restart Home Assistant.
  • Used terminal (python3 get_devices.py) to discover serial credential etc... initially it didn't work because I had disconnected the account from the mobile phone.
  • I logged in with my phone, ran python3 get_devices.py again and it worked.
  • In home assistant I only installed the hacs dyson local component.
  • Restarted home assistant
  • Launch dyson local and it worked choosing dyson hot+cool (i have hp06)

Looks like this is working but not for me, i have a TP09.

kevchu3 commented 1 year ago

I had a similar issue, not exactly the same but perhaps my solution may help here. I tried to use the latest source code from the main branch and encountered this error when attempting to load dyson_local:

Error occurred loading configuration flow for integration dyson_local: No module named 'libdyson'

I did a little digging and found that this commit was implemented a while back, and decided to implement the referenced libdyson Github code in the requirements field as follows:

    "requirements": ["libdyson@git+https://github.com/shenxn/libdyson@main"],

The full manifest.json was this, and this worked for me:

# cat manifest.json 
{
    "domain": "dyson_local",
    "name": "Dyson Local",
    "config_flow": true,
    "documentation": "https://github.com/shenxn/ha-dyson",
    "issue_tracker": "https://github.com/shenxn/ha-dyson/issues",
    "dependencies": ["zeroconf"],
    "codeowners": ["@shenxn"],
    "requirements": ["libdyson@git+https://github.com/shenxn/libdyson@main"],
    "version": "0.16.4-4",
    "iot_class": "local_polling"
}
AlxSZP commented 1 year ago

Here's also another solution I found:

I found a solution, buried in this thread: https://github.com/shenxn/libdyson/pull/32#issuecomment-1399591550 @javemp wrote it, I followed it and now it's working: to get this working:

  1. fully uninstall existing integration and restart ha
  2. reinstall the integration from hacs (do not restart ha yet) and modify your manifest.json file to change: “requirements”: [“libdyson==0.8.11”] to: “requirements": ["git+https://github.com/jezzab/libdyson.git@main#libdyson==0.9.0"],
  3. restart ha and install integration as per normal, you should now see purifier cool in the list of devices

huge thanks to @jezzab for his work

TerrorSource commented 1 year ago

Here's also another solution I found:

I found a solution, buried in this thread: shenxn/libdyson#32 (comment) @javemp wrote it, I followed it and now it's working: to get this working:

  1. fully uninstall existing integration and restart ha
  2. reinstall the integration from hacs (do not restart ha yet) and modify your manifest.json file to change: “requirements”: [“libdyson==0.8.11”] to: “requirements": ["git+https://github.com/jezzab/libdyson.git@main#libdyson==0.9.0"],
  3. restart ha and install integration as per normal, you should now see purifier cool in the list of devices

huge thanks to @jezzab for his work

Looks promising except that i have a Hot+Cool+Formaldehyde and that one isn't shown, even with this trick

bgalakazam commented 1 year ago

Adding “requirements": ["git+https://github.com/jezzab/libdyson.git@main#libdyson==0.9.0"], fixed this for me. I was able to use it for the cloud as well, log in, then add the local entity and delete cloud.

Any plans on making that the main lib?

dotvezz commented 1 year ago

Unfortunately this integration is no longer maintained, but I've created a new fork and am actively working on the new Formaldehyde models. Have a look at #185 for more information, and let me know if you have any questions.

The new repos incorporate the 0.9.0 version and a few more recent Pull Requests for expanded device support.