Version 0.4.1
* Added config parameter for extraCareNavigation
This commit is contained in:
parent
bfb03b5d5d
commit
08ef90f7b0
@ -38,3 +38,7 @@
|
||||
* Added log output when user requests accessory identify
|
||||
* Changed plugin to platform instead of single accessory
|
||||
* Removed parameter name from config
|
||||
|
||||
## 0.4.1
|
||||
|
||||
* Added config parameter for extraCareNavigation
|
28
README.md
28
README.md
@ -4,7 +4,7 @@ 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 you have to adapt your config.
|
||||
If you update from a previous version 0.3.x you have to adapt your config.
|
||||
|
||||
# Features
|
||||
|
||||
@ -16,11 +16,10 @@ If you update from a previous version you have to adapt your config.
|
||||
- Get dock info
|
||||
- Periodic refresh of robot state
|
||||
- Support for multiple robots
|
||||
- Extra care navigation
|
||||
|
||||
\* Available after some seconds of cleaning.
|
||||
|
||||
**Hint:** To control the robot with your own commands just set up a scene with the name of your choice.
|
||||
|
||||
# Installation
|
||||
|
||||
1. Install homebridge using: `npm install -g homebridge`
|
||||
@ -32,7 +31,25 @@ If you update from a previous version you have to adapt your config.
|
||||
|
||||
Add the following information to your config file. Change the values for name, email and password.
|
||||
|
||||
The parameter **refresh** is optional (default 0=off) and 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).
|
||||
#### Simple
|
||||
|
||||
```json
|
||||
"platforms": [
|
||||
{
|
||||
"platform": "NeatoVacuumRobot",
|
||||
"email": "YourEmail",
|
||||
"password": "YourPassword"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
The following config contains optional settings that are disabled 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 **extraCareNavigation** determines if supporting models (currently Neato D3 and D5) take extra care of your furniture while cleaning.
|
||||
|
||||
#### Advanced
|
||||
|
||||
```json
|
||||
"platforms": [
|
||||
@ -40,7 +57,8 @@ The parameter **refresh** is optional (default 0=off) and adjusts in what interv
|
||||
"platform": "NeatoVacuumRobot",
|
||||
"email": "YourEmail",
|
||||
"password": "YourPassword",
|
||||
"refresh": "0"
|
||||
"refresh": "120",
|
||||
"extraCareNavigation": true
|
||||
}
|
||||
]
|
||||
```
|
||||
|
8
index.js
8
index.js
@ -18,6 +18,9 @@ function NeatoVacuumRobotPlatform(log, config) {
|
||||
this.email = config['email'];
|
||||
this.password = config['password'];
|
||||
|
||||
this.careNavigation = ('extraCareNavigation' in config && config['extraCareNavigation'] ? 2 : 1);
|
||||
debug("Extra Care Navigation: " + this.careNavigation);
|
||||
|
||||
// default off
|
||||
this.refresh = ('refresh' in config ? parseInt(config['refresh']) : 0);
|
||||
// must be integer and positive
|
||||
@ -78,6 +81,7 @@ function NeatoVacuumRobotAccessory(robot, platform) {
|
||||
this.platform = platform;
|
||||
this.log = platform.log;
|
||||
this.refresh = platform.refresh;
|
||||
this.careNavigation = platform.careNavigation;
|
||||
this.robot = robot;
|
||||
this.name = robot.name;
|
||||
this.lastUpdate = null;
|
||||
@ -155,8 +159,8 @@ NeatoVacuumRobotAccessory.prototype = {
|
||||
that.robot.resumeCleaning(callback);
|
||||
}
|
||||
else {
|
||||
debug(that.name + ": Start cleaning");
|
||||
that.robot.startCleaning(that.robot.eco, 2, callback);
|
||||
debug(that.name + ": Start cleaning (" + that.careNavigation + ")");
|
||||
that.robot.startCleaning(that.robot.eco, that.careNavigation, callback);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "homebridge-neato",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"description": "A Neato vacuum robot plugin for homebridge.",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
Loading…
Reference in New Issue
Block a user