Daisy: a talking round-screen companion for the kids' rooms

An ESP32-S3 round screen running Xiaozhi in English, with a kid-safe Claude Haiku brain on my home server that can switch the room light and read its sensors.

Difficulty
Advanced
Parts cost
One round-screen ESP32-S3 board and a small speaker per room, plus pay-as-you-go AI credit
Build time
A long day for the first one, then weeks of fixes
Skills
ESP-IDF, Docker, Home Assistant, Linux command line, Basic wiring

The problem

I wanted each of the kids to have something in their bedroom they could talk to: ask questions, get a story, turn their light off from bed. And I wanted it on my terms. My server, my prompt, and a model I trust around kids, not an uncensored one.

Xiaozhi is an open-source project that turns a cheap ESP32-S3 board into a talking gadget. Out of the box it’s built for Chinese: Chinese wake word, Chinese screen text, Chinese replies. So this guide is mostly about converting it to English, running its server at home, and all the ways it quietly went wrong.

We call it Daisy. It’s a 1.46-inch round touchscreen with a daisy-flower face, a big clock when it’s idle, and an Australian voice. There are two now, one per bedroom. One bedroom is on its fourth board, which taught me a lot about swapping screens.

How it works

How a Daisy companion answers The round-screen board in the bedroom hears the wake word and streams the child's voice to the Xiaozhi server on the home server. The server turns speech into text locally, adds which room it is and what was said before, asks Claude Haiku with a kid-safe prompt, and turns the reply back into speech. The reply goes back to the board, and if a light was asked for, the server tells Home Assistant. Separately, the board's room sensors report to Home Assistant over MQTT. Daisy, in a bedroom hears "Hi ESP", streams your voice ESP32-S3, 1.46-inch round screen Xiaozhi server in Docker on my home server 1 hears you stop talking (Silero VAD) 2 speech to text, local (SenseVoice) 3 adds the room and past chats 4 Claude Haiku, kid-safe prompt 5 text to speech (Edge TTS) 6 calls Home Assistant if asked Daisy speaks the reply, shows a daisy face Home Assistant switches the light, reads the room Dashed line: the board's temperature, humidity and light sensors report to Home Assistant over MQTT, separately from the talking.

The board on the bedside table is a thin client: it only does the wake word (“Hi ESP”, built into the firmware), the microphone, the speaker and the screen. Everything else happens on my home server in a Docker container running xiaozhi-esp32-server. That’s where the persona, the kid-safe rules, the memories and the room identity all live, keyed on each board’s MAC address (its hardware ID).

On the server, Silero VAD (voice activity detection, which works out when you’ve stopped talking) cuts the audio, SenseVoice turns it into text locally, and the text goes to Claude Haiku 4.5 through OpenRouter with the kid-safe prompt. The reply is turned back into speech by Edge TTS in an Australian English voice. A small local model in Ollama is kept in the config as a fallback for when the internet is down.

Daisy only touches Home Assistant through its API, to read and switch lights. It is not a Home Assistant voice satellite and it’s not ESPHome. The room sensors on one of the boards are separate again: the firmware reports them straight to Home Assistant over MQTT.

What you need

  • Waveshare ESP32-S3-Touch-LCD-1.46, one per room: an ESP32-S3 with a 1.46-inch round touchscreen. Plus a small speaker for each board.
  • The Xiaozhi firmware, version 2.2.6: https://github.com/78/xiaozhi-esp32 My modified copy isn’t published, so the changes below are made to the stock source.
  • ESP-IDF v5.5.2 to build it. Not the newest: 6.0 is too new for this firmware.
  • A home server running Docker, for xiaozhi-esp32-server: https://github.com/xinnan-tech/xiaozhi-esp32-server
  • An OpenRouter account with credit, for Claude Haiku. Put a spending limit on the key (see the lessons).
  • Home Assistant with a long-lived access token, and the MQTT integration with a Mosquitto broker if you want the sensors.
  • Optional sensors: a BME280 (temperature and humidity) and a BH1750 (light level).
  • A USB data cable. Not a charge-only one. That cost me time.
  • Optional: a 3D printer for the figure that holds the board.

Wiring

The talking needs no wiring at all. The sensors share the board’s own I2C bus (a two-wire bus for small chips), the same one the touch controller and an I/O expander already use, so all four wires are teed together:

Sensor pin Board
VCC 5 V (both sensors share the one 5 V line)
GND GND
SDA GPIO11 (labelled SDA)
SCL GPIO10 (labelled SCL)

What’s on that bus, so you can check for clashes: BME280 at 0x76, BH1750 at 0x23, the SPD2010 touch controller at 0x53, and a TCA9554 expander at 0x20. Both sensors read fine alongside the touch chip, once the firmware stopped them talking over each other (see below).

The printed figure

The board isn’t a full circle. It has a flat tail about 13 mm wide at the USB-C end, sits on three standoffs, not four (two either side of the USB-C, 23.54 mm apart, and one at the top), and is about 41.5 mm tall by 39.4 mm wide. The mic hole is on one side only.

If you design a case from the datasheet drawing, watch this: the drawing is a view of the back, but the board mounts screen-up. Every feature that isn’t symmetrical (the mic hole especially) has to be mirrored. The community case I started from had the mic on the wrong side and the standoff pair 0.1 mm out.

The first case was a round puck. I scrapped it: there was no way to get the speaker in, it ignored the flat tail, and there was no path for wires. Then a 100 mm stick figure, and now version 2: a 185 mm seated, cross-legged figure with hair framing the round screen as a face. The light sensor sits in the right hand and the temperature sensor in the left, fitted after printing through snap caps under the palms, so they can be swapped any time. It’s sliced over four plates, about 17 hours in PLA+. Version 2 is designed and ready to print, but I haven’t printed it yet.

Two things to know before printing the body:

  • A standard USB-C plug won’t fit the 8 mm channel through the chest. Use a solder-on USB-C pigtail, or measure a slim plug first.
  • The head is glued on, with about a 1 mm gap for gap-filling glue. Hold it in a jig while it sets. It’s not a friction fit.

Firmware and config

Building the English firmware

Start from Xiaozhi 2.2.6 with the board set to esp32-s3-touch-lcd-1.46. My overrides in the sdkconfig file:

CONFIG_LANGUAGE_EN_US=y
CONFIG_SR_WN_WN9_HIESP=y
CONFIG_OTA_URL="http://<your-server>:8103/xiaozhi/ota/"
CONFIG_USE_MULTILINE_CHAT_MESSAGE=y

LANGUAGE_EN_US gives English screen text, SR_WN_WN9_HIESP swaps the Chinese wake word for “Hi ESP”, and the OTA address points the board at my own server instead of the default one.

Build with ESP-IDF 5.5.2 in a clean shell. My laptop’s default ESP-IDF is 6.0-dev and my login profile loads it automatically, so idf.py refused with a Python environment mismatch until I cleared it out:

unset IDF_PATH IDF_PYTHON_ENV_PATH ESP_IDF_VERSION
export IDF_PATH=~/esp-idf-v5.5.2
source "$IDF_PATH/export.sh"
idf.py -p /dev/ttyACM0 flash

Never erase the whole flash. The NVS partition at 0x9000 holds the Wi-Fi details and the server addresses. Leave it alone and a reflashed board comes straight back on Wi-Fi by itself. Font and face changes live in the assets partition, so those need the app and assets flashed.

Back up every new board’s full 16 MB flash before you touch it. On this board esptool’s stub flasher dies partway through big reads (“Packet content transfer stopped”) at any baud rate. --no-stub fixes it. It’s slow, about 13 minutes:

esptool --no-stub -p /dev/ttyACM0 read-flash 0 0x1000000 factory-backup.bin

Screen tweaks

  • Bigger text: 30 px text and icons instead of 16 px, and multi-line chat on the screen.
  • A big idle clock: 130 px digits, a custom LVGL font made with lv_font_conv from DejaVu Sans Bold (digits and colon only). It appears after 30 seconds idle. A tap or any activity hides it.
  • Daisy faces: 22 flat daisy-flower faces, one per Xiaozhi emotion, 128 px PNGs, installed as their own emoji collection.
  • Volume: the default is compiled in at 100. Asking Daisy to turn it down is saved on the board and overrides that.

Two build traps with the faces. The board’s CMake section already had a set(DEFAULT_EMOJI_COLLECTION ...) line further down than where I added mine. The last set() wins, so mine was silently ignored. And idf.py build doesn’t rebuild the assets when only the face collection changes: delete build/generated_assets.bin first. Check the build log says the right collection.

The touchscreen

The stock Xiaozhi port for this board ignores the touchscreen. I wired it up so a tap starts listening without the wake word, stops Daisy mid-sentence, or stops listening. See the lessons for the boot loops this cost.

The server config

The server’s settings are in data/.config.yaml inside the xiaozhi-esp32-server folder. A restart applies them:

docker restart xiaozhi-esp32-server

These are the parts I changed. Your stock file has much more around them.

selected_module:
  LLM: ClaudeHaiku          # switch to OllamaLLM (the local fallback) if the internet is down
  Memory: mem_local_short   # was nomem
  Intent: function_call

LLM:
  ClaudeHaiku:
    # anthropic/claude-haiku-4.5 through OpenRouter, with your own key
    max_tokens: 600         # was 300; room for a proper story

TTS:
  EdgeTTS:
    # voice: en-AU-NatashaNeural
    language: English       # DO NOT REMOVE. Without it, the prompt template tells the model to reply in Chinese.

Memory:
  mem_local_short:
    type: mem_local_short
    llm: ClaudeHaiku        # must be set. Left blank, it falls back to a model you don't have.

Intent:
  function_call:
    functions:
      - hass_get_state
      - hass_set_state

plugins:
  home_assistant:
    base_url: http://<home-assistant-address>:8123
    api_key: <your long-lived access token>

I also replaced the stock Chinese end_prompt (the goodbye when a chat times out) with an English one.

Stop words. The “stop listening” commands never matched at first. The server’s matcher strips out every space and punctuation mark, and it’s case-sensitive. So the stock spaced-out entries could never match. They have to be written squashed, in both cases:

exit_commands:
  - Stoplistening
  - stoplistening
  - Stoplisteningnow
  - stoplisteningnow
  - Stop
  - stop
  - Goodbye
  - goodbye
  - Bye
  - bye
  - Byebye
  - byebye
  - Gotosleep
  - gotosleep

For looser phrasings, a rule in the prompt tells Daisy to end the chat herself.

Which lights Daisy can touch

Put the list of devices inside the prompt text itself, with a hard rule never to invent an entity ID. (Why: see “It said it turned the light on” in the lessons.) The shape of it, with made-up IDs:

You can control only these devices. Never invent an entity_id that is not on this list.
- light.example_light: the light in this bedroom

Daisy can switch the kids’ lights, the living-area light groups, a couple of other rooms, and an “all the lights” group for “turn off all the lights”. I deliberately didn’t give a bedroom device the garage.

Which room is it in?

Both boards are called Daisy, so each needs to know whose room it’s in. A tiny Python service on the home server (device_context.py, port 8104) maps each board’s MAC address to a room and child. The Xiaozhi server asks it through its context_providers setting, and the prompt reads that in. The prompt itself says nothing about which room. Adding a board is one line in that map plus:

sudo systemctl restart xiaozhi-device-context

The container has to be allowed through the server’s firewall to reach that port. Without this, the lookups silently timed out after 3 seconds and Daisy just guessed the room:

sudo ufw allow from <docker-bridge-subnet> to any port 8104

The room sensors

I added BME280 and BH1750 drivers to the board’s own folder in the firmware (main/boards/waveshare/esp32-s3-touch-lcd-1.46/sensors/). The board reads them every 30 seconds, shows a line under the idle clock, and publishes them over MQTT with Home Assistant discovery, so three sensors (temperature, humidity, light level) appear on their own. I wrote the compensation maths by hand and checked it against the Bosch datasheet and real readings.

Points that matter if you do the same:

  • Share the bus safely. The touch driver’s poll takes several transactions. The sensor reads could land in the middle of it. The board creates a lock (a mutex) and hands it to the patched touch driver, and wraps its own sensor reads in the same lock.
  • Wait for Wi-Fi. Don’t start the MQTT client until Wi-Fi is connected. Don’t take over the network event callback for it: Xiaozhi’s own code owns the only one.
  • The broker address is compiled in. It’s in sensor_mqtt.cc (cfg.broker.address.uri). There is no setting at runtime, so changing it means a reflash. Check what you built before flashing:
strings build/xiaozhi.bin | grep -oE "mqtt://[^\"]*"

Step by step

  1. Plug the board in with a data cable. You should see 303a:1001 Espressif USB JTAG/serial debug unit in lsusb. If nothing shows, try another cable.
  2. Back up the full 16 MB flash with --no-stub (above). Keep a second copy somewhere else.
  3. Set up xiaozhi-esp32-server in Docker on your home server. It uses port 8100 for the voice websocket and 8103 for OTA.
  4. Build the English firmware with ESP-IDF 5.5.2 in a clean shell, and flash it. Don’t erase NVS.
  5. Edit data/.config.yaml: Claude Haiku, language: English under Edge TTS, the English goodbye, the squashed stop words. Restart the container.
  6. Patch speech recognition to English (see the first lesson). Keep the patch file on the server, outside the container.
  7. Write the kid-safe persona prompt, with the device list and the “never invent an entity ID” rule inside it. Add the Home Assistant plugin settings. Restart.
  8. Add the board’s MAC to the room map and restart that service. Allow the container through the firewall.
  9. Turn memory on with llm: ClaudeHaiku set explicitly, and put a spending limit on the OpenRouter key.
  10. Optional: wire the sensors, set the right broker address in the firmware, reflash.
  11. Optional: print the figure. Print the fit-test pieces first.

A second board doesn’t need setting up through the phone app. I made its NVS partition in advance with ESP-IDF’s nvs_partition_gen from a CSV copied from the first board’s settings (Wi-Fi, OTA address, websocket address, theme), but without the board’s unique ID, which each board makes for itself. Flash it at 0x9000 along with the firmware.

When a screen breaks

Because the board is a thin client, a swap is mostly a server job:

  1. Back up the new board’s flash (--no-stub).
  2. Flash the same firmware. Leave NVS alone, or give it a pre-made one.
  3. In the room map, add the new MAC and comment out the old one. Don’t delete it. Commented out, a dead board that comes back to life falls to a generic “I don’t know this room” answer instead of pretending to be in a child’s room.
  4. Restart the room service. That’s the whole identity step. Persona, memories and lights all follow.

The only fiddly part is the Home Assistant sensors, if the board has them. Their unique IDs include the MAC (daisy_<mac>_temperature and so on), so a new board creates a second set and orphans your dashboard cards. Home Assistant’s API can’t change a unique ID. What worked for me:

  1. Back up Home Assistant first.
  2. ha core stop. This is required: Home Assistant rewrites its .storage files from memory when it shuts down, so edits made while it’s running are lost.
  3. In core.entity_registry, change the three unique IDs to the new MAC. In core.device_registry, change the device’s MQTT identifier. (The Home Assistant OS host has no Python, so do the JSON editing on another machine and copy the files back.)
  4. ha core start.
  5. Clear the old board’s retained discovery messages (see the lessons), or you’ll get _2 duplicates.

The entity IDs never change, so the dashboard cards keep working.

Testing it

  • Ask a question with no device word in it, like “what time is it?”. If the screen says “Speaking…” and nothing comes out, the reply was in Chinese (see the first lesson).
  • Watch the server log while you talk. These three Chinese log markers show what it heard, which tool it called (with the entity ID), and any text-to-speech failures:
docker logs xiaozhi-esp32-server | grep -E "识别文本|执行工具|语音生成失败"
  • Test without a board. A small Python script using websocket-client can connect to port 8100 with a device-id header set to a board’s MAC, send hello, then send a pretend request. This is how I check each MAC gets the right room. Keep the text to questions, so nothing in the house switches:
{"type":"listen","state":"detect","text":"what time is it?"}
  • Check memory is really saving. After a chat ends, the data/.memory.yaml file should exist and grow. Don’t trust the log line (see the lessons). To wipe Daisy’s memory, delete that file and restart the container.
  • Sensors: when the broker is right, the boot log shows SensorMqtt: broker connected and discovery published, and the readings appear in Home Assistant within about 30 seconds.

Lessons learnt

It spoke Chinese, or showed “Speaking…” and said nothing. The Australian voice can’t read Chinese text, so a Chinese reply comes out as silence. The firmware was never the problem. There were three separate leaks on the server. Speech recognition was auto-detecting the language and labelling English as Chinese, which told the model to answer in Chinese: I patched core/providers/asr/fun_local.py inside the container from language="auto" to "en". The prompt template has its own output-language rule, which defaults to Chinese unless language: English is set under the speech engine. And the timeout goodbye was hard-coded in Chinese. Fix all three.

It said it turned the light on, and nothing happened. The model was guessing entity IDs: one bulb of a pair, or rooms that don’t exist. Home Assistant answers “OK” even for an entity that doesn’t exist, so Daisy honestly thought it had worked. The server’s own way of adding a device list didn’t help: written as a YAML list it crashed the prompt (“can only concatenate str (not list)”), and even as text it was dropped when the server rebuilt the prompt. The fix that held: the device list lives inside the prompt text, with a rule never to invent an ID.

Memory never worked for a month, and the log said it did. I turned memory on and left its llm: blank, assuming it would use the main model. It doesn’t. It falls back to a built-in default that had no API key, so every save failed. But the server logs Save memory successful whether it saved or not, and the memory file had never existed. I only found it during a screen swap. Set llm: ClaudeHaiku and check the file, not the log. The summaries are written in Chinese by the upstream template. The kids never see them and Haiku reads them back fine, so I left that alone.

A looping board spent $60 of AI credit in about a day. One board got stuck connecting, listening and disconnecting every few seconds, around 1,600 times in 98 minutes. Every disconnect asked Claude Haiku to summarise the “conversation” for memory, even when nobody had said anything, and each of those calls costs money. I disabled the key. Put a spending limit on any key a gadget can use unattended.

Two boards, one room. With both boards running, whichever connected last set the room for both of them. The server kept that context in one shared variable. I patched prompt_manager.py to look it up per board. Separately, the firewall was blocking the container from the room service, the lookups timed out quietly, and Daisy just made a guess. If it’s wrong about the room, check the firewall first.

The touchscreen boot-looped, twice. The SPD2010 touch chip refuses a plain I2C read. It needs the write and the read combined in one transfer, which is what Waveshare’s own demo does. The stock driver used separate transfers, every read failed, and the display library reboots the board on any touch read error. I patched the driver to use combined transfers and to never report an error. A missed touch is better than a reboot.

The sensors went “unknown”, and ping said everything was fine. The firmware had the MQTT broker address compiled in, and it was the wrong one. My Home Assistant machine has two network addresses and both answer ping, but the broker only listens on one. Test port 1883 itself, not ping. A USB boot log tells you fast: BME280: init ok means the hardware is fine, and Error transport connect means it’s the address. Ignore Ota: No mqtt section found!. That’s Xiaozhi’s own update check, nothing to do with the sensors.

A screen swap gave me duplicate sensors. After re-keying the sensors, _2 copies appeared anyway. The old board’s discovery messages were still retained on the MQTT broker, and Home Assistant replayed them at startup. Publishing an empty retained message to each old homeassistant/sensor/daisy_<oldmac>_<kind>/config topic cleared them, and Home Assistant removed the copies itself.

Daisy told the wrong time while the screen showed the right one. The clock on the screen comes from the board. The spoken time comes from the server. The container was running on UTC, and the upstream code never filled in the time, so the prompt literally said Current time: {{current_time}}. I set the container’s time zone and patched the code to put the real time in.

My patches live inside the container. They survive a restart but not an image update, and recreating the container also moved it to a new network that the firewall then blocked. Keep every patch as a file on the host with a note on how to re-apply it, and re-test after any update. Also: docker exec python3 - with a heredoc silently runs nothing unless you add -i.

Questions and comments

Loading comments…

    Your name and comment show publicly. To stop spam, a scrambled code made from your internet address is kept, never the address itself. Comments with links wait for a quick check before they show. Be decent: I'll remove anything that isn't.