Modern Forms Smart Fans - Integration

Another theory:
Assumptions: I think the Fan may only allow a single TCP connection (or some other limited number). This should be easy to test (just open a few connections to it and do nothing). I haven’t been home in ages so I can’t test.

If the above assumption is correct and for some reason HA is leaking connections, we might starve it from our polling, (hence your prober failing too). This means eventually it should recover if we kill HA.

That may be a good theory. I am not sure if it matches my observations though (which doesn’t mean it’s not correct!)

In my case, when a fan becomes unresponsive, it’s not even responding to ping, or the wall remote. It appears to just be completely dead. Hard-reset from the wall switch (essentially a power cycle) brings it back to life, but often I need to re-pair the remote as well.

This sounds like a bad module.

I actually have a bad module too. One of my fans decides to reset out of the blue and it needs re-pairing. I got it replaced by modern forms but I never had the chance to replace it. The fan install was a pain

Possibly, but both of my brand new fans are behaving the same way, and that sounds a little too much to be a bad module. Perhaps.

OK, so here’s my first shot at a workaround for locking fans. Anyone struggling with this, please give this one a try. The following will reboot the fans 3x a day.

Note: The fans I have (Roboto 52) handle this kind of a reboot in an undistruptive way: if they are on, they stay on, if they are off, they stay off.

  • configuration.yaml:
        url: "http://{{ip_address_one}}/mf"
        method: POST
        payload: '{"reboot": true}'
        content_type: "application/json; charset=utf-8"
        url: "http://{{ip_address_two}}/mf"
        method: POST
        payload: '{"reboot": true}'
        content_type: "application/json; charset=utf-8"
  • automations.yaml:
    - id: reboot_mf_fans
      alias: Reboot MF Fans
      description: ""
        platform: time
          - "00:00:00"
          - "08:00:00"
          - "16:00:00"
      condition: []
        - service: rest_command.reboot_mf_fan_one
        - service: rest_command.reboot_mf_fan_two
      mode: single

Installed your automation for my 3 MF fans Marko. Will let you know if fans fall off line.
I just installed a nightly reboot (al la jimpastos) to see if this helped, I will deactivate this for now so I can see if fans fall off line (HA reboot hid information in the log files).

This change to line 64 of
self.poll = async_track_time_interval(hass, update_action, timedelta(seconds=interval))
in combination with an increase in the scan_interval to 30 seconds looks to have solved my ~12 hour lockup problem. I’m up to about 3 days without any issues or failues. Spoke too soon… died after 5 days.

  - host: 192.168.XXX.XXX
    name: Bedroom Fan
    light: true
    scan_interval: 30

I’ve documented this as well in

Trying the reboot automation now…

Update: 2020-10-01
Reboot automation worked perfectly. Not 1 issue in over 2 weeks!!!
Thanks @icemarkom

1 Like

I was having similar issues with the locking up of Lovelace.
These comments helped me. I also patched the leaking exception by fixing the _send_request method in the bottom of

  def _send_request(self, data):
      r =, json=data)
      r.raise_for_status() = r.json();
    except requests.exceptions.RequestException as e:
      _LOGGER.error("An error occurred while making a request. {}".format(repr(e)))

I’m having similar issues and I tried your rest command/automation but it returns either an error or a timeout warning. If you ran into this or have any input, I’d appreciate it.

I am seeing the exact same error. I can send curl command and control all attributes of the fan, but a reboot command fails.

I think that’s either expected (WARNING), or too late (ERROR).

Expected, because the reboot command returns nothing, so in theory, reboot request will eventually time-out, and report the warning. You can confirm this by setting up automation to run at a specific time, and run ping to your fan at the same time. If reboot is successful, you will lose 2-3 ping packets.

Too late, means the fan was already stuck when you tried to reboot it, and there is nothing you can do software-wise to recover it. It’s time to power-cycle. You can confirm this by pinging the fan, and confirming that it’s not responding.

That being said, I see the same warning messages in my log, but I’ve learned to live with them.

Thanks, your comments got me thinking to send back to back requests and the fan rebooted. A single request times out.

My firmware upgraded about a month ago. I was wondering if anyone noted this and tried to see if Marko’s reboot automation is still needed. Unless anyone has tested this with firmware 02.00.0017 / 02.05.002 and found the reboots are still needed, I might check this out.

Thank you for bringing this up! I, too, upgraded, but I have not disabled my reboot automation until now. I have disabled it right now, and I will try the fans in a few days to see if they are still alive and well :slight_smile:

Me too. Will report back…

Locked up in under a day. Reboots are back.

No lockups here ~30 hr.

I turned off Marko’s ModernForms reboot utility 4 days ago. Still no loss of connections!
I am using firmware 02.00.0017 / 02.05.002 on these fans.
Paul Earley

I bought a modern forms fan in July of 2020. After much struggle to get it installed in a high ceiling, i found it would drop off the network a lot and i would re-add it through the app many times. That was before i had home assistant.

Modern forms sent me 2 replacement wifi modules and one new wall control (They said my second wifi module was incompatible with the wall unit). I was really ready to give up on this fan. I talked to a few different people in modern forms fan support and finally a new person started on the support team and promised to help me get my fan working properly. At this point the fan was staying on wifi pretty well, but if i turned it off and tried to start it from the alexa, it would struggle to start and not actually move and just make clicking noises. If i got a stick and gave it a little push it would start spinning, I sent this to support and told them i suspect the motor was bad. They said no it is a firmware issue, and a new firmware would be released soon. I kind of lost interest in the fan at this point because it was so much trouble, but a few months later i realized the fan was working perfectly and was solid for months. Because of all the issues, i would only control the fan through alexa. I would not open the app on phone or use the wall control. It worked fine for months this way. I think i remember that if i even open the modern forms app on my phone or use the wall control, the fan would drop off wifi sometime later.

Then i started to use home assistant and found this great add on (Thank you!). But as soon as i started using it my fan started dropping off the network several times a day and require i pull the air gap to get it back on wifi again. So my situation sounds like what has been described here. I deleted the add on and i am going to reset the fan and see if it stays on the network for a few days, If it works fine then i will reinstall the add on and try to change the polling interval and setup the auto reboots and see how that goes,

Thank you for this add on! I don’t think my recent issues are because the add on is bad, i just think these fans are VERY finicky and develop problems for the least little thing. Hopefully i can get it figured out.

If the fan wasn’t so hard to install, i would have taken it down and sent it back a long time ago. Way too much trouble for a simple fan. I do like the way it looks and being able to control it through alexa when it will stay on the network.