Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ad41c1679d | ||
|
89f6f233a5 | ||
|
88f217e2b1 |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -49,4 +49,13 @@
|
||||
|
||||
## 0.4.4
|
||||
|
||||
* Fixed config parameter to disable switches/sensors not optional
|
||||
* 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
|
@@ -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 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
|
||||
|
||||
@@ -70,6 +70,6 @@ The parameter **disabled** accepts a list of switches/sensors that can be disabl
|
||||
|
||||
- BotVac Connected (Firmware 2.2.0)
|
||||
- BotVac D3 Connected
|
||||
- BotVac D5 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.
|
13
index.js
13
index.js
@@ -260,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);
|
||||
});
|
||||
},
|
||||
|
||||
@@ -303,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();
|
||||
});
|
||||
@@ -319,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) {
|
||||
@@ -328,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);
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "homebridge-neato",
|
||||
"version": "0.4.4",
|
||||
"version": "0.4.6",
|
||||
"description": "A Neato vacuum robot plugin for homebridge.",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
Reference in New Issue
Block a user