Version 0.4.2

* Added config parameter to disable switches/sensors
This commit is contained in:
naofireblade 2017-07-24 19:52:32 +02:00
parent afdff765b0
commit 20e0a9b909
4 changed files with 27 additions and 8 deletions

View File

@ -41,4 +41,8 @@
## 0.4.1
* Added config parameter for extraCareNavigation
* Added config parameter for extraCareNavigation
## 0.4.2
* Added config parameter to disable switches/sensors

View File

@ -45,11 +45,13 @@ Add the following information to your config file. Change the values for email a
### Advanced
The following config contains advanced settings that are disabled when not specified.
The following config contains advanced optional settings that are off when not specified.
The parameter **refresh** adjusts in what interval (seconds) changes of the robot state will be pushed to homekit. The minimum refresh time is 60 seconds. You need this only when you set up rules based on the robot state and start him outside of homekit (e.g. with the Neato app).
The parameter **refresh** sets in what interval (seconds) changes of the robot state will be pushed to homekit. The minimum refresh time is 60 seconds. You need this only when you set up rules based on the robot state and start him outside of homekit (e.g. with the Neato app).
The parameter **extraCareNavigation** determines if supporting models (currently Neato D3 and D5) should take extra care of your furniture while cleaning.
The parameter **extraCareNavigation** sets if supporting models (currently Neato D3 and D5) should take extra care of your furniture while cleaning.
The parameter **disabled** accepts a list of switches/sensors that can be disabled in the neato homekit plugin (e.g. dock, dockstate, eco, schedule).
```json
"platforms": [
@ -58,7 +60,8 @@ The parameter **extraCareNavigation** determines if supporting models (currently
"email": "YourEmail",
"password": "YourPassword",
"refresh": "120",
"extraCareNavigation": true
"extraCareNavigation": true,
"disabled": ["dock", "dockstate", "eco"]
}
]
```
@ -66,6 +69,7 @@ The parameter **extraCareNavigation** determines if supporting models (currently
## Tested robots
- BotVac Connected (Firmware 2.2.0)
- BotVac D3 Connected
- BotVac D5 Connected
If you have another connected neato robot, please [tell me](https://github.com/naofireblade/homebridge-neato/issues) about your experience with this plugin.

View File

@ -17,6 +17,7 @@ function NeatoVacuumRobotPlatform(log, config) {
this.serial = "1-3-3-7";
this.email = config['email'];
this.password = config['password'];
this.hiddenServices = config['disabled'];
this.careNavigation = ('extraCareNavigation' in config && config['extraCareNavigation'] ? 2 : 1);
debug("Extra Care Navigation: " + this.careNavigation);
@ -82,6 +83,7 @@ function NeatoVacuumRobotAccessory(robot, platform) {
this.log = platform.log;
this.refresh = platform.refresh;
this.careNavigation = platform.careNavigation;
this.hiddenServices = platform.hiddenServices;
this.robot = robot;
this.name = robot.name;
this.lastUpdate = null;
@ -139,8 +141,17 @@ NeatoVacuumRobotAccessory.prototype = {
this.vacuumRobotBatteryService.getCharacteristic(Characteristic.BatteryLevel).on('get', this.getBatteryLevel.bind(this));
this.vacuumRobotBatteryService.getCharacteristic(Characteristic.ChargingState).on('get', this.getBatteryChargingState.bind(this));
return [this.informationService, this.vacuumRobotCleanService, this.vacuumRobotGoToDockService, this.vacuumRobotDockStateService, this.vacuumRobotEcoService,
this.vacuumRobotScheduleService, this.vacuumRobotBatteryService];
this.services = [this.informationService, this.vacuumRobotCleanService, this.vacuumRobotBatteryService];
if (this.hiddenServices.indexOf('dock') === -1)
this.services.push(this.vacuumRobotGoToDockService);
if (this.hiddenServices.indexOf('dockstate') === -1)
this.services.push(this.vacuumRobotDockStateService);
if (this.hiddenServices.indexOf('eco') === -1)
this.services.push(this.vacuumRobotEcoService);
if (this.hiddenServices.indexOf('schedule') === -1)
this.services.push(this.vacuumRobotScheduleService);
return this.services;
},
setClean: function (on, callback) {

View File

@ -1,6 +1,6 @@
{
"name": "homebridge-neato",
"version": "0.4.1",
"version": "0.4.2",
"description": "A Neato vacuum robot plugin for homebridge.",
"license": "MIT",
"keywords": [