sean9keenan / homebridge-bigAssFans

A Homebridge plugin for Big Ass Fans
MIT License
27 stars 14 forks source link

Fixed occupancy sensor #13

Closed pedroserano closed 7 years ago

pedroserano commented 7 years ago

Occupancy sensor finally works!

pponce commented 7 years ago

i tried to merge your changes into my fork and i get this error when i try and start homebridge. My fork is Sean9keenan base untouched.

[2/27/2017, 3:23:23 PM] [Big Ass Fan] No light exists for: Haiku Fan Light /home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/homebridge-bigAssFans/node_modules/BigAssFansAPI/BigAssApi.js:220 } while (this.updateCallbacks[name][possibleKey] != undefined); ^

TypeError: Cannot read property '0.9596669043392851' of undefined at BigAssProperty. (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/homebridge-bigAssFans/node_modules/BigAssFansAPI/BigAssApi.js:220:44) at BigAssFanAccessory. (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/homebridge-bigAssFans/index.js:170:37) at new BigAssFanAccessory (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/homebridge-bigAssFans/index.js:304:3) at BigAssFansPlatform.addAccessory (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/homebridge-bigAssFans/index.js:91:30) at FanMaster.BigAssFansPlatform.fanMaster.onFanFullyUpdated (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/homebridge-bigAssFans/index.js:33:14) at FanMaster. (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/homebridge-bigAssFans/node_modules/BigAssFansAPI/BigAssApi.js:57:22) at callbackForUser (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/homebridge-bigAssFans/node_modules/BigAssFansAPI/BigAssApi.js:361:13) at callbackForUser (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/homebridge-bigAssFans/node_modules/BigAssFansAPI/BigAssApi.js:361:13) at BigAssProperty. (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/homebridge-bigAssFans/node_modules/BigAssFansAPI/BigAssApi.js:191:17) at BigAssProperty. (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/homebridge-bigAssFans/node_modules/BigAssFansAPI/BigAssApi.js:158:48) at BigAssFan. (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/homebridge-bigAssFans/node_modules/BigAssFansAPI/BigAssApi.js:319:36) at FanMaster. (/home/pi/.nvm/versions/node/v6.9.5/lib/node_modules/homebridge-bigAssFans/node_modules/BigAssFansAPI/BigAssApi.js:72:40) at emitTwo (events.js:106:13) at Socket.emit (events.js:191:7) at UDP.onMessage (dgram.js:550:8)

pedroserano commented 7 years ago

Not exactly sure but double check the BigAssAPI.js is using the version that uses the variable "sensor" for the occupancy state

sean9keenan commented 7 years ago

Yeah - even though I merged that commit into master - I forgot to update NPM.

I just updated the NPM package on the BigAssFanAPI though - so it should now be version 1.1.1

pponce commented 7 years ago

All good now. I see my two occupancy sensors now! pretty cool.