[Recommendations] Australia Local Control Ceiling Fan

Hi,

I currently have a Infra-Red remote control ceiling fan which i control through MQTT with a ESP8266 module i made, however we are looking to change the ceiling fan so i was looking for any recommendations of what others use.

My main requirement is that the fan has to be controllable locally i don’t trust the internet connection to be up and the companies to keep their data centres running for the life of the fan or 24/7 (as per recent Amazon/Google/Tesla etc issues). I have seen a few posts on the, now massive, Australia - Electrically Certified Hardware. From what i have seen these either have to be hacked or don’t have local control.

I would be happy with another IR controlled fan that i can re-program my ESP device for, not having current state hasn’t been an issue so far as the fan defaults to off after power failure. I do have a z-wave network so could use that but i don’t think that is a realistic option with currently available hardware over here. WiFi is also fine, so long as no internet connection is required (i have a internet blocked IoT network).

Does anyone have any thoughts or suggestions? I can do basic hobby stuff so for example if there is a RF fan that i could build a bridge for using an ESP module that could work but ideally i don’t want to be taking things apart and hacking either (a) the risk of me bricking it and (b) not then being certified/legal. At the moment we just have a on off wall switch to power the fan so the remote/esp is the only control and we would like to keep if that way without the need for extra control panels etc.

Sorry about the long post / requirements but i am struggling to find suitable items online and when we do start browsing shops i don’t know how many staff will understand what i would like!

Thanks,
Richard

1 Like

If you don’t mind doing a chip swap, the Brilliant fan controllers can be used and are quite nice (without chip swapping they need the Tuya cloud). I bought a few of them but blew one up (see below).

Due to me finding out the hard way that the above fan controller didn’t like my 85W fan (they are only rated to 70W) I am actually about to build my own fan controller and have it run ESPhome (full local). I hope to have two of them built next week and can then showcase them. For now they will be prototypes but if the process of certification isn’t too extreme I would consider doing that. The prototypes are using certified components so will technically be fine as they are, just not as neat and compact as most would like.

By chip swap what does this involve? Is it a case of flashing the device over wifi, do i have to solder on connections and physically flash it, or literally buying another chip to put in? If they were to change their hardware or firmware at some point then i guess this might not work, i just say that as i got a cheap Arlec WiFi switch to try flashing for local use but they changed the firmware so it cannot be updated to Tuya-Local/ESPHome etc. anymore.

I would be interested in an ESPHome controller so i’ll keep an eye out for any updates on this if it can be certified.

Physical removal of the original controller chip and soldering in a new (ESP based) one. Previously we could re-program the original chips over wifi but that got blocked in newer versions.

Once you put your own chip in there the firmware cannot be changed by anyone but you.

This is when you need to pull the original chip out and solder in an ESP12F or similar which you then have full control over, locally.

I’ve written up some blog posts about a couple of options: ceiling fan – neon.ninja

  • Brilliant fan with RF remote connecting to a Sonoff RF bridge running ESPHome - this is surprisingly reliable.
  • Brilliant fan controller retrofitted to old ceiling fan and flashed with Tasmota - same as recommended by sparkydave and which now requires a chip swap
  • Different Brilliant WiFi ceiling fan that could run ESPHome or Tasmota, not sure if you can still flash this fan though.

And one more option I haven’t documented in detail yet: SRLTech wall controller which I was able to flash with ESPHome at the time and which can be a drop-in replacement for standard wall controllers.

sonoff ifan is perhaps an option if you have the controller on the wall.

I was looking to do this, but have not done it myself

Looks flashable with tasmota & likely esphome

Those aren’t certified for use in Australia so would be at owners risk regarding insurance if it catches fire.

These look nice, thanks for suggesting them. How long ago did you flash one to ESPhome? I wonder if they are still flashable? If not, were they easy to open up and access the chip? I have spare ESP12F’s ready to go if I need one.

Thanks for the input. We’re not planning on having a wall controller but it could be an option. I may have a look at the arlec wifi switch I have at the moment and see if I am capable of changing the chip in that first before going down the other options.

Otherwise I suppose finding a fan with an IR remote is looking like the easy option for now.

If you used one of those SRL Tech wall controllers use could still use another device integrated to HA to remotely control the fan, such as an IKEA Tradfri remote. That’s what I’m now thinking of doing. That way the wall control is there if you move house.

The problem with IR is not having feedback to HA.

Yes, not having confirmation of the fan state is a minor issue, the esp does send a mqtt confirmation back though so it hasn’t been an issue up until now.

The point about having a controller somewhere for moving is a good one, will take that into consideration. I have zwave wireless wallmotes that I will use as control panels so additional remotes other than the HA app isn’t as issue. Just want to make sure I am not relying on a cloud provider anywhere.

Also need to make sure everything passes the wife test too :grinning:

I’d say about 2 years ago. I think I flashed them over the air using tuya convert at the time.

For completeness i just ended up going with a Beacon (Lucci brand) fan with a remote control controller - this remote uses 433MHz which i have decoded the signals for using a 433MHz receiver connected to Arduino. Once we get the fan installed i will setup the transmitter to send the decoded signals.

Whilst this does mean that i don’t have feedback on the current state this isn’t a huge issue, the current IR one works fine like this except for twice where the fan stopped in a way it blocked the signal! At least that will not be a problem with the radio signal not needing line of sight.

Do you have any details on the decoded signals? i just put in some Lucci fans and cannot bring myself to spend $130 on their closed tuya-based controller and app.

i haven’t worked with 433MHz before, so some pointers would be fantastic.

cheers

Hi,
I used a cheap 433MHz receiver and transmitter pair to read the signals and then wrote a basic program for a WiMOS board in Arduino IDE to transmit the binary signals based on an incoming MQTT message. It is probably easier to do the transmit part with ESPHome now though.

The transmitter and receiver used are the same as in this tutorial: https://lastminuteengineers.com/433mhz-rf-wireless-arduino-tutorial/ for a few dollars.

I used the RCSwitch library which isn’t the same as the library in the tutorials. I could share the codes however it depends what channel you are using (I can’t remember which one I used!).

Is that enough to get you started? I can put the code snippets I used here if that helps.

Thanks,
Richard

1 Like

ok cool, thanks :smiley:

I am hoping to get an off the shelf Tasmota type bridge. i am going to test out the Sonoff bridge, and see if the recent changes cause issues, hopefully not :smiley:, so i will try and avoid the custom builds .

Hi there, I think this is exactly what I was looking for, or somewhat. I built my house without considering the need to install ceiling fans in the bedrooms, so the only way to have light and fan in those rooms are the ceiling fan/light combos that I got from Beacon or now directly from an electrician who installs them. Long story short. I have 3 remotes (beacon, lucci and ventair) which I believe all uses rf to communicate with the fans, which I like to put into home assistant.

I was hoping to find an integration that does it for me, but it looks like I need to work. It will help very much if you can share what I should be seeing from the signals and I will try to figure out how I can get it working with ESPHome (also new to this).

Thanks.

Hi,
For testing the remote and getting what each button used i think i used this, (which is the RC-Switch library basic example, i think i also used the Advanced version which gives more data):

/*
  Simple example for receiving
  
  https://github.com/sui77/rc-switch/
*/

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(0);  // Receiver on interrupt 0 => that is pin #2
Serial.println("Init complete ");
}

void loop() {
  //Serial.println("Test");
  if (mySwitch.available()) {
    
    Serial.print("Received ");
    Serial.print( mySwitch.getReceivedValue() );
    Serial.print(" / ");
    Serial.print( mySwitch.getReceivedBitlength() );
    Serial.print("bit ");
    Serial.print("Protocol: ");
    Serial.println( mySwitch.getReceivedProtocol() );

    mySwitch.resetAvailable();
  }
}

Advanced is here: rc-switch/examples/ReceiveDemo_Advanced at master · sui77/rc-switch · GitHub
This printed out in the Serial Monitor the strings in needed.

I then use a project like this to transmit using a WeMos D1 mini board, note i haven’t tested this as my project has more sensors attached to the board, this is a cut down version):

//For 8266
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h>

#include <RCSwitch.h>


//433MHz Transmitter pinout
const int TRANSMITPIN = 0;

RCSwitch fanTransmit = RCSwitch();

const char* ssid = "****"; // Enter the SSID of your WiFi Network.
const char* password = "****";// Enter the Password of your WiFi Network.

//MQTT stuff
#define mqtt_server "****"
#define mqtt_port 1883
#define mqtt_user "****"
#define mqtt_password "****"

#define bedroomFan_command_topic "home/Bedroom/Fan"
#define bedroomFan_state_topic "home/Bedroom/Fan/State"
#define bedroomFan_mode_topic "home/Bedroom/Fan/Preset_Mode"
#define bedroomFan_mode_state_topic "home/Bedroom/Fan/Preset_Mode/State"

WiFiClient espClient;
PubSubClient client;

const int interval = 60000;
unsigned long previousMillis=0;

char fanOffRawData[] = "001011111101";  // 
char fanLowRawData[] = "001011110111";  //  
char fanMedRawData[] = "001011101111";  // 
char fanHiRawData[] = "001011011111";  // 

void setup()
{
  Serial.begin(9600,SERIAL_8N1,SERIAL_TX_ONLY);
  
  //setup RC
  fanTransmit.enableTransmit(TRANSMITPIN);
  fanTransmit.setPulseLength(322);
  fanTransmit.setProtocol(11);
  fanTransmit.setRepeatTransmit(5);

  delay(10);
  Serial.println("");
  Serial.println("");
  Serial.print("Connecting To: ");
  Serial.println(ssid);
 
  WiFi.begin(ssid, password);

  WiFi.mode(WIFI_STA);

  while (WiFi.status() != WL_CONNECTED)
  {
    delay(500);
    Serial.print("*");
  }
  Serial.println("");
  Serial.println("WiFi Connected.");

  client.setClient(espClient);
  client.setServer(mqtt_server, mqtt_port);
  client.setCallback(mqtt_callback);
}

void loop()
{
  //MQTT subscribe
  //send code depending on MQTT topic received
  if (!client.connected()) {
    reconnect();
  }

  client.loop();

  unsigned long currentMillis = millis();
}

void sendCode(int button) {
  
  switch(button){  
    case 1:
      //fan off
      fanTransmit.send(fanOffRawData);
    break;
    case 2:
      //fan low
      fanTransmit.send(fanLowRawData);
    break;
    case 3:
      //fan med
      fanTransmit.send(fanMedRawData);
    break;
    case 4:
      //fan high
      fanTransmit.send(fanHiRawData);
    break;
  }  
  
  Serial.println("Transmitted Binary code");
  //send mqtt status
}


//reconnect to mqtt topic
void reconnect() {
  // Loop until we're reconnected
  while (!client.connected()) {
    Serial.print("Attempting MQTT connection...");
    // Attempt to connect
    if (client.connect("ESP8266Bedroom_New", mqtt_user, mqtt_password)) {
      Serial.println("connected");
      //now subscribe to topic
      client.subscribe(bedroomFan_command_topic);
      client.subscribe(bedroomFan_mode_topic);
    } else {
      Serial.print("failed, rc=");
      Serial.print(client.state());
      Serial.println(" try again in 5 seconds");
      // Wait 5 seconds before retrying
      delay(5000);
    }
  }
}

//MQTT function
void mqtt_callback(char* topic, byte* payload, unsigned int length) 
{
  Serial.print("Message arrived [");
  Serial.print(topic);
  Serial.print("] ");
  //for (int i = 0; i < length; i++) {
    //char receivedChar = (char)payload[i];
    
    payload[length] = '\0';
    String strPayload = String((char*)payload);
  Serial.println(strPayload);
    if(strcmp(topic,bedroomFan_mode_topic) == 0)
    {
      if(strPayload == "Low")
      {
        sendCode(2);
        client.publish(bedroomFan_mode_state_topic, String("Low").c_str(), true);
        client.publish(bedroomFan_state_topic, String("On").c_str(), true);
      }
      else if(strPayload == "Med")
      {
        sendCode(3);
        client.publish(bedroomFan_mode_state_topic, String("Med").c_str(), true);
        client.publish(bedroomFan_state_topic, String("On").c_str(), true);
      }
      else if(strPayload == "Hi")
      {
        sendCode(4);
        client.publish(bedroomFan_mode_state_topic, String("Hi").c_str(), true);
        client.publish(bedroomFan_state_topic, String("On").c_str(), true);
      }
    }  
    else if(strcmp(topic,bedroomFan_command_topic) == 0)
    {
      if(strPayload == "Off")
      {
        sendCode(1);
        client.publish(bedroomFan_state_topic, String("Off").c_str(), true);
      }
      else if(strPayload == "On")
      {
        sendCode(2);
        client.publish(bedroomFan_mode_state_topic, String("Low").c_str(), true);
        client.publish(bedroomFan_state_topic, String("On").c_str(), true);
      }

    }      
Serial.println();
}

This is very crude but should be a starting point if you are familiar with Arduino, it connects to WiFi subscribes to the MQTT broker and then waits in an incoming MQTT topic, it reads the topic and then sends a 433MHz signal. If this is a bit too much then ESPHome should be much easier with something like this: Remote Transmitter — ESPHome

I used the transmitter/receiver pairs mentioned above that i bought on eBay.

Thanks for the share. I will try to give it a go.