Skip to content

Commit

Permalink
Merge pull request #115 from Luligu/dev
Browse files Browse the repository at this point in the history
Release 1.5.2
  • Loading branch information
Luligu committed Aug 30, 2024
2 parents 509f930 + d77cd3d commit f088173
Show file tree
Hide file tree
Showing 37 changed files with 778 additions and 440 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@ If you like this project and find it useful, please consider giving it a star on

- please read this [Development guide lines](https://github.com/Luligu/matterbridge/blob/main/README-DEV.md)

## [1.5.2] - 2024-08-30

### Added

- [frontend]: Added a confirmation message for removing and disabling plugins.
- [matterbridge cli]: Added the parameter `-sudo` to force the use of sudo when installing or updating a package (this is useful when the internal logic is not working in your setup).
- [matterbridge cli]: Added the parameter `-nosudo` to force not using sudo when installing or updating a package (this is useful when the internal logic is not working in your setup).

### Changed

- [package]: Update dependencies.
- [spawn]: Modified the install or update function to add more info in the log.

<a href="https://www.buymeacoffee.com/luligugithub">
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
</a>

## [1.5.1] - 2024-08-28

### Added
Expand Down
83 changes: 1 addition & 82 deletions README-ADVANCED.md → README-DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,88 +14,7 @@

# Advanced configuration

## Run matterbridge as a daemon with systemctl (Linux only)

Create a systemctl configuration file for Matterbridge

```
sudo nano /etc/systemd/system/matterbridge.service
```

Add the following to this file, replacing twice (!) USER with your user name (e.g. WorkingDirectory=/home/pi/Matterbridge and User=pi):

You may need to adapt the configuration to your setup:
- execStart on some linux distribution can also be ExecStart==/usr/bin/matterbridge -service

```
[Unit]
Description=matterbridge
After=network-online.target
[Service]
Type=simple
ExecStart=matterbridge -service
WorkingDirectory=/home/<USER>/Matterbridge
StandardOutput=inherit
StandardError=inherit
Restart=always
RestartSec=10s
TimeoutStopSec=30s
User=<USER>
[Install]
WantedBy=multi-user.target
```

If you modify it after, then run:

```
sudo systemctl daemon-reload
```

### Start Matterbridge

```
sudo systemctl start matterbridge
```

### Stop Matterbridge

```
sudo systemctl stop matterbridge
```

### Show Matterbridge status

```
sudo systemctl status matterbridge.service
```

### View the log of Matterbridge in real time (this will show the log with colors)

```
sudo journalctl -u matterbridge.service -f --output cat
```

### Delete the logs older then 3 days (all of them not only the ones of Matterbridge!)

```
sudo journalctl --vacuum-time=3d
```

### Enable Matterbridge to start automatically on boot

```
sudo systemctl enable matterbridge.service
```

### Disable Matterbridge from starting automatically on boot

```
sudo systemctl disable matterbridge.service
```

## Run matterbridge with docker
## Run matterbridge with docker and docker compose

The Matterbridge Docker image, which includes a manifest list for the linux/amd64, linux/arm64 and linux/arm/v7 architectures, is published on Docker Hub.

Expand Down
96 changes: 96 additions & 0 deletions README-SERVICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# <img src="https://github.com/Luligu/matterbridge/blob/main/frontend/public/matterbridge%2064x64.png" alt="Matterbridge Logo" width="64px" height="64px">&nbsp;&nbsp;&nbsp;Matterbridge

[![npm version](https://img.shields.io/npm/v/matterbridge.svg)](https://www.npmjs.com/package/matterbridge)
[![npm downloads](https://img.shields.io/npm/dt/matterbridge.svg)](https://www.npmjs.com/package/matterbridge)
[![Docker Version](https://img.shields.io/docker/v/luligu/matterbridge?label=docker%20version&sort=semver)](https://hub.docker.com/r/luligu/matterbridge)
[![Docker Pulls](https://img.shields.io/docker/pulls/luligu/matterbridge.svg)](https://hub.docker.com/r/luligu/matterbridge)
![Node.js CI](https://github.com/Luligu/matterbridge/actions/workflows/build.yml/badge.svg)

[![power by](https://img.shields.io/badge/powered%20by-matter--history-blue)](https://www.npmjs.com/package/matter-history)
[![power by](https://img.shields.io/badge/powered%20by-node--ansi--logger-blue)](https://www.npmjs.com/package/node-ansi-logger)
[![power by](https://img.shields.io/badge/powered%20by-node--persist--manager-blue)](https://www.npmjs.com/package/node-persist-manager)

---

# Advanced configuration

## Run matterbridge as a daemon with systemctl (Linux only)

Create a systemctl configuration file for Matterbridge

```
sudo nano /etc/systemd/system/matterbridge.service
```

Add the following to this file, replacing twice (!) USER with your user name (e.g. WorkingDirectory=/home/pi/Matterbridge and User=pi):

You may need to adapt the configuration to your setup:
- execStart on some linux distribution can also be ExecStart==/usr/bin/matterbridge -service

```
[Unit]
Description=matterbridge
After=network-online.target
[Service]
Type=simple
ExecStart=matterbridge -service
WorkingDirectory=/home/<USER>/Matterbridge
StandardOutput=inherit
StandardError=inherit
Restart=always
RestartSec=10s
TimeoutStopSec=30s
User=<USER>
[Install]
WantedBy=multi-user.target
```

If you modify it after, then run:

```
sudo systemctl daemon-reload
```

### Start Matterbridge

```
sudo systemctl start matterbridge
```

### Stop Matterbridge

```
sudo systemctl stop matterbridge
```

### Show Matterbridge status

```
sudo systemctl status matterbridge.service
```

### View the log of Matterbridge in real time (this will show the log with colors)

```
sudo journalctl -u matterbridge.service -f --output cat
```

### Delete the logs older then 3 days (all of them not only the ones of Matterbridge!)

```
sudo journalctl --vacuum-time=3d
```

### Enable Matterbridge to start automatically on boot

```
sudo systemctl enable matterbridge.service
```

### Disable Matterbridge from starting automatically on boot

```
sudo systemctl disable matterbridge.service
```
71 changes: 54 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ The project is build on top of https://github.com/project-chip/matter.js.

A special thank to Apollon77 for his incredible work.

## Prerequisites

To run Matterbridge, you need either a [Node.js](https://nodejs.org/en/download/package-manager) environment or [Docker](https://docs.docker.com/get-started/get-docker/) installed on your system.

## Installation

Follow these steps to install Matterbridge:
Expand Down Expand Up @@ -120,40 +124,68 @@ Config editor:

## Advanced configurations

[Advanced configurations](https://github.com/Luligu/matterbridge/blob/main/README-ADVANCED.md)
### Run matterbridge as a daemon with systemctl (Linux only)

[Advanced configurations](https://github.com/Luligu/matterbridge/blob/main/README-SERVICE.md)

### Run matterbridge with docker and docker compose

[Advanced configurations](https://github.com/Luligu/matterbridge/blob/main/README-DOCKER.md)

## Development

[Development](https://github.com/Luligu/matterbridge/blob/main/README-DEV.md)

## Plugins

### Production-level plugins
### Shelly

<a href="https://github.com/Luligu/matterbridge-shelly">
<img src="https://github.com/Luligu/matterbridge/blob/dev/screenshot/Shelly.png" alt="Shelly plugin logo" width="100" />
</a>

Matterbridge shelly plugin allows you to expose all Shelly Gen 1, Gen 2, Gen 3 and BLU devices to Matter.

Features:

- Shellies are automatically discovered using mDNS.
- Shelly wifi battery-powered devices are supported.
- Shelly wifi battery-powered devices with sleep_mode are supported.
- Shelly BLU devices are supported through local devices configured as ble gateway.
- Discovered shellies are stored in local storage for quick loading on startup.
- The components exposed are Light (with brightness and RGB color), Switch, Relay, Roller, Cover, PowerMeter, Temperature, Humidity and Input.
- All components expose the electrical measurements with the EveHistory cluster (displayed on HA), waiting for the controllers to upgrade to the Matter 1.3 specs.
- Shellies are controlled locally, eliminating the need for cloud or MQTT (which can both be disabled).
- Shelly Gen 1 devices are controlled using the CoIoT protocol (see the note below).
- Shelly Gen 2 and Gen 3 devices are controlled using WebSocket.
- The Matter device takes the name configured in the Shelly device's web page.
- If the device has a firmware update available, a message is displayed.
- If the device's CoIoT protocol is not correctly configured, a message is displayed.
- If the device cover/roller component is not calibrated, a message is displayed.
- A 10-minute timer checks if the device has reported within that time frame, and fetch un update.



### Zigbee2MQTT

[zigbee2mqtt plugin](https://github.com/Luligu/matterbridge-zigbee2mqtt)
<a href="https://github.com/Luligu/matterbridge-zigbee2mqtt">
<img src="https://github.com/Luligu/matterbridge/blob/dev/screenshot/Zigbee2MQTT.png" alt="Zigbee2MQTT plugin logo" width="100" />
</a>

Matterbridge zigbee2mqtt is a matterbridge production-level plugin that expose all zigbee2mqtt devices and groups to Matter.

No hub or dedicated hardware needed.

[somy-tahoma plugin](https://github.com/Luligu/matterbridge-somfy-tahoma)

Matterbridge Somfy Tahoma is a matterbridge production-level plugin that expose all Somfy Tahoma devices to Matter.

[shelly plugin](https://github.com/Luligu/matterbridge-shelly)
### Somfy tahoma

Matterbridge shelly allows you to expose Shelly Gen 1, Gen 2, and Gen 3 devices to Matter.
<a href="https://github.com/Luligu/matterbridge-somfy-tahoma">
<img src="https://github.com/Luligu/matterbridge/blob/dev/screenshot/Somfy.png" alt="Somfy plugin logo" width="100" />
</a>

Features:
Matterbridge Somfy Tahoma is a matterbridge production-level plugin that expose the Somfy Tahoma screen devices to Matter.

- Shellies are automatically discovered using mDNS.
- Discovered shellies are stored in local storage for quick loading on startup.
- In this first release, the components exposed are lights (with brightness), switches, rollers and meters.
- Shellies are controlled locally, eliminating the need for cloud or MQTT (which can be disabled).
- Shelly Gen 1 devices are controlled using the CoIoT protocol (see the note below).
- Shelly Gen 2 and Gen 3 devices are controlled using WebSocket.
- The Matter device takes the name configured in the Shelly device's web page.
- A 10-minute timer checks if the device has reported in that time.

### Accessory platform example

Expand Down Expand Up @@ -195,7 +227,12 @@ The history works in both bridge and childbridge mode.

The Eve app only shows the history when the plugins run like an AccessoryPlatform in childbridge mode (this means the plugin is paired directly).

## How to install and register a production-level plugin from a terminal (from npm)
## How to install and add a plugin with the frontend (best option)

Just open the frontend on the link provided in the log, select a plugin and click install.


## How to install and add a plugin manually from a terminal (from npm)

To install i.e. https://github.com/Luligu/matterbridge-zigbee2mqtt

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.main
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ RUN npm -g install matterbridge-eve-room
RUN npm -g install matterbridge-eve-weather

WORKDIR /app
CMD ["matterbridge", "-bridge", "-docker"]
CMD ["matterbridge", "-docker"]
12 changes: 6 additions & 6 deletions frontend/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"files": {
"main.css": "/static/css/main.ee3183e2.css",
"main.js": "/static/js/main.4c5271fd.js",
"main.css": "/static/css/main.1cf003ae.css",
"main.js": "/static/js/main.cfcfbb06.js",
"static/js/453.abd36b29.chunk.js": "/static/js/453.abd36b29.chunk.js",
"index.html": "/index.html",
"main.ee3183e2.css.map": "/static/css/main.ee3183e2.css.map",
"main.4c5271fd.js.map": "/static/js/main.4c5271fd.js.map",
"main.1cf003ae.css.map": "/static/css/main.1cf003ae.css.map",
"main.cfcfbb06.js.map": "/static/js/main.cfcfbb06.js.map",
"453.abd36b29.chunk.js.map": "/static/js/453.abd36b29.chunk.js.map"
},
"entrypoints": [
"static/css/main.ee3183e2.css",
"static/js/main.4c5271fd.js"
"static/css/main.1cf003ae.css",
"static/js/main.cfcfbb06.js"
]
}
2 changes: 1 addition & 1 deletion frontend/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="/manifest.json"/><script defer="defer" src="/static/js/main.4c5271fd.js"></script><link href="/static/css/main.ee3183e2.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="/manifest.json"/><script defer="defer" src="/static/js/main.cfcfbb06.js"></script><link href="/static/css/main.1cf003ae.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
2 changes: 2 additions & 0 deletions frontend/build/static/css/main.1cf003ae.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f088173

Please sign in to comment.