joe-ng / homebridge-dyson-link

MIT License
206 stars 40 forks source link

HP04 support #76

Open joppuyo opened 5 years ago

joppuyo commented 5 years ago

I got one of these new HP04 fan heaters which is the same as DP04 but has support for heating in addition to cooling.

I got it working by adding device id 527 to heatAvailable method. It otherwise works fine with this plugin except you are not able to turn it on or off using HomeKit and setting target temperature does not work.

When setting heating target, HomeBridge sends hmax attribute and refreshes the device state, but hmax from the device retains the previous value.

Is there any way to debug what MQTT commands the Dyson app is sending? I tried using Wireshark but was not able see any MQTT packets being sent 😢

joppuyo commented 5 years ago

Ok, I've got setting the temperature working in my fork. Seems like you need to cast hmax attribute to string, otherwise it will not work on HP04.

I still need to figure out what's preventing the on/off functionality

joppuyo commented 5 years ago

Looks like 2018 models send a different command for turning fan on and off, I solved this by adding 527 to Is2018Dyson method.

joppuyo commented 5 years ago

Created pull request #78

patpatmok commented 5 years ago

I had installed the latest Homebridge-dyson-link for HP04, It works for fan speed adjustment, temperature, filter life, air quality and humidity detection, however, it cannot turns on/off the fan, when I adjust the fan speed to off in ‘Home’ app, the fan changes to speed ‘1’, not turn off the fan.

Do I missing anything? Could you help to have a look at this issue?

My Devices: Dyson HP04 iPhone iOS 12.1.3 Homebridge Version 0.4.46 running on Synology NAS Docker

patpatmok commented 5 years ago

I had installed the latest Homebridge-dyson-link for HP04, It works for fan speed adjustment, temperature, filter life, air quality and humidity detection, however, it cannot turns on/off the fan, when I adjust the fan speed to off in ‘Home’ app, the fan changes to speed ‘1’, not turn off the fan.

Do I missing anything? Could you help to have a look at this issue?

My Devices: Dyson HP04 iPhone iOS 12.1.3 Homebridge Version 0.4.46 running on Synology NAS Docker

It works now

HammerAce42 commented 5 years ago

@joppuyo, I manually installed your fork by overwriting the files in the homebridge directory since I got an HP04 (and couldn't get npm installation of a fork to work on my Pi). Various controls and readouts for the new device show-up, but I am not able to control temperature through Homekit, unlike the previous Hot + Cool Link devices I have.

Incidentally, the Dyson app now reports that due to UL 1278 compliance heating and temperature control are not available and to use the physical remote control instead. Hopefully this is not something that would prevent temperature control via Homekit control, else will have to return the device given my use case is almost exclusively for home automation.

HammerAce42 commented 5 years ago

Disregard - it looks like I overwrote the files in a wrong/unused location. Everything seems to work now, but I fear that Dyson will disable temperature controls via whatever API this plugin is using, rendering the device useless to me at some point after the return policy expires.

Thoughts on how likely that is to happen?

joppuyo commented 5 years ago

I haven't run into the same problem with the plugin. Did you get the temperature controls working again via the app? Or the plugin? You could always try to reset the fan to factory settings if you get that error message.

HammerAce42 commented 5 years ago

The temperature controls are now working in Homekit. The app still reports the same UL 1278 message when trying to manipulate the heat settings, and speaking to Dyson, it seems like that is by design.

joppuyo commented 5 years ago

Looks like Dyson might have pushed a firmware update to prevent heating control over the app due to some safety standards issue: https://www.dyson.com/support/journey/troubleshooting/244314-01.html#HP04_PERFORMANCE,HP04_USNOHEATAPP

I googled the standard and it might have something to do if Dyson can't provide setting for disabling the remote control or detecting movement, but I'm just guessing here. https://i.imgur.com/fU3sHSy.png

Seems like a US only thing, wonder if you reset the heater and select Canada for example, does it still restrict you from using the heater controls?

octaviz commented 5 years ago

Hi, I have too the new Dyson HP04 purifier and with this plugin I can not get it working, all the buttons appear in the iOS App Home but no button obeys, you press it and nothing happens, someone has the solution? the JSON code seems to be correct since it detects it well.

joppuyo commented 5 years ago

Hey @octaviz , did you try this plugin (https://github.com/joe-ng/homebridge-dyson-link) or my fork with HP04 support (https://github.com/joppuyo/homebridge-dyson-link/tree/hp04-support).

Please note that you cannot install the fork using npm but you have to install it manually by downloading the zipped file and installing node_modules dependencies with npm install (or just install the original plugin and replace the files from the forked version.)

octaviz commented 5 years ago

Hi, I have already tested the files of your fork and the same thing happens to me, I see the buttons but they do not pay attention to me, I have a homebridge in a docker of my NAS, the rest of the devices that I have configured go very well, it could be due to a problem of my JSON code? , is this:

{ "platform": "DysonPlatform", "name": "DysonPlatform", "email": "xxxxx@gmail.com", "password": "**********", "country": "ES", "accessories": [ { "ip": "192.168.3.85", "displayName": "Purificador", "serialNumber": "A1B-EU-XXXXXXXX-527", "password": "*********." } ] }, Attachment photo home App buttons 27B2D3B9-7C14-4CFD-9CAD-CCBD91CFC0BC

Thanks

joppuyo commented 5 years ago

Hey, if you installed the regular version first and then the forked one after that, the old accessories might be cached in the system. In this case I recommend you to shut down homebridge, delete persist and accessories folders, delete homebridge from home app on your iphone, start homebridge and add homebridge to your iphone again.

Your json looks good. But since you are using 2018 model, you don't need password in the accessory array so you can just remove it. Authentication is handled with the dyson account.

Hope this helps!

octaviz commented 5 years ago

Hi! I've already made it work, but there are many buttons that do not do anything, right? The turn on and turn off works, the fan speed, humidity indicator, etc ...

Thank you very much for your help!

takamasa-arch commented 5 years ago

Hi, joppuyo

Great works! This is what i want to have it because I was hesitating to purchase hp04 due to lack of homekit support. Could you confirm that your folks supports to get temperature/humidity/VOC/etc and those value can be triggered to other homekit accessories?

joppuyo commented 5 years ago

IMG_1360 It looks like this, at least to me. I have some automations that depend on the temperature and air quality and at least those work fine to me.

joppuyo commented 5 years ago

The only problem that I have that if I manually overwrite the files in node_modules with the forked version, they will revert to initial state after a couple of days.

That's why I hope my PR will get merged soon so we can have HP04 support in the npm version.

takamasa-arch commented 5 years ago

Thanks for reply, joppuyo. How about humidity? Can get this? Since it seems you don't use humidity in your screen.

I'm not familiar for npm management but why don't you create independent new npm package for dyson link hp04 capable?

joppuyo commented 5 years ago

Humidity is the center square, with 41% percent and it's working fine

I think HP04 compatibility should be part of this plugin so I'm not eager to release another version on npm. So I'm hoping that @joe-ng would be able to merge this PR sometime soon!

takamasa-arch commented 5 years ago

Indeed. Let's wait @joe-ng 's to merge your forks into master.

mrowlinson commented 5 years ago

Also looking forward to @joe-ng merging this. Just got my HP04 yesterday and didn’t even consider the fact it might not be supported yet. Can’t come soon enough so I can control this heat on it from my phone since Dyson so annoyingly disabled it in the app.

joe-ng commented 5 years ago

thanks everyone who worked on this! i have merged the recent PRs let us know if that works for you

mrowlinson commented 5 years ago

Would it be possible to break the heater controller out into a separate accessory? Or at least make it an option? I'd like to have an accessory that is just the room temperature like you get with the non-heater fans.

mrowlinson commented 5 years ago

I also noticed a bug where the heat setting keeps looking like it’s on with a set temperature of null. You can manually set it to off and it’ll stay that way for about 10 minutes or so, then go back to on and null.

https://i.imgur.com/pu9q7Hg.jpg

jptoucas commented 5 years ago

I also noticed a bug where the heat setting keeps looking like it’s on with a set temperature of null. You can manually set it to off and it’ll stay that way for about 10 minutes or so, then go back to on and null.

https://i.imgur.com/pu9q7Hg.jpg

Same for me !

ekimia commented 4 years ago

any update on merging this? I can help if needed