Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Ifan02 #2839

Closed
sleezy100 opened this issue May 26, 2018 · 373 comments
Closed

Support for Ifan02 #2839

sleezy100 opened this issue May 26, 2018 · 373 comments
Labels
enhancement Type - Enhancement that will be worked on

Comments

@sleezy100
Copy link

Hi, Just ordered 2 of these and was wondering if there will be any support for them in the near future ?

Sonoff iFan02: Convert Non-smart LED Ceiling Fan to WiFi Smart Ceiling Fan with Light
Model: IM170811003

Remote ON/OFF–Turn on/off the fan and light from anywhere
Control Fan Speed–Change the fan speed level: 1/2/3/Smart
Adjust the light intensity–Dimmable lights support: white/warm white/warm

Thanks

@abzman
Copy link

abzman commented May 27, 2018

I just ordered 9 on the same assumption. There's probably just a pin to PWM for the LED, not sure about the speed. And getting that remote to still work will be fun.

@arendst
Copy link
Owner

arendst commented May 28, 2018

Support might me added but do not expect it within 8 weeks.

@arendst arendst added the enhancement Type - Enhancement that will be worked on label May 28, 2018
@abzman
Copy link

abzman commented May 29, 2018

I can ship you one if it'll help but I understand if you have other time demands. I can probably hack in some support for the basics, not sure about the remote or the fan speeds though.

@MYLE-01
Copy link

MYLE-01 commented May 29, 2018

I can wait I just ordered 1

@Snipercaine
Copy link

Me too. Got one on the way.

@ageorgios
Copy link

ageorgios commented Jun 12, 2018

Really great if support is added! Got one. Don’t know how it works though to control speed and light color

@palitu
Copy link

palitu commented Jun 15, 2018

Im going to assume it works exactly the same as everyother fan controller, it just uses a different comms protocol to communicate to it than the switch.

But these look out standing, and i will be upgrading as soon as we have some custom firmware for them!

@palitu
Copy link

palitu commented Jun 15, 2018

to be honest - i wont be waiting for firmware - i'll just use the controller for now

@digiblur
Copy link
Contributor

Anxious to see who gets one first and pops it open.

@palitu
Copy link

palitu commented Jun 15, 2018 via email

@palitu
Copy link

palitu commented Jun 15, 2018 via email

@tyjtyj
Copy link

tyjtyj commented Jun 15, 2018

What the fun without tasmota.... Hehe

@palitu
Copy link

palitu commented Jun 15, 2018

oh no - i want Tasmota on it, but i can improve what i have in the mean time :)

@PrathikGopal
Copy link

I can wait , thanks 👍

@WayneManion
Copy link

I ordered a few of them, but the ebay vendor canceled my order. Now the item appears to have disappeared from ebay entirely?

@Snipercaine
Copy link

I just got shipping confirmation from iTead.

@digiblur
Copy link
Contributor

Can't wait to see internal pics!

@arendst
Copy link
Owner

arendst commented Jun 23, 2018

My ifan02 is on the way. When received all I need is a fan (LOL) and good weather...

@nmatt25
Copy link

nmatt25 commented Jun 25, 2018

ordered 2 of them and are being delivered via DHL today ... will post pictures as soon as they get here .... feels like Christmas morning ... lol

@nmatt25
Copy link

nmatt25 commented Jun 25, 2018

20180625_094857
20180625_095013
20180625_095023
Uploading 20180625_095211.jpg…
Uploading 20180625_095251.jpg…
Uploading 20180625_095337.jpg…
Uploading 20180625_095400.jpg…
Uploading 20180625_095429.jpg…
now for the install

@nmatt25
Copy link

nmatt25 commented Jun 25, 2018

20180625_095211
20180625_095337
20180625_095400

@nmatt25
Copy link

nmatt25 commented Jun 25, 2018

Good News:
OK ... Install went painless as expected. Just swapped out old harbor breeze wireless controller with new sonoff new one. Once powered up I easily paired controller with the eWeLink app on my phone and then proceeded to discover new devices via Alexa app and all went well and I can control everything via the remote, eWelink app, and Alexa via voice.

Bad News:
When I proceeded to test all the functions I started with the easy part which was turning on and off the light which worked but only On or Off no "dimming" but maybe I am doing something wrong but will look into that further. Next went to test the fan .... Let me start with saying that yes I did make sure that I had the pull chain set in the position for the fan to be on HIGH/Full speed. When I turned on the fan via the remote by pressing 3 (high) the fan came on but did not seem like it was the full speed (doubled checked the chain setting) so I figured I would check the 2 (medium) button and the fan slowed but seemed like it was WAY slower then medium and then tried 1 (low) which resulted in the fan barely even spinning. I am not sure if this is something that can be corrected via firmware or not but it is very disappointing and think I am going to wait to install the second one until further testing.

Next Project:
now to see about integration with Home Assistant!

@Snipercaine
Copy link

Thanks Matt!

@digiblur
Copy link
Contributor

I don't recall the light being dimmable on their description. Curious to see someone put a volt/current meter measurements on it. I do see a few jumper pins.

@nmatt25
Copy link

nmatt25 commented Jun 25, 2018

this is from there site but like I said maybe I'm missing something ... lol

Remote ON/OFF–Turn on/off the fan and light from anywhere
Control Fan Speed–Change the fan speed level: 1/2/3/Smart
Adjust the light intensity–Dimmable lights support: white/warm white/warm
App Support –Free iOS and Android mobile App eWeLink
Sync Status–Real-time device status provided to App
Timing–Set scheduled/countdown to turn on/off at a specified time
Share Control– Control your smart home together with your family
Scene–Turn on/off a gang of devices with one tap
Smart Scene–Triggered on/off the fan or light by environmental conditions from sensor
Compatibility –Works perfectly with Amazon Alexa, Google Assistant, Google Nest

https://www.itead.cc/sonoff-ifan02-wifi-smart-ceiling-fan-with-light.html

@abzman
Copy link

abzman commented Jun 26, 2018

I don't know how they're claiming that there's a bicolor, color-temp adjustable LED output on this thing, it's clearly just one relay for the output on the light. I'll trace more of it later, interested in getting under the can and also sniffing the remote (probably 433mhz)

one of these even: https://www.alibaba.com/product-detail/Hot-selling-FANHAR-W11-1A2STE-5VDC_60553617588.html

@palitu
Copy link

palitu commented Jun 26, 2018

I would imagine that there is a triac chopping the wave to dim the light a bit.

Hopefully the fan integration actually works!

@sschnoor
Copy link

Hi. I'm a bit of a noob to all this. I used a CH340G to flash 2 Sonoff/TH16's - no issues. Now I'm trying to flash the ifan02. I'm struggling to understand the power part, do I literally wire the ifan02 to 120v AC coming from the wall to flash this? Has anyone has written up some detailed steps just on the flashing part for the ifan02? Appreciate any advice.... thank you.

@vmarks
Copy link

vmarks commented Jun 22, 2019 via email

@Sawadee2u
Copy link

Sawadee2u commented Jun 22, 2019 via email

@sschnoor
Copy link

Yeah - my conservative nature says connecting to AC is just wrong....will wait for someone has done this is the plan @Sawadee2u . Thanks! :)

@meingraham
Copy link
Collaborator

If flashing using the serial interface, NEVER connect the device to AC mains. The only time you can flash a device while plugged into mains is when you flash it OTA (e.g., Tuya-Convert).

@hutchwilco
Copy link

Hi. I'm a bit of a noob to all this. I used a CH340G to flash 2 Sonoff/TH16's - no issues. Now I'm trying to flash the ifan02. I'm struggling to understand the power part, do I literally wire the ifan02 to 120v AC coming from the wall to flash this? Has anyone has written up some detailed steps just on the flashing part for the ifan02? Appreciate any advice.... thank you.

@sschnoor Just to be really clear, (it's great that you knew enough to come ask first) the reason you shouldn't flash while powered up on AC is the danger - to you, and to your computer, serial interface and connected devices.
In most reputable devices, for safety reasons AC parts of the circuit maintain a minimum of "two fault" isolation from the DC or extra low voltage parts that might be accessible to a person (so that one fault of isolation will not cause an unsafe situation).
Sonoff products are not necessarily designed with this level of care in this regard as we would expect from devices compliant to common safety standards.

Since you are flashing the very low voltage areas (3V), you can power the important parts using a 3.3V DC supply onto the pad usually labelled VCC (positive or "+") and GND (negative or "-").
Your serial-USB converter may have 3V output in which case you can use that. Beware though that many do not, and instead have 5V (since that is USB standard). 5V is likely to damage a 3.3V device you are flashing. You can power it with a cheap separate power supply such as MB102-Breadboard-Module-Adapter-Shield. Just make sure you have the GND for the serial interface and power supply connected together at the iFan serial GND.

@w1ll1am23
Copy link

w1ll1am23 commented Jun 23, 2019

I would like to clairfy some things.

The ifan02 can be flash safely (if you are very careful) while powered by 120 and connected to a computer. I have 3 and did this so can confirm that it works and so do my computers.

In fact this page https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-iFan02 hints at that and I believe use to even explain that doing so was okay because the power is isolated.

It should be noted that this isn't the case with all sonoff devices.

I guess I should mention that there are safer ways to do this mentioned in this thread and you shouldn't use the 120v method of you are 100% confident in your abilities to do so.

@meingraham
Copy link
Collaborator

meingraham commented Jun 23, 2019 via email

@sschnoor
Copy link

@w1ll1am23 , hello. Have you written up any steps do this? I'm seeing bits and pieces of steps in the thread here, but was hoping for something more complete. And fwiw - seems my noob comment was misunderstood (but appreciate the caution from everyone ;] )- I simply meant new to flashing these types of devices. As far as working with AC/main power, I've installed sub-panels, re-wired my house, etc. Thanks!

@kll
Copy link

kll commented Jun 25, 2019

I highly recommend picking up something like the μArt for flashing devices like this. It has full galvanic isolation so is pretty safe to use to flash stuff connected to mains power. It doesn't protect from being an idiot and hooking it up wrong or just touching the wrong thing when connected to mains, so the safest is still what everyone keeps saying and "just don't hook it up to mains power when flashing".

I've got one and it is my go-to for flashing pretty much everything even if it isn't hooked up to mains power.

@finity69x2
Copy link

finity69x2 commented Jun 27, 2019

There should be a diagram in the wiki for a power supply/flasher circuit that I created. While you could flash connected to ac why would you want to put yourself at unnecessary risk if there is a safer alternative?

@Bizzarrini
Copy link

Hi all, new user from the Netherlands here. I've started using Domoticz a few months ago and progressed to Sonoff and Tasmota soon after. I've managed to flash and control quite a few Basics and a Touch T2. I'm working on controlling my ceiling fan right now using the Ifan02. I've got the hard part done, unit is flashed and installed. I've configured MQTT and Domoticz services and created two virtual switches (one for the light and one for the fanspeed). The light switch works, but I can't get the fanspeed to work. I've created a button switch with four options (off, one, two and three) but this sends the wrong MQTT messages. How do I get this to work properly? Thanks for the advice. Regards, Ward

@sschnoor
Copy link

sschnoor commented Jul 2, 2019

@Bizzarrini can you tell me how you went about flashing your ifan02? Thank you

@Bizzarrini
Copy link

Bizzarrini commented Jul 2, 2019

@sschnoor sure, actually I just followed the instructions on this page and the Tasmota wiki. I used a serial to usb convertor to connect GND, TX and RX while I powered the Ifan02 unit from one of my NodeMCU devices attached to a powerbank. I interconnected the GND of all devices first. For flashing I used the NodeMCU firmware flashing tool.

@jpadie
Copy link

jpadie commented Jul 2, 2019 via email

@Bizzarrini
Copy link

Thanks for your reply. In the Tasmota settings it's possible to define an MQTT server, which I've also added to Domoticz. I've created two virtual switches in Domoticz. In the Tasmota interface it's possible to enter the switch ID'S so tasmota can communicate with Domoticz through the pre defined MQTT server. This way I can switch the light (as I've also accomplished with a few Sonoff Basics), however the commands originating from the Domoticz fan switch don't match the expected input to Tasmota.

@jpadie
Copy link

jpadie commented Jul 2, 2019 via email

@Bizzarrini
Copy link

Thanks for the quick response! I'm quite new to Domoticz and especially MQTT so I'm unsure, however as Tasmota integrated the options to include two switch ID's I assumed it was possible without much hassle. I guess the other option would be to use a script to assign the correct MQTT messages to the switch positions, but that's something I have zero experience with unfortunately. I'll look into this option.

@jpadie
Copy link

jpadie commented Jul 2, 2019 via email

@Bizzarrini
Copy link

Bizzarrini commented Jul 2, 2019

Ok for unknown reason it's working now. I checked the ingoing mqtt messages to Domoticz when I changed fanspeed from the Tasmota web interface, and they read like
{"idx":133,"nvalue":2,"svalue":"10","Battery":48,"RSSI":3},
where the svalue is 0 for off, 10 for speed 1 etc.

I then created a selector switch in Domoticz with levels 0, 10, 20 and 30 and named them off, 1, 2 and 3.

Outgoing message now looks like
{
"Battery" : 48,
"LevelActions" : "|||",
"LevelNames" : "Off|1|2|3",
"LevelOffHidden" : "undefined",
"RSSI" : 4,
"SelectorStyle" : "0",
"description" : "",
"dtype" : "Light/Switch",
"id" : "000140D5",
"idx" : 133,
"name" : "Slaapkamer Ventilator",
"nvalue" : 2,
"stype" : "Switch",
"svalue1" : "20",
"switchType" : "Selector",
"unit" : 1
}

Works like a charm now. Thanks for all the advice!

Ps: any ideas on how to change the battery level output in the message to 255 coming from Tasmota?

@psnlk
Copy link

psnlk commented Dec 14, 2019

Ok for unknown reason it's working now. I checked the ingoing mqtt messages to Domoticz when I changed fanspeed from the Tasmota web interface, and they read like
{"idx":133,"nvalue":2,"svalue":"10","Battery":48,"RSSI":3},
where the svalue is 0 for off, 10 for speed 1 etc.

I then created a selector switch in Domoticz with levels 0, 10, 20 and 30 and named them off, 1, 2 and 3.

Outgoing message now looks like
{
"Battery" : 48,
"LevelActions" : "|||",
"LevelNames" : "Off|1|2|3",
"LevelOffHidden" : "undefined",
"RSSI" : 4,
"SelectorStyle" : "0",
"description" : "",
"dtype" : "Light/Switch",
"id" : "000140D5",
"idx" : 133,
"name" : "Slaapkamer Ventilator",
"nvalue" : 2,
"stype" : "Switch",
"svalue1" : "20",
"switchType" : "Selector",
"unit" : 1
}

Works like a charm now. Thanks for all the advice!

Ps: any ideas on how to change the battery level output in the message to 255 coming from Tasmota?

possible to see a screenshot of your fan02?

@nimamoslemy
Copy link

Hi, we are a team that needs your feedback to complete our idea.
Please visit our pages and comment on it.
github
gitlab

@jrfernandes
Copy link

jrfernandes commented Jun 5, 2020

Hello all,

I'm very amateur when it comes to electronics but, I got an iFan02 for a US ceiling fan and I'm having the same issues as reported by others above where the fan rotates extremely-slow, slow and not-so-slow-but-quite-fast.

The capacitor on my fan only has 3 wires:
IMG_9314

Here's the diagram of the wiring for my fan:
fan

How can I make iFan02 to work properly here? I'm not opposed to solder the iFan's capacitors out and put something else there, I just need help to know what that something else is and how the fan wiring should look like.

I do have a few 5uF capacitors but I'm not sure if I should use those on the iFan02 since that's not what the fan itself uses.

TIA

@jpadie
Copy link

jpadie commented Jun 5, 2020 via email

@jrfernandes
Copy link

I had it in the position of full speed. I'm not sure if it was before installing the iFan or if I did that after. Does that really make a difference?

@jpadie
Copy link

jpadie commented Jun 6, 2020 via email

@jpadie
Copy link

jpadie commented Jun 6, 2020 via email

@jrfernandes
Copy link

I don’t. fwiw, I did have the fan speed set to maximum when having the ifan connected.

Can’t I remove the capacitor from the fan and have Iran’s capacitors to handle the speed?

@jpadie
Copy link

jpadie commented Jun 6, 2020

hmm. i see that the images in my earlier post got stripped. to recap the image textually:

set GPIO4 to relay3, GPIO5 to relay2, gpio12 to relay1 and gpio 15 to relay4.

I would not do as you suggest as you are then passing full mains to your motor’s coils. It will probably not start at all as there would be no phase angle for the starting coils. But you could maybe work around that by starting at a lower speed and then going to full speed. and the coils may not be able to accept that voltage resulting in a burn out or the fan spinning inappropriately fast for the bearings.

if you did want to try that route and not use the pass through relay, then you would not be able to match all three speeds as the capacitor values available to you are only 2.5uF, 3uF and 5.5uF. the fast speed would be (potentially) too fast for your fan (which is tuned to a 4uF capacitance most likely) and the slowest speed would be equivalent to your current medium speed. You again run the risk of damage, although more likely to be damage to the bearings. and you would again need a specially compiled binary.

@welbo97
Copy link

welbo97 commented Jun 6, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on
Projects
None yet
Development

No branches or pull requests