matterbridge-computherm 0.0.1 → 1.0.0
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/README.md +7 -96
- package/dist/module.js +5 -4
- package/matterbridge-computherm.config.json +2 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
<!-- markdownlint-disable MD033 -->
|
|
2
2
|
|
|
3
|
-
# <img src="https://matterbridge.io/assets/matterbridge.svg" alt="Matterbridge Logo" width="64px" height="64px"> Matterbridge
|
|
3
|
+
# <img src="https://matterbridge.io/assets/matterbridge.svg" alt="Matterbridge Logo" width="64px" height="64px"> Matterbridge Computherm plugin
|
|
4
4
|
|
|
5
|
-
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
9
|
-

|
|
10
|
-

|
|
11
|
-
[](https://codecov.io/gh/Luligu/matterbridge-example-dynamic-platform)
|
|
5
|
+
[](https://www.npmjs.com/package/matterbridge-example-dynamic-platform)
|
|
6
|
+
[](https://www.npmjs.com/package/matterbridge-example-dynamic-platform)
|
|
7
|
+

|
|
12
8
|
[](https://github.com/prettier/prettier)
|
|
13
9
|
[](https://github.com/eslint/eslint)
|
|
14
10
|
[](https://www.typescriptlang.org/)
|
|
@@ -16,101 +12,16 @@
|
|
|
16
12
|
[](https://matterbridge.io)
|
|
17
13
|
|
|
18
14
|
[](https://www.npmjs.com/package/matterbridge)
|
|
19
|
-
[](https://www.npmjs.com/package/matter-history)
|
|
20
15
|
[](https://www.npmjs.com/package/node-ansi-logger)
|
|
21
16
|
[](https://www.npmjs.com/package/node-persist-manager)
|
|
17
|
+
[](https://www.npmjs.com/package/node-broadlink)
|
|
22
18
|
|
|
23
19
|
---
|
|
24
20
|
|
|
25
|
-
Matterbridge
|
|
26
|
-
|
|
27
|
-
It exposes 70 virtual devices:
|
|
28
|
-
|
|
29
|
-
- a door contact sensor
|
|
30
|
-
- a motion sensor
|
|
31
|
-
- an illuminance sensor
|
|
32
|
-
- a temperature sensor
|
|
33
|
-
- a humidity sensor
|
|
34
|
-
- a pressure sensor
|
|
35
|
-
- a flow sensor
|
|
36
|
-
- a climate sensor with temperature, humidity and pressure
|
|
37
|
-
- a mode select device
|
|
38
|
-
- a switch with onOff cluster
|
|
39
|
-
- a light with onOff
|
|
40
|
-
- a light with onOff and levelControl (dimmer)
|
|
41
|
-
- a light with onOff, levelControl and colorControl (with XY, HS and CT) clusters
|
|
42
|
-
- a light with onOff, levelControl and colorControl (with HS and CT) clusters
|
|
43
|
-
- a light with onOff, levelControl and colorControl (with XY and CT) clusters
|
|
44
|
-
- a light with onOff, levelControl and colorControl (with CT only) clusters
|
|
45
|
-
- an outlet (plug) with onOff cluster
|
|
46
|
-
- an outlet (plug) with onOff cluster, energy measurements and power measurements
|
|
47
|
-
- an outlet (plug) with onOff cluster, apparent energy measurements and power measurements
|
|
48
|
-
- a smart outlet with an energy meter and four individually controllable sockets (with tagList 1, 2, 3 and 4)
|
|
49
|
-
- a bridged outlet with four individually controllable plugs that expose their names
|
|
50
|
-
- a cover with windowCovering cluster and lift feature
|
|
51
|
-
- a cover with windowCovering cluster and both lift and tilt features
|
|
52
|
-
- a lock with doorLock cluster
|
|
53
|
-
- a thermostat auto mode (i.e. with Auto Heat and Cool features) with thermostat cluster and 3 sub endpoints with flowMeasurement cluster, temperatureMeasurement cluster
|
|
54
|
-
and relativeHumidityMeasurement cluster (to show how to create a composed device with sub endpoints)
|
|
55
|
-
- a thermostat with auto mode (i.e. with Auto Heat and Cool features), occupancy and outdoorTemperature
|
|
56
|
-
- a thermostat auto mode with presets (Home, Away, Sleep, Wake, Vacation and GoingToSleep modes) including 3 sub endpoints with flow, temperature and humidity sensors
|
|
57
|
-
- a thermostat heat only with two external temperature sensors (tagged like Indoor and Outdoor)
|
|
58
|
-
- a thermostat cool only
|
|
59
|
-
- a fan with Off High presets
|
|
60
|
-
- a fan with Off Low Med High presets
|
|
61
|
-
- a fan with Off Low Med High Auto presets and step
|
|
62
|
-
- a fan with all the features MultiSpeed, Auto, Step, Rock, Wind and AirflowDirection and mode Off Low Med High Auto.
|
|
63
|
-
- a rain sensor device
|
|
64
|
-
- a water freeze detector device
|
|
65
|
-
- a water leak detector device
|
|
66
|
-
- a smokeCoAlarm (with smoke and co features) sensor (supported by Apple Home)
|
|
67
|
-
- a smokeCoAlarm (with smoke only feature) sensor (supported by Apple Home)
|
|
68
|
-
- a smokeCoAlarm (with co only feature) sensor (supported by Apple Home)
|
|
69
|
-
- an airConditioner device
|
|
70
|
-
- an airPurifier device with temperature and humidity sensor (supported by Apple Home)
|
|
71
|
-
- a pump device
|
|
72
|
-
- a waterValve device
|
|
73
|
-
- an airQuality device with all concentration measurements clusters (supported by Apple Home with the concentration measurements from version 18.5)
|
|
74
|
-
- a momentary switch composed by three switches with Single Double Long (tagged with One Two Three and Top Middle Bottom) and three switches with Single only.
|
|
75
|
-
- a latching switch
|
|
76
|
-
- a Robot Vacuum Cleaner device (supported by SmartThings, Alexa, Home Assistant and partially by Apple Home). Read also <https://github.com/Luligu/matterbridge/discussions/264>.
|
|
77
|
-
- an onOff Mounted Switch device (supported by SmartThings, Alexa, Home Assistant)
|
|
78
|
-
- a onOff Mounted Switch legacy device (supported by all controllers)
|
|
79
|
-
- a dimmer Mounted Switch device (supported by SmartThings, Alexa, Home Assistant)
|
|
80
|
-
- a dimmer Mounted Switch legacy device (supported by all controllers)
|
|
81
|
-
- a laundry Washer device (supported by SmartThings, Alexa and Home Assistant)
|
|
82
|
-
- a laundry Dryer device (supported by SmartThings, Alexa and Home Assistant)
|
|
83
|
-
- a dishwasher device (supported by SmartThings, Alexa and Home Assistant)
|
|
84
|
-
- a refrigerator device (supported by SmartThings, Alexa and Home Assistant)
|
|
85
|
-
- an oven device (supported by SmartThings, Alexa and Home Assistant)
|
|
86
|
-
- a microwave Oven device (supported by SmartThings, Alexa and Home Assistant)
|
|
87
|
-
- an extractor Hood device (supported by SmartThings, Alexa and Home Assistant)
|
|
88
|
-
- a cooktop device (supported by SmartThings, Alexa and Home Assistant)
|
|
89
|
-
- a water heater device (supported by SmartThings and Home Assistant)
|
|
90
|
-
- a car charger device (supported by Home Assistant)
|
|
91
|
-
- a solar power device
|
|
92
|
-
- a battery storage device
|
|
93
|
-
- a heat pump device
|
|
94
|
-
- a basic video player (supported by SmartThings)
|
|
95
|
-
- a speaker device (supported by SmartThings)
|
|
96
|
-
- a soil sensor (Matter 1.5.0)
|
|
97
|
-
- an irrigation system (Matter 1.5.0)
|
|
98
|
-
- an irrigation system with four zones (Matter 1.5.0)
|
|
99
|
-
|
|
100
|
-
All these devices continuously change their state and position. The plugin also shows how to use all the command handlers (so you can control all the devices), how to subscribe to attributes, and how to trigger events.
|
|
101
|
-
|
|
102
|
-
If you want to write your own plugin, the easiest way to get started is to clone the [Matterbridge Plugin Template](https://github.com/Luligu/matterbridge-plugin-template). It has **Dev Container support for an instant development environment**, with all tools and extensions (like Node.js, npm, TypeScript, ESLint, Prettier, Jest, and Vitest) already loaded and configured.
|
|
103
|
-
|
|
104
|
-
If you like this project and find it useful, please consider giving it a star on [GitHub](https://github.com/Luligu/matterbridge-example-dynamic-platform) and sponsoring it.
|
|
105
|
-
|
|
106
|
-
<a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
|
|
21
|
+
A Matterbridge plugin for supporting Computherm thermostats. The plugin automatically discovers thermostats on the local subnet and adds them to matterbridge. Currently no support for devices in an other subnet (eg: on an other VLAN).
|
|
107
22
|
|
|
108
23
|
## Prerequisites
|
|
109
24
|
|
|
110
25
|
### Matterbridge
|
|
111
26
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
## Style guide
|
|
115
|
-
|
|
116
|
-
See also the [Style Guide](./STYLEGUIDE.md) for JSDoc, naming, and logging conventions used in this repository.
|
|
27
|
+
This plugin works with Matterbridge.
|
package/dist/module.js
CHANGED
|
@@ -19,12 +19,12 @@ export class ComputhermMatterbridgePlatform extends MatterbridgeDynamicPlatform
|
|
|
19
19
|
this.log.info('Initializing platform:', this.config.name);
|
|
20
20
|
}
|
|
21
21
|
async onStart(reason) {
|
|
22
|
-
this.log.info('
|
|
22
|
+
this.log.info('Starting plugin with reason:', reason ?? 'none');
|
|
23
23
|
await this.ready;
|
|
24
24
|
await this.clearSelect();
|
|
25
25
|
const discoveredDevices = await broadlink.discover();
|
|
26
26
|
for (const device of discoveredDevices) {
|
|
27
|
-
this.log.info(`Found device ${device.manufacturer} ${device.model} on IP ${device.host.address}`);
|
|
27
|
+
this.log.info(`Found device ${device.manufacturer} ${device.model} on IP ${device.host.address}}`);
|
|
28
28
|
const hysenDevice = device;
|
|
29
29
|
const thermostat = new ComputhermThermostat(this, hysenDevice);
|
|
30
30
|
await thermostat.create();
|
|
@@ -34,14 +34,14 @@ export class ComputhermMatterbridgePlatform extends MatterbridgeDynamicPlatform
|
|
|
34
34
|
}
|
|
35
35
|
async onConfigure() {
|
|
36
36
|
await super.onConfigure();
|
|
37
|
-
this.log.info('onConfigure
|
|
37
|
+
this.log.info('onConfigure: Restoring states');
|
|
38
38
|
for (const device of this.devices) {
|
|
39
39
|
await device.startUpdates();
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
async onShutdown(reason) {
|
|
43
43
|
await super.onShutdown(reason);
|
|
44
|
-
this.log.info('
|
|
44
|
+
this.log.info('Shutting down plugin with reason:', reason ?? 'none');
|
|
45
45
|
if (this.config.unregisterOnShutdown === true)
|
|
46
46
|
await this.unregisterAllDevices(500);
|
|
47
47
|
for (const device of this.devices) {
|
|
@@ -83,6 +83,7 @@ export class ComputhermMatterbridgePlatform extends MatterbridgeDynamicPlatform
|
|
|
83
83
|
return device;
|
|
84
84
|
}
|
|
85
85
|
else {
|
|
86
|
+
this.log.info(`Device ${device.serialNumber} is not matching config, hence will not be added.`);
|
|
86
87
|
return undefined;
|
|
87
88
|
}
|
|
88
89
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-computherm",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge-computherm",
|
|
9
|
-
"version": "0.0
|
|
9
|
+
"version": "1.0.0",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"node-ansi-logger": "3.2.0",
|