matterbridge-roborock-vacuum-plugin 1.0.8-rc09 → 1.1.0-rc01
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/platform.js +2 -2
- package/dist/rvc.js +3 -2
- package/matterbridge-roborock-vacuum-plugin.config.json +3 -2
- package/matterbridge-roborock-vacuum-plugin.schema.json +7 -2
- package/package.json +1 -1
- package/src/model/ExperimentalFeatureSetting.ts +1 -0
- package/src/platform.ts +2 -2
- package/src/rvc.ts +3 -1
package/dist/platform.js
CHANGED
|
@@ -25,8 +25,8 @@ export class RoborockMatterbridgePlatform extends MatterbridgeDynamicPlatform {
|
|
|
25
25
|
persist;
|
|
26
26
|
constructor(matterbridge, log, config) {
|
|
27
27
|
super(matterbridge, log, config);
|
|
28
|
-
if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.
|
|
29
|
-
throw new Error(`This plugin requires Matterbridge version >= "3.
|
|
28
|
+
if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.1.2')) {
|
|
29
|
+
throw new Error(`This plugin requires Matterbridge version >= "3.1.2". Please update Matterbridge from ${this.matterbridge.matterbridgeVersion} to the latest version in the frontend.`);
|
|
30
30
|
}
|
|
31
31
|
this.log.info('Initializing platform:', this.config.name);
|
|
32
32
|
if (config.whiteList === undefined)
|
package/dist/rvc.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RoboticVacuumCleaner } from 'matterbridge';
|
|
1
|
+
import { RoboticVacuumCleaner } from 'matterbridge/devices';
|
|
2
2
|
import { getOperationalStates, getSupportedAreas, getSupportedCleanModes, getSupportedRunModes } from './initialData/index.js';
|
|
3
3
|
import { RvcOperationalState } from 'matterbridge/matter/clusters';
|
|
4
4
|
export class RoborockVacuumCleaner extends RoboticVacuumCleaner {
|
|
@@ -15,7 +15,8 @@ export class RoborockVacuumCleaner extends RoboticVacuumCleaner {
|
|
|
15
15
|
log.debug(`Creating RoborockVacuumCleaner for device: ${deviceName}, model: ${device.data.model}, forceRunAtDefault: ${enableExperimentalFeature?.advancedFeature?.forceRunAtDefault}`);
|
|
16
16
|
log.debug(`Supported Clean Modes: ${JSON.stringify(cleanModes)}`);
|
|
17
17
|
log.debug(`Supported Run Modes: ${JSON.stringify(supportedRunModes)}`);
|
|
18
|
-
|
|
18
|
+
const bridgeMode = enableExperimentalFeature?.advancedFeature.enableServerMode ? 'server' : undefined;
|
|
19
|
+
super(deviceName, device.duid, bridgeMode, supportedRunModes[0].mode, supportedRunModes, cleanModes[0].mode, cleanModes, undefined, undefined, RvcOperationalState.OperationalState.Docked, getOperationalStates(), supportedAreas, undefined, supportedAreas[0].areaId);
|
|
19
20
|
this.username = username;
|
|
20
21
|
this.device = device;
|
|
21
22
|
this.rrHomeId = device.rrHomeId;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-roborock-vacuum-plugin",
|
|
3
3
|
"type": "DynamicPlatform",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.1.0-rc01",
|
|
5
5
|
"whiteList": [],
|
|
6
6
|
"blackList": [],
|
|
7
7
|
"useInterval": true,
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"showRoutinesAsRooms": false,
|
|
12
12
|
"includeDockStationStatus": false,
|
|
13
13
|
"forceRunAtDefault": false,
|
|
14
|
-
"useVacationModeToSendVacuumToDock": false
|
|
14
|
+
"useVacationModeToSendVacuumToDock": false,
|
|
15
|
+
"enableServerMode": false
|
|
15
16
|
},
|
|
16
17
|
"cleanModeSettings": {
|
|
17
18
|
"enableCleanModeMapping": false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "Matterbridge Roborock Vacuum Plugin",
|
|
3
|
-
"description": "matterbridge-roborock-vacuum-plugin v. 1.0
|
|
3
|
+
"description": "matterbridge-roborock-vacuum-plugin v. 1.1.0-rc01 by https://github.com/RinDevJunior",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"required": ["username", "password"],
|
|
6
6
|
"properties": {
|
|
@@ -81,7 +81,12 @@
|
|
|
81
81
|
"default": false
|
|
82
82
|
},
|
|
83
83
|
"useVacationModeToSendVacuumToDock": {
|
|
84
|
-
"title": "Use Vacation Mode To Send Vacuum To Dock",
|
|
84
|
+
"title": "Use \"Vacation\" Mode To Send Vacuum To Dock",
|
|
85
|
+
"type": "boolean",
|
|
86
|
+
"default": false
|
|
87
|
+
},
|
|
88
|
+
"enableServerMode": {
|
|
89
|
+
"description": "Enable the Robot Vacuum Cleaner in server mode (Each vacuum will have its own server).",
|
|
85
90
|
"type": "boolean",
|
|
86
91
|
"default": false
|
|
87
92
|
}
|
package/package.json
CHANGED
package/src/platform.ts
CHANGED
|
@@ -32,9 +32,9 @@ export class RoborockMatterbridgePlatform extends MatterbridgeDynamicPlatform {
|
|
|
32
32
|
super(matterbridge, log, config);
|
|
33
33
|
|
|
34
34
|
// Verify that Matterbridge is the correct version
|
|
35
|
-
if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.
|
|
35
|
+
if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.1.2')) {
|
|
36
36
|
throw new Error(
|
|
37
|
-
`This plugin requires Matterbridge version >= "3.
|
|
37
|
+
`This plugin requires Matterbridge version >= "3.1.2". Please update Matterbridge from ${this.matterbridge.matterbridgeVersion} to the latest version in the frontend.`,
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
this.log.info('Initializing platform:', this.config.name);
|
package/src/rvc.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RoboticVacuumCleaner } from 'matterbridge';
|
|
1
|
+
import { RoboticVacuumCleaner } from 'matterbridge/devices';
|
|
2
2
|
import RoomMap from './model/RoomMap.js';
|
|
3
3
|
import { Device } from './roborockCommunication/index.js';
|
|
4
4
|
import { getOperationalStates, getSupportedAreas, getSupportedCleanModes, getSupportedRunModes } from './initialData/index.js';
|
|
@@ -34,9 +34,11 @@ export class RoborockVacuumCleaner extends RoboticVacuumCleaner {
|
|
|
34
34
|
log.debug(`Supported Clean Modes: ${JSON.stringify(cleanModes)}`);
|
|
35
35
|
log.debug(`Supported Run Modes: ${JSON.stringify(supportedRunModes)}`);
|
|
36
36
|
|
|
37
|
+
const bridgeMode = enableExperimentalFeature?.advancedFeature.enableServerMode ? 'server' : undefined;
|
|
37
38
|
super(
|
|
38
39
|
deviceName, // name
|
|
39
40
|
device.duid, // serial
|
|
41
|
+
bridgeMode, // mode
|
|
40
42
|
supportedRunModes[0].mode, // currentRunMode
|
|
41
43
|
supportedRunModes, // supportedRunModes
|
|
42
44
|
cleanModes[0].mode, // currentCleanMode
|