11 Commits

Author SHA1 Message Date
naofireblade
ad41c1679d Version 0.4.6
* Added error log while refreshing robot state
* Fixed a rare bug where the robot stops after some seconds of cleaning
2017-12-10 13:14:12 +01:00
naofireblade
89f6f233a5 Added errorlog while refreshing robot state 2017-10-15 19:34:02 +02:00
naofireblade
88f217e2b1 Version 0.4.5
* Fixed compatibility with homebridge 0.4.23 (occupancy sensor not
working)
2017-09-04 00:13:44 +02:00
naofireblade
2fec762498 Version 0.4.4
* Fixed config parameter to disable switches/sensors not optional
2017-07-25 08:54:52 +02:00
naofireblade
857af55e99 Version 0.4.3
* Fixed config parameter to disable switches/sensors not optional
2017-07-25 08:52:17 +02:00
naofireblade
20e0a9b909 Version 0.4.2
* Added config parameter to disable switches/sensors
2017-07-24 19:52:32 +02:00
Arne
afdff765b0 Wording 2017-06-07 10:51:14 +02:00
Arne
dcef6653ff Wording 2017-06-07 10:50:44 +02:00
Arne
82bf19c548 Wording 2017-06-07 10:48:46 +02:00
Arne
1084bff0ee Wording 2017-06-07 10:48:11 +02:00
Arne
5aa66835dd Wording 2017-06-07 10:47:01 +02:00
4 changed files with 58 additions and 21 deletions

View File

@@ -41,4 +41,21 @@
## 0.4.1
* Added config parameter for extraCareNavigation
* Added config parameter for extraCareNavigation
## 0.4.2
* Added config parameter to disable switches/sensors
## 0.4.4
* Fixed config parameter to disable switches/sensors not optional
## 0.4.5
* Fixed compatibility with homebridge 0.4.23 (occupancy sensor not working)
## 0.4.6
* Added error log while refreshing robot state
* Fixed a rare bug where the robot stops after some seconds of cleaning

View File

@@ -4,9 +4,9 @@ This is a plugin for [homebridge](https://github.com/nfarina/homebridge) to cont
Feel free to leave any feedback [here](https://github.com/naofireblade/homebridge-neato/issues).
If you update from a previous version 0.3.x you have to adapt your config.
If you update from a previous version 0.3.x you have to adapt your config (plugin is now a platform).
# Features
## Features
- Start and pause cleaning
- Return to dock\*
@@ -20,18 +20,18 @@ If you update from a previous version 0.3.x you have to adapt your config.
\* Available after some seconds of cleaning.
# Installation
## Installation
1. Install homebridge using: `npm install -g homebridge`
2. Install this plugin using: `npm install -g homebridge-neato`
3. If you don't have a Neato account yet create one [here](https://www.neatorobotics.com/create-account/).
4. Update your configuration file. See the sample below.
### Configuration
## Configuration
Add the following information to your config file. Change the values for name, email and password.
Add the following information to your config file. Change the values for email and password.
#### Simple
### Simple
```json
"platforms": [
@@ -43,13 +43,15 @@ Add the following information to your config file. Change the values for name, e
]
```
The following config contains optional settings that are disabled when not specified.
### Advanced
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 following config contains advanced optional settings that are off when not specified.
The parameter **extraCareNavigation** determines if supporting models (currently Neato D3 and D5) take extra care of your furniture while cleaning.
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).
#### Advanced
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,14 +60,16 @@ The parameter **extraCareNavigation** determines if supporting models (currently
"email": "YourEmail",
"password": "YourPassword",
"refresh": "120",
"extraCareNavigation": true
"extraCareNavigation": true,
"disabled": ["dock", "dockstate", "eco"]
}
]
```
# Tested robots
## Tested robots
- BotVac Connected (Firmware 2.2.0)
- BotVac D5 Connected
- BotVac D3 Connected
- BotVac D5 Connected (Firmware 3.2.0-305)
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 = ('disabled' in config ? 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) {
@@ -249,7 +260,7 @@ NeatoVacuumRobotAccessory.prototype = {
let that = this;
this.updateRobot(function (error, result) {
debug(that.name + ": Is docked: " + that.robot.isDocked);
callback(false, that.robot.isDocked);
callback(false, that.robot.isDocked ? 1 : 0);
});
},
@@ -292,6 +303,10 @@ NeatoVacuumRobotAccessory.prototype = {
else {
debug(this.name + ": Update (online)");
this.robot.getState(function (error, result) {
if (error) {
that.log.error("Error while updating robot state.");
that.log.error(error);
}
that.lastUpdate = new Date();
callback();
});
@@ -308,8 +323,9 @@ NeatoVacuumRobotAccessory.prototype = {
that.vacuumRobotCleanService.setCharacteristic(Characteristic.On, that.robot.canPause);
}
if (that.vacuumRobotGoToDockService.getCharacteristic(Characteristic.On).value !== !that.robot.dockHasBeenSeen) {
that.vacuumRobotGoToDockService.setCharacteristic(Characteristic.On, !that.robot.dockHasBeenSeen);
// dock switch is on (dock not seen before) and dock has just been seen -> turn switch off
if (that.vacuumRobotGoToDockService.getCharacteristic(Characteristic.On).value == true && that.robot.dockHasBeenSeen) {
that.vacuumRobotGoToDockService.setCharacteristic(Characteristic.On, false);
}
if (that.vacuumRobotScheduleService.getCharacteristic(Characteristic.On).value !== that.robot.isScheduleEnabled) {
@@ -317,7 +333,7 @@ NeatoVacuumRobotAccessory.prototype = {
}
// no commands here, values can be updated without problems
that.vacuumRobotDockStateService.setCharacteristic(Characteristic.OccupancyDetected, that.robot.isDocked);
that.vacuumRobotDockStateService.setCharacteristic(Characteristic.OccupancyDetected, that.robot.isDocked ? 1 : 0);
that.vacuumRobotBatteryService.setCharacteristic(Characteristic.BatteryLevel, that.robot.charge);
that.vacuumRobotBatteryService.setCharacteristic(Characteristic.ChargingState, that.robot.isCharging);

View File

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