johnlemonse / homebridge-telldus

36 stars 22 forks source link

Crash with latest Homebridge 0.4.7 #27

Closed tvillingett closed 7 years ago

tvillingett commented 7 years ago

Dammit... Something went bad after I updated homebridge to 0.4.7, I think it has to do with telldusLive...

` [11/3/2016, 1:04:58 AM] [TelldusLive] Initializing platform accessory 'Groventré'... [11/3/2016, 1:04:58 AM] [TelldusLive] Initializing platform accessory 'Hallfönster'... [11/3/2016, 1:04:58 AM] [TelldusLive] Initializing platform accessory 'Innelampa garage'... [11/3/2016, 1:04:58 AM] [TelldusLive] Initializing platform accessory 'Lampa garage'... [11/3/2016, 1:04:58 AM] [TelldusLive] Initializing platform accessory 'Motorvärmare switch'... [11/3/2016, 1:04:58 AM] [TelldusLive] Initializing platform accessory 'Nanoakvarium'... [11/3/2016, 1:04:58 AM] [TelldusLive] Initializing platform accessory 'taket'... [11/3/2016, 1:04:58 AM] [TelldusLive] Initializing platform accessory 'Utelampa Garage'... [11/3/2016, 1:04:58 AM] [TelldusLive] Initializing platform accessory 'Vägglampa'... [11/3/2016, 1:04:58 AM] [TelldusLive] Initializing platform accessory 'Värme hönshus'... Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-154 │     
└────────────┘     

[11/3/2016, 1:04:58 AM] [TelldusLive] Buffer.alloc is not a function Unhandled Rejection Detected at: Promise Promise { _bitField: 18087936, _fulfillmentHandler0: [TypeError: Buffer.alloc is not a function], _rejectionHandler0: undefined, _promise0: undefined, _receiver0: undefined } reason: [TypeError: Buffer.alloc is not a function] Restarting homebridge due to an error restarting... shutting down......] - : shutting down servers... starting next hub... ["/usr/local/bin/homebridge"] waiting for exit...`

tvillingett commented 7 years ago

The workaround was to downgrade to 0.4.6 for now: sudo npm install -g --unsafe-perm homebridge@0.4.6

mifi commented 7 years ago

This is because homebridge 0.4.7 has upgraded to hap-nodejs 0.4.12 which has made the breaking change of using Buffer.alloc and Buffer.from, which do not exist in node v4. homebridge now requires node 5(6). https://github.com/KhaosT/HAP-NodeJS/commit/a4067085589753198e177786b151165824c19f99

I created an issue in HAP-NodeJS: https://github.com/KhaosT/HAP-NodeJS/issues/322

tvillingett commented 7 years ago

ok, thanks! I'll leave this one open until anything changes...

mifi commented 7 years ago

Has been fixed in homebridge now.