Showing posts with label smart home. Show all posts
Showing posts with label smart home. Show all posts

Saturday, January 17, 2026

Alexa Controls Domoticz via Philips Hue Emulator

If you run Domoticz and have an Amazon Echo, this is one of the simplest ways to get voice control while keeping device commands on your local network — no cloud subscriptions, no Alexa skills, no Philips account.

Last updated: January 18, 2026

Note: Alexa still uses the internet for speech recognition, but device control stays on your LAN.

Domoticz Hue Emulator architecture: Echo -> Hue Emulator -> Domoticz -> devices (local network)

Architecture overview: voice command → Echo discovers a Hue-bridge emulator → commands are translated to Domoticz API calls → devices respond (locally).

What you get

  • No Philips Hue cloud — emulates a Hue Bridge locally
  • No third-party Alexa skills — Echo's native Hue support handles discovery
  • No subscriptions — runs on any Raspberry Pi or Linux box you already own
  • Local device control — commands stay on your LAN (Echo → Emulator → Domoticz)

The problem with typical Alexa integrations

A lot of smart-home voice control flows through vendor clouds and Alexa skills: you install a skill, link accounts, and every action takes a detour through the internet. That can add latency, create privacy concerns, and introduce dependencies on services that can change, break, or become paid.

If you already run Domoticz, the question is natural: why can't Alexa talk to your system directly? The answer is: it can — if you present your devices in a way Alexa already understands.

What is Domoticz Hue Emulator?

Domoticz Hue Emulator is a lightweight Python service that emulates a Philips Hue Bridge on your local network. Amazon Echo devices have native support for Hue bridges, which means Alexa can discover and control devices without an Alexa skill.

The emulator makes Alexa believe it's talking to a Hue bridge, but behind the scenes it translates those requests into Domoticz API calls for your switches, dimmers, RGB lights, and scenes/groups.

How it fits together

Voice Command
   →
Amazon Echo
   →  (local Hue protocol)
Hue Emulator (Python)
   →
Domoticz API
   →
Switches / Dimmers / RGB Lights / Scenes

Features at a glance

  • On/Off control for switches
  • Dimming (brightness control) for dimmers and RGB lights
  • RGB color control (e.g., "set lamp to red", "warm white")
  • Scenes/Groups support for controlling multiple devices at once
  • Easy YAML configuration
  • Runs as a systemd service (auto-start)

Voice command examples

Basic on/off

  • "Alexa, turn on Living Room Light"
  • "Alexa, turn off Kitchen Light"

Dimming (dimmer/rgb types)

  • "Alexa, set Bedroom Light to 50 percent"
  • "Alexa, dim Living Room Light"
  • "Alexa, brighten Bedroom Light"

Colors (rgb type only)

  • "Alexa, set Lamp to red"
  • "Alexa, set Lamp to blue"
  • "Alexa, set Lamp to warm white"

Scenes and groups

  • "Alexa, turn on All Lights"
  • "Alexa, turn off All Lights" (groups only)

Requirements

  • Raspberry Pi or any Linux server on the same network as your Echo
  • Domoticz running with devices configured
  • Python 3.7+
  • Port 80 available (required by the Hue Bridge protocol)

Tip: if port 80 is in use by Apache, Nginx, or another service, you must stop or reconfigure it for the emulator to work.

Installation & setup

1) Clone the repository

git clone https://github.com/hackboxguy/domoticz-hue-emulator.git
cd domoticz-hue-emulator

2) Install (or test with a dry run)

# Test installation (dry run)
sudo ./install.sh --domoticz-user=YOUR_USER --domoticz-pw=YOUR_PW --dryrun

# Install
sudo ./install.sh --domoticz-user=YOUR_USER --domoticz-pw=YOUR_PW

3) Configure your devices in alexa-devices.yaml

Add your Domoticz devices by name, IDX, and type (switch, dimmer, rgb). You can find IDX values in Domoticz under Setup > Devices.

domoticz:
  url: "http://localhost:8080"
  username: "admin"
  password: "yourpassword"
devices:
  - name: "Living Room Light"
    idx: 10
    type: dimmer

  - name: "RGB Lamp"
    idx: 30
    type: rgb

4) Restart the service

sudo systemctl restart domoticz-hue-emulator

5) Discover devices

Now the fun part:

"Alexa, discover devices"

Within seconds, your Domoticz devices should appear inside Alexa as controllable lights.

Scenes vs groups: In Domoticz, Scenes only support ON (activate), while Groups support ON and OFF. If you need voice control to turn devices both on and off, create a Domoticz group.

Scenes, groups, and routines

The emulator supports Domoticz scenes/groups so you can control multiple devices with a single command. It also pairs nicely with Alexa Routines for custom phrases like "Alexa, let's start the party" — mapped to a Domoticz scene or group.

Troubleshooting

Alexa doesn't discover devices

  • Confirm the service is running: sudo systemctl status domoticz-hue-emulator
  • Verify port 80 is available: sudo ss -tlnp | grep :80
  • Check logs for SSDP activity: sudo journalctl -u domoticz-hue-emulator -f

Device shows "not responding"

  • Verify Domoticz is reachable: curl http://localhost:8080
  • Confirm the device IDX is correct in alexa-devices.yaml
  • Review logs for API errors: sudo journalctl -u domoticz-hue-emulator -f

Port 80 already in use

Stop or reconfigure the conflicting service (often Apache, Nginx, or another bridge).

How it works (under the hood)

  1. SSDP discovery: the emulator answers Alexa's UPnP/SSDP discovery requests (UDP 1900), announcing itself as a Hue Bridge.
  2. Hue API emulation: Alexa reads Hue-compatible JSON describing your Domoticz devices as "lights".
  3. Command translation: Alexa commands are translated into Domoticz API calls (on/off, brightness, color).
  4. Local device control: commands stay on your LAN (Echo → Emulator → Domoticz). Alexa still uses the internet for speech recognition.

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

Sunday, January 07, 2018

Flash XMPP ChatBot Firmware onto A5-V11 Router

Step-by-step guide to replace the stock Chinese firmware on an A5-V11 pocket router (~5 EUR) with an OpenWrt-based image that includes an XMPP chat-bot daemon for IoT applications.

What is A5-V11?

A low-cost (~5 EUR) Wi-Fi router capable of running OpenWrt Linux.

What is a5v11-xmpp-image?

A customized OpenWrt image that includes a C++ based XMPP client daemon for IoT applications. See this blog post for details on using it as a smart-home gateway.

Setup

As shown below, items 1–3 are required. Items 4–6 (USB-to-I2C converter and SSD1306 display) are optional — they help display the router's IP address on boot if you can't find it via your home router's DHCP client list.

A5-V11 setup: router, Ethernet cable, PC, and optional I2C display

Setup overview: A5-V11 router, Ethernet cable, PC (required), plus optional USB-to-I2C converter and SSD1306 display for IP readout.

Flashing steps

Step 1Download a5v11-xmpp-factory.uimg to your PC.

Step 2 — Connect an Ethernet cable between the A5-V11 and your PC.

Step 3 — Power on the A5-V11 with 5 V DC and wait ~1 minute until your PC gets an IP in the 192.168.100.x range.

Step 4 — Open 192.168.100.1 in your browser. You should see the Chinese OEM firmware page:

A5-V11 Chinese OEM firmware web UI

Chinese OEM firmware web interface — confirm your router shows this page.

Stop here if your page looks different. You may have the Qualcomm firmware variant — follow this other guide instead.

Step 5 — Click the language dropdown to switch to English:

Switching language to English

Switch the web UI language to English.

Step 6 — Navigate to Admin → Firmware Upgrade → Choose File, select a5v11-xmpp-factory.uimg (downloaded in Step 1), then click "Upgrade".

Step 7 — Confirm by clicking "OK":

First firmware upgrade confirmation

First confirmation dialog.

Step 8 — A second confirmation is needed — click "OK" again:

Second firmware upgrade confirmation

Second confirmation dialog.

Step 9 — The firmware upgrade begins:

Firmware upgrade in progress

Firmware flashing in progress.

Firmware upgrade completing

Firmware flash completing.

Step 10 — Wait about 40 seconds, then remove power and disconnect the Ethernet cable from the PC.

Step 11 — Connect the A5-V11 to your home router via Ethernet. Make sure your PC is also on the same network.

Step 12 — Power on the A5-V11 and wait until the red LED stops blinking.

Post-flash configuration

Step 13 — SSH into the router using hostname my-a5v11 with credentials root / brb0x.

If you can't find the router's IP, connect an I2C display to the USB port — the router prints its IP on boot:

A5-V11 displaying IP address on I2C OLED display

Optional: SSD1306 I2C display showing the router's IP address after boot.

Step 14 — Change the default password:

passwd

Step 15 — Set your XMPP (Jabber) login credentials (replace with your own):

echo "user: test-slave-account@xabber.de" >/etc/xmproxy/xmpp-login.txt
echo "pw: chatbotpw" >>/etc/xmproxy/xmpp-login.txt
reboot

Step 16 — After reboot, your device should appear online in your smartphone's Xabber chat client.

Next steps: Follow this blog post to use the A5-V11 XMPP chat-bot as an IoT gateway for home automation.