Skip to content

Commit

Permalink
1.4.8-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoduj committed Feb 19, 2022
1 parent 0598484 commit 83454e2
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 26 deletions.
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
language: node_js
node_js:
- '10'
- '12'
- '13'
- '14'
- '15'
- '16'

jobs:
include:
- stage: npm release
if: tag IS present
node_js: '12'
node_js: '16'
script: echo "Deploying to npm ..."
deploy:
provider: npm
email: '$NPM_EMAIL'
api_key: '$NPM_TOKEN'
tag: beta
on:
tags: true
edge: true
- stage: GitHub Release
if: tag IS present
node_js: '12'
node_js: '16'
script: echo "Deploying to GitHub releases ..."
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
cleanup: true
prerelease: true
name: $TRAVIS_TAG
on:
tags: true
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ You can also use the [PACKAGES](https://github.com/oznu/docker-homebridge#option

All notable changes to this project will be documented in this file.

## 1.4.8-beta.1

- [NEW] bump dep to beta version
- [NEW] Allow manual naming override of SpotArea and CustomArea switch #83

## 1.4.7

- [NEW] bump dep
Expand Down
4 changes: 2 additions & 2 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@
"title": "Publish SpotArea Cleaning Switchs",
"type": "array",
"items": {
"title": "SpotArea numbers (comma separated. 1 or 1,2 or deebotName|1 or deebotName2|1,2 if you have multiple deebots)",
"title": "SpotArea numbers (comma separated. 1 or 1,2 or deebotName|1 or deebotName2|1,2 if you have multiple deebots). Use /Kitchen for exemple if you want to give it a name.",
"type": "string"
}
},
"publishCustomAreaSwitches": {
"title": "Publish CustomArea Cleaning Switchs",
"type": "array",
"items": {
"title": "CustomArea coordinates (comma separated. Must be something like x1,y1,x2,y2 or deebotName|x1,y1,x2,y2 if you have multiple deebots)",
"title": "CustomArea coordinates (comma separated. Must be something like x1,y1,x2,y2 or deebotName|x1,y1,x2,y2 if you have multiple deebots). Use /Kitchen for exemple if you want to give it a name.",
"type": "string"
}
},
Expand Down
46 changes: 31 additions & 15 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,21 @@ myDeebotEcovacsPlatform.prototype = {
if (this.publishSpotAreaSwitches !== undefined && vacBot.hasSpotAreaCleaningMode()) {
for (let i = 0; i < this.publishSpotAreaSwitches.length; i++) {
let isForThisDeebot = true;
var command = '';
var command = this.publishSpotAreaSwitches[i];
var switchName = '';

if (this.publishSpotAreaSwitches[i].indexOf('|') > -1) {
let expectedDeebotName = this.publishSpotAreaSwitches[i].split('|')[0];
command = this.publishSpotAreaSwitches[i].split('|')[1];
isForThisDeebot = expectedDeebotName === deebotName;
//name handling
if (command.indexOf('/') > -1) {
switchName = command.split('/')[1];
command = command.split('/')[0];
} else {
command = this.publishSpotAreaSwitches[i];
switchName = 'SpotArea ' + i + ' ' + deebotName;
}

if (command.indexOf('|') > -1) {
let expectedDeebotName = command.split('|')[0];
command = command.split('|')[1];
isForThisDeebot = expectedDeebotName === deebotName;
}

if (isForThisDeebot) {
Expand Down Expand Up @@ -476,7 +483,7 @@ myDeebotEcovacsPlatform.prototype = {
}

let HKSwitchSpotAreaService = accessory.getServiceByUUIDAndSubType(
'SpotArea ' + i + ' ' + deebotName,
switchName,
'SwitchSpotAreaService' + i + deebotName
);

Expand All @@ -485,7 +492,7 @@ myDeebotEcovacsPlatform.prototype = {
'INFO - Creating SpotArea ' + i + ' stateless Switch Service for ' + deebotName
);
HKSwitchSpotAreaService = new Service.Switch(
'SpotArea ' + i + ' ' + deebotName,
switchName,
'SwitchSpotAreaService' + i + deebotName
);
HKSwitchSpotAreaService.subtype = 'SwitchSpotAreaService' + i + deebotName;
Expand All @@ -509,12 +516,21 @@ myDeebotEcovacsPlatform.prototype = {
var command = '';
var numberOfCleanings = 1;

if (this.publishCustomAreaSwitches[i].indexOf('|') > -1) {
let expectedDeebotName = this.publishCustomAreaSwitches[i].split('|')[0];
command = this.publishCustomAreaSwitches[i].split('|')[1];
isForThisDeebot = expectedDeebotName === deebotName;
var command = this.publishCustomAreaSwitches[i];
var switchName = '';

//name handling
if (command.indexOf('/') > -1) {
switchName = command.split('/')[1];
command = command.split('/')[0];
} else {
command = this.publishCustomAreaSwitches[i];
switchName = 'CustomArea ' + i + ' ' + deebotName;
}

if (command.indexOf('|') > -1) {
let expectedDeebotName = command.split('|')[0];
command = command.split('|')[1];
isForThisDeebot = expectedDeebotName === deebotName;
}

if (command.split(',').length > 4) {
Expand Down Expand Up @@ -571,7 +587,7 @@ myDeebotEcovacsPlatform.prototype = {
}

let HKSwitchCustomAreaService = accessory.getServiceByUUIDAndSubType(
'CustomArea ' + i + ' ' + deebotName,
switchName,
'SwitchCustomAreaService' + i + deebotName
);

Expand All @@ -580,7 +596,7 @@ myDeebotEcovacsPlatform.prototype = {
'INFO - Creating CustomArea' + i + ' stateless Switch Service for ' + deebotName
);
HKSwitchCustomAreaService = new Service.Switch(
'CustomArea ' + i + ' ' + deebotName,
switchName,
'SwitchCustomAreaService' + i + deebotName
);
HKSwitchCustomAreaService.subtype = 'SwitchCustomAreaService' + i + deebotName;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-deebotecovacs",
"version": "1.4.7",
"version": "1.4.8-beta.1",
"author": "Nicolas Dujardin",
"description": "Publish your deebot ecovacs as an homekit accessory",
"main": "index.js",
Expand All @@ -25,7 +25,7 @@
"homekit"
],
"dependencies": {
"ecovacs-deebot": "^0.7.0",
"ecovacs-deebot": ">=0.7.2-beta",
"node-machine-id": "^1.1.12"
},
"bugs": {
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ Fields:
- `publishAutoSwitch` Optional - Publish a switch to start in auto Mode.
- `publishEdgeSwitch` Optional - Publish a switch to start in edge Mode.
- `publishSpotSwitch` Optional - Publish a switch to start in spot Mode.
- `publishSpotAreaSwitches` Optional - Publish switches to start for each spot Area. Must be something like ["1","1,2"] or ["deebotName|1","deebotName2|1,2"] if you have multiple deebots
- `publishCustomAreaSwitches` Optional - Publish switches to start for each Custom Area. Must be something like ["x1,y1,x2,y2,numberOfcleanings","x1,y1,x2,y2,numberOfcleanings"] or ["deebotName|x1,y1,x2,y2,numberOfcleanings","deebotName2|x1,y1,x2,y2,numberOfcleanings"] if you have multiple deebots ? number of cleanings is optionnal
- `publishSpotAreaSwitches` Optional - Publish switches to start for each spot Area. Must be something like ["1","1,2"] or ["deebotName|1","deebotName2|1,2"] if you have multiple deebots . Name can be specified like ["1/Kitchen","1,2/LivingRoom"]
- `publishCustomAreaSwitches` Optional - Publish switches to start for each Custom Area. Must be something like ["x1,y1,x2,y2,numberOfcleanings","x1,y1,x2,y2,numberOfcleanings"] or ["deebotName|x1,y1,x2,y2,numberOfcleanings","deebotName2|x1,y1,x2,y2,numberOfcleanings"] if you have multiple deebots. Number of cleanings is optionnal . Name can be specified like ["x1,y1,x2,y2,numberOfcleanings/Kitchen"]
- `publishAreaSwitchesAsSeparateDevices` Optional - Defaults to false. Publish Custom / Spot switches as indiviual accessories so that you can move them in other rooms.
- `showInfoLogs` Optional - Defaults to false. Log info for maps, custom areas and so on .

Expand Down

0 comments on commit 83454e2

Please sign in to comment.