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

custom type error #102

Open
thncode opened this issue Nov 7, 2020 · 4 comments
Open

custom type error #102

thncode opened this issue Nov 7, 2020 · 4 comments

Comments

@thncode
Copy link

thncode commented Nov 7, 2020

I do get the following errors when trying to use the custom type

Unhandled rejection TypeError: thisAccessory.services.forEach is not a function
at new FakeGatoHistory (/usr/local/lib/node_modules/fakegato-history/fakegato-history.js:317:29)
at new FritzOutletAccessory (/usr/local/lib/node_modules/homebridge-fritz/lib/accessories/outlet.js:48:27)
at /usr/local/lib/node_modules/homebridge-fritz/lib/platform.js:123:46
at Array.forEach ()
at /usr/local/lib/node_modules/homebridge-fritz/lib/platform.js:121:26
at tryCatcher (/usr/local/lib/node_modules/homebridge-fritz/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-fritz/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-fritz/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._fulfillPromises (/usr/local/lib/node_modules/homebridge-fritz/node_modules/bluebird/js/release/promise.js:704:14)
at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-fritz/node_modules/bluebird/js/release/promise.js:730:18)
at _drainQueueStep (/usr/local/lib/node_modules/homebridge-fritz/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/usr/local/lib/node_modules/homebridge-fritz/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/usr/local/lib/node_modules/homebridge-fritz/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/homebridge-fritz/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:456:21)

what can that possibly be?

@simont77
Copy link
Owner

simont77 commented Nov 7, 2020

@NorthernMan54 any help here?

@NorthernMan54
Copy link
Collaborator

@thncode can you share a link to your github repo ? I think you not passing the correct accessory context

If you want an example please see my homebridge-tasmota plugin

@NorthernMan54
Copy link
Collaborator

@thncode
Copy link
Author

thncode commented Nov 8, 2020

ok - I kind of found it out - still need to test a lot...

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

No branches or pull requests

3 participants