Closed DeltaEchoFour closed 3 years ago
I just tested with a server configured but no switches. Homebridge loads fine and I can monitor the bus as expected. You can just cut and past the pico config below to get started.
If you could post the config that was created and is causing your a problem I can take a look and see if there's something that can be improved for these initial setups.
{
"bridge": {
"name": "Homebridge xxxx",
"username": "xx:xx:xx:xx:xx:xx",
"port": 51524,
"pin": "xxx-xx-xxx"
},
"accessories": [],
"platforms": [
{
"name": "Config",
"port": 8080,
"platform": "config"
},
{
"buslog": "monitor",
"servers": [
{
"switches": [
],
"host": "x.x.x.x",
"port": 23
}
],
"platform": "Pico"
}
]
}
Here's the snippet that's created by config-ui-x on a new install and having set buslog to Monitor and the IP address of the server.
{ "buslog": "monitor", "servers": [ { "switches": [ { "pico": [] } ], "host": "192.168.7.218", "port": 23 } ], "longname": false, "platform": "Pico" }
This causes the this error:
[01/02/2021, 23:12:03] TypeError: types[this.type] is not iterable
at PicoRemote.getServices (/usr/local/lib/node_modules/homebridge-pico/accessory.js:71:29)
at Server.createHAPAccessory (/usr/local/lib/node_modules/homebridge/src/server.ts:448:41)
at /usr/local/lib/node_modules/homebridge/src/server.ts:433:34
at Array.forEach (
Pasting this into config.json and updating the IP address does work!
{ "buslog": "monitor", "servers": [ { "switches": [ ], "host": "x.x.x.x", "port": 23 } ], "platform": "Pico" } ]
}
This should now be fixed.
I have a fully updated Homebridge 1.2.5 install running on a Pi 4. Using several plugins without issue.
I added homebridge-pico using config-ui-x. I set my hub’s IP address and bus logging to monitor in the config UI. I then restarted homebridge, only for it to fail to restart.
The following error is being logged:
TypeError: this.servers[key].switches is not iterable
This seems related to the empty switch block the UI sets up in config.json. If I remove the empty block by hand, I get a similar but different error about switches not being iterable.
How can I go about monitoring for the information I need to setup a pico?
Thanks!