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 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">&nbsp;&nbsp;&nbsp;Matterbridge dynamic platform example plugin
3
+ # <img src="https://matterbridge.io/assets/matterbridge.svg" alt="Matterbridge Logo" width="64px" height="64px">&nbsp;&nbsp;&nbsp;Matterbridge Computherm plugin
4
4
 
5
- [![npm version](https://img.shields.io/npm/v/matterbridge-example-dynamic-platform.svg)](https://www.npmjs.com/package/matterbridge-example-dynamic-platform)
6
- [![npm downloads](https://img.shields.io/npm/dt/matterbridge-example-dynamic-platform.svg)](https://www.npmjs.com/package/matterbridge-example-dynamic-platform)
7
- [![Docker Version](https://img.shields.io/docker/v/luligu/matterbridge/latest?label=docker%20version)](https://hub.docker.com/r/luligu/matterbridge)
8
- [![Docker Pulls](https://img.shields.io/docker/pulls/luligu/matterbridge?label=docker%20pulls)](https://hub.docker.com/r/luligu/matterbridge)
9
- ![Node.js CI](https://github.com/Luligu/matterbridge-example-dynamic-platform/actions/workflows/build.yml/badge.svg)
10
- ![CodeQL](https://github.com/Luligu/matterbridge-example-dynamic-platform/actions/workflows/codeql.yml/badge.svg)
11
- [![codecov](https://codecov.io/gh/Luligu/matterbridge-example-dynamic-platform/branch/main/graph/badge.svg)](https://codecov.io/gh/Luligu/matterbridge-example-dynamic-platform)
5
+ [![npm version](https://img.shields.io/npm/v/matterbridge-computherm.svg)](https://www.npmjs.com/package/matterbridge-example-dynamic-platform)
6
+ [![npm downloads](https://img.shields.io/npm/dt/matterbridge-computherm.svg)](https://www.npmjs.com/package/matterbridge-example-dynamic-platform)
7
+ ![Node.js CI](https://github.com/andrasg/matterbridge-computherm/actions/workflows/build.yml/badge.svg)
12
8
  [![styled with prettier](https://img.shields.io/badge/styled_with-Prettier-f8bc45.svg?logo=prettier)](https://github.com/prettier/prettier)
13
9
  [![linted with eslint](https://img.shields.io/badge/linted_with-ES_Lint-4B32C3.svg?logo=eslint)](https://github.com/eslint/eslint)
14
10
  [![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
@@ -16,101 +12,16 @@
16
12
  [![matterbridge.io](https://img.shields.io/badge/matterbridge.io-online-brightgreen)](https://matterbridge.io)
17
13
 
18
14
  [![powered by](https://img.shields.io/badge/powered%20by-matterbridge-blue)](https://www.npmjs.com/package/matterbridge)
19
- [![powered by](https://img.shields.io/badge/powered%20by-matter--history-blue)](https://www.npmjs.com/package/matter-history)
20
15
  [![powered by](https://img.shields.io/badge/powered%20by-node--ansi--logger-blue)](https://www.npmjs.com/package/node-ansi-logger)
21
16
  [![powered by](https://img.shields.io/badge/powered%20by-node--persist--manager-blue)](https://www.npmjs.com/package/node-persist-manager)
17
+ [![powered by](https://img.shields.io/badge/powered%20by-node--broadlink-blue)](https://www.npmjs.com/package/node-broadlink)
22
18
 
23
19
  ---
24
20
 
25
- Matterbridge dynamic platform example plugin is a template to develop your own plugin using the dynamic platform.
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
- See the guidelines on [Matterbridge](https://github.com/Luligu/matterbridge/blob/main/README.md) for more information.
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('onStart called with reason:', reason ?? 'none');
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 called');
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('onShutdown called with reason:', reason ?? 'none');
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
  }
@@ -2,6 +2,8 @@
2
2
  "name": "matterbridge-computherm",
3
3
  "type": "DynamicPlatform",
4
4
  "pollInterval": 60,
5
+ "whiteList": [],
6
+ "blackList": [],
5
7
  "debug": false,
6
8
  "unregisterOnShutdown": false
7
9
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-computherm",
3
- "version": "0.0.1",
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.1",
9
+ "version": "1.0.0",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "node-ansi-logger": "3.2.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-computherm",
3
- "version": "0.0.1",
3
+ "version": "1.0.0",
4
4
  "description": "Matterbridge Computherm plugin",
5
5
  "author": "https://github.com/andrasg",
6
6
  "license": "Apache-2.0",