ha-dyson icon indicating copy to clipboard operation
ha-dyson copied to clipboard

{"message":"Invalid handler specified"}

Open giushd opened this issue 2 years ago • 17 comments

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 avatar Dec 05 '22 17:12 giushd

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

giushd avatar Dec 05 '22 17:12 giushd

same over here for both

derDeno avatar Dec 06 '22 22:12 derDeno

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)

derDeno avatar Dec 06 '22 23:12 derDeno

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

giushd avatar Dec 07 '22 12:12 giushd

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)

giushd avatar Dec 07 '22 12:12 giushd

{"message":"Invalid handler specified"}

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

grazie

nimitiz86 avatar Dec 19 '22 22:12 nimitiz86

Ciao, se posso volentieri Cosa non ti è chiaro?

giushd avatar Dec 20 '22 14:12 giushd

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.

nimitiz86 avatar Dec 22 '22 11:12 nimitiz86

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 :)

giushd avatar Dec 22 '22 11:12 giushd

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)

BerlinBased avatar Dec 27 '22 09:12 BerlinBased

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

GitPetri avatar Dec 27 '22 11:12 GitPetri

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.

TerrorSource avatar Jan 06 '23 22:01 TerrorSource

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"
}

kevchu3 avatar Jan 25 '23 03:01 kevchu3

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

AlxSZP avatar Jan 30 '23 18:01 AlxSZP

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

TerrorSource avatar Jan 30 '23 22:01 TerrorSource

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?

bgalakazam avatar Feb 09 '23 17:02 bgalakazam

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.

dotvezz avatar Mar 14 '23 15:03 dotvezz