Skip to main content

Two routers configuration for Smart Home

When setting up the smart home system using WIFI as the core network infrastructure, it is important to split the surfing traffic and smart home traffic. This will ensure that the smart switches respond timely. 

For my smart home setup, I have used 2  Asus routers (RT-AC1200G+ & RT- AC68U), one is configured as the main the other configured as the slave. There is no reason why a particular model is chosen as it is based on what I have on-hand but it is better to have dual-band routers because I will have 4 separate bands (Two 5Ghz and two 2.4 GHz) of network bandwidth.




The router is configured as a Master-slave mode with different subnets and network route is added to make sure that the traffic can flow both ways. The smart switches are all connected to a dedicated 2.4 GHz bandwidth and the remaining 3 bands are for normal surfing.

For normal surfing, in order to the client devices to automatic connect to the strongest signal frequency, all the SSIDs have to be the same.  So the client device will automatically connect to the strongest signal router.

For some reason, setting up the static route in the web interface does not enable the routing. A separate route has to be added to the iptables by Telnet into the console. The following are the commands to set the iptables:

# to list all the forwarding rules  
iptables -L FORWARD -v

# add an entry to allow all traffics between the 2 routers.
iptables -I FORWARD 3 -i br0 -o br0 -j ACCEPT

Comments

Popular posts from this blog

Using ESP-Link transparent bridge (ESP-01 and Arduino Pro Mini)

Recently stumbled across an interesting open source project ESP-Link . Its main purpose is to network-enable a non-network microcontroller (MCU) such as Arduino Uno, Pro mini or Nano using ESP8266. The author termed it as "Transparent Bridge". The ESP and MCU  communicate via the serial link and there is a companion Arduino library EL-Client  for the MCU to connect up the network using MQTT, REST, TCP and UDP. Setup I have put together an ESP-01 and an Arduino Pro Mini for this experiment. I have chosen a 3.3 version Pro mini so that I do not need to do any voltage level shifting between the I/O pins. In order to have a stable voltage source, the ESP8266 is powered by Pro Mini and the Pro Mini "RAW" pin is connected to a 5v USB power source. The RAW pin can take voltage up to 12V. The reset pin of Pro Mini is connected to GPIO 0 of ESP-01. This enables the ESP-01 to reset the Pro Mini.   I have linked up an APDS 9960 sensor to it and periodically se...

Xiaomi Mi Flora Chinese and International version comparison

Xiaomi Miflora sensor allows monitoring of the surrounding environment of the plant. It can monitor temperature, soil moisture, conductivity (acidity of the soil), ambience light. There are 2 versions of the sensor, international and Chinese version. Realistically, I cannot see the difference between the 2 versions. The left-hand side is the Chinese version and the right is the international version. Other than the packaging, the main difference is the price of the sensor. The International version cost 2x more. In other forums, there are discussions that the Chinese version cannot connect to the MiHome App. I have set my MiHome app to connect to China server and it is able to register the sensor correctly. For my usage, I will be connecting to Openhab to monitor the plants andusing  Thomas Dietrich MiFlora mqtt daemon  as the bridge between Openhab and the sensor. The International version is detected as Flower care and the firmware version is 3.1.9 wh...