Sonoff IFan02 (Tasmota) MQTT Fan

No. They don’t require the card. Iirc you’ll get a switch for fan and light but when you click on fan the entity will open allowing you to chose speed. Visit the thread on github and you can see some evolution as we worked it out.

You never have to ask about editing a wiki. Please do. Ha docs are sparse and always need updating

Hi,

I have used the code form the tasmota wiki for my ifan but i only see one button. (see image)

fan:
  - platform: mqtt  
    name: "Master Bedroom Fan"
    command_topic: "cmnd/sonoff_MBR_fan/FanSpeed"
    speed_command_topic: "cmnd/sonoff_MBR_fan/FanSpeed"    
    state_topic: "stat/sonoff_MBR_fan/RESULT"
    speed_state_topic: "stat/sonoff_MBR_fan/RESULT"
    state_value_template: >
      {% if value_json.FanSpeed is defined %}
        {% if value_json.FanSpeed == 0 -%}0{%- elif value_json.FanSpeed > 0 -%}4{%- endif %}
      {% else %}
        {% if states.fan.master_bedroom_fan.state == 'off' -%}0{%- elif states.fan.master_bedroom_fan.state == 'on' -%}4{%- endif %}
      {% endif %}
    speed_value_template: "{{ value_json.FanSpeed }}"
    availability_topic: tele/sonoff_MBR_fan/LWT
    payload_off: "0"
    payload_on: "4"
    payload_low_speed: "1"
    payload_medium_speed: "2"
    payload_high_speed: "3"
    payload_available: Online
    payload_not_available: Offline
    speeds:
      - off
      - low
      - medium
      - high

fan

In order to get the 4 buttons on the card you will have to do some extra configuration (the link to get to the relevant thread is up higher in this thread in a post by finity).

I just posted my configs for the iFan02 on the Tasmota > Home Assistant wiki. It includes all the sections that need configuring (I don’t use the 4 button customization). Hopefully you will have more luck after checking it out.
https://github.com/arendst/Sonoff-Tasmota/wiki/Home-Assistant#ifan02-1

2 Likes

Hi mjoshd,

I seen the post above but how do I access those files when I am running hassio (docker)?

I don’t use the 4 button customization so I can’t speak to how it is configured. As for the files mentioned in my post on the wiki entry, they are in the /config directory and are in the same place where you added the config for the iFan02 already.
I use Hass.io on HassOS (rPi3). If you are using another host OS then you can enable an addon (Configurator, Samba, IDE, etc.) that will let you access the files without having to dig through the host OS (make sure you secure it according to the docs).
If you need more help/information about editing .yaml files, check here: https://www.home-assistant.io/docs/configuration/

was just about to ask about a lovelace card, but found this:

Thanks, could you guide me on how to set this up? Which file needs which config?
Automation and switches i get that, but the rest?

Kind regards

I got everything to work, except one thing - my off button does not turn blue when i turn off the fan and whatever speed was last stays blue instead. didn’t have much time to dig deeper, but if someone knows how to fix that, please let me know, so i don’t spent time troubleshooting it.

thank you!

I had the same problem at first.

See this to see how to fix it:

read from there down and you’ll see the conversation about it.

Does anyone know if the remote that comes with the IFan02 can be used after flashing to Tasmota? In order to make this “wife-approved” I need it to work with a standard remote as well.

i flashed and remote working perfectly after that. so - yes.

1 Like

I even forgot to pair the remote before flashing and I was worried that I screwed it up but it paired exactly as it should after I flashed it.

1 Like

Hi

hassio noob here, have several (7) ifan02’s running off hass, and they’re working great, even better now I have the automation setup to get their state upon restart of hass. Thanks to all in this thread and elsewhere!

I have the home assistant cloud service (subsription, not manual) running also, and am able to turn fans off (and fans lights on and off) via google assistant, but not able to turn any of them on. I have no idea where to start with customising home assistant cloud devices, the documentation is rather minimal!

So question is, does anyone have google assistant ability to turn fans on? If so, any pointers?

Thanks

Tim.

stupid me, just realised I have to ask google to set the fan speed to high/medium/low and it works.

still don’t get any controls on google home hub though, just a single on/off toggle where off works but on does nothing. In google assistant mobile app I get no controls at all.

How did you get it to flash?

I’m missing something obvious but I don’t know what.

I am powering it with the mains since the wiki says 3.3v wont cut it.

Is the boot order power, jump Tp16 to ground, plug in usb?

Any help as to what you did would be greatly appreciated as I’m not following the small amount of info on the wiki and am new to tasmota.

No.

It’s jumper TP16 to ground, power on, connect USB.

You have to have TP16 jumpered at boot to get it into flash mode. And be very careful about using main power. Not only can you fry your computer if you manage to feed main power back to the computer thru USB but you can also kill yourself if you screw up.

How did you power it if not using main?

Also, are you pushing the button while jumping?

Is there any indication on the board that it’s ready to flash?

I came up with this device to power up the IFan02 using an external 5v higher current power supply (scroll down till you see the heading “alternate power supply schematic”):

There is no need to push the button. Jumping TP16 to ground is putting GPIO0 to ground which put it into flash mode.

I honestly can’t remember for sure if there is a light that comes on or not. I don’t think so tho.

If I read that right, you going

Power (in my case it would be 2.4a @ 5v) ->buck converter - >3.3v to ifan02

Rx, Tx amd Gnd come from the FTI.

Are you also connecting the ground to the buck converter?

Yes the negative on the 3.3v output from the buck converter and both grounds from the FTDI adapter and the ground pin on J# of the IFan02 are connected together. And I have a jumper wire also connected to the ground pin on the power supply that I use to jumper to TP16 before I power it up. Then once it’s powered up I just release the jumper wire from TP16, plug in the FTDI to the USB port on the computer and flash it.

Here are some pictures of the power supply I made:

In the last picture the right side of the PCB has the power coming in from the 5v PS. On the far left are the wires going to the connector I plug into the IFan02 J3 port onto which I soldered a header. the buck converter is the board in the middle and the FTDI is connected to the header in the bottom middle. The FTDI adapter USB connector isn’t connected to anything outside of the picture yet.

You can also see the yellow wire on the bottom that is connected to ground (-) of the buck power supply that I use to intermittently touch to TP16 while I turn on the 5v input to power everything up.