Version 0.4.1
* Added config parameter for extraCareNavigation
This commit is contained in:
parent
bfb03b5d5d
commit
08ef90f7b0
@ -37,4 +37,8 @@
|
|||||||
* Added support for multiple robots
|
* Added support for multiple robots
|
||||||
* Added log output when user requests accessory identify
|
* Added log output when user requests accessory identify
|
||||||
* Changed plugin to platform instead of single accessory
|
* Changed plugin to platform instead of single accessory
|
||||||
* Removed parameter name from config
|
* 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).
|
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
|
# Features
|
||||||
|
|
||||||
@ -16,11 +16,10 @@ If you update from a previous version you have to adapt your config.
|
|||||||
- Get dock info
|
- Get dock info
|
||||||
- Periodic refresh of robot state
|
- Periodic refresh of robot state
|
||||||
- Support for multiple robots
|
- Support for multiple robots
|
||||||
|
- Extra care navigation
|
||||||
|
|
||||||
\* Available after some seconds of cleaning.
|
\* 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
|
# Installation
|
||||||
|
|
||||||
1. Install homebridge using: `npm install -g homebridge`
|
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.
|
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
|
```json
|
||||||
"platforms": [
|
"platforms": [
|
||||||
@ -40,7 +57,8 @@ The parameter **refresh** is optional (default 0=off) and adjusts in what interv
|
|||||||
"platform": "NeatoVacuumRobot",
|
"platform": "NeatoVacuumRobot",
|
||||||
"email": "YourEmail",
|
"email": "YourEmail",
|
||||||
"password": "YourPassword",
|
"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.email = config['email'];
|
||||||
this.password = config['password'];
|
this.password = config['password'];
|
||||||
|
|
||||||
|
this.careNavigation = ('extraCareNavigation' in config && config['extraCareNavigation'] ? 2 : 1);
|
||||||
|
debug("Extra Care Navigation: " + this.careNavigation);
|
||||||
|
|
||||||
// default off
|
// default off
|
||||||
this.refresh = ('refresh' in config ? parseInt(config['refresh']) : 0);
|
this.refresh = ('refresh' in config ? parseInt(config['refresh']) : 0);
|
||||||
// must be integer and positive
|
// must be integer and positive
|
||||||
@ -78,6 +81,7 @@ function NeatoVacuumRobotAccessory(robot, platform) {
|
|||||||
this.platform = platform;
|
this.platform = platform;
|
||||||
this.log = platform.log;
|
this.log = platform.log;
|
||||||
this.refresh = platform.refresh;
|
this.refresh = platform.refresh;
|
||||||
|
this.careNavigation = platform.careNavigation;
|
||||||
this.robot = robot;
|
this.robot = robot;
|
||||||
this.name = robot.name;
|
this.name = robot.name;
|
||||||
this.lastUpdate = null;
|
this.lastUpdate = null;
|
||||||
@ -155,8 +159,8 @@ NeatoVacuumRobotAccessory.prototype = {
|
|||||||
that.robot.resumeCleaning(callback);
|
that.robot.resumeCleaning(callback);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
debug(that.name + ": Start cleaning");
|
debug(that.name + ": Start cleaning (" + that.careNavigation + ")");
|
||||||
that.robot.startCleaning(that.robot.eco, 2, callback);
|
that.robot.startCleaning(that.robot.eco, that.careNavigation, callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "homebridge-neato",
|
"name": "homebridge-neato",
|
||||||
"version": "0.4.0",
|
"version": "0.4.1",
|
||||||
"description": "A Neato vacuum robot plugin for homebridge.",
|
"description": "A Neato vacuum robot plugin for homebridge.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
Loading…
Reference in New Issue
Block a user