Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plug-in wont start #112

Closed
jameswestcott opened this issue Aug 13, 2021 · 4 comments
Closed

plug-in wont start #112

jameswestcott opened this issue Aug 13, 2021 · 4 comments
Assignees
Labels

Comments

@jameswestcott
Copy link

Hi,

just updated plug-in with latest v5.0.1 from a previous v4 and the plug-in no longer runs. I get the following error message:

TypeError: Cannot read property 'filter' of undefined
at Cmd4Accessory.setupAccessoryFakeGatoService (C:\Users\james\AppData\Roaming\npm\node_modules\homebridge-cmd4\Cmd4Accessory.js:1165:64)
at Cmd4Accessory.createServicesForStandaloneAccessoryAndItsChildren (C:\Users\james\AppData\Roaming\npm\node_modules\homebridge-cmd4\Cmd4Accessory.js:556:17)
at new Cmd4Accessory (C:\Users\james\AppData\Roaming\npm\node_modules\homebridge-cmd4\Cmd4Accessory.js:300:15)
at C:\Users\james\AppData\Roaming\npm\node_modules\homebridge\src\server.ts:350:50
at Array.forEach ()
at Server.loadAccessories (C:\Users\james\AppData\Roaming\npm\node_modules\homebridge\src\server.ts:270:29)
at Server.start (C:\Users\james\AppData\Roaming\npm\node_modules\homebridge\src\server.ts:162:12)

There are multiple entries in accessories in config.json like this one:
"accessories": [
{
"accessory": "Cmd4",
"type": "TemperatureSensor",
"name": "Bathroom1Temperature",
"displayName": "Bathroom1Temperature",
"manufacturer": "cmd4",
"model": "TemperatureSensor",
"serialNumber": "10001",
"CurrentTemperature": 0,
"statusActive": "TRUE",
"StatusFault": "NO_FAULT",
"StatusTampered": "NOT_TAMPERED",
"StatusLowBattery": "BATTERY_LEVEL_NORMAL",
"polling": [
{
"Characteristic": "CurrentTemperature",
"Interval": 60,
"Timeout": 10000
}
],
"fakegato": {
"eve": "room",
"temp": "CurrentTemperature",
"humidity": "0",
"ppm": "0",
"storage": "fs"
},
"stateChangeResponseTime": 3,
"state_cmd": "node C:\Users\james\.homebridge\instance2\temperaturehumidity1.js"
},

@ztalbot2000
Copy link
Owner

ztalbot2000 commented Aug 13, 2021 via email

@jameswestcott
Copy link
Author

I'm not sure if it's changed. Am now running 0.6.1. Not sure what version I had before. Will also take a look.

@ztalbot2000
Copy link
Owner

ztalbot2000 commented Aug 14, 2021 via email

@ztalbot2000
Copy link
Owner

Resolved with v5.0.2. I've also added a number of test cases around some fakegato configurations so hopefully this will not happen again. It certainly would have caught this one.

Sorry for the inconvenience
John

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants