Closed andrewk123 closed 1 week ago
As far as I know, the 'platform' should:
The plugin should also contain 'name'. The value 'name' means the name of the child bridge and also the name displayed in logs.
so for me it should be:
{
"platform": "homebridge-phantom-switch",
"name": "Phantom Switch",
"devices": [
{
"name": "Phantom 1",
"delay": 120,
"hasMotion": true
},
{
"name": "Phantom 2",
"delay": 180
}
],
"_bridge": {
"username": "XX:XX:XX:XX:XX:XX",
"port": 58202
}
}
The child bridge can be named with a name
property inside the _bridge
object. although I'm going slightly off-topic in this issue.
The beta version of the UI allows for child bridge details to be modified in the UI:
Thanks for that. I typically always set a child bridge name anyway for clarity, however it appears that there is a change from 1.8.3 to 2.0.0 in homebridge which throws an error on startup if a child bridge name is not added and the plugin name is the typical homebridge-xxxxxx etc. If it is not possible to fix this in homebridge or the underlying code then I would suggest the name field is made mandatory when adding a child bridge.
Let's clarify... this isn't an error it a warning. This can easily be mitigated by adding a default name parameter in your config.schema.json file:
And if you use layout it won't even display the name config option:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed as no further activity has occurred.
Describe The Bug
In 2.0 Beta if you do not have a plugin "name" assigned an error is raised (see below) on starting the plugin. Note that the child bridge is named correctly in the list of Child Plugins (in this case homebridge-phantom-switch-wsm) and everything seems to work correctly. However, you have to add a plugin name in config.js eg
to (without '-' in the name) to remove the error on boot. Note that this plugin is a private plugin used internally, however I see the same issue on plugins downloaded from NPM.
The issue does not appear on v1.8.4.
Note that this is a standard (apt based) Raspi install on bookworm.
Logs
HAP-NodeJS WARNING: The accessory 'homebridge-phantom-switch-wsm 77FA' has an invalid 'Name' characteristic ('homebridge-phantom-switch-wsm 77FA'). Please use only alphanumeric, space, and apostrophe characters. Ensure it starts and ends with an alphabetic or numeric character, and avoid emojis. This may prevent the accessory from being added in the Home App or cause unresponsiveness.
Config
Homebridge UI Version
v4.56.4
Homebridge Version
v2.0.0-beta.8
Node.js Version
v20.15.1
Operating System
Raspberry Pi OS / Raspbian
Environment Info
None
Raspberry Pi Model
Raspberry Pi 4 B