Compare commits
No commits in common. "master" and "v0.8.0" have entirely different histories.
19
.github/workflows/npm.yml
vendored
19
.github/workflows/npm.yml
vendored
@ -1,19 +0,0 @@
|
||||
name: npm
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [created]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
# Setup .npmrc file to publish to npm
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '12.x'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- run: npm install
|
||||
- run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
14
CHANGELOG.md
14
CHANGELOG.md
@ -120,16 +120,4 @@
|
||||
|
||||
## 0.8.0
|
||||
* Add German plugin language (for example, this gives you a "Sauge Küche" Siri command for a zone called "Küche")
|
||||
* Added possibility to toggle between languages (English/German) in Homebridge UI Plugin Settings
|
||||
|
||||
## 0.8.1
|
||||
* Include Robot name in Homekit battery service name
|
||||
|
||||
## 0.8.2
|
||||
* Eliminate warnings on Homebridge >= 1.3.0 (77945f8 and 877c3d7 on `naofireblade/homebridge-neato`)
|
||||
|
||||
## 0.8.3
|
||||
* Add French plugin language (for example, this gives you a "Aspirer la cuisine" Siri command for a zone called "La cuisine")
|
||||
|
||||
## 0.8.4
|
||||
* Link to token getter tool in homebridge UI
|
||||
* Added possibility to toggle between languages (English/German) in Homebridge UI Plugin Settings
|
36
README.md
36
README.md
@ -1,7 +1,3 @@
|
||||
[](https://www.npmjs.com/package/homebridge-kobold)
|
||||
[](https://www.npmjs.com/package/homebridge-kobold?activeTab=versions)
|
||||
|
||||
|
||||
# homebridge-kobold
|
||||
|
||||
This is a plugin for [homebridge](https://github.com/nfarina/homebridge) to control your [Vorwerk Kobold](https://kobold.vorwerk.de/saugroboter/) VR300 vacuum robot. You can download it via [npm](https://www.npmjs.com/package/homebridge-kobold).
|
||||
@ -31,7 +27,7 @@ The interaction with the Server is handled by the underlying [node-kobold-contro
|
||||
- Automatic or periodic refresh of robot state
|
||||
- Multiple robots
|
||||
|
||||
- German, English or French Language Setting
|
||||
- German or English Language Setting
|
||||
|
||||
> <b name="change-room">2</b> You can send the robot from one room to another as well. He will return to the base, wait there some seconds and then starts cleaning the next room.
|
||||
|
||||
@ -47,21 +43,21 @@ The interaction with the Server is handled by the underlying [node-kobold-contro
|
||||
|
||||
## Configuration
|
||||
|
||||
Add the following information to your config file. Adapt the value for `token`.
|
||||
Add the following information to your config file. Change the values for email and password.
|
||||
|
||||
### Simple
|
||||
### Simple
|
||||
|
||||
```json
|
||||
"platforms": [
|
||||
{
|
||||
"platform": "KoboldVacuumRobot",
|
||||
"token": "YourToken",
|
||||
{
|
||||
"platform": "KoboldVacuumRobot",
|
||||
"token": "YourToken",
|
||||
"language": "de"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
You can get a token using the GUI tool [Kobold Token Getter](https://github.com/himbeles/kobold-token-get) or using the following two curl commands:
|
||||
You can get a token using the following two curl commands:
|
||||
|
||||
```bash
|
||||
# This will trigger the email sending
|
||||
@ -99,7 +95,7 @@ curl -X "POST" "https://mykobold.eu.auth0.com/oauth/token" \
|
||||
|
||||
From the output, you want to copy the `id_token` value.
|
||||
|
||||
The `language` can be `de` for German, `en` for English, or `fr` for French.
|
||||
The `language` can be `de` for German, or `en` for English.
|
||||
|
||||
### Advanced
|
||||
|
||||
@ -116,16 +112,16 @@ List of plugin features that you don't want to use in homekit (e.g. `dock`, `doc
|
||||
|
||||
```json
|
||||
"platforms": [
|
||||
{
|
||||
"platform": "KoboldVacuumRobot",
|
||||
"token": "YourToken",
|
||||
"refresh": "120",
|
||||
"hidden": ["dock", "dockstate", "eco", "nogolines", "extracare", "schedule", "find", "spot"],
|
||||
{
|
||||
"platform": "KoboldVacuumRobot",
|
||||
"token": "YourToken",
|
||||
"refresh": "120",
|
||||
"hidden": ["dock", "dockstate", "eco", "nogolines", "extracare", "schedule", "find", "spot"],
|
||||
"language": "de"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Tested robots
|
||||
|
||||
- Vorwerk Kobold VR300
|
||||
- Vorwerk Kobold VR300
|
||||
|
@ -64,19 +64,6 @@ function KoboldVacuumRobotAccessory(platform, robotObject)
|
||||
"findMe": "Finde mich",
|
||||
"cleanSpot": "Spot Reinigung",
|
||||
"battery": "Batterie"
|
||||
},
|
||||
'fr': {
|
||||
"clean": "Aspirer",
|
||||
"clean the": "Aspirer",
|
||||
"goToDock": "Retour à la base",
|
||||
"dockState": "Sur la base",
|
||||
"eco": "Eco mode",
|
||||
"noGoLines": "Lignes NoGo",
|
||||
"extraCare": "Extra Care",
|
||||
"schedule": "Planifier",
|
||||
"findMe": "Me retrouver",
|
||||
"cleanSpot": "Nettoyage local",
|
||||
"battery": "Batterie"
|
||||
}
|
||||
}[this.platform.language]
|
||||
|
||||
@ -106,7 +93,7 @@ function KoboldVacuumRobotAccessory(platform, robotObject)
|
||||
this.name = this.robot.name + ' - ' + this.boundary.name;
|
||||
}
|
||||
|
||||
this.batteryService = new Service.BatteryService(this.name + " " + this.dict["battery"], "battery");
|
||||
this.batteryService = new Service.BatteryService(this.dict["battery"], "battery");
|
||||
|
||||
if (this.boundary == null)
|
||||
{
|
||||
@ -136,7 +123,6 @@ function KoboldVacuumRobotAccessory(platform, robotObject)
|
||||
serviceName = this.dict["clean"] + " " + this.boundary.name;
|
||||
}
|
||||
this.cleanService = new Service.Switch(serviceName, "cleanBoundary:" + this.boundary.id);
|
||||
this.cleanService = new Service.Switch(serviceName + "1", "cleanBoundary:" + this.boundary.id)
|
||||
}
|
||||
|
||||
this.log("Added cleaning device named: " + this.name);
|
||||
@ -274,10 +260,7 @@ KoboldVacuumRobotAccessory.prototype = {
|
||||
if (this.robot.canResume)
|
||||
{
|
||||
debug(this.name + ": ## Resume cleaning");
|
||||
this.robot.resumeCleaning((error) =>
|
||||
{
|
||||
callback(error);
|
||||
});
|
||||
this.robot.resumeCleaning(callback);
|
||||
}
|
||||
// Start cleaning
|
||||
else if (this.robot.canStart)
|
||||
@ -319,10 +302,7 @@ KoboldVacuumRobotAccessory.prototype = {
|
||||
if (this.robot.canPause)
|
||||
{
|
||||
debug(this.name + ": ## Pause cleaning");
|
||||
this.robot.pauseCleaning((error) =>
|
||||
{
|
||||
callback(error);
|
||||
});
|
||||
this.robot.pauseCleaning(callback);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -358,8 +338,12 @@ KoboldVacuumRobotAccessory.prototype = {
|
||||
if (error)
|
||||
{
|
||||
this.log.error("Cannot start cleaning. " + error + ": " + JSON.stringify(result));
|
||||
callback(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
callback();
|
||||
}
|
||||
callback(error);
|
||||
});
|
||||
}
|
||||
// Room cleaning
|
||||
@ -370,8 +354,12 @@ KoboldVacuumRobotAccessory.prototype = {
|
||||
if (error)
|
||||
{
|
||||
this.log.error("Cannot start room cleaning. " + error + ": " + JSON.stringify(result));
|
||||
callback(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
callback();
|
||||
}
|
||||
callback(error);
|
||||
});
|
||||
}
|
||||
// Spot cleaning
|
||||
@ -382,8 +370,12 @@ KoboldVacuumRobotAccessory.prototype = {
|
||||
if (error)
|
||||
{
|
||||
this.log.error("Cannot start spot cleaning. " + error + ": " + JSON.stringify(result));
|
||||
callback(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
callback();
|
||||
}
|
||||
callback(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -407,20 +399,14 @@ KoboldVacuumRobotAccessory.prototype = {
|
||||
setTimeout(() =>
|
||||
{
|
||||
debug(this.name + ": ## Go to dock");
|
||||
this.robot.sendToBase(() =>
|
||||
{
|
||||
callback();
|
||||
});
|
||||
this.robot.sendToBase(callback);
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
else if (this.robot.canGoToBase)
|
||||
{
|
||||
debug(this.name + ": ## Go to dock");
|
||||
this.robot.sendToBase(() =>
|
||||
{
|
||||
callback();
|
||||
});
|
||||
this.robot.sendToBase(callback);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -499,18 +485,12 @@ KoboldVacuumRobotAccessory.prototype = {
|
||||
if (on)
|
||||
{
|
||||
debug(this.name + ": " + "Enabled".brightGreen + " Schedule");
|
||||
this.robot.enableSchedule((error) =>
|
||||
{
|
||||
callback(error);
|
||||
});
|
||||
this.robot.enableSchedule(callback);
|
||||
}
|
||||
else
|
||||
{
|
||||
debug(this.name + ": " + "Disabled".red + " Schedule");
|
||||
this.robot.disableSchedule((error) =>
|
||||
{
|
||||
callback(error);
|
||||
});
|
||||
this.robot.disableSchedule(callback);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -530,16 +510,13 @@ KoboldVacuumRobotAccessory.prototype = {
|
||||
this.findMeService.setCharacteristic(Characteristic.On, false);
|
||||
}, 1000);
|
||||
|
||||
this.robot.findMe((error) =>
|
||||
{
|
||||
callback(error);
|
||||
});
|
||||
this.robot.findMe(callback);
|
||||
}
|
||||
},
|
||||
|
||||
getSpotClean: function (callback)
|
||||
{
|
||||
callback(false, this.spotCleanService.getCharacteristic(Characteristic.On).value);
|
||||
callback();
|
||||
},
|
||||
|
||||
setSpotClean: function (on, callback)
|
||||
@ -579,10 +556,7 @@ KoboldVacuumRobotAccessory.prototype = {
|
||||
if (this.robot.canPause)
|
||||
{
|
||||
debug(this.name + ": ## Pause cleaning");
|
||||
this.robot.pauseCleaning((error) =>
|
||||
{
|
||||
callback(error);
|
||||
});
|
||||
this.robot.pauseCleaning(callback);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -700,13 +674,8 @@ KoboldVacuumRobotAccessory.prototype = {
|
||||
|
||||
if (this.spotPlusFeatures)
|
||||
{
|
||||
let widthProps = this.spotCleanService.getCharacteristic(SpotWidthCharacteristic).props;
|
||||
let heightProps = this.spotCleanService.getCharacteristic(SpotHeightCharacteristic).props;
|
||||
|
||||
this.spotCleanService.setCharacteristic(SpotWidthCharacteristic,
|
||||
this.robot.spotWidth >= widthProps.minValue && this.robot.spotWidth <= widthProps.maxValue ? this.robot.spotWidth : widthProps.minValue);
|
||||
this.spotCleanService.setCharacteristic(SpotHeightCharacteristic,
|
||||
this.robot.spotHeight >= heightProps.minValue && this.robot.spotHeight <= heightProps.maxValue ? this.robot.spotHeight : heightProps.minValue);
|
||||
this.spotCleanService.setCharacteristic(SpotWidthCharacteristic, this.robot.spotWidth);
|
||||
this.spotCleanService.setCharacteristic(SpotHeightCharacteristic, this.robot.spotHeight);
|
||||
}
|
||||
}
|
||||
|
||||
@ -723,4 +692,4 @@ KoboldVacuumRobotAccessory.prototype = {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
@ -9,7 +9,7 @@
|
||||
"title": "token",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Your Kobold Token (https://git.io/J3g1b)"
|
||||
"description": "Your Token"
|
||||
},
|
||||
"language": {
|
||||
"title": "language",
|
||||
@ -27,16 +27,10 @@
|
||||
"enum": [
|
||||
"de"
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "French",
|
||||
"enum": [
|
||||
"fr"
|
||||
]
|
||||
}
|
||||
],
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
10
package.json
10
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "homebridge-kobold",
|
||||
"version": "0.8.4",
|
||||
"version": "0.8.0",
|
||||
"description": "A Vorwerk Kobold vacuum robot plugin for homebridge.",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@ -16,12 +16,6 @@
|
||||
"name": "Luis R.",
|
||||
"url2": "https://github.com/himbeles"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Alexandre L.",
|
||||
"url": "https://github.com/aluini"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/himbeles/homebridge-kobold.git"
|
||||
@ -29,7 +23,7 @@
|
||||
"dependencies": {
|
||||
"colors": "^1.4.0",
|
||||
"debug": "^4.1.1",
|
||||
"node-kobold-control": ">=0.4.2",
|
||||
"node-kobold-control": ">=0.4.0",
|
||||
"uuid": "^3.3.2"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user