Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Dyson integration returns failed to connect #94

Open
HuguesD opened this issue Jan 22, 2022 · 15 comments
Open

Local Dyson integration returns failed to connect #94

HuguesD opened this issue Jan 22, 2022 · 15 comments
Assignees
Labels
bug Something isn't working

Comments

@HuguesD
Copy link

HuguesD commented Jan 22, 2022

I do not succeed to make the local Dyson integration work. I have retrieved the device credentials and serial number from the python script ok.
But in the integration UI, after entering serial number, credential and device type, it show failed to connect.

My device type is 438E (it is a TP09 purifier formaldehyde). Isn't this device type supported ?

@MarcusKapun
Copy link

Same issue here, but with Cool + Humidify device.

@Fulg
Copy link

Fulg commented Feb 9, 2022

Same here with a PH03 (device type 358E, sadly the same as PH04). If I enable the debug log in HA for this integration, this is what I get (serial number redacted):

...
2022-02-09 13:49:46 DEBUG (Thread-8) [libdyson.dyson_device] Connected with result code 0
2022-02-09 13:49:46 INFO (MainThread) [libdyson.dyson_device] Connected to device xxx-CA-xxxxxxxx
2022-02-09 13:49:46 DEBUG (Thread-8) [libdyson.dyson_device] Disconnected with result code 7
2022-02-09 13:49:48 DEBUG (Thread-8) [libdyson.dyson_device] Connected with result code 0
2022-02-09 13:49:48 DEBUG (Thread-8) [libdyson.dyson_device] Disconnected with result code 7
2022-02-09 13:49:50 DEBUG (Thread-8) [libdyson.dyson_device] Connected with result code 0
2022-02-09 13:49:50 DEBUG (Thread-8) [libdyson.dyson_device] Disconnected with result code 7
2022-02-09 13:49:51 DEBUG (Thread-8) [libdyson.dyson_device] Connected with result code 0
2022-02-09 13:49:51 DEBUG (Thread-8) [libdyson.dyson_device] Disconnected with result code 7
2022-02-09 13:49:53 DEBUG (Thread-8) [libdyson.dyson_device] Connected with result code 0
2022-02-09 13:49:53 DEBUG (Thread-8) [libdyson.dyson_device] Disconnected with result code 7
2022-02-09 13:49:54 DEBUG (Thread-8) [libdyson.dyson_device] Connected with result code 0
2022-02-09 13:49:54 DEBUG (Thread-8) [libdyson.dyson_device] Disconnected with result code 7
2022-02-09 13:49:56 DEBUG (Thread-8) [libdyson.dyson_device] Connected with result code 0
2022-02-09 13:49:56 DEBUG (Thread-8) [libdyson.dyson_device] Disconnected with result code 7
2022-02-09 13:49:58 DEBUG (Thread-8) [libdyson.dyson_device] Connected with result code 0
2022-02-09 13:49:58 DEBUG (Thread-8) [libdyson.dyson_device] Disconnected with result code 7
2022-02-09 13:50:00 DEBUG (Thread-8) [libdyson.dyson_device] Connected with result code 0
2022-02-09 13:50:00 DEBUG (Thread-8) [libdyson.dyson_device] Disconnected with result code 7
2022-02-09 13:50:02 DEBUG (Thread-8) [libdyson.dyson_device] Connected with result code 0
2022-02-09 13:50:02 DEBUG (Thread-8) [libdyson.dyson_device] Disconnected with result code 7
2022-02-09 13:50:03 DEBUG (Thread-8) [libdyson.dyson_device] Connected with result code 0
2022-02-09 13:50:03 DEBUG (Thread-8) [libdyson.dyson_device] Disconnected with result code 7
2022-02-09 13:50:05 DEBUG (Thread-8) [libdyson.dyson_device] Connected with result code 0
2022-02-09 13:50:05 DEBUG (Thread-8) [libdyson.dyson_device] Disconnected with result code 7
2022-02-09 13:50:06 DEBUG (Thread-8) [libdyson.dyson_device] Connected with result code 0
2022-02-09 13:50:06 DEBUG (Thread-8) [libdyson.dyson_device] Disconnected with result code 7
2022-02-09 13:50:07 DEBUG (MainThread) [custom_components.dyson_local.config_flow] Failed to connect to device:
...

Note that there is nothing after the "failed to connect" message, I did not cut off the message (and I did specify the fan's IP address explicitly, but not putting an address changes nothing to the log output). I looked at the libdyson source but I haven't figured out what return code 7 might be yet.

@t0ny-peng
Copy link

@Fulg I'm seeing exactly the same error as yours.

@sersol-ai
Copy link

Same thing, failed to connect, Device Type: 358E, Dyson Purifier Humidify + Cool, 2021 MY. MQTT port 1883 seems to be open on the device IP.

@Kakise Kakise added the bug Something isn't working label Apr 8, 2022
@Kakise Kakise self-assigned this Apr 8, 2022
@LunchboxNYC
Copy link

I hate to pile on but experiencing the same issue, have them working in Homebridge, but get this error when I try and set them up in HA using this plugin.

@Anto79-ops
Copy link

Anto79-ops commented Apr 10, 2022

I believe the issue for discussion here is that the OP cannot get his Dyson Pure Hot+Cool Formaldehyde (TP09) to integrate with the new version of the script. If so, I have the same issue, with my TP09 purifier formaldehyde (Dyson Pure Hot+Cool Formaldehyde). With the right credentials and password and the latest version that supports the machine: when I press submit, I get failed to connect, and even after pressing it multiple times (> 20).

If I may add however, when I change the machine type Dyson Pure Hot + Cool (New), it works on the first submit. So, at the moment, I’m using this configuration for my formaldehyde machine.

@GitPetri
Copy link

Same here with a PH03 (device type 358E, sadly the same as PH04). If I enable the debug log in HA for this integration,

I managed to configure my 358E with the latest Dyson Local which has new enough libdyson to include 358E.
If both Dyson Local and Dyson Cloud are installed, at least in my setup it messes up the configurations as the libdyson version differs between Dyson Local and Dyson Cloud.
See #103 (comment)

@LunchboxNYC
Copy link

I am having the issue with a PH02 and two PH04's

@GitPetri
Copy link

I am having the issue with a PH02 and two PH04's

@LunchboxNYC did you test the steps linked to my previous comment?

@Fulg
Copy link

Fulg commented Apr 13, 2022

No change for me using latest Dyson Local (I did have Dyson Cloud installed, so I removed both and only reinstalled Dyson Local). I still have the debug logs activated so I see the same errors as before (Disconnected with result code 7), regardless of the machine type I use. I have confirmed in the logs that I only have the newer libdyson installed: Attempting install of libdyson==0.8.11.

Maybe I need to wipe it out further, ensure nothing is left before trying again...

@GitPetri
Copy link

GitPetri commented Apr 13, 2022

I do know that selecting incorrect machine type will end up in fail. So picking up the correct based on https://github.com/shenxn/libdyson/blob/7b19d1c96c151eb876d8d8fbb3a4d5f2917b86b3/libdyson/const.py#L4 is crucial too

@GitPetri
Copy link

No change for me using latest Dyson Local (I did have Dyson Cloud installed, so I removed both and only reinstalled Dyson Local). I still have the debug logs activated so I see the same errors as before (Disconnected with result code 7), regardless of the machine type I use. I have confirmed in the logs that I only have the newer libdyson installed: Attempting install of libdyson==0.8.11.

Maybe I need to wipe it out further, ensure nothing is left before trying again...

Had the same result myself for my 520 device but it was a S.U.E. i.e. Stupid User Error, I selected the machine type off-by-one from the libdyson list (link in my previous comment)

@Fulg
Copy link

Fulg commented Apr 13, 2022

Ha, thanks for writing back. Indeed after confirming that my PH03 (358E) machine is listed as Purifier Humidify+Cool Formaldehyde in libdyson and not Pure Humidify+Cool as on the product box, if I select that in the drop down, the integration works! S.U.E. indeed. :)

@LunchboxNYC
Copy link

LunchboxNYC commented Apr 13, 2022 via email

@Fulg
Copy link

Fulg commented Apr 13, 2022

The correct device type to use is the one shown during the get_devices.py. Use whatever name that maps to the Device Type line that was printed during credentials generation. Looks like the actual product name or model number is not useful...

EDIT: It might also be worth confirming in the HA logs that the correct libdyson got installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants