matterbridge-webhooks 0.0.1 → 0.0.2
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/CHANGELOG.md +14 -0
- package/README.md +24 -3
- package/dist/platform.js +2 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,20 @@ If you like this project and find it useful, please consider giving it a star on
|
|
|
8
8
|
<img src="bmc-button.svg" alt="Buy me a coffee" width="120">
|
|
9
9
|
</a>
|
|
10
10
|
|
|
11
|
+
## [0.0.2] - 2025-03-30
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- [readme]: Added some examples for Shelly Trv gen 1.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- [select]: Fixed missing clearSelect on start.
|
|
20
|
+
|
|
21
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
22
|
+
<img src="bmc-button.svg" alt="Buy me a coffee" width="80">
|
|
23
|
+
</a>
|
|
24
|
+
|
|
11
25
|
## [0.0.1] - 2025-03-19
|
|
12
26
|
|
|
13
27
|
First published release.
|
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@ This plugin allows you to expose any webhooks to Matter.
|
|
|
19
19
|
Features:
|
|
20
20
|
|
|
21
21
|
- The webhooks parameters can easily be entered in the frontend.
|
|
22
|
+
- It is possible to choose how to expose the webhooks: Switch, Outlet or Light.
|
|
22
23
|
- It is possible to choose the method: GET or POST.
|
|
23
24
|
- The webhook can be tested in the frontend.
|
|
24
25
|
|
|
@@ -54,12 +55,32 @@ See the complete guidelines on [Matterbridge](https://github.com/Luligu/matterbr
|
|
|
54
55
|
|
|
55
56
|
## How to add a webhook
|
|
56
57
|
|
|
57
|
-
In the frontend open the plugin config: add a new webhook, enter the webhook name in the first field (replace newKey with the name you want to give to the webhook), select GET or POST and enter the webhook url. The webhook name will be the device name on the controller. The webhook will be exposed like a switch or like a
|
|
58
|
+
In the frontend open the plugin config: add a new webhook, enter the webhook name in the first field (replace newKey with the name you want to give to the webhook), select GET or POST and enter the webhook url. The webhook name will be the device name on the controller. The webhook will be exposed like a switch, like an outlet or like a light. When you turn it on, the webhook is called and in a few seconds the switch or the outlet or the light will revert to off.
|
|
58
59
|
|
|
59
60
|
It is possible to test directly the webhook from the config editor.
|
|
60
61
|
|
|
61
62
|
## Examples
|
|
62
63
|
|
|
63
|
-
## Shelly webhooks
|
|
64
|
+
## Shelly webhooks examples
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
Change 192.168.1.XXX with your device IP address.
|
|
67
|
+
|
|
68
|
+
### Shelly 1 Gen 1
|
|
69
|
+
|
|
70
|
+
To turn on a shelly gen 1 device with ip 192.168.1.155 the url is http://192.168.1.XXX/light/0?turn=on.
|
|
71
|
+
|
|
72
|
+
To turn off a shelly gen 1 device with ip 192.168.1.155 the url is http://192.168.1.XXX/light/0?turn=off.
|
|
73
|
+
|
|
74
|
+
### Shelly Trv Gen 1
|
|
75
|
+
|
|
76
|
+
The following examples allows to fully control a Shelly Trv Gen 1, adding Boost, Schedule and Profile (provided by https://github.com/vandan380).
|
|
77
|
+
|
|
78
|
+
"Boost 30min": method: POST, Url: "http://192.168.1.XXX/thermostats/0?boost_minutes=30"
|
|
79
|
+
|
|
80
|
+
"Schedule Enable": method: POST, Url: "http://192.168.1.XXX/settings/thermostats/0?schedule=1"
|
|
81
|
+
|
|
82
|
+
"Schedule Disable": method: POST, Url: "http://192.168.1.XXX/settings/thermostats/0?schedule=0"
|
|
83
|
+
|
|
84
|
+
"Profile Working Day": method: POST, Url: "http://192.168.1.XXX/settings/thermostats/0?schedule_profile=1"
|
|
85
|
+
|
|
86
|
+
"Profile Holiday": method: POST, Url: "http://192.168.1.XXX/settings/thermostats/0?schedule_profile=2"
|
package/dist/platform.js
CHANGED
|
@@ -14,6 +14,8 @@ export class Platform extends MatterbridgeDynamicPlatform {
|
|
|
14
14
|
}
|
|
15
15
|
async onStart(reason) {
|
|
16
16
|
this.log.info('onStart called with reason:', reason ?? 'none');
|
|
17
|
+
await this.ready;
|
|
18
|
+
await this.clearSelect();
|
|
17
19
|
let i = 1;
|
|
18
20
|
for (const webhookName in this.webhooks) {
|
|
19
21
|
if (Object.prototype.hasOwnProperty.call(this.webhooks, webhookName)) {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-webhooks",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge-webhooks",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.2",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"node-ansi-logger": "^3.0.1",
|