Closed JangoBritt closed 4 years ago
what's weird though, is that CH2 appears as the Power/Low setting, CH3 is Med, but also requires CH2 ON. CH4 is High, but requires CH2 ON, and CH3 OFF.
so: Light Off = 0 x x x Light On = 1 x x x Fan Off = x 0 0 0 Fan Low = x 1 0 0 Fan med = x 1 1 0 Fan High = x 1 0 1
Hi @JangoBritt, the code in this PR should be not necessary for it to work. As the "switchAmount" is obtained from the uiid, instead of hardcoding base on model. The uiid and channel count information were extracted from the official ewelink app. If the iFan is not working as intended, would you dump the content of platform.devicesFromApi
on line 120 in index.js and post it here? The information should be useful for debugging.
platform.log("devicesFromApi = %s", JSON.stringify(platform.devicesFromApi));
Honestly, I just cut & pasted from the other repo, and it started working.
Are you saying to add that command at 120 and run it? Which file is that going to log to, homebridge.log, or Homebridge.err?
Sent with GitHawk
Yes, the log should go to stdout, I guess it's the .log file in your case.
@howanghk I'm having the same issue. Happy to help debug
Fan support have been added by bassrock in https://github.com/howanghk/homebridge-ewelink/pull/57 and released in version 0.1.18, please install the latest version with
npm install -g homebridge-ewelink-max@latest
There was a disparity between the howanghk master branch, and the MrTomAsh master branch that was missing the Device Type Channels for devices including the iFan02.
I've re-merged them, and tested. This displays as 4 channels in HomeKit, CH1 for light, and CH2-4 for the three speed settings of the fan.
Obviously this is quick and dirty implementation, and I'd prefer to present a proper Fan device type made up of the three channels (OFF/33%/66%/100%). As it is, it appears as extra device tiles.
This at least resolved the problems of the device appearing offline