SimonRice / homebridge-dyson-nu

MIT License
11 stars 10 forks source link

Hot+Cool Link (heat mode) characteristic (Dyson hmod) + Night Mode characteristic (Dyson nmod) + Current/Target Heat Mode Temperature get/set characteristic?? #1

Open leoneleone opened 7 years ago

leoneleone commented 7 years ago

Hello,

Thanks for writing this plugin.

I have two requests regarding integration with Dyson Hot+Cool Link:

  1. Please add control for Dyson hmod = value ? "HEAT" : "COOL" perhaps you could use this Hap-NodeJS characteristic for this: /**
    • Characteristic "Current Heating Cooling State" * + Characteristic "Target Heating Cooling State" /

Characteristic.CurrentHeatingCoolingState = function() { Characteristic.call(this, 'Current Heating Cooling State', '0000000F-0000-1000-8000-0026BB765291'); this.setProps({ format: Characteristic.Formats.UINT8, perms: [Characteristic.Perms.READ, Characteristic.Perms.NOTIFY] }); this.value = this.getDefaultValue(); };

inherits(Characteristic.CurrentHeatingCoolingState, Characteristic);

Characteristic.CurrentHeatingCoolingState.UUID = '0000000F-0000-1000-8000-0026BB765291';

// The value property of CurrentHeatingCoolingState must be one of the following: Characteristic.CurrentHeatingCoolingState.OFF = 0; Characteristic.CurrentHeatingCoolingState.HEAT = 1; Characteristic.CurrentHeatingCoolingState.COOL = 2;

  1. Add Temperature control characteristic get/set for Dyson HotCoolLink Heat Temperature setting.

  2. Also it would be great if you can add control for Dyson "nmod" (NightMode) On/OFF. Dyson nmod is BOOL as simple switch characteristic.on would suffice, but you could also use Characteristic.NightVision which is reserved for the Camera service, but I believe HomeKit to be agnostic regarding adding any Characteristic available in HomeKitTypes.js to any HomeKit Service, the new characteristic will work and show up in Eve.app and perhaps even controlled via Siri Voice Commands.

Thanks again for the plugin. I hope you find the time to make the additions I have suggested :) I'd be happy to do it myself if I was more familiar with the Dyson Link api...

SimonRice commented 7 years ago

Hi @leoneleone,

Thank you very much for the kind words. If I'm honest, I only found this project in an NPM repository, forked it & figured out how to get your correct password.

I personally would find it hard to do points 1-2 because I don't own or have access to a Dyson HotCoolLink appliance. I know some forks of this repo have attempted to do this, & I know this Python repo gives some very useful API pointers.

Night mode however would be a cool thing to have. I'll see what I can come up with.

leoneleone commented 7 years ago

Hey

I've already forked this and added night mode as a switch. Still need to add Heat Mode and Target Temperature.

Let's see what we can come up with 👍🏼

uschen commented 7 years ago

@leoneleone https://github.com/uschen/homebridge-dyson-nu

Krocko commented 7 years ago

@leoneleone can´t install your fork. Got this error

Jun 27 21:01:25 raspberrypi homebridge[5497]: /usr/local/lib/node_modules/homebridge-dyson/index.js:86
Jun 27 21:01:25 raspberrypi homebridge[5497]: .on('get', this.getCurrentTemperature.bind(this));
Jun 27 21:01:25 raspberrypi homebridge[5497]: ^
Jun 27 21:01:25 raspberrypi homebridge[5497]: TypeError: Cannot read property 'bind' of undefined
Jun 27 21:01:25 raspberrypi homebridge[5497]: at CoolLink.initCommonSensors (/usr/local/lib/node_modules/homebridge-dyson/index.js:86:46)
Jun 27 21:01:25 raspberrypi homebridge[5497]: at new CoolLink (/usr/local/lib/node_modules/homebridge-dyson/index.js:17:10)
Jun 27 21:01:25 raspberrypi homebridge[5497]: at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:265:29)
Jun 27 21:01:25 raspberrypi homebridge[5497]: at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:81:38)
Jun 27 21:01:25 raspberrypi homebridge[5497]: at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
Jun 27 21:01:25 raspberrypi homebridge[5497]: at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
Jun 27 21:01:25 raspberrypi homebridge[5497]: at Module._compile (module.js:571:32)
Jun 27 21:01:25 raspberrypi homebridge[5497]: at Object.Module._extensions..js (module.js:580:10)
Jun 27 21:01:25 raspberrypi homebridge[5497]: at Module.load (module.js:488:32)
Jun 27 21:01:25 raspberrypi homebridge[5497]: at tryModuleLoad (module.js:447:12)
Jun 27 21:01:25 raspberrypi homebridge[5497]: at Function.Module._load (module.js:439:3)
Jun 27 21:01:25 raspberrypi homebridge[5497]: at Module.runMain (module.js:605:10)
Jun 27 21:01:25 raspberrypi homebridge[5497]: at run (bootstrap_node.js:427:7)
Jun 27 21:01:25 raspberrypi homebridge[5497]: at startup (bootstrap_node.js:151:9)
Jun 27 21:01:25 raspberrypi homebridge[5497]: at bootstrap_node.js:542:3
JotWee commented 7 years ago

@leoneleone @simonrice @Krocko @uschen Integration into npm or a description of how to install the plugin would be appreciated

Krocko commented 7 years ago

@JotWee: sudo npm install-g "github link to the fork"

Example: sudo npm install -g https://github.com/uschen/homebridge-dyson-nu

JotWee commented 7 years ago

@Krocko thank you very much. Didn’t know it was that easy.

JotWee commented 7 years ago

I installed it and it runs perfectly, but there is no Night Mode switch in https://github.com/uschen/homebridge-dyson-nu

JotWee commented 7 years ago

hey guys, in case you are still interested: i updated the pure cool link with the new fanv2 service and added night switch. https://github.com/JotWee/homebridge-dyson-nu