Comments (31)
For now you can try installing my fork where i reverted recent changes (adding occupancy sensors and light checks) that broke things for me.
pponce/homebridge-bigAssFans
from homebridge-bigassfans.
Here you go:
npm install -g pponce/homebridge-bigAssFans
from homebridge-bigassfans.
@pponce - first off, I'm sorry that I've been so MIA on this repo, the info and debugging you did is really great and useful.
Regarding the line below:
this.light.createGetField('exists', ['DEVICE', 'LIGHT'], false, undefined, "PRESENT");
I'm betting you're right, that this is the issue. If you're interested I can help you understand / get the info needed to help get this working + change it yourself if you're so inclined.
In particular what I'm going to suggest is changing the line in the BigAssAPI to turn logging on. Once you do this if you run any of the examples you'll see a barrage of all of the messages that are coming off of the fan I ran this:
var bigAssApi = require("../BigAssApi");
var myMaster = new bigAssApi.FanMaster(1); // Expect only one fan in my setup
myMaster.onFanFullyUpdated = function(myBigAss){
console.log("Found a new fan with name '" + myBigAss.name + "'")
console.log("and identifier: '" + myBigAss.id + "'\n")
console.log("and lightExists: '" + myBigAss.light.exists + "'\n")
}
Afterwards I see the output: and lightExists: 'true'
but I also see an earlier statement:
server got: (Sean's Room;DEVICE;LIGHT;PRESENT) from 192.168.7.59:31415
That's the raw message from the fan itself - it's likely that you see a different message somewhere in there that has LIGHT and some identifier that the light exists. Either way this line is what the createGetField
is monitoring - the second argument matches the N
parameters at the beginning after the fan name, while the last parameter is what it should be if that field is true
, (and the parameter after that is where false
should be).
Given this I see two solutions for the library as a whole:
- Fix the light.exists variable (what we probably should do)
- Add a patch in homebridge that lets you specify in your config that you "for sure have a light", or otherwise treats undefined as "true"
Again sorry for me being MIA and leaving this broken all the while :/
@djfatal - I believe this is because the fan no longer broadcasts it's updates as a multicast UDP packet, and instead only sends this to the person requesting the update. This is an unfortunate change because this means that we'll have to constantly be polling the fan for updates. This isn't a terribly involved change, but it's definitely non-trivial, and probably should be implemented as a feature / option inside of BigAssFansAPI instead of inside of the homebridge plugin. I probably don't have the bandwidth to do this anytime soon, but I'd be more than welcome to accept any PR's. For anyone interested just let me know if you start so I don't accidentally start it before you get it back to me 👍
from homebridge-bigassfans.
@sean9keenan my bad. i accidently deleted this key line that kickstarts most of the logic in the code. :)
platform.addAccessory(myBigAss);
The lights did not work when i ran pponce/homebridge-bigAssFans earlier.
I was just surprised by the "and lightExists: 'true'" log message and assumed that it meant that the lights were also found. Bad assumption.
Here is the output now with the fixed code and one more console message that i added.
https://github.com/pponce/homebridge-bigAssFans/blob/master/index.js#L254
You can now see the "no light exists for" message and my lights do not work.
It's strange that this.myBigAss.light.exists = undefined but is set when running the console.log command outside of the platform.addAccessory logic.
[4/1/2017, 6:39:50 PM] [Big Ass Fan] Initializing BigAssFans platform...
[4/1/2017, 6:39:50 PM] [Big Ass Fan] Big Ass Fans Platform Init
[4/1/2017, 6:39:50 PM] Loading 10 accessories...
[4/1/2017, 6:39:50 PM] [Big Ass Fan] KidsHaiku Configure Accessory 6a738ad4-804e-4447-869c-b15af4702353
[4/1/2017, 6:39:50 PM] [Big Ass Fan] Haiku Configure Accessory 86df6446-5c5e-497b-acf5-ef681688c068
[4/1/2017, 6:39:50 PM] [Big Ass Fan] DidFinishLaunching
(node:3161) DeprecationWarning: sys is deprecated. Use util instead.
Sending: <ALL;DEVICE;ID;GET>
[4/1/2017, 6:39:50 PM] FrontDoorIPCam is running on port 44883.
server got: <ALL;DEVICE;ID;GET> from 192.168.1.99:31415
server got: (KidsHaiku;DEVICE;ID;20:F8:5E:AA:33:A7;FAN,HAIKU,SENSEME) from 192.168.1.202:31415
Sending: <20:F8:5E:AA:33:A7;FAN;PWR;GET>
Sending: <20:F8:5E:AA:33:A7;FAN;SPD;GET;ACTUAL>
Sending: <20:F8:5E:AA:33:A7;FAN;SPD;GET;MIN>
Sending: <20:F8:5E:AA:33:A7;FAN;SPD;GET;MAX>
Sending: <20:F8:5E:AA:33:A7;FAN;AUTO;GET>
Sending: <20:F8:5E:AA:33:A7;FAN;WHOOSH;GET;STATUS>
Sending: <20:F8:5E:AA:33:A7;FAN;DIR;GET>
Sending: <20:F8:5E:AA:33:A7;LIGHT;LEVEL;GET;ACTUAL>
Sending: <20:F8:5E:AA:33:A7;LIGHT;LEVEL;GET;MIN>
Sending: <20:F8:5E:AA:33:A7;LIGHT;LEVEL;GET;MAX>
Sending: <20:F8:5E:AA:33:A7;LIGHT;AUTO;GET>
Sending: <20:F8:5E:AA:33:A7;DEVICE;LIGHT;GET>
Sending: <20:F8:5E:AA:33:A7;SNSROCC;STATUS;GET>
Sending: <20:F8:5E:AA:33:A7;SNSROCC;TIMEOUT;GET;MIN>
Sending: <20:F8:5E:AA:33:A7;SNSROCC;TIMEOUT;GET;MAX>
Sending: <20:F8:5E:AA:33:A7;SNSROCC;TIMEOUT;GET;CURR>
Sending: <20:F8:5E:AA:33:A7;SMARTMODE;ACTUAL;GET>
Sending: <20:F8:5E:AA:33:A7;SMARTMODE;STATE;GET>
Sending: <20:F8:5E:AA:33:A7;LEARN;STATE;GET>
Sending: <20:F8:5E:AA:33:A7;LEARN;MINSPEED;GET>
Sending: <20:F8:5E:AA:33:A7;LEARN;MAXSPEED;GET>
Sending: <20:F8:5E:AA:33:A7;LEARN;ZEROTEMP;GET>
Sending: <20:F8:5E:AA:33:A7;SLEEP;STATE;GET>
Sending: <20:F8:5E:AA:33:A7;SMARTSLEEP;IDEALTEMP;GET>
Sending: <20:F8:5E:AA:33:A7;SMARTSLEEP;MINSPEED;GET>
Sending: <20:F8:5E:AA:33:A7;SMARTSLEEP;MAXSPEED;GET>
Sending: <20:F8:5E:AA:33:A7;DEVICE;BEEPER;GET>
Sending: <20:F8:5E:AA:33:A7;DEVICE;INDICATORS;GET>
Sending: <20:F8:5E:AA:33:A7;WINTERMODE;STATE;GET>
Sending: <20:F8:5E:AA:33:A7;WINTERMODE;HEIGHT;GET>
Sending: <20:F8:5E:AA:33:A7;NW;TOKEN;GET>
Sending: <20:F8:5E:AA:33:A7;NW;DHCP;GET>
Sending: <20:F8:5E:AA:33:A7;FW;FW000003;GET>
Sending: <20:F8:5E:AA:33:A7;NW;SSID;GET>
Sending: <20:F8:5E:AA:33:A7;NW;AP;GET;STATUS>
server got: (Kids Room Wall Controller;DEVICE;ID;20:F8:5E:D9:F6:71;SWITCH,SENSEME) from 192.168.1.126:31415
Skipping wall control - TODO : Add support for wall control
server got: (KidsHaiku;FAN;PWR;OFF) from 192.168.1.202:31415
[4/1/2017, 6:39:50 PM] [Philips Hue 1] Philips hue: BSB002 bridge, api v1.17.0
[4/1/2017, 6:39:50 PM] [Philips Hue 2] Philips hue: BSB002 bridge, api v1.15.0
server got: (KidsHaiku;FAN;SPD;ACTUAL;0) from 192.168.1.202:31415
server got: (KidsHaiku;FAN;SPD;MIN;1) from 192.168.1.202:31415
server got: (KidsHaiku;FAN;SPD;MAX;7) from 192.168.1.202:31415
server got: (KidsHaiku;FAN;AUTO;OFF) from 192.168.1.202:31415
server got: (KidsHaiku;FAN;WHOOSH;STATUS;OFF) from 192.168.1.202:31415
server got: (KidsHaiku;FAN;DIR;FWD) from 192.168.1.202:31415
server got: (KidsHaiku;LIGHT;LEVEL;ACTUAL;0) from 192.168.1.202:31415
server got: (KidsHaiku;LIGHT;LEVEL;MIN;1) from 192.168.1.202:31415
server got: (KidsHaiku;LIGHT;LEVEL;MAX;16) from 192.168.1.202:31415
server got: (KidsHaiku;LIGHT;AUTO;OFF) from 192.168.1.202:31415
server got: (KidsHaiku;DEVICE;LIGHT;PRESENT) from 192.168.1.202:31415
server got: (KidsHaiku;SNSROCC;STATUS;OCCUPIED) from 192.168.1.202:31415
server got: (KidsHaiku;SNSROCC;TIMEOUT;MIN;60000) from 192.168.1.202:31415
server got: (KidsHaiku;SNSROCC;TIMEOUT;MAX;86400000) from 192.168.1.202:31415
server got: (KidsHaiku;SNSROCC;TIMEOUT;CURR;1800000) from 192.168.1.202:31415
server got: (KidsHaiku;SMARTMODE;ACTUAL;OFF) from 192.168.1.202:31415
server got: (KidsHaiku;SMARTMODE;STATE;OFF) from 192.168.1.202:31415
server got: (KidsHaiku;LEARN;STATE;OFF) from 192.168.1.202:31415
server got: (KidsHaiku;LEARN;MINSPEED;0) from 192.168.1.202:31415
server got: (KidsHaiku;LEARN;MAXSPEED;7) from 192.168.1.202:31415
server got: (KidsHaiku;LEARN;ZEROTEMP;2222) from 192.168.1.202:31415
server got: (KidsHaiku;SLEEP;STATE;OFF) from 192.168.1.202:31415
server got: (KidsHaiku;SMARTSLEEP;IDEALTEMP;2111) from 192.168.1.202:31415
server got: (KidsHaiku;SMARTSLEEP;MINSPEED;0) from 192.168.1.202:31415
Failed - retrying : 1
Sending: <20:F8:5E:AA:33:A7;SMARTSLEEP;MAXSPEED;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:33:A7;DEVICE;BEEPER;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:33:A7;DEVICE;INDICATORS;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:33:A7;WINTERMODE;STATE;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:33:A7;WINTERMODE;HEIGHT;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:33:A7;NW;TOKEN;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:33:A7;NW;DHCP;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:33:A7;FW;FW000003;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:33:A7;NW;SSID;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:33:A7;NW;AP;GET;STATUS>
server got: (KidsHaiku;SMARTSLEEP;MAXSPEED;6) from 192.168.1.202:31415
server got: (KidsHaiku;DEVICE;BEEPER;OFF) from 192.168.1.202:31415
server got: (KidsHaiku;DEVICE;INDICATORS;ON) from 192.168.1.202:31415
server got: (KidsHaiku;WINTERMODE;STATE;OFF) from 192.168.1.202:31415
server got: (KidsHaiku;WINTERMODE;HEIGHT;244) from 192.168.1.202:31415
server got: (KidsHaiku;NW;TOKEN;c24ec29f-4be4-4a36-887f-1b87c62f1e67) from 192.168.1.202:31415
server got: (KidsHaiku;NW;DHCP;OFF) from 192.168.1.202:31415
server got: (KidsHaiku;FW;FW000003;2.2.40) from 192.168.1.202:31415
server got: (KidsHaiku;NW;SSID;Sancho24) from 192.168.1.202:31415
server got: (KidsHaiku;NW;AP;STATUS;OFF) from 192.168.1.202:31415
var this.myBigAss.light.exists = undefined
[4/1/2017, 6:39:51 PM] [Big Ass Fan] No light exists for: KidsHaiku Fan Light
Found a new fan with name 'KidsHaiku'
and identifier: '20:F8:5E:AA:33:A7'
and lightExists: 'true'
server got: (KidsHaiku;SMARTSLEEP;MAXSPEED;6) from 192.168.1.202:31415
server got: (KidsHaiku;DEVICE;BEEPER;OFF) from 192.168.1.202:31415
server got: (KidsHaiku;DEVICE;INDICATORS;ON) from 192.168.1.202:31415
server got: (KidsHaiku;WINTERMODE;STATE;OFF) from 192.168.1.202:31415
server got: (KidsHaiku;WINTERMODE;HEIGHT;244) from 192.168.1.202:31415
server got: (KidsHaiku;NW;TOKEN;c24ec29f-4be4-4a36-887f-1b87c62f1e67) from 192.168.1.202:31415
server got: (KidsHaiku;NW;DHCP;OFF) from 192.168.1.202:31415
server got: (KidsHaiku;FW;FW000003;2.2.40) from 192.168.1.202:31415
server got: (KidsHaiku;NW;SSID;Sancho24) from 192.168.1.202:31415
server got: (Haiku;DEVICE;ID;20:F8:5E:AA:3A:1C;FAN,HAIKU,SENSEME) from 192.168.1.145:31415
Sending: <20:F8:5E:AA:3A:1C;FAN;PWR;GET>
Sending: <20:F8:5E:AA:3A:1C;FAN;SPD;GET;ACTUAL>
Sending: <20:F8:5E:AA:3A:1C;FAN;SPD;GET;MIN>
Sending: <20:F8:5E:AA:3A:1C;FAN;SPD;GET;MAX>
Sending: <20:F8:5E:AA:3A:1C;FAN;AUTO;GET>
Sending: <20:F8:5E:AA:3A:1C;FAN;WHOOSH;GET;STATUS>
Sending: <20:F8:5E:AA:3A:1C;FAN;DIR;GET>
Sending: <20:F8:5E:AA:3A:1C;LIGHT;LEVEL;GET;ACTUAL>
Sending: <20:F8:5E:AA:3A:1C;LIGHT;LEVEL;GET;MIN>
Sending: <20:F8:5E:AA:3A:1C;LIGHT;LEVEL;GET;MAX>
Sending: <20:F8:5E:AA:3A:1C;LIGHT;AUTO;GET>
Sending: <20:F8:5E:AA:3A:1C;DEVICE;LIGHT;GET>
Sending: <20:F8:5E:AA:3A:1C;SNSROCC;STATUS;GET>
Sending: <20:F8:5E:AA:3A:1C;SNSROCC;TIMEOUT;GET;MIN>
Sending: <20:F8:5E:AA:3A:1C;SNSROCC;TIMEOUT;GET;MAX>
Sending: <20:F8:5E:AA:3A:1C;SNSROCC;TIMEOUT;GET;CURR>
Sending: <20:F8:5E:AA:3A:1C;SMARTMODE;ACTUAL;GET>
Sending: <20:F8:5E:AA:3A:1C;SMARTMODE;STATE;GET>
Sending: <20:F8:5E:AA:3A:1C;LEARN;STATE;GET>
Sending: <20:F8:5E:AA:3A:1C;LEARN;MINSPEED;GET>
Sending: <20:F8:5E:AA:3A:1C;LEARN;MAXSPEED;GET>
Sending: <20:F8:5E:AA:3A:1C;LEARN;ZEROTEMP;GET>
Sending: <20:F8:5E:AA:3A:1C;SLEEP;STATE;GET>
Sending: <20:F8:5E:AA:3A:1C;SMARTSLEEP;IDEALTEMP;GET>
Sending: <20:F8:5E:AA:3A:1C;SMARTSLEEP;MINSPEED;GET>
Sending: <20:F8:5E:AA:3A:1C;SMARTSLEEP;MAXSPEED;GET>
Sending: <20:F8:5E:AA:3A:1C;DEVICE;BEEPER;GET>
Sending: <20:F8:5E:AA:3A:1C;DEVICE;INDICATORS;GET>
Sending: <20:F8:5E:AA:3A:1C;WINTERMODE;STATE;GET>
Sending: <20:F8:5E:AA:3A:1C;WINTERMODE;HEIGHT;GET>
Sending: <20:F8:5E:AA:3A:1C;NW;TOKEN;GET>
Sending: <20:F8:5E:AA:3A:1C;NW;DHCP;GET>
Sending: <20:F8:5E:AA:3A:1C;FW;FW000003;GET>
Sending: <20:F8:5E:AA:3A:1C;NW;SSID;GET>
Sending: <20:F8:5E:AA:3A:1C;NW;AP;GET;STATUS>
server got: (KidsHaiku;NW;AP;STATUS;OFF) from 192.168.1.202:31415
server got: (Haiku;FAN;PWR;ON) from 192.168.1.145:31415
server got: (Haiku;FAN;SPD;ACTUAL;1) from 192.168.1.145:31415
server got: (Haiku;FAN;SPD;MIN;1) from 192.168.1.145:31415
server got: (Haiku;FAN;SPD;MAX;7) from 192.168.1.145:31415
server got: (Haiku;FAN;AUTO;ON) from 192.168.1.145:31415
server got: (Haiku;FAN;WHOOSH;STATUS;OFF) from 192.168.1.145:31415
server got: (Haiku;FAN;DIR;FWD) from 192.168.1.145:31415
server got: (Haiku;LIGHT;LEVEL;ACTUAL;0) from 192.168.1.145:31415
server got: (Haiku;LIGHT;LEVEL;MIN;1) from 192.168.1.145:31415
server got: (Haiku;LIGHT;LEVEL;MAX;16) from 192.168.1.145:31415
server got: (Haiku;LIGHT;AUTO;OFF) from 192.168.1.145:31415
server got: (Haiku;DEVICE;LIGHT;PRESENT) from 192.168.1.145:31415
server got: (Haiku;SNSROCC;STATUS;OCCUPIED) from 192.168.1.145:31415
server got: (Haiku;SNSROCC;TIMEOUT;MIN;60000) from 192.168.1.145:31415
server got: (Haiku;SNSROCC;TIMEOUT;MAX;86400000) from 192.168.1.145:31415
server got: (Haiku;SNSROCC;TIMEOUT;CURR;1200000) from 192.168.1.145:31415
server got: (Haiku;SMARTMODE;ACTUAL;HEATING) from 192.168.1.145:31415
server got: (Haiku;SMARTMODE;STATE;FOLLOWTSTAT) from 192.168.1.145:31415
server got: (Haiku;LEARN;STATE;OFF) from 192.168.1.145:31415
server got: (Haiku;LEARN;MINSPEED;0) from 192.168.1.145:31415
server got: (Haiku;LEARN;MAXSPEED;7) from 192.168.1.145:31415
server got: (Haiku;LEARN;ZEROTEMP;2333) from 192.168.1.145:31415
server got: (Haiku;SLEEP;STATE;OFF) from 192.168.1.145:31415
server got: (Haiku;SMARTSLEEP;IDEALTEMP;2111) from 192.168.1.145:31415
server got: (Haiku;SMARTSLEEP;MINSPEED;0) from 192.168.1.145:31415
server got: (Haiku;SMARTSLEEP;MAXSPEED;6) from 192.168.1.145:31415
Failed - retrying : 1
Sending: <20:F8:5E:AA:3A:1C;DEVICE;BEEPER;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:3A:1C;DEVICE;INDICATORS;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:3A:1C;WINTERMODE;STATE;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:3A:1C;WINTERMODE;HEIGHT;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:3A:1C;NW;TOKEN;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:3A:1C;NW;DHCP;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:3A:1C;FW;FW000003;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:3A:1C;NW;SSID;GET>
Failed - retrying : 1
Sending: <20:F8:5E:AA:3A:1C;NW;AP;GET;STATUS>
server got: (Haiku;DEVICE;BEEPER;ON) from 192.168.1.145:31415
server got: (Haiku;DEVICE;INDICATORS;ON) from 192.168.1.145:31415
server got: (Haiku;WINTERMODE;STATE;ON) from 192.168.1.145:31415
server got: (Haiku;WINTERMODE;HEIGHT;244) from 192.168.1.145:31415
server got: (Haiku;NW;TOKEN;1680609e-53af-43d9-a0ec-f80ef917d0a5) from 192.168.1.145:31415
server got: (Haiku;NW;DHCP;OFF) from 192.168.1.145:31415
server got: (Haiku;FW;FW000003;2.2.40) from 192.168.1.145:31415
server got: (Haiku;NW;SSID;Sancho24) from 192.168.1.145:31415
server got: (Haiku;NW;AP;STATUS;OFF) from 192.168.1.145:31415
var this.myBigAss.light.exists = undefined
[4/1/2017, 6:39:51 PM] [Big Ass Fan] No light exists for: Haiku Fan Light
Found a new fan with name 'Haiku'
and identifier: '20:F8:5E:AA:3A:1C'
and lightExists: 'true'
server got: (Haiku;DEVICE;BEEPER;ON) from 192.168.1.145:31415
server got: (Haiku;DEVICE;INDICATORS;ON) from 192.168.1.145:31415
server got: (Haiku;WINTERMODE;STATE;ON) from 192.168.1.145:31415
server got: (Haiku;WINTERMODE;HEIGHT;244) from 192.168.1.145:31415
server got: (Haiku;NW;TOKEN;1680609e-53af-43d9-a0ec-f80ef917d0a5) from 192.168.1.145:31415
server got: (Haiku;NW;DHCP;OFF) from 192.168.1.145:31415
server got: (Haiku;FW;FW000003;2.2.40) from 192.168.1.145:31415
server got: (Haiku;NW;SSID;Sancho24) from 192.168.1.145:31415
server got: (Haiku;NW;AP;STATUS;OFF) from 192.168.1.145:31415
from homebridge-bigassfans.
@sean9keenan I created a fix that works. At least for me and i think should work generally. Can you let me know if this is an acceptable approach.
I essentially created another config variable, added it to the doctored config vars and have a check based on that var. The variable is configured automatically using light.exists and has a default setting of "false".
https://github.com/pponce/homebridge-bigAssFans/blob/master/index.js#L79
https://github.com/pponce/homebridge-bigAssFans/blob/master/index.js#L130
https://github.com/pponce/homebridge-bigAssFans/blob/master/index.js#L145
https://github.com/pponce/homebridge-bigAssFans/blob/master/index.js#L260
If you think this is an acceptable solution for this issue, i submitted a PR.
from homebridge-bigassfans.
I've been running my fix for a couple weeks now with no issues with detecting lights.
If others want to install this version to test as well you just need to run:
npm install -g pponce/homebridge-bigAssFans#pponceLightFix
The only issue i have remaining now is that the occupancy sensors always show triggered in the home app.
from homebridge-bigassfans.
from homebridge-bigassfans.
from homebridge-bigassfans.
Hey @pponce - what's the error that you're getting? and what type of model fan do you have?
If people are seeing issues I do want to fix it 😅
from homebridge-bigassfans.
Specifically - do you know if it's an issue in the homebridge-bigAssFans repo or the bigassfanAPI? Or what exact revert allowed you to fix it. From the logs it's not exactly clear to me what might have caused the issue, and I saw that you reverted both of those repos in trying to fix this issue @pponce
from homebridge-bigassfans.
I'm not really sure. I reverted back to before the recent changes that were pushed 16 days ago. The only recent change I kept was the "hack" to fix the home-bridge crashing issue with the call back being called twice.
The light issue happened after this commit reference in this comment:
#7 (comment)
Also the occupancy detection does not seem to work. Always seems to show occupancy detected for me regardless of actual occupancy. But that looks to be a known open issue #3
I'll test things by pointing to your current bigassfanAPI and see if I only really needed to revert homebridge-bigassfans.
from homebridge-bigassfans.
Ok
I re-installed my fork but made it depend on your bigassfansAPI master branch. Lights work.
So it seems to be related to recent changes to homebridge-bigAssFans.
I think it's related to this variable not getting set properly.
this.myBigAss.light.exists
Shot in the dark guess. That variable is not present in the reverted changes to homebridge-bigAssFans and it seems to kick start the logic for lights in the current master.
Link to update i think caused the issue: 1f28ab7
Also i was not getting an error per say. I was getting an incorrect "no light" message for each fan.
So the detection of the existing light for both my fans was not working properly.
Same problem was confirmed to be happening to @davidvanvo
Oh and I have two haiku senseme fans. They were early models. When they just came out. The official app calls them "Haiku with SenseMe". Not sure how i can get the exact model number for you.
from homebridge-bigassfans.
My current guess is that this line in bigassfansAPI is not setting the property value correctly.
I'm not sure how to fix though.
this.light.createGetField('exists', ['DEVICE', 'LIGHT'], false, undefined, "PRESENT"); // Unknown false string.. WAY too lazy to unplug from fan
from homebridge-bigassfans.
I reset my fork to match your current master.
I made it so that this.myBigAss.light.exists variable does not get checked, so that the light found code always gets executed for me (since i have lights on all my fans). I also added a log message for troubleshooting and seeing what the value is of this.myBigAss.light.exist. For me it appears as undefined which is why the light code gets skipped.
I'm not sure why this is not getting set properly in the bigAssFansApi code.
I'll create an issue to track that in the bigAssFansAPI repo.
[3/19/2017, 10:56:15 AM] [Big Ass Fan] this.myBigAss.light.exists= undefined, Found a light for: Haiku Fan Light
[3/19/2017, 10:56:15 AM] [Big Ass Fan] this.myBigAss.light.exists= undefined, Found a light for: KidsHaiku Fan Light
from homebridge-bigassfans.
I'm experiencing a weird issue with the light. I can turn on/off the light within the home app. However if I use the wall control to turn on the light or fan, the home app does not recognize the light or fan as being on.
edit: using pponce's branch the light and fan does show on/off if I use the wall control however it only seems to report correctly if the home app is forced closed and open. It does not update the on/off status in real time for some reason.
from homebridge-bigassfans.
@sean9keenan No problem on any delay here. I was able to just bypass the check in the mean time to get things to work.
So the plot thickens: have a look at my fork. i made the changes to turn on logging and added your comments suggested console.log messages. Links to the changes:
https://github.com/pponce/homebridge-bigAssFans/blob/master/index.js#L2
https://github.com/pponce/homebridge-bigAssFans/blob/master/index.js#L33-L35
https://github.com/pponce/homebridge-bigAssFans/blob/master/index.js#L254
https://github.com/pponce/BigAssFansAPI/blob/master/BigAssApi.js#L408
Here is the output. for some reasons "and lightExists: 'true'" when i turn on logging and i made the small changes.
see output in comment
#15 (comment)
from homebridge-bigassfans.
Awesome, thanks!
Hmm, I see that lightExists: 'true' gets printed, but I don't see
this.log("Found a light for: " + this.homekitLightName);
get printed from this line. You said that the light is working properly though? O.o
I'm a bit confused as to why this would be the case :|
from homebridge-bigassfans.
@sean9keenan
For the polling update/enhancement in the future you may want to look at this project:
https://github.com/ebaauw/homebridge-lib
The author maintains homebridge-hue and it's rock solid. Sounds like it might help here.
from homebridge-bigassfans.
Awesome, I am going to try it out now. I hope the occupancy sensor can work in the future. :)
from homebridge-bigassfans.
installed this version last night. working great thus far. thanks @pponce
from homebridge-bigassfans.
+1 working
from homebridge-bigassfans.
@sean9keenan Just checking in. PR look good?
from homebridge-bigassfans.
This has been workin great for me thus far.
Does anyone know if the BigAssFan API support Haiku Lights too? I have those as well and this current plugin doesn't detect them.
from homebridge-bigassfans.
Thanks for pinging me again @pponce, and thank you for both creating the fix and getting the Pull Request in 😄
I've gone ahead and merged your changes in and updated the npm package so that it's easier for people to pull the changes.
Thanks again @pponce, and sorry for the delay!
from homebridge-bigassfans.
No problem. Was fun to learn a bit and figure this out.
Have you taken a look at this project by ebaauw?
https://github.com/ebaauw/homebridge-lib
He's implemented a polling feature that might come in handy for updating bigAssFans to poll since you mentioned bigAssFans changed the way the fans communicate.
from homebridge-bigassfans.
from homebridge-bigassfans.
Any progress with the occupancy sensor? :)
from homebridge-bigassfans.
Or could we use this as a model for setting up a longpoll for each fan?
https://github.com/tekuonline/homebridge-assurelink2/blob/master/index.js
// Method for state periodic update
AssureLinkPlatform.prototype.statePolling = function (delay) {
var self = this;
var refresh = this.longPoll + delay;
// Clear polling
clearTimeout(this.tout);
// Determine polling interval
if (this.count < this.maxCount) {
this.count++;
refresh = this.shortPoll + delay;
}
// Setup periodic update with polling interval
this.tout = setTimeout(function () {
self.updateState(function (error) {
if (!error) {
// Update states for all HomeKit accessories
for (var deviceID in self.accessories) {
var accessory = self.accessories[deviceID];
self.updateDoorStates(accessory);
}
} else {
// Re-login after short polling interval if error occurs
self.count = self.maxCount - 1;
}
// Setup next polling
self.statePolling(0);
});
}, refresh * 1000);
}
from homebridge-bigassfans.
For some reason the light stopped working again.
edit: n/m got it working again after I uninstalled and reinstalled the homebridge.
from homebridge-bigassfans.
Is any progress still being made on this?
from homebridge-bigassfans.
For some reason I started experiencing "No lights exists" again. I am trying the fork from @pponce and it is having this problem too.
edit: looks like my setup got corrupted somehow. I got things working again once I setup on a different raspberry pi.
from homebridge-bigassfans.
Related Issues (20)
- Array Handling Error
- Fan w/out Wall Controller HOT 1
- expose fan smart mode as HomeKit thermostat
- Haiku lights HOT 1
- homebridge crashed with this error
- lights unintentionally turn on to full brightness instead of partial brightness
- iOS 13 changed fan and light to one object HOT 1
- Enabling this platform makes homekit stall and fail to update all other devices HOT 3
- Haiku fans show up in Lutron app all in the same room duplicated HOT 3
- [FEATURE] Eve App 4.2 Issue with homebridge-bigAssFans
- [email protected] - Plugin 'homebridge-bigAssFans' tried to register with an incorrect plugin identifier: 'homebridge-bigAssFan'. Please report this to the developer! HOT 1
- Issue with homebridge >= 1.0.0 HOT 1
- i6 Fan compatibility HOT 2
- Error after configuration and installation of plugin in Homebridge
- Occupancy Sensor - Always triggered HOT 5
- Last fan speed and light level not saved HOT 1
- Plugin causes Homebridge v1.3.0 beta to crash HOT 5
- Plugin crashes Homebridge on launch HOT 2
- Duplicate Serial Numbers for all fans
- Latest firmware update to haiku fans broke compatibility HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-bigassfans.