Tuesday, January 01, 2019

$20 Pocket Router as Domoticz Smart Home Gateway

A custom OpenWrt firmware (autom8box) that packs router + Domoticz server + MQTT broker into an all-in-one home automation gateway running on a ~$20 off-the-shelf GL-MT300N-V2 pocket router.

Domoticz home automation gateway setup diagram

System overview: GL-MT300N-V2 running autom8box firmware as Wi-Fi AP, MQTT broker, and Domoticz server.

The problem

Wi-Fi based home automation products are cheaper than Zigbee or Z-Wave, but they typically require internet connectivity. Letting cloud servers control your home devices is not ideal — internet should be optional, not mandatory.

Thanks to the open-source community (Tasmota, ESPurna, etc.) for helping jailbreak devices like Sonoff, Blitzwolf, and Teckin. But jailbreaking solves only part of the problem — you still need a home automation gateway: Wi-Fi access point + MQTT broker + automation server (Domoticz, OpenHAB, etc.).

What autom8box provides

  • Wi-Fi access point — dedicated network for your IoT devices
  • DHCP and DNS server — automatic network configuration
  • MQTT broker (Mosquitto) — message bus for IoT devices
  • Domoticz — home automation dashboard and rules engine
GL-MT300N-V2 pocket router

GL-MT300N-V2 (~$20) — compact pocket router running the autom8box firmware.

Limitations: Limited Wi-Fi range and a reduced set of Domoticz plugins due to the 16 MB flash limit. But it's a good starting point for low-budget home automation.

Flashing steps

Step 1Download autom8box-mt300nv2.bin.

Step 2 — Power on the GL-MT300N-V2 and wait for its SSID to appear (shown as GL-MT300N-V2-xxx).

GL-MT300N-V2 SSID visible in Wi-Fi list

OEM SSID appearing in the Wi-Fi list.

Step 3 — Connect to the SSID. When prompted for a password, enter goodlife (printed on the device's back sticker).

Wi-Fi password prompt

Enter the default Wi-Fi password.

Step 4 — Once connected, you should see the confirmation message:

Wi-Fi connected confirmation

Successfully connected to the router.

Step 5 — Open a browser and navigate to:
http://192.168.8.1/cgi-bin/luci/admin/system/flashops

LuCI login page

LuCI login — leave the password box empty and click "Login".

Step 6 — In the firmware update section, uncheck "Keep settings", choose autom8box-mt300nv2.bin, then click "Flash Image".

Firmware upload page

Firmware upload — uncheck "Keep settings" and select the autom8box binary.

File selected for flashing

File selected — ready to flash.

Step 7 — Click "Proceed" to confirm:

Flash confirmation dialog

Confirm flashing — click "Proceed".

Step 8 — Wait about 2 minutes for the flash to complete:

Flashing in progress

Firmware flashing in progress — wait for the device to reboot.

Step 9 — After reboot, a new SSID autom8box will appear. Connect with password goodlife.

autom8box SSID in Wi-Fi list

The new autom8box SSID is now visible.

Step 10 — Open http://192.168.8.1:8080 in your browser — Domoticz is ready:

Domoticz dashboard running on autom8box

Domoticz home automation dashboard — running entirely on the pocket router.

Post-setup security

SSH credentials: user root, password goodlife

Change root password:

passwd root

Change Wi-Fi password:

uci set wireless.default_radio0.key=my-new-password
uci commit wireless
wifi

Change SSID:

uci set wireless.default_radio0.ssid=my-new-ssid
uci commit wireless
wifi

Important: autom8box does not auto-save the Domoticz database. After configuring your devices, SSH in and run reboot — during reboot the database is saved from RAM to the persistent partition. A hard power cut without rebooting may lose your configuration.

SOURCE CODE

github.com/hackboxguy/lede-a5v11 — build instructions and sources

autom8box-mt300nv2.bin — pre-built firmware image

9 comments:

Unknown said...

Hey ho,

I have some of the "Sister Series" GL-MT300A
Flying around somewere here.

Its basically the same price & thing but the SoC is a different one MTK 7620A @580Mhz but more importantly the Storage is woping DDRII 128MB/ FLASH 16MB.

Would you mind compiling a second Firmware for this Box?

Angelo Filippi said...

great work! i will try soon as possible.

Unknown said...

How can I do this on other routers?

WorldWideSkylab said...

Can I use this box instead? it's like a better version of the one you choose IMO

https://smile.amazon.com/gp/product/B01FJ4S9JK/ref=ox_sc_saved_title_2?smid=A364119SDJA4QG&psc=1

Unknown said...

Can I try this one with open hab?? or i need more muscle in the hub to run open hab on this??

Unknown said...

Any chance of reverting back to original firmware?

Unknown said...

Hello,

I'm really happy to have found this page.
I've managed to install the firmware on this pocket router.
Domoticz is going well...
I've manged to install some more package (nano, curl, jq...)
But I still can't load script from 'Action On' or 'Action Off' with a dummy device.

I've search on the net but I don't find the way to make it possible.
Should it be possible to get some help about this point ?

Thanx a lot.

Cyril

Unknown said...

this would be even nicer if it supported cc2531 usb dongle ..

From Finland said...

Hello

Can I use this with Heishamon and Domoticz for Raspberry?