KraigM / homebridge-flowerpower

5 stars 1 forks source link

SyntaxError: Unexpected identifier #2

Open samj opened 8 years ago

samj commented 8 years ago

Not compatible with ES6?

Aug 6 17:23:45 raspberrypi homebridge[1641]: [Sat Aug 06 2016 17:23:45 GMT+1000 (AEST)] --- Aug 6 17:23:46 raspberrypi homebridge[1641]: [Sat Aug 06 2016 17:23:46 GMT+1000 (AEST)] Loaded plugin: homebridge-wemo Aug 6 17:23:46 raspberrypi homebridge[1641]: [Sat Aug 06 2016 17:23:46 GMT+1000 (AEST)] Registering accessory 'homebridge-wemo.WeMo' Aug 6 17:23:46 raspberrypi homebridge[1641]: [Sat Aug 06 2016 17:23:46 GMT+1000 (AEST)] --- Aug 6 17:23:46 raspberrypi homebridge[1641]: [Sat Aug 06 2016 17:23:46 GMT+1000 (AEST)] Loaded plugin: homebridge-flowerpower Aug 6 17:23:46 raspberrypi homebridge[1641]: /usr/local/lib/node_modules/homebridge-flowerpower/node_modules/flower-power-api/FlowerPowerCloud.js:127 Aug 6 17:23:46 raspberrypi homebridge[1641]: for (var sensor of results.sensors) { Aug 6 17:23:46 raspberrypi homebridge[1641]: ^^ Aug 6 17:23:46 raspberrypi homebridge[1641]: SyntaxError: Unexpected identifier Aug 6 17:23:46 raspberrypi homebridge[1641]: at Module._compile (module.js:439:25) Aug 6 17:23:46 raspberrypi homebridge[1641]: at Object.Module._extensions..js (module.js:474:10) Aug 6 17:23:46 raspberrypi homebridge[1641]: at Module.load (module.js:356:32) Aug 6 17:23:46 raspberrypi homebridge[1641]: at Function.Module._load (module.js:312:12) Aug 6 17:23:46 raspberrypi homebridge[1641]: at Module.require (module.js:364:17) Aug 6 17:23:46 raspberrypi homebridge[1641]: at require (module.js:380:17) Aug 6 17:23:46 raspberrypi homebridge[1641]: at Object. (/usr/local/lib/node_modules/homebridge-flowerpower/lib/platform.js:9:22) Aug 6 17:23:46 raspberrypi homebridge[1641]: at Module._compile (module.js:456:26) Aug 6 17:23:46 raspberrypi homebridge[1641]: at Object.Module._extensions..js (module.js:474:10) Aug 6 17:23:46 raspberrypi homebridge[1641]: at Module.load (module.js:356:32) Aug 6 17:23:46 raspberrypi systemd[1]: homebridge.service: main process exited, code=exited, status=8/n/a Aug 6 17:23:46 raspberrypi systemd[1]: Unit homebridge.service entered failed state. Aug 6 17:23:56 raspberrypi systemd[1]: homebridge.service holdoff time over, scheduling restart. Aug 6 17:23:56 raspberrypi systemd[1]: Stopping Node.js HomeKit Server...

samj commented 8 years ago

Refer to same problem in homebridge-netatmo: https://github.com/planetk/homebridge-netatmo/issues/14

samj commented 8 years ago

Resolved by new modular architecture: https://github.com/planetk/homebridge-netatmo/commit/0bad0b288c7052ef5d97038c600e1ecc7ed335f4#diff-168726dbe96b3ce427e7fedce31bb0bcR42