JSPM

  • Created
  • Published
  • Downloads 269
  • Score
    100M100P100Q108654F
  • License Apache-2.0

Matterbridge webhooks plugin

Package Exports

  • matterbridge-webhooks
  • matterbridge-webhooks/dist/module.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (matterbridge-webhooks) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Matterbridge Logo   Matterbridge webhooks plugin

npm version npm downloads Docker Version Docker Pulls Node.js CI CodeQL codecov

power by power by power by power by


This plugin allows you to expose any webhooks to Matter.

Features:

  • The webhooks parameters can easily be entered in the frontend.
  • It is possible to choose how to expose the webhooks: Switch, Outlet or Light.
  • It is possible to choose the method: GET or POST.
  • The webhook can be tested in the frontend.

If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge-webhooks and sponsoring it.

Buy me a coffee

Prerequisites

Matterbridge

Follow these steps to install or update Matterbridge if it is not already installed and up to date:

npm install -g matterbridge --omit=dev

on Linux you may need the necessary permissions:

sudo npm install -g matterbridge --omit=dev

See the complete guidelines on Matterbridge for more information.

How to add a webhook

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.

It is possible to test directly the webhook from the config editor.

Examples

Shelly webhooks examples

Change 192.168.1.XXX with your device IP address.

Shelly 1 Gen 1

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.

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.

Shelly Trv Gen 1

The following examples allows to fully control a Shelly Trv Gen 1, adding Boost, Schedule and Profile (provided by https://github.com/vandan380).

"Boost 30min": method: POST, Url: "http://192.168.1.XXX/thermostats/0?boost_minutes=30"

"Schedule Enable": method: POST, Url: "http://192.168.1.XXX/settings/thermostats/0?schedule=1"

"Schedule Disable": method: POST, Url: "http://192.168.1.XXX/settings/thermostats/0?schedule=0"

"Profile Working Day": method: POST, Url: "http://192.168.1.XXX/settings/thermostats/0?schedule_profile=1"

"Profile Holiday": method: POST, Url: "http://192.168.1.XXX/settings/thermostats/0?schedule_profile=2"