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

TypeError when running homebridge-roku-config #3

Closed
bmosley opened this issue Sep 15, 2017 · 9 comments
Closed

TypeError when running homebridge-roku-config #3

bmosley opened this issue Sep 15, 2017 · 9 comments

Comments

@bmosley
Copy link

bmosley commented Sep 15, 2017

TypeError: Object.entries is not a function
at req.then.then.then.json (/usr/local/lib/node_modules/homebridge-roku/node_modules/nodeku/lib/device.js:68:14)

@bmosley
Copy link
Author

bmosley commented Sep 15, 2017

this might be due to running node-v6.9.5-linux as im on a Pi Zero and can't install node 7

@jeffreyjue1
Copy link

I'm getting this TypeError when running on both my Raspberry Pi and Mac:

pi@jj-raspberrypi:~ $ /usr/lib/node_modules/homebridge-roku/bin/./homebridge-roku-config
TypeError: app.get is not a function
at apps.forEach.app (/usr/lib/node_modules/homebridge-roku/bin/homebridge-roku-config:13:18)
at Array.forEach (native)
at device.apps.then.apps (/usr/lib/node_modules/homebridge-roku/bin/homebridge-roku-config:12:17)

jj-iMac-3:~ jeffrey$ /usr/local/lib/node_modules/homebridge-roku/bin/homebridge-roku-config
TypeError: app.get is not a function
at apps.forEach.app (/usr/local/lib/node_modules/homebridge-roku/bin/homebridge-roku-config:13:18)
at Array.forEach (native)
at device.apps.then.apps (/usr/local/lib/node_modules/homebridge-roku/bin/homebridge-roku-config:12:17)

Any ideas?

@bschlenk
Copy link
Owner

Can you try updating your homebridge-roku installation? The latest version doesn't call app.get

@jeffreyjue1
Copy link

I upgraded homebridge-roku to the latest and upgrade nodejs from 6.12.2 to 7.10.1 on my Pi3. This is the new result:

pi@jj-raspberrypi:~ $ /usr/lib/node_modules/homebridge-roku/bin/./setup
/usr/lib/node_modules/homebridge-roku/node_modules/roku-client/dist/client.js:31
const parseStringAsync = (0, _util.promisify)(_xml2js.parseString);
^

TypeError: (0 , _util.promisify) is not a function
at Object. (/usr/lib/node_modules/homebridge-roku/node_modules/roku-client/dist/client.js:31:46)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/usr/lib/node_modules/homebridge-roku/node_modules/roku-client/dist/index.js:12:15)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)

@bschlenk
Copy link
Owner

Ah, that method is only available since node 8. I can use es6-promisify instead which will allow it to run on node6 and up. I'm planning on supporting node6 and later with homebridge-roku, so your node version should be fine once I fix this.

@bschlenk
Copy link
Owner

Published version 1.0.2, try updating and running again.

@jeffreyjue1
Copy link

bschlenk, that works very well now. I have it controlling my TCL Roku TV now, and I may add the Roku 2 to the configuration at a later date.

One think that you might consider in a major update is the setup for 2 Roku's on the same network. For example, when I ran setup, it always found the Roku 2 first, since it has the lower IP address. Until I unplugged the Roku 2 from the network, I could not do the search for the TCL Roku TV. This is a minor problem at this time that has an easy work around, since the setup needs to be done only initially or when adding apps to control.

@bschlenk
Copy link
Owner

Thanks for the suggestion! The library I use to discover Roku devices does support finding multiple Rokus on the same network. I'll have to look into how that would work. Ideally that would be after I figure out how to get the Roku to show up as a single device, instead of a device per feature.

Could you open that as a separate issue so I can track it separately? Closing this one.

@roberkane212
Copy link

Can you help me too please???

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

4 participants