flochtililoch / homebridge-lirc-accessory Goto Github PK
View Code? Open in Web Editor NEW Homebridge Plugin for lirc-state-api
Homebridge Plugin for lirc-state-api
What type of Accessory are you using to control a TV or Stereo? I see from the lirc-state-api that there is a TV listed, but not a corresponding TV in the accessory. Looking for something to control, Power, Volume, Mute, Input. Thoughts?
[12/12/2016, 10:02:16 PM] [Fan] Initializing homebridge-lirc-accessory.LIRC Accessory accessory...
/usr/local/lib/node_modules/homebridge-lirc-accessory/index.js:46
const service = new Servicethis.config.HapService;
^
I'm getting this error when I run homebridge with this accessory using sample configuration for lira-state-api and homebridge-lirc-accessory
TypeError: Service[this.config.HapService] is not a constructor
at Accessory.coreService (/usr/local/lib/node_modules/homebridge-lirc-accessory/index.js:46:21)
at Accessory.getServices (/usr/local/lib/node_modules/homebridge-lirc-accessory/index.js:94:12)
at Server._createAccessory (/usr/local/lib/node_modules/homebridge/lib/server.js:378:36)
at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:266:26)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:81:38)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
Homebridge launches and loads the accessory. It then crashes and throws the following error:
Initializing homebridge-lirc-accessory.LIRC Accessory accessory... /home/pi/.nvm/versions/node/v8.0.0/lib/node_modules/homebridge-lirc-accessory/index.js:75 .on('get', getter) ^
TypeError: Cannot read property 'on' of undefined at wrap (/home/pi/.nvm/versions/node/v8.0.0/lib/node_modules/homebridge-lirc-accessory/index.js:75:9) at config.properties.forEach.property (/home/pi/.nvm/versions/node/v8.0.0/lib/node_modules/homebridge-lirc-accessory/index.js:81:7) at Array.forEach (native) at Accessory.coreService (/home/pi/.nvm/versions/node/v8.0.0/lib/node_modules/homebridge-lirc-accessory/index.js:79:28) at Accessory.getServices (/home/pi/.nvm/versions/node/v8.0.0/lib/node_modules/homebridge-lirc-accessory/index.js:94:12) at Server._createAccessory (/home/pi/.nvm/versions/node/v8.0.0/lib/node_modules/homebridge/lib/server.js:378:36) at Server._loadAccessories (/home/pi/.nvm/versions/node/v8.0.0/lib/node_modules/homebridge/lib/server.js:266:26) at Server.run (/home/pi/.nvm/versions/node/v8.0.0/lib/node_modules/homebridge/lib/server.js:81:38) at module.exports (/home/pi/.nvm/versions/node/v8.0.0/lib/node_modules/homebridge/lib/cli.js:40:10) at Object.<anonymous> (/home/pi/.nvm/versions/node/v8.0.0/lib/node_modules/homebridge/bin/homebridge:17:22)
I have also verified that lirc-state-api is working. Any thoughts on what is happening here?
Homebridge launches and loads the accessory, but then crashes with the following error.
[7/11/2017, 9:20:27 AM] [Heater] Initializing homebridge-lirc-accessory.LIRC Accessory accessory... /usr/lib/node_modules/homebridge-lirc-accessory/index.js:46 const service = new Service[this.config.hapService](); ^ TypeError: Service[this.config.hapService] is not a constructor at Accessory.coreService (/usr/lib/node_modules/homebridge-lirc-accessory/index.js:46:21) at Accessory.getServices (/usr/lib/node_modules/homebridge-lirc-accessory/index.js:94:12) at Server._createAccessory (/usr/lib/node_modules/homebridge/lib/server.js:378:36) at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:266:26) at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:81:38) at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10) at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32)
I've tried a number of different options for hapService, as per this file of homebridge Services, but still get the error.
lirc-state-api has been tested separately and is working correctly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.