tteck / Proxmox

Proxmox VE Helper-Scripts
https://Helper-Scripts.com
MIT License
14.43k stars 2.37k forks source link

Matterbridge script #3499

Closed tammeryousef1006 closed 3 months ago

tammeryousef1006 commented 3 months ago

Please verify that you have read and understood the guidelines.

yes

A clear and concise description of the issue.

the script of Matterbridge via luligu is wrong , kindly update it as its not working probably

https://github.com/Luligu/matterbridge-zigbee2mqtt/issues/50

What settings are you currently utilizing?

Default Settings

Which Linux distribution are you employing?

Debian 12

If relevant, including screenshots or a code block can be helpful in clarifying the issue.

kindly check the link

https://github.com/Luligu/matterbridge-zigbee2mqtt/issues/50

Please provide detailed steps to reproduce the issue.

[Unit] Description=matterbridge After=network-online.target

[Service] Type=simple ExecStart=matterbridge -bridge -service WorkingDirectory=/home//Matterbridge StandardOutput=inherit StandardError=inherit Restart=always RestartSec=10s TimeoutStopSec=30s User=

[Install] WantedBy=multi-user.target

tteck commented 3 months ago

@MickLesk, could you take a look at this, since it's your PR? https://github.com/tteck/Proxmox/pull/3178

tteck commented 3 months ago

Discussion https://github.com/tteck/Proxmox/discussions/3498

tteck commented 3 months ago

@tammeryousef1006 the default Linux distribution is Debian 12, you stated that you are employing Debian 11 https://github.com/tteck/Proxmox/blob/23ebc32489a9598594a3938f5f8068c2bdbf729e/ct/matterbridge.sh#L25-L26

tammeryousef1006 commented 3 months ago

sorry wrong distribution selection

tammeryousef1006 commented 3 months ago
   __  ___      __  __            __         _     __         
   /  |/  /___ _/ /_/ /____  _____/ /_  _____(_)___/ /___ ____ 
  / /|_/ / __ `/ __/ __/ _ \/ ___/ __ \/ ___/ / __  / __ `/ _ \
 / /  / / /_/ / /_/ /_/  __/ /  / /_/ / /  / / /_/ / /_/ /  __/
/_/  /_/\__,_/\__/\__/\___/_/  /_.___/_/  /_/\__,_/\__, /\___/ 
                                                  /____/                                      
Using Default Settings
Using Distribution: debian
Using debian Version: 12
Using Container Type: 1
Using Root Password: Automatic Login
Using Container ID: 110
Using Hostname: matterbridge
Using Disk Size: 4GB
Allocated Cores 1
Allocated Ram 1024
Using Bridge: vmbr0
Using Static IP Address: dhcp
Using Gateway IP Address: Default
Using Apt-Cacher IP Address: Default
Disable IPv6: No
Using Interface MTU Size: Default
Using DNS Search Domain: Host
Using DNS Server Address: Host
Using MAC Address: Default
Using VLAN Tag: Default
Enable Root SSH Access: No
Enable Verbose Mode: No
Creating a Matterbridge LXC using the above default settings
 ✓ Using local for Template Storage.
 ✓ Using sam for Container Storage.
 ✓ Updated LXC Template List
 ✓ LXC Container 110 was successfully created.
 ✓ Started LXC Container
 ✓ Set up Container OS
 ✓ Network Connected: 192.168.68.147 2a01:9700:3e3a:a900:be24:11ff:fef3:7e7d 
 ✓ IPv4 Internet Connected
 ✗ IPv6 Internet Not Connected
 ✓ DNS Resolved github.com to 140.82.121.3
 ✓ Updated Container OS
 ✓ Installed Dependencies
 ✓ Set up Node.js Repository
 ✓ Installed Node.js
 ✓ Installed Matterbridge
 ✓ Created Service
 ✓ Customized Container
 ✓ Cleaned
 ✓ Completed Successfully!

Matterbridge Setup should be reachable by going to the following URL.
         http://192.168.68.147:8283 
tammeryousef1006 commented 3 months ago

root@matterbridge:~# sudo journalctl -u matterbridge.service -f --output cat █ ▄▄▄▄▄ █ ▀▄▀█▀▀▀ ▄ █ █ █ █ █ █▄ ▀▄ ▀▄ ▀██ █ █▄▄▄█ █ ▄ █ ▄ ▀█ ▀ █ █▄▄▄▄▄▄▄█▄█▄▄▄██▄██▄█▄█ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ [18:22:45.409] [Matterbridge] Matterbridge qrPairingCode: MT:Y.K90YDA13PLTD2VU10 Manual pairing code: 25877352307

[18:23:13.087] [Matterbridge] WebSocketServer client "::ffff:192.168.68.55" connected to Matterbridge [18:23:42.956] [PluginManager] Failed to resolve plugin path matterbridge-zigbee2mqtt/package.json: Error: ENOENT: no such file or directory, open '/usr/lib/node_modules/matterbridge-zigbee2mqtt/package.json' [18:23:42.957] [PluginManager] Failed to add plugin matterbridge-zigbee2mqtt: package.json not found [18:23:45.409] [Matterbridge] Setting reachability to true for Matterbridge [18:24:19.032] [Matterbridge] Installing plugin matterbridge-zigbee2mqtt... root : PWD=/opt/matterbridge ; USER=root ; COMMAND=/usr/bin/npm install -g matterbridge-zigbee2mqtt pam_limits(sudo:session): Could not set limit for 'core' to soft=0, hard=-1: Operation not permitted; uid=0,euid=0 pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0) root : PWD=/usr/lib/node_modules/matterbridge-zigbee2mqtt ; USER=root ; COMMAND=/usr/bin/npm link matterbridge pam_limits(sudo:session): Could not set limit for 'core' to soft=0, hard=-1: Operation not permitted; uid=0,euid=0 pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)

tammeryousef1006 commented 3 months ago

[18:26:27.980] [Matterbridge] Installing plugin matterbridge-zigbee2mqtt... root : PWD=/opt/matterbridge ; USER=root ; COMMAND=/usr/bin/npm install -g matterbridge-zigbee2mqtt pam_limits(sudo:session): Could not set limit for 'core' to soft=0, hard=-1: Operation not permitted; uid=0,euid=0 pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0) root : PWD=/usr/lib/node_modules/matterbridge-zigbee2mqtt ; USER=root ; COMMAND=/usr/bin/npm link matterbridge pam_limits(sudo:session): Could not set limit for 'core' to soft=0, hard=-1: Operation not permitted; uid=0,euid=0 pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)

tammeryousef1006 commented 3 months ago

by the request of the creator of matterbridge , kindly delete this helper script and he will add in readme.MD of matterbridge next time he modify , because multiple users already reporting it and its not running well via this script at this point

tteck commented 3 months ago

Thanks for your input, but I think I'll wait for @MickLesk to investigate, since he mentioned, "Tested and used in my Homelab".

tteck commented 3 months ago

Should Matterbridge be created privileged?

Edit: Makes no difference

tammeryousef1006 commented 3 months ago

for me i run it as privileged without the script privileged

tammeryousef1006 commented 3 months ago

i use the same script of zigbee2mqtt and i did install matterbridge inside it manually via terminal

tteck commented 3 months ago

After setting up MQTT in the Matterbridge zigbee2mqtt plugin

Screenshot 2024-08-11 7 34 02 AM

nfo - [07:31:48.263] [Matterbridge]: Saving config for plugin matterbridge-zigbee2mqtt...
Matterbridge - Restarting matterbridge...
info - [07:32:36.599] [Matterbridge]: restarting...
WebSocket - Disconnected from WebSocket: ws://192.168.86.250:8283
WebSocket - Reconnecting (attempt 1 of 10) to WebSocket: ws://192.168.86.250:8283
WebSocket - Connecting to WebSocket: ws://192.168.86.250:8283
WebSocket - WebSocket error connecting to ws://192.168.86.250:8283
WebSocket - Disconnected from WebSocket: ws://192.168.86.250:8283
WebSocket - Reconnecting (attempt 2 of 10) to WebSocket: ws://192.168.86.250:8283
WebSocket - Connecting to WebSocket: ws://192.168.86.250:8283
WebSocket - Connected to WebSocket: ws://192.168.86.250:8283
info - [07:32:40.131] [Matterbridge]: WebSocketServer client "::ffff:192.168.86.42" connected to Matterbridge
notice - [07:32:40.151] [Matterbridge]: Matter server started
info - [07:32:40.204] [Matterbridge]: The commissioning server on port 5540 for Matterbridge is not commissioned. Pair it scanning the QR code:
info - [07:32:40.205] [Matterbridge]: MatterbridgeqrPairingCode: MT:Y.K904QI14WIKS19420Manual pairing code: 03989960984
info - [07:33:10.164] [PluginManager]: Configuring plugin matterbridge-zigbee2mqtt type DynamicPlatform
info - [07:33:10.164] [Matterbridge zigbee2mqtt plugin]: Requesting update for 0 zigbee entities.
info - [07:33:10.164] [Matterbridge zigbee2mqtt plugin]: Configuring 0 matter devices.
notice - [07:33:10.165] [PluginManager]: Configured plugin matterbridge-zigbee2mqtt type DynamicPlatform
info - [07:33:40.205] [Matterbridge]: Setting reachability to true for Matterbridge
info - [07:34:10.167] [Diningroom Lights]: ONLINE message for device Diningroom Lights
info - [07:34:10.168] [Dishwasher Leak]: ONLINE message for device Dishwasher Leak
info - [07:34:10.168] [Dog Feeder]: ONLINE message for device Dog Feeder
info - [07:34:10.168] [Dogs Lamp]: ONLINE message for device Dogs Lamp
info - [07:34:10.168] [Dogs Lamp Switch]: ONLINE message for device Dogs Lamp Switch
info - [07:34:10.168] [Dogs Water Level]: ONLINE message for device Dogs Water Level
info - [07:34:10.168] [Doorbell]: ONLINE message for device Doorbell
info - [07:34:10.168] [Front Door]: ONLINE message for device Front Door
info - [07:34:10.168] [Front Porch Motion]: ONLINE message for device Front Porch Motion
info - [07:34:10.168] [Front Water]: ONLINE message for device Front Water
info - [07:34:10.168] [Greenhouse Light]: ONLINE message for device Greenhouse Light
info - [07:34:10.168] [Greenhouse Plug]: ONLINE message for device Greenhouse Plug
info - [07:34:10.169] [Hall Switch]: ONLINE message for device Hall Switch
info - [07:34:10.169] [Hallway Light]: ONLINE message for device Hallway Light
info - [07:34:10.169] [Hot Water Leak]: ONLINE message for device Hot Water Leak
info - [07:34:10.169] [Kitchen]: ONLINE message for device Kitchen
info - [07:34:10.169] [Kitchen Ceiling Light1]: ONLINE message for device Kitchen Ceiling Light1
info - [07:34:10.169] [Kitchen Ceiling Light2]: ONLINE message for device Kitchen Ceiling Light2
info - [07:34:10.169] [Kitchen Ceiling Lights]: ONLINE message for device Kitchen Ceiling Lights
info - [07:34:10.169] [Kitchen Leak]: ONLINE message for device Kitchen Leak
info - [07:34:10.169] [Kitchen Motion]: ONLINE message for device Kitchen Motion
info - [07:34:10.169] [Kitchen Switch]: ONLINE message for device Kitchen Switch
info - [07:34:10.169] [Kitchen Window]: ONLINE message for device Kitchen Window
info - [07:34:10.169] [Left Living Room Lamp]: ONLINE message for device Left Living Room Lamp
info - [07:34:10.169] [Left Master Bedroom Lamp]: ONLINE message for device Left Master Bedroom Lamp
info - [07:34:10.170] [Living Room Ceiling Fan Light1]: ONLINE message for device Living Room Ceiling Fan Light1
info - [07:34:10.170] [Living Room Ceiling Fan Light2]: ONLINE message for device Living Room Ceiling Fan Light2
info - [07:34:10.170] [Living Room Ceiling Fan Lights]: ONLINE message for device Living Room Ceiling Fan Lights
info - [07:34:10.170] [Living Room Fan Switch]: ONLINE message for device Living Room Fan Switch
info - [07:34:10.170] [Living Room Lamps]: ONLINE message for device Living Room Lamps
info - [07:34:10.170] [Living Room Left Window]: ONLINE message for device Living Room Left Window
info - [07:34:10.170] [Living Room Motion]: ONLINE message for device Living Room Motion
info - [07:34:10.170] [Living Room Right Window]: ONLINE message for device Living Room Right Window
info - [07:34:10.170] [Master Bathroom Door]: ONLINE message for device Master Bathroom Door
info - [07:34:10.170] [Master Bathroom Leak]: ONLINE message for device Master Bathroom Leak
info - [07:34:10.170] [Master Bathroom Motion]: ONLINE message for device Master Bathroom Motion
info - [07:34:10.170] [Master Bathroom Motion2]: ONLINE message for device Master Bathroom Motion2
info - [07:34:10.170] [Master Bedroom]: ONLINE message for device Master Bedroom
info - [07:34:10.170] [Master Bedroom Button]: ONLINE message for device Master Bedroom Button
info - [07:34:10.170] [Master Bedroom Fan Switch]: ONLINE message for device Master Bedroom Fan Switch
info - [07:34:10.170] [Master Bedroom Front Window]: ONLINE message for device Master Bedroom Front Window
info - [07:34:10.171] [Master Bedroom Motion]: ONLINE message for device Master Bedroom Motion
info - [07:34:10.171] [Master Bedroom Side Window]: ONLINE message for device Master Bedroom Side Window
info - [07:34:10.172] [Master Bedroom Wax Warmer]: ONLINE message for device Master Bedroom Wax Warmer
info - [07:34:10.172] [Mbedroom Plug]: ONLINE message for device Mbedroom Plug
info - [07:34:10.172] [Mechanical Room Door]: ONLINE message for device Mechanical Room Door
info - [07:34:10.172] [Mechanical Room Light]: ONLINE message for device Mechanical Room Light
info - [07:34:10.172] [NEO Siren]: ONLINE message for device NEO Siren
info - [07:34:10.172] [Outside Fan]: ONLINE message for device Outside Fan
info - [07:34:10.173] [Pantry Door]: ONLINE message for device Pantry Door
info - [07:34:10.173] [Pantry Light]: ONLINE message for device Pantry Light
info - [07:34:10.173] [Pantry Switch]: ONLINE message for device Pantry Switch
info - [07:34:10.173] [Pantry Window]: ONLINE message for device Pantry Window
info - [07:34:10.173] [Recliner Light]: ONLINE message for device Recliner Light
info - [07:34:10.173] [Refrigerator]: ONLINE message for device Refrigerator
info - [07:34:10.173] [Refrigerator Leak]: ONLINE message for device Refrigerator Leak
info - [07:34:10.173] [Right Living Room Lamp]: ONLINE message for device Right Living Room Lamp
info - [07:34:10.174] [Right Master Bedroom Lamp]: ONLINE message for device Right Master Bedroom Lamp
info - [07:34:10.174] [She Shed Door]: ONLINE message for device She Shed Door
info - [07:34:10.174] [She Shed Vent]: ONLINE message for device She Shed Vent
info - [07:34:10.174] [Sink Light1]: ONLINE message for device Sink Light1
info - [07:34:10.174] [Sink Light2]: ONLINE message for device Sink Light2
info - [07:34:10.174] [Sink Light3]: ONLINE message for device Sink Light3
info - [07:34:10.174] [Sink Lights]: ONLINE message for device Sink Lights
info - [07:34:10.174] [Sink Switch]: ONLINE message for device Sink Switch
info - [07:34:10.174] [Sliding Glass Door]: ONLINE message for device Sliding Glass Door
info - [07:34:10.175] [Steps Plug]: ONLINE message for device Steps Plug
info - [07:34:10.175] [Storage Door]: ONLINE message for device Storage Door
info - [07:34:10.175] [String Light]: ONLINE message for device String Light
info - [07:34:10.175] [Water Hose Button]: ONLINE message for device Water Hose Button
info - [07:34:10.175] [Wax Melt]: ONLINE message for device Wax Melt
info - [07:34:10.175] [Wine Cooler]: ONLINE message for device Wine Cooler

Seems to be working 🤷🏻‍♂️

tteck commented 3 months ago

It's working. So, I don't think it's a script issue.

root@matterbridge:~# journalctl -u matterbridge.service -f --output cat
[07:49:56.397] [Storage Door] Update endpoint undefined attribute TemperatureMeasurement-measuredValue from 0 to 2400 
[07:49:58.200] [Bathroom Light3] MQTT message for device Bathroom Light3 payload: { brightness: 254, color_mode: 'color_temp', color_temp: 237, last_seen: '2024-08-11T07:49:58-04:00', linkquality: 91, power_on_behavior: 'previous', state: 'OFF' } 
[07:50:11.931] [Right Master Bedroom Lamp] MQTT message for device Right Master Bedroom Lamp payload: { brightness: 254, color_mode: 'color_temp', color_temp: 190, color_temp_startup: 65535, last_seen: '2024-08-11T07:50:11-04:00', linkquality: 91, power_on_behavior: 'previous', state: 'OFF' } 
[07:50:25.828] [Bedroom Motion] MQTT message for device Bedroom Motion payload: { battery: 100, device_temperature: 21, illuminance: 38, illuminance_lux: 38, last_seen: '2024-08-11T07:48:55-04:00', linkquality: 109, occupancy: false, power_outage_count: 30, temperature: 23, voltage: 3095 } 
[07:50:25.828] [Bedroom Motion] Update endpoint undefined attribute TemperatureMeasurement-measuredValue from 2300 to 2100 
[07:50:25.828] [Bedroom Motion] Update endpoint undefined attribute OccupancySensing-occupancy from { occupied: true } to { occupied: false } 
[07:50:25.828] [Bedroom Motion] Update endpoint undefined attribute TemperatureMeasurement-measuredValue from 2100 to 2300 
[07:50:26.704] [Greenhouse Light] MQTT message for device Greenhouse Light payload: { brightness: 254, color_mode: 'color_temp', color_temp: 250, last_seen: '2024-08-11T07:50:26-04:00', linkquality: 43, power_on_behavior: 'previous', state: 'OFF' } 
[07:50:33.673] [Dogs Lamp] MQTT message for device Dogs Lamp payload: { brightness: 160, color_mode: 'color_temp', color_temp: 300, last_seen: '2024-08-11T07:50:33-04:00', linkquality: 98, power_on_behavior: 'previous', state: 'OFF' } 
[07:50:35.788] [Diningroom Light2] MQTT message for device Diningroom Light2 payload: { brightness: 127, color_mode: 'color_temp', color_temp: 237, last_seen: '2024-08-11T07:50:35-04:00', linkquality: 131, power_on_behavior: 'previous', state: 'OFF' } 
[07:50:37.849] [Wax Melt] MQTT message for device Wax Melt payload: { last_seen: '2024-08-11T07:50:37-04:00', linkquality: 98, state: 'OFF', update: { installed_version: 4352, latest_version: 4099, state: 'idle' }, update_available: false } 
[07:50:38.490] [Master Bedroom Motion] MQTT message for device Master Bedroom Motion payload: { battery: 100, device_temperature: 30, illuminance: 10, illuminance_lux: 10, last_seen: '2024-08-11T07:49:08-04:00', linkquality: 116, occupancy: false, power_outage_count: 270, temperature: 32, voltage: 3005 } 
[07:50:38.490] [Master Bedroom Motion] Update endpoint undefined attribute TemperatureMeasurement-measuredValue from 3200 to 3000 
[07:50:38.490] [Master Bedroom Motion] Update endpoint undefined attribute OccupancySensing-occupancy from { occupied: true } to { occupied: false } 
[07:50:38.490] [Master Bedroom Motion] Update endpoint undefined attribute TemperatureMeasurement-measuredValue from 3000 to 3200 
[07:50:45.859] [Living Room Ceiling Fan Light1] MQTT message for device Living Room Ceiling Fan Light1 payload: { brightness: 254, color_mode: 'color_temp', color_temp: 300, last_seen: '2024-08-11T07:50:45-04:00', linkquality: 156, power_on_behavior: 'previous', state: 'OFF' } 
tammeryousef1006 commented 3 months ago

its not saving devices , the status for matterbridge that you point at its for activity only

mb

try to install the matterbridge without using the script

tteck commented 3 months ago

I see. I will fix it.

tteck commented 3 months ago

Fixed

Screenshot 2024-08-11 8 58 25 AM