Esp-homekit-devices: Enhancement request: support for sonoff ifan02

Created on 5 Jan 2019  Â·  37Comments  Â·  Source: RavenSystem/esp-homekit-devices

Ifan02 is a ceiling fan controller supporting light on/off and four fan speeds (off, slow, medium, high) over Wi-Fi. I would really like to use it with apple homekit.

HAA

Most helpful comment

I made it for iFan03 myself. everything (fan control and light) works good.

{"c":{"l":13,"b":[{"g":0,"t":5}]},"a":[{"t":65,"0":{"r":[{"g":15},{"g":12},{"g":14}]},"y0":[{"v":1,"0":{"r":[{"g":15,"v":1,"i":0.5},{"g":12},{"g":14,"i":0.6}]}},{"v":35,"0":{"r":[{"g":15,"v":1,"i":0.5},{"g":12,"i":0.6},{"g":14,"i":0.6}]}},{"v":70,"0":{"r":[{"g":15,"v":1},{"g":4},{"g":14}]}}]},{"1":{"r":[{"g":9}]},"0":{"r":[{"g":9,"v":1}]},"b":[{"g":0}]}]}

All 37 comments

Ok. If you can, please, put GPIO map of this device.

Ok!
(How do I do that? It’s supported by tasmota firmware, and I have been able
to flash it.)

On Sun, Jan 6, 2019 at 2:11 PM José A. Jiménez notifications@github.com
wrote:

Ok. If you can, please, put GPIO map of this device.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/RavenSystem/esp-homekit-devices/issues/165#issuecomment-451779692,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAUrU27UVw-xjD7xiHCTOHMGAN4e_5Yzks5vAnSWgaJpZM4ZyCSE
.

Try find info in Tasmota repo. Looks like what you ask:
{ "Sonoff iFan02", // Sonoff iFan02 (ESP8285)
GPIO_KEY1, // GPIO00 WIFI_KEY0 Virtual button 1 as feedback from RC
GPIO_USER, // GPIO01 ESP_TXD Serial RXD and Optional sensor
0, // GPIO02 ESP_LOG
GPIO_USER, // GPIO03 ESP_RXD Serial TXD and Optional sensor
GPIO_REL3, // GPIO04 WIFI_O2 Relay 3 (0 = Off, 1 = On) controlling the fan
GPIO_REL2, // GPIO05 WIFI_O1 Relay 2 (0 = Off, 1 = On) controlling the fan
// GPIO06 (SD_CLK Flash)
// GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
// GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
GPIO_KEY2, // GPIO09 WIFI_KEY1 Virtual button 2 as feedback from RC
GPIO_KEY3, // GPIO10 WIFI_KEY2 Virtual button 3 as feedback from RC
// GPIO11 (SD_CMD Flash)
GPIO_REL1, // GPIO12 WIFI_O0 Relay 1 (0 = Off, 1 = On) controlling the light
GPIO_LED1_INV, // GPIO13 WIFI_CHK Blue Led on PCA (0 = On, 1 = Off) - Link and Power status
GPIO_KEY4, // GPIO14 WIFI_KEY3 Virtual button 4 as feedback from RC
GPIO_REL4, // GPIO15 WIFI_O3 Relay 4 (0 = Off, 1 = On) controlling the fan
0, 0
},

@RavenSystem was it helpful or not?

@pandarek Yes! But I need the way ifan02 relays work and manage fan.

GPIO_REL2, // GPIO05 WIFI_O1 Relay 2 (0 = Off, 1 = On) controlling the fan = Low

GPIO_REL3, // GPIO04 WIFI_O2 Relay 3 (0 = Off, 1 = On) controlling the fan + GPIO_REL2, // GPIO05 WIFI_O1 Relay 2 (0 = Off, 1 = On) controlling the fan = Medium

GPIO_REL4, // GPIO15 WIFI_O3 Relay 4 (0 = Off, 1 = On) controlling the fan = High

To prevent motor burnout from starting on low or medium, I think the high relay should be triggered for about 3 seconds at the start.

Is it right?

Off -> Relay 2: OFF; Relay 3: OFF; Relay 4: OFF
Low -> Relay 2: ON; Relay 3: OFF; Relay 4: OFF
Med -> Relay 2: ON; Relay 3: ON; Relay 4: OFF
High -> Relay 2: OFF; Relay 3: OFF; Relay 4: ON

Starter -> Always set to High for 3 seconds.

In my experience yes.

I monitored the relays with my multimeter while using the stock firmware and stepping through the speeds with the stock app. I did, however, notice the stock firmware starts on medium for some crazy reason. Even with the standard wall controller the best practice is always go through high before going to a lower speed. I am happy to be the test any firmware you would like to try.

@angyp Excellent!!!

Just FYI. The iFan02 is at half price in Aliexpress...don't know how much will it last.

also interesting for that device to use it for kitchen hood

What else is needed? I'm ready to test firmware as soon as it is available, @RavenSystem

This feature will be implemented, but later.

I can't wait! I'm excited for this.

Hi,

Is there anything to test? I am still very interested in this.

Is this feature implemented?

Can I test?

Sorry, it is not implemented yet.

Thank you - I am very hopeful it will be implemented someday soon.

I would offer to send you the hardware, but it's 125vac, and Europe is
240vac. I don't know if that would be helpful.

On Sat, Jul 20, 2019 at 5:12 AM José Antonio Jiménez <
[email protected]> wrote:

Sorry, it is not implemented yet.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/RavenSystem/esp-homekit-devices/issues/165?email_source=notifications&email_token=AACSWU6SADK7IV5MDYYTGK3QALJHNA5CNFSM4GOIESCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2NKK7Y#issuecomment-513451391,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACSWU5KKCSMGYN7QS5LKZDQALJHNANCNFSM4GOIESCA
.

I would offer to send you the hardware, but it's 125vac, and Europe is
240vac. I don't know if that would be helpful.

Don't worry. I think I have all info needed, but none of actual development uses a fan type accessory. Fans will be implemented with HAA, but not soon.

Hope soon see sonoff iFan working in HomeKit!

@vmarks Install HAA v1.7.0 and use this:

HAA JSON config for Sonoff iFan02:
{"c":{"l":13,"b":[{"g":0,"t":5}]},"a":[{"t":65,"0":{"r":[{"g":15},{"g":4},{"g":5}]},"y0":[{"v":1,"0":{"r":[{"g":15,"v":1,"i":0.5},{"g":4},{"g":5,"i":0.6}]}},{"v":35,"0":{"r":[{"g":15,"v":1,"i":0.5},{"g":4,"i":0.6},{"g":5,"i":0.6}]}},{"v":70,"0":{"r":[{"g":15,"v":1},{"g":4},{"g":5}]}}],"b":[{"g":9}]},{"0":{"r":[{"g":12}]},"1":{"r":[{"g":12,"v":1}]},"b":[{"g":0}]}]}

I hope it works. Please, leave feedback.

waiting for test? @vmarks good luck

BTW @RavenSystem is it only for ifan02 model? sonoff make note that it replaced by 03 as more stable at performance...

@Partizan7676 I know, but that JSON is for 02, not for 03. Have you a iFan03?

@RavenSystem i dont have it, but plan to buy.

@vmarks Did you test it?

I tried it with iFan03, it works only with the fastest speed. and no light (relays are mixed as I see). If anyone make json I can try it...
https://github.com/arendst/Tasmota/wiki/Sonoff-iFan03
https://templates.blakadder.com/sonoff_ifan03.html

I made it for iFan03 myself. everything (fan control and light) works good.

{"c":{"l":13,"b":[{"g":0,"t":5}]},"a":[{"t":65,"0":{"r":[{"g":15},{"g":12},{"g":14}]},"y0":[{"v":1,"0":{"r":[{"g":15,"v":1,"i":0.5},{"g":12},{"g":14,"i":0.6}]}},{"v":35,"0":{"r":[{"g":15,"v":1,"i":0.5},{"g":12,"i":0.6},{"g":14,"i":0.6}]}},{"v":70,"0":{"r":[{"g":15,"v":1},{"g":4},{"g":14}]}}]},{"1":{"r":[{"g":9}]},"0":{"r":[{"g":9,"v":1}]},"b":[{"g":0}]}]}

@egorist
Does the iFan03 lose the RF remote functionality when flashed?

@egorist
Does the iFan03 lose the RF remote functionality when flashed?

good question! also interest for that. @egorist , is RF remote working too?

Probably it wil still work but the status will not be updated in the home app. Example: the fan is off in the home app, it is turned on with the RF remote, the fan will be on physically but the home app will say that it is off.

The remote functionality is lost in the Sonoff RF. I would say you lost this functionality on the iFan, but if its not handled by the esp8266, then you might be able to keep it. RavenSystem will tell you for sure. You can also ask it in the official forum

So, your ESP8266 on IFan03 don't receive signal on GPIOxxx from RF module? I'm interested because I have to do a difference project using Sonoff basic RF R3 and Sonoff DW1...any info could be useful to everyone!

@egorist
Does the iFan03 lose the RF remote functionality when flashed?

sorry, but I don't use RF

@egorist can you do some test with RF for us, please?

@egorist, oh yes. If you could implement the RF. I would even pay you for beer.

Great stuff over here. So, noob here I want to get iFan03 working with homekit, what’s the simplest guide I can follow?

waiting for test? @vmarks good luck

Following up (sorry to revive this, I was sick for a while and just got it done today)

Using HAA 2.5.0 on iFan02 light and fan function.

I noticed from 1.8.5, there was this note:Fan: Added user setting to customize speed steps with "e" key. Default is "e":100.

I do not have steps, I have % all over the place, not sure how to use steps.

I also notice that iFan02 beeps twice seems to go its fastest at 52%. at 29% it beeps once, and slows down. On original iFan firmware, it beeps once for slow, twice for medium, three times for fast. I'm not finding that 3x beep setting yet.

at 80% to 100%, the fan slows to a stop. At 52% to 56% ish, it speeds back up.

My JSON is

{"c":{"l":13,"b":[{"g":0,"t":5}]},"a":[{"t":65,"0":{"r":[{"g":15},{"g":4},{"g":5}]},"y0":[{"v":1,"0":{"r":[{"g":15,"v":1,"i":0.5},{"g":4},{"g":5,"i":0.6}]}},{"v":35,"0":{"r":[{"g":15,"v":1,"i":0.5},{"g":4,"i":0.6},{"g":5,"i":0.6}]}},{"v":70,"0":{"r":[{"g":15,"v":1},{"g":4},{"g":5}]}}],"b":[{"g":9}]},{"0":{"r":[{"g":12}]},"1":{"r":[{"g":12,"v":1}]},"b":[{"g":0}]}]}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

i3laze picture i3laze  Â·  3Comments

xrust83 picture xrust83  Â·  4Comments

richardlimaa picture richardlimaa  Â·  4Comments

i3laze picture i3laze  Â·  3Comments

lizzus picture lizzus  Â·  5Comments