Convert a $20 Router To Home Automation Gateway For IoT Devices

Convert a $20 Router To Home Automation Gateway For IoT Devices

WiFi based home automation products are cheaper compared to ZigBee or Z-Wave products, but the downside is that WiFi devices need an internet connection to perform their function. A lot of those IoT devices don’t just communicate on your local network, they also talk to the outside world via the internet. IoT devices like simple smart plugs, sensors, and all kinds of home automation gadgets don’t always have a good reason to connect to the outside world. Letting your home devices controlled by a bunch of cloud servers on the internet may not be the best idea.

Internet connectivity for home devices should be optional – the user should be in charge of deciding whether he/she wants to expose the home-devices to the internet – may be for remote monitoring or controlling purpose. This can be done by making a local gateway for your home automation devices using a cheap $20 pocket router. Here is a guide on how to do this clever hack.

GL-MT300Nv2 $20 Router
GL-MT300Nv2 $20 Router

This hack depend on the IoT devices themselves, but many of them simply won’t function without access to the internet, but a lot of popular products like sonoff, blitzwolf, teckin etc have been hacked by the open source community to get around that. But jailbreaking solves part of the problem. Still, the need for a home-automation gateway is a challenge and requires some advanced knowledge of setting-up WiFi access point + MQTT broker + automation gateway server.

Albert David (@albert-david.blogspot.com) solved this challenge by modifying the firmware of a GL-MT300Nv2 (a $20 travel router) and converting it to a full-automation-gateway to support following functionalities:

  • wifi-access-point
  • DHCP and DNS server
  • MQTT broker (mosquitto)
  • domoticz
domoticz setup
Domoticz setup

All he did was build his own variant of OpenWRT firmware that includes all necessary components like domoticz and MQTT-broker. Follow the step-by-step method to overwrite the OEM firmware of the router with Albert’s all-in-one custom firmware.

1 – Download the autom8box binary from here.
2 – Power ON your GL-MT300N-V2 box and wait for the device’s SSID to show up on your PC.
3 – With OEM firmware, this device’s SSID is shown as “GL-MT300N-V2-xxx”.
4 – Connect to the AP with default password “goodlife“.
5 – If connected, you can see the IP near the WiFi option. Or by using “ipconfig” (Windows) or “ifconfig” (Linux) command in cmd/terminal.

Router IP
Router IP

6 – Open a browser, and enter the following address in the URL field:
http://192.168.8.1/cgi-bin/luci/admin/system/flashops
7 – Login with username “root” and leave the password field empty. After logging in, you’ll see the flashing page.
8 – In the page, make sure the “keep settings” option is unchecked. Select the firmware binary (autom8box-mt300nv2.bin) that you have downloaded already. Click the “Flash Image” button.

Flashing Procedure
Flashing Procedure

9 – Next, click on the “Proceed” button and the flashing process will start. Wait patiently and don’t turn off your router in the middle of flashing.
10 – After 2minutes, check on your PC’s wifi-list, new SSID “autom8box” will show up. “goodlife” is the password.
11 – Open the following URL in the browser – there you go! your new domoticz UI
http://192.168.8.1:8080

Custom firmware UI
Custom firmware UI

You are all set by now. You have your own home-automation gateway. Configure your IoT devices on domoticz as per your need. You have full control over the devices and can flexibly configure all the settings.

Please follow and like us:
Pin Share

Myself Rik and I am founder of Riktronics. I study Electronics and Communication Engineering in IIE. My hobby is playing with electronics and making various projects, mainly about embedded systems. Love to do coding, and making tutorials about electronics/programming. Contact me in any need at [email protected] My blog : riktronics.wordpress.com

view all posts by rik
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
Get new posts by email:
Get new posts by email:

Join 97,426 other subscribers

Archives