rnilssoncx / homebridge-pico

Expose Lutron Pico Remotes in Homebridge: https://github.com/nfarina/homebridge
MIT License
63 stars 6 forks source link

Fresh install of homebridge-pico v1.0.2 resulting in startup error #36

Closed jamesdh closed 2 years ago

jamesdh commented 2 years ago

After installing minimally configuring the homebridge-pico plugin, and then restarting, I'm getting the following error on homebridge startup:

[14/12/2021, 12:09:24] [Pico] Initializing Pico platform...
[14/12/2021, 12:09:24] [Pico] Pico Plugin Loaded - Version 1.0.2
[14/12/2021, 12:09:24] [Pico] Bus Logging set to full
[14/12/2021, 12:09:24] [Pico] [10.0.1.14] Caseta Pro Initializing
[14/12/2021, 12:09:24] [Pico] [10.0.1.14] Attempting connection
[14/12/2021, 12:09:24] [Pico] 10.0.1.14: "undefined" - undefined - 
[14/12/2021, 12:09:24] [Pico] Creating undefined switch: undefined
[14/12/2021, 12:09:24] Initializing platform accessory 'undefined'...
[14/12/2021, 12:09:25] TypeError: types[this.type] is not iterable
    at PicoRemote.getServices (/usr/local/lib/node_modules/homebridge-pico/accessory.js:71:29)
    at BridgeService.createHAPAccessory (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:461:41)
    at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:549:34
    at Array.forEach (<anonymous>)
    at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:539:21
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
    at Pico.accessories (/usr/local/lib/node_modules/homebridge-pico/index.js:65:5)
    at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:534:24
    at new Promise (<anonymous>)
    at BridgeService.loadPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:528:12)
[14/12/2021, 12:09:25] [Pico] [10.0.1.14] Caseta Pro Connected
[14/12/2021, 12:09:25] Got SIGTERM, shutting down Homebridge...

This is on Homebridge v1.3.8 using Node v14.17.4

rnilssoncx commented 2 years ago

Can you share the pico section of your config?

jamesdh commented 2 years ago
{
    "buslog": "full",
    "servers": [
        {
            "switches": [
                {
                    "pico": []
                }
            ],
            "host": "10.0.1.14",
            "port": 23
        }
    ],
    "longname": false,
    "platform": "Pico"
}
rnilssoncx commented 2 years ago

This is corrected in the latest version (and the beta that was out). New release is posting shortly.