Luligu / matterbridge

Matterbridge plugin manager for Matter
https://github.com/Luligu/matterbridge/blob/main/README.md
Apache License 2.0
125 stars 13 forks source link

macOS Support #29

Closed donavanbecker closed 1 month ago

donavanbecker commented 2 months ago

Will macOS be added at some point? so that it can be installed as a service.

Luligu commented 2 months ago

Hi, sorry for the late answer. I have no knowledge of macOS. Can you explain me if you encounter problem please?

donavanbecker commented 1 month ago

Well for one thing it would be nice if a Launchctl Service File could be generated that would start matterbridge. Similar to how you have a systemctl for linux here: https://github.com/Luligu/matterbridge/blob/main/README.md#run-matterbridge-as-a-daemon-with-systemctl-linux-only

I was receiving an error but tried installing again and not getting that right now

donavanbecker commented 1 month ago
eneralDiagnosticsCluster.setNetworkInterfacesAttribute for Matterbridge error: ValidationError: Validation error for attribute "networkInterfaces"in field [0].iPv6Addresses.[0]: (Validation/135) String is too short: 12, min 16.
2024-05-24 10:43:41     at StringSchema.validate (file:///app/node_modules/@project-chip/matter.js/dist/esm/tlv/TlvString.js:39:13)
2024-05-24 10:43:41     at error.fieldName (file:///app/node_modules/@project-chip/matter.js/dist/esm/tlv/TlvArray.js:62:34)
2024-05-24 10:43:41     at tryCatch (file:///app/node_modules/@project-chip/matter.js/dist/esm/common/TryCatchHandler.js:8:12)
2024-05-24 10:43:41     at file:///app/node_modules/@project-chip/matter.js/dist/esm/tlv/TlvArray.js:61:7
2024-05-24 10:43:41     at Array.forEach (<anonymous>)
2024-05-24 10:43:41     at ArraySchema.validate (file:///app/node_modules/@project-chip/matter.js/dist/esm/tlv/TlvArray.js:60:10)
2024-05-24 10:43:41     at error.fieldName (file:///app/node_modules/@project-chip/matter.js/dist/esm/tlv/TlvObject.js:137:24)
2024-05-24 10:43:41     at tryCatch (file:///app/node_modules/@project-chip/matter.js/dist/esm/common/TryCatchHandler.js:8:12)
2024-05-24 10:43:41     at ObjectSchema.validate (file:///app/node_modules/@project-chip/matter.js/dist/esm/tlv/TlvObject.js:136:9)
2024-05-24 10:43:41     at error.fieldName (file:///app/node_modules/@project-chip/matter.js/dist/esm/tlv/TlvArray.js:62:34) {
2024-05-24 10:43:41   code: 135,
2024-05-24 10:43:41   clusterCode: undefined,
2024-05-24 10:43:41   fieldName: '[0].iPv6Addresses.[0]'
2024-05-24 10:43:41 } 
Luligu commented 1 month ago

This is really interesting, could you please post also the first part of the log before the error... I will report back to matter.js. I do apologize but, as I told you, I have 0 knowledge of macOS.

Luligu commented 1 month ago

7.18.2.39. IPv6 Address The IPv6 address data type is derived from an octet string. The octets SHALL correspond to the full 16 octets that comprise an IPv6 address as defined by RFC 4291. The octets SHALL be presented in network byte order. Examples of encoding: • Address 2001:DB8:0:0:8:800:200C:417A → 20010DB80000000000080800200C417A • Address 2001:0DB8:1122:3344:5566:7788:99AA:BBCC → 20010DB8112233445566778899AABBCC These are the matter specs.

Apollon77 commented 1 month ago

Hm ... I also use macos and I never got that error. I will enhance the exception to also contain the invalid value and not only the details about the error, then we might be able to see a reason.

It might help to show your network interfaces. ideally do on a command line

node and then enter os.networkInterfaces() ... please post the result

Luligu commented 1 month ago

Thanks Apollon

Hm ... I also use macos and I never got that error. I will enhance the exception to also contain the invalid value and not only the details about the error, then we might be able to see a reason.

It might help to show your network interfaces. ideally do on a command line

node and then enter os.networkInterfaces() ... please post the result

Luligu commented 1 month ago
eneralDiagnosticsCluster.setNetworkInterfacesAttribute for Matterbridge error: ValidationError: Validation error for attribute "networkInterfaces"in field [0].iPv6Addresses.[0]: (Validation/135) String is too short: 12, min 16.
2024-05-24 10:43:41     at StringSchema.validate (file:///app/node_modules/@project-chip/matter.js/dist/esm/tlv/TlvString.js:39:13)
2024-05-24 10:43:41     at error.fieldName (file:///app/node_modules/@project-chip/matter.js/dist/esm/tlv/TlvArray.js:62:34)
2024-05-24 10:43:41     at tryCatch (file:///app/node_modules/@project-chip/matter.js/dist/esm/common/TryCatchHandler.js:8:12)
2024-05-24 10:43:41     at file:///app/node_modules/@project-chip/matter.js/dist/esm/tlv/TlvArray.js:61:7
2024-05-24 10:43:41     at Array.forEach (<anonymous>)
2024-05-24 10:43:41     at ArraySchema.validate (file:///app/node_modules/@project-chip/matter.js/dist/esm/tlv/TlvArray.js:60:10)
2024-05-24 10:43:41     at error.fieldName (file:///app/node_modules/@project-chip/matter.js/dist/esm/tlv/TlvObject.js:137:24)
2024-05-24 10:43:41     at tryCatch (file:///app/node_modules/@project-chip/matter.js/dist/esm/common/TryCatchHandler.js:8:12)
2024-05-24 10:43:41     at ObjectSchema.validate (file:///app/node_modules/@project-chip/matter.js/dist/esm/tlv/TlvObject.js:136:9)
2024-05-24 10:43:41     at error.fieldName (file:///app/node_modules/@project-chip/matter.js/dist/esm/tlv/TlvArray.js:62:34) {
2024-05-24 10:43:41   code: 135,
2024-05-24 10:43:41   clusterCode: undefined,
2024-05-24 10:43:41   fieldName: '[0].iPv6Addresses.[0]'
2024-05-24 10:43:41 } 

Just to be sure what version of Matterbridge are you using ?

donavanbecker commented 1 month ago

sorry have been busy. Th latest version seems to resolve this and I am not seeing this error.

However I am not seeing the bridge in the Home App.

donavanbecker commented 1 month ago

@Luligu would you know his to create a startup script for macOS? If a user closes terminal the matterbridge dies

Apollon77 commented 1 month ago

maybe that could be an ideal topic to deliver by the community? ;-)) But yes, maybe looking at how homebridge or iobroker does it could help? (iobroker like https://github.com/ioBroker/ioBroker/blob/master/installer.sh#L429-L465)