Skip to content

Commit

Permalink
Merge pull request #132 from Luligu/dev
Browse files Browse the repository at this point in the history
Release 1.5.7
  • Loading branch information
Luligu authored Sep 17, 2024
2 parents 1489cef + 8264ce3 commit 9ac134c
Show file tree
Hide file tree
Showing 15 changed files with 753 additions and 168 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,33 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Clean cache
run: npm cache clean --force

- name: Install latest npm
run: npm install -g npm@latest

- name: Verify Node.js version
run: node -v

- name: Verify Npm version
run: npm -v

- name: Clean cache
run: npm cache clean --force

- name: Install matterbridge
run: npm install -g matterbridge --force

- name: Install dependencies
run: npm install
run: npm ci

- name: Lint the project
run: npm run lint

- name: Test the project
run: npm run test

- name: Build the project
run: npm run build

- name: Install matterbridge
run: npm install -g .

- name: Test the project
run: npm run test

- name: List, audit, fix outdated dependencies and build again
run: |
npm list --outdated
Expand Down
32 changes: 6 additions & 26 deletions .github/workflows/docker-buildx-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Docker image dev and dev_shelly_alpine with buildx
name: Build Docker image dev and dev_shelly with buildx

on:
push:
Expand All @@ -18,7 +18,7 @@ jobs:
node-version: '20.x'

- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -42,35 +42,15 @@ jobs:
- name: Echo main version ${{ env.VERSION }}
run: |
echo "Extracted version is: $VERSION ${{ env.VERSION }}"
- name: Run Docker Buildx on dev_shelly_alpine
run: |
docker buildx build \
--platform linux/arm64 \
-f docker/Dockerfile.shelly.alpine \
-t luligu/matterbridge:dev_shelly_alpine \
--push .
docker manifest inspect luligu/matterbridge:dev_shelly_alpine
timeout-minutes: 60

- name: Run Docker Buildx on dev_shelly_bullseye
run: |
docker buildx build \
--platform linux/arm64 \
-f docker/Dockerfile.shelly.bullseye \
-t luligu/matterbridge:dev_shelly_bullseye \
--push .
docker manifest inspect luligu/matterbridge:dev_shelly_bullseye
timeout-minutes: 60

- name: Run Docker Buildx on dev_shelly_bookworm
- name: Run Docker Buildx on dev_shelly
run: |
docker buildx build \
--platform linux/arm64 \
-f docker/Dockerfile.shelly.bookworm \
-t luligu/matterbridge:dev_shelly_bookworm \
-t luligu/matterbridge:dev_shelly \
--push .
docker manifest inspect luligu/matterbridge:dev_shelly_bookworm
docker manifest inspect luligu/matterbridge:dev_shelly
timeout-minutes: 60

- name: Run Docker Buildx on dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-buildx-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
node-version: '20.x'

- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,20 @@ jobs:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'

- name: Clean cache
run: npm cache clean --force

- name: Install latest npm
run: npm install -g npm@latest

- name: Verify Node.js version
run: node -v

- name: Verify Npm version
run: npm -v

- name: Install dependencies
run: npm install
run: npm ci

- name: Lint the project
run: npm run lint
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@ If you like this project and find it useful, please consider giving it a star on

The Home Assistant Community Add-ons and plugins are not verified to work with Matterbridge. I strongly advise against using them. If you do use them and encounter an issue (which is likely because some do not meet the Matterbridge guidelines), please do not open an issue in the Matterbridge repository.

## [1.5.7] - 2024-09-17

### Added

- [matterbridge]: Added the [Official Matterbridge Home Assistant Add-on](https://github.com/Luligu/matterbridge-home-assistant-addon)

### Changed

- [electricalSensor]: Refactor the getDefaultElectricalEnergyMeasurementClusterServer and getDefaultElectricalPowerMeasurementClusterServer
- [package]: Update matter-node.js to 0.10.3.
- [package]: Update matter-history to 1.1.14.
- [package]: Update dependencies.

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

## [1.5.6] - 2024-09-13

### Added
Expand Down
19 changes: 15 additions & 4 deletions README-DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,47 @@
Matterbridge exports from:

"matterbridge"

- Matterbridge and all Matterbridge related classes.
- All relevant matter-node.js or matter.js clusters, classes and functions.

"matterbridge/cluster"

- All clusters not present in matter.js or modified.

"matterbridge/utils"

- All general utils and colorUtils functions.

"matterbridge/history"

- MatterHistory class.

"matterbridge/logger"

- NodeAnsiLogger class.

"matterbridge/storage"

- NodeStorage classes.

# **********
# ****\*\*****

A plugin must never install or import from `matter-node.js` or `matter.js` directly, as this leads to a second instance of `matter.js`, causing instability and unpredictable errors such as "The only instance is Endpoint". Additionally, when Matterbridge updates the `matter.js` version, it should be consistent across all plugins.
# **********

# ****\*\*****

A plugin must never install Matterbridge (neither as dependencies nor as devDependencies). Matterbridge must be linked to the plugin:

```json
"scripts": {
'''
"install": "node link-matterbridge-script.js",
'''
}
}
```
# **********

# ****\*\*****

In the next releases I will remove the duplicated exports so please update your plugins.

Expand Down
3 changes: 2 additions & 1 deletion README-DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ mkdir -p ./Matterbridge
mkdir -p ./.matterbridge
sudo chown -R $USER:$USER ./Matterbridge ./.matterbridge
```

You may need to adapt the script to your setup.

### Run the Docker container and start it
Expand All @@ -40,6 +41,7 @@ docker run --name matterbridge \
-v ${HOME}/.matterbridge:/root/.matterbridge \
--network host --restart always -d luligu/matterbridge:latest
```

You may need to adapt the script to your setup.

### Run with docker compose
Expand Down Expand Up @@ -113,4 +115,3 @@ docker logs matterbridge
```
docker logs --tail 1000 -f matterbridge
```

3 changes: 2 additions & 1 deletion README-SERVICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ 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

- execStart on some linux distribution can also be ExecStart==/usr/bin/matterbridge -service

```
[Unit]
Expand Down
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ sudo npm install -g matterbridge
Test the installation with:

```
matterbridge -bridge
matterbridge
```

Now it is possible to open the frontend at the link provided in the log (e.g. http://MATTERBIDGE-IPV4-ADDRESS:8283)
Now it is possible to open the frontend at the link provided in the log (e.g. http://MATTERBIDGE-IPV4-ADDRESS:8283).

You can then change the bridge mode from the frontend.

## Usage

Expand All @@ -76,6 +78,8 @@ Now it is possible to open the frontend at the link provided in the log (e.g. ht
matterbridge -bridge
```

This force Matterbridge to load in bridge mode.

Matterbridge only exposes itself, and you have to pair it scanning the QR code shown in the frontend or in the console.

### mode childbridge
Expand All @@ -84,6 +88,8 @@ Matterbridge only exposes itself, and you have to pair it scanning the QR code s
matterbridge -childbridge
```

This force Matterbridge to load in childbridge mode.

Matterbridge exposes each registered plugins, and you have to pair each one by scanning the QR code shown in the frontend or in the console.

### Use matterbridge -help to see the command line syntax
Expand All @@ -101,11 +107,7 @@ You can change the default port by adding the frontend parameter when you run it
Here's how to specify a different port number:

```
matterbridge -bridge -frontend [port number]
```

```
matterbridge -childbridge -frontend [port number]
matterbridge -frontend [port number]
```

From the frontend you can do all operations in an easy way.
Expand All @@ -132,9 +134,13 @@ Config editor:

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

### Home Assistant Community Add-ons
### Run matterbridge as an home assistant add-on with the official add-on

[Advanced configurations](https://github.com/Luligu/matterbridge-home-assistant-addon)

### Other Home Assistant Community Add-ons

The Home Assistant Community Add-ons and plugins are not verified to work with Matterbridge. I strongly advise against using them. If you do use them and encounter an issue (which is likely because some do not meet the Matterbridge guidelines), please do not open an issue in the Matterbridge repository.
The other Home Assistant Community Add-ons and plugins are not verified to work with Matterbridge. I strongly advise against using them. If you do use them and encounter an issue (which is likely because some do not meet the Matterbridge guidelines), please do not open an issue in the Matterbridge repository.

## Development

Expand Down Expand Up @@ -168,8 +174,6 @@ Features:
- 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

<a href="https://github.com/Luligu/matterbridge-zigbee2mqtt">
Expand All @@ -180,8 +184,6 @@ Matterbridge zigbee2mqtt is a matterbridge production-level plugin that expose a

No hub or dedicated hardware needed.



### Somfy tahoma

<a href="https://github.com/Luligu/matterbridge-somfy-tahoma">
Expand All @@ -190,7 +192,6 @@ No hub or dedicated hardware needed.

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


### Accessory platform example

This an example of an accessory platform plugin.
Expand All @@ -206,6 +207,7 @@ An Accessory platform plugin only exposes one device.
This an example of a dynamic platform plugin.

It exposes:

- a switch with onOff cluster
- a light with onOff
- a light with onOff and levelControl (dimmer)
Expand Down Expand Up @@ -339,10 +341,12 @@ So far is the only controller supporting some Matter 1.2 and 1.3 device type:
- deviceEnergyManagement code 0x050d (Matter 1.3 with only DeviceEnergyManagementMode cluster)

Electrical measurements:

- electrical measurements from EveHistoryCluster (used in Matterbridge plugins)
- electricalSensor code 0x0510 with clusters: ElectricalPowerMeasurement and ElectricalEnergyMeasurement (still in dev but fully working!)

Other supported cluster:

- ModeSelect

## Home Assistant issues (Matter Server for HA is still in Beta)
Expand Down
Loading

0 comments on commit 9ac134c

Please sign in to comment.