↓Skip to main content
  1. Blog/

Running a Divoom Times Gate Offline: I Wrote a Fake Cloud, Then Found I Didn't Need It

1367 words·7 mins
homelab iot pihole dns security divoom

There’s a Divoom Times Gate on my desk: a small info board with five 128×128 pixel screens. I drive it with my own data. Every minute, a container in my homelab renders weather, time, exchange rates and Proxmox status, and pushes them to the device over the LAN as JPEGs. So the device has no need for the internet. The device doesn’t see it that way.

This post is the record of getting it to run fully offline: what I looked at, what I misread, what I tested, and why I ended up deleting the code I wrote.

Who is the device talking to? #

The first step was looking, not assuming. Pi-hole resolves DNS on my network, so every domain the device asks for gets logged. Here’s what it asked for in roughly the first 17 hours after it joined the network:

Domain Queries What it is
appusa.divoom-gz.com 334 Divoom cloud
appin.divoom-gz.com 245 Divoom cloud
weather.visualcrossing.com 163 The device’s built-in weather face
api.open-meteo.com 156 The device’s own weather lookup
api.country.is 79 IP-based geolocation
app.divoom-gz.com 1 Once, at boot

The row that bothered me most was api.country.is. The device keeps asking a third party “where is my public IP?” In my setup that does nothing useful, because I render the weather myself.

The risks I cared about #

I looked at this with an AppSec lens. My concerns:

  • Constant phoning home: a closed-firmware device that talks to a cloud hundreds of times a day is sitting inside my home network.

  • Location leakage: the api.country.is lookups.

  • Built-in microphone: the device has a microphone inside. Divoom’s own API even offers an element that shows the ambient noise level on screen. A microphone in a closed-firmware device that is always talking to a cloud is reason enough on its own to run it offline.

  • No real authentication on the LAN API: Divoom’s docs say every command needs a LocalToken from the device settings. I tested it: a frame sent with a wrong token (111111) was drawn on screen. This firmware (402077) doesn’t check the token. Anything on the LAN can draw whatever it wants. The only real control is network placement.

  • Cloud dependency: it’s unclear what the device does if Divoom’s servers go away or change.

Blocking a domain in your own DNS doesn’t stop a device from connecting to a hardcoded IP. I kept that in mind and come back to it below.

First lesson: the reply code lies #

When I cut the internet at the router, the device started answering every command with {"ReturnCode": 1, "ReturnMessage": "command timeout"}. My first read was “commands relay through the cloud, so it can’t work offline.” Wrong. When I looked at the screen, the frames were there. The device draws the frame locally right away, then waits about 8 seconds for the cloud to acknowledge it, and reports a timeout when nothing comes back.

I changed my code to match: that reply is now logged as “drawn, cloud unconfirmed”.

Then I rebooted the device with the internet off. The API came back within 90 seconds, and every frame I sent got the same “command timeout”. By the logs, everything was fine. On the device, all five screens were stuck on a loading screen.

So the same reply code means “drawn” in one case and “stuck” in the other. The device’s HTTP reply is not evidence of what’s on screen. From then on, every step needed a look at the device.

The community’s fake-cloud recipe #

A bit of searching turned up a project that had solved this: Ogydos/pixoo-offline, tested on a Pixoo64 and a Times Gate (firmware 4000118). The flow it describes:

  1. At boot, the device sends GET /Device/InitV2 to app.divoom-gz.com over plain HTTP (a GET, but with a JSON body).

  2. It connects on port 1883 to the MQTT broker named in the reply’s IP field.

  3. It publishes Device/Hearbeat (spelled that way in the real traffic) to divoom/2/<id>/set and expects an echo on .../get.

The idea is simple: point the Divoom domains at your own server in DNS, answer InitV2 with your own broker’s address, and reply to the heartbeats.

I wrote it in TypeScript: a small HTTP server on raw TCP (most frameworks drop GET bodies), a minimal MQTT 3.1.1/5 broker, and a logging layer that records everything the device sends, in full. The tests passed with real MQTT and HTTP round trips. In Pi-hole, I pointed four names (app, appin, appusa, appchina.divoom-gz.com) at the homelab container and rebooted the device.

My firmware hadn’t read the recipe #

The logs didn’t show what I expected. My device (firmware 402077):

  • never sent the plain-HTTP InitV2,

  • never connected to MQTT,

  • instead tried about 12 TLS connections to port 443 within 10 seconds, each of which my server closed at once,

  • then gave up, finished booting, and the screens showed my frames.

It worked, but not because of the mechanism I wrote. I had a new hypothesis. On the first try, the boot hung because the router was silently dropping the device’s internet traffic, so every connection sat waiting for a timeout. With DNS pointed at the LAN, the connections were refused instantly (a TCP RST), and the device moved on without waiting.

Controlled experiment: turn the fake cloud off #

To test that, I stopped the fake-cloud service and left the DNS records in place. The names still pointed at the container, but nothing was listening on ports 80, 443 or 1883 anymore. I confirmed from my laptop that all three ports refused connections, then rebooted the device.

Result: the device first showed the screens I’d set up in the Divoom app, and within a minute my board’s frames took over, with the right time.

The fake cloud wasn’t needed. I deleted the code, the service and the certificate.

Guide: running a Times Gate offline #

What worked in my setup, on firmware 402077:

  1. Block the device’s internet at the router. That gives you a floor against traffic that skips DNS.

  2. Point the Divoom names at a live machine on your LAN. Use app, appin, appusa and appchina.divoom-gz.com. If you run more than one Pi-hole, add the records to all of them, so the device gets the same answer whichever one it uses. Flush the DNS cache afterwards (pihole reloaddns), or the old answers keep coming back for a while.

  3. Make sure nothing listens on ports 80 and 443 on that machine. The fast refusal is what matters. Don’t use an unused IP: nothing answers ARP there, so connections time out again and you get the same hang.

  4. Check the screen with your eyes. Don’t trust the reply codes.

  5. Push your own content. The device accepts JPEGs on the LAN at /divoom_api on port 9000.

What’s still open #

These are risks that are still open, or that I’ve accepted knowingly:

  • Hardcoded IPs: DNS logs only show name lookups. Seeing whether the device connects straight to an IP needs the router’s connection table (conntrack). The router block should cover it, but I haven’t verified that.

  • The LAN API is unprotected: the token isn’t checked, so putting the device on a separate IoT network is the real control.

  • The Divoom app stops working at home: the DNS records apply to everyone on the network. On home Wi-Fi the phone app goes to the same names and gets refused. It still works on mobile data.

  • Firmware updates: all of this is one firmware version’s behaviour. Divoom could change the boot sequence in an update.

  • The target machine’s ports: if I ever run a service on port 80 or 443 on that machine, the device’s behaviour could change.

What I took away #

Two lessons stuck. First, a device’s reply code is not evidence of what’s on its screen. I reached the wrong conclusion twice, both times because I read logs without looking at the device.

Second, drop and reject are not the same thing. A silently dropped connection makes the device wait for a timeout. An instantly refused one tells it “nobody’s here, move on”. The community recipe never even ran on my firmware. What fixed it wasn’t the 250 lines of code I wrote, but four DNS records pointing at the right place.