auchenberg / dyson-purelink

Control Dyson PureLink fan/purifier devices from JavaScript
39 stars 10 forks source link

2018 models don't work #2

Closed lenwar closed 5 years ago

lenwar commented 6 years ago

Hi, I own a 2018 model of the Dyson Cool (standing air purifier). The js files don't find the device. I did some inital research and found that my device uses another identification number. It uses 438 rather than 475. I tried to simply replace the 475 with 438 but that didn't suffice so probably something else is going wrong too.

I found the 438 with a tcpdump (( it propagates itself via MDNS ))

I am obviously no programmer but if you need any specific info I can send you it. (is the tcpdump of any value?)

elisaado commented 6 years ago

Same here, although sometimes I am able to find the device, and to get values but I am never able to set values (e.g. turn the fan on or off).

auchenberg commented 6 years ago

Would be interesting to see if you get the correct devices from the Dyson cloud in https://github.com/auchenberg/dyson-purelink/blob/master/index.js#L24.

I don't have the newer hardware, so it's a bit hard for me to debug ;/

elisaado commented 6 years ago

I found that it does work when you retry a lot, also some of the field names have changed (fmod => fpwr, and more)

(The devices do show up in the cloud and also in the bonjour discovery thingy)

SkorpionNL commented 6 years ago

As I read here, TS found out that Dyson changed the API for the 2018 models.

https://github.com/athombv/homey/issues/2745

lenwar commented 6 years ago

Hi,

I found a fork who worked on it, and has at least some functionality working: https://github.com/fabdrol/dyson-purelink/tree/use-v2-endpoint-for-devices

I also found a Python implementation that works completely (I tested this some time ago) https://github.com/etheralm/libpurecoollink

auchenberg commented 6 years ago

Opened a @lenwar from https://github.com/auchenberg/dyson-purelink/pull/3

Does that branch/fork work with your new devices?

lenwar commented 6 years ago

Hi,

First off. I know absolutely nothing of nodejs. I finally figured out to execute the .js scipts :smile: I managed to execute a test-script (the example.js that was provided)

That works for 'reading' the status:

pi@calpernia:~/dysontest/nooh $ nodejs example
getFanStatus true
getFanSpeed AUTO
getRotationStatus true
getAutoOnStatus true
setRotation true
setFanSpeed AUTO
getTemperature 24.65
getAirQuality 5
getRelativeHumidity 52

When trying to give it actions (stop oscilating or turn it off) it does nothing. It 'hangs'. I'm not sure how I can activate debugging or where it logs anything.

elisaado commented 6 years ago

@lenwar You can use DEBUG=* node file.js (or nodejs instead of node) (on linux)