ServerlessNabaztag is a firmware allowing control of the Nabaztag/tag directly via the web, without an external server (a web server is needed only for downloading the firmware and resources).
With this firmware, you can connect at http://<YOURNABAZTAGIP>/ and completely control your rabbit with a very simple web interface, as shown in the following screenshot:
The OpenAPI specification is available at http://<YOURNABAZTAGIP>/openapi.json and the Swagger UI at http://andreax79.github.io/ServerlessNabaztag/vl/api/
All the commands can be called with a single HTTP request from an external program/script, example:
$ curl http://nabaztag/wakeup
In examples/check_mail.py, there is a script that turns on the nose when you have unread email.
- Unplug the rabbit, press the button on its head and hold it while you replug your rabbit. When all the lights are blue, you can release the button
- On your computer, connect to the WiFi network created by your rabbit (the name should be Nabaztag<XX>)
- Go to the configuration page at the following address: http://192.168.0.1
- At the bottom of the page, in General Info, change "Violet Platform" to andreax79.github.io/ServerlessNabaztag/vl (without http://)
- Click on Update settings and wait for the rabbit to reboot
- You can now connect to the IP of your rabbit, configure and control it. (Note: if your rabbit IP is assigned with DHCP, you have to discover the IP address. Usually you can check the assigned IP from some page on your router)
- Copy all the content from the vl folder on this repository to your web server in a folder named "vl". This folder contains all the resources needed by the firmware (mp3 files, Forth files, choreographies, HTML, CSS, etc.)
- Unplug the rabbit, press the button on its head and hold it while you replug your rabbit. When all the lights are blue, you can release the button
- On your computer, connect to the WiFi network created by your rabbit (the name should be Nabaztag<XX>)
- Go to the configuration page at the following address: http://192.168.0.1
- At the bottom of the page, in General Info, change "Violet Platform" to the URL of the vl directory (without http://, example: 192.168.0.1/vl)
- Click on Update settings and wait for the rabbit to reboot
- You can now connect to the IP of your rabbit, configure and control it. (Note: if your rabbit IP is assigned with DHCP, you have to discover the IP address. Usually you can check the assigned IP from some page on your router)
- Control the rabbit via HTTP API
- Configure via Web interface
- Simple password protection for Web and Telnet access
- Built-in Forth interpreter accessible from the Web interface and via Telnet
- Fetch the current time from NTP and play the corresponding sound every hour
- Fetch weather and air quality from open-meteo
- Autonomously wake up and go to sleep
- Override the LEDs with custom colors and change the breathing LED color
- Customize LEDs animation patterns
- Respond to ICMP pings
- Optional low-latency OpenAI Realtime voice assistant with conversation memory and hot-reloadable physical tools
The optional voice assistant uses a stateful Node.js relay because the original rabbit can speak only plain HTTP and cannot open TLS or WebSocket connections. The relay keeps the OpenAI WebSocket session, converts the rabbit's 8 kHz IMA ADPCM recording to G.711 μ-law, and streams the response back as MP3. The assistant and experimental wake word are disabled by default; the default model is gpt-realtime-2.1 and the default voice is marin. Hold the top button to talk after enabling the assistant; a short click cancels a pending request or playback. Before each turn the firmware synchronizes the editable personality prompt in a request body, avoiding the original TCP stack's small-header limit.
- Install the relay from relay/README.md on a Raspberry Pi, NAS, or other stateful LAN host with Node.js and FFmpeg.
- Store
OPENAI_API_KEYand a randomTTS_SIGNING_SECRETonly in the relay's protected environment file. Set a project budget limit in the OpenAI dashboard. - Open the rabbit web interface, enable AI Assistant, and set the relay address without a scheme, for example
relay-host.local:8787. - Confirm
curl -sv http://relay-host.local:8787/v1/healthreturns HTTP 200 without a redirect, enter a message in Test message, and select Send test message.
No API credential is stored in the rabbit's flash, exposed through /status, or sent over the plain-HTTP LAN hop. The relay-to-OpenAI connection uses TLS/WSS. Keep the relay port restricted to the trusted LAN. Official Realtime format, voice, and function-calling details are documented in the OpenAI Realtime conversations guide and Realtime API reference.
For Realtime-2.x models the relay defaults to reasoning.effort: low, OpenAI's recommended starting point for responsive production voice agents. It can be changed with OPENAI_REASONING_EFFORT; older Realtime model families omit the field automatically.
Tool declarations live in vl/ai_tools.json, while physical/LAN implementations live in vl/ai_tools.forth. The model can call only declared tools, and the firmware executes only Forth words prefixed with tool-. To add a reversible tool named wave, add its JSON Schema declaration with "exec": "forth", then define:
: tool-wave ( args-json -- result )
drop
0 5 left-ear move-ear
"ok" ;Copy both files to the platform web directory and hot-reload them without a firmware rebuild:
curl -G http://RABBIT_IP/forth --data-urlencode "c=reload-init"HTTP tools run on the relay and must use a fixed user-configured URL; model-built URLs are rejected. A disabled webhook template is included in ai_tools.json. Anyone who can speak near the rabbit can request an enabled tool, so keep all voice tools reversible and non-destructive. Tool and HTTP timeouts, a four-call loop limit, sequential execution, per-rabbit and global rate limits, and signed expiring MP3 URLs are enforced automatically.
The firmware includes a built-in Forth interpreter that allows you to interactively control and program your Nabaztag. The interpreter provides a powerful scripting environment with access to all rabbit functions.
You can access the Forth interpreter in two ways:
- Web Interface: Available at http://<YOURNABAZTAGIP>/
- Telnet: Connect to your Nabaztag via Telnet on port 22
$ telnet 192.168.79.15 Trying 192.168.79.15... Connected to 192.168.79.15. Escape character is '^]'. *** ServerlessNabaztag *** $Rev: 2025-12-20T07:44:49$ Welcome to the interactive Forth system. Type 'words' to see available words. Type 'quit' to exit the interpreter. [0] > taichi [0] >
The complete list of available Forth words is documented in vl/words.txt. The interpreter supports standard Forth operations plus Nabaztag-specific commands for controlling ears, playing sounds, and more.
Here are some basic commands to get you started:
\ Move the left ear forward to position 10
left-ear forward 10 move-ear
\ Move the right ear backward to position 5
right-ear backward 5 move-ear
\ Play a MIDI note (middle C)
60 play-midi
\ Display current ear positions
ears . .
\ Wake up the rabbit
wake-up
\ Put the rabbit to sleep
sleep
\ Display current time
daytime
\ Say something (text-to-speech)
"Hello World" say
\ Override the left LED to red color
"#ff0000" led-left !You can configure the telnet login credentials and other settings by editing the vl/config.forth file. This file contains configuration variables for the username and password.
Most of the Nabaztag's functionality can be customized by editing the Forth files in the vl folder:
- vl/init.forth - Initialization script
- vl/config.forth - Configuration settings
- vl/consts.forth - Constant definitions
- vl/crontab.forth - Scheduled tasks
- vl/hooks.forth - Event handlers (clicks, RFID, etc.)
- vl/telnet.forth - Telnet server
- vl/weather.forth - Weather and air quality
- vl/ai_tools.json and vl/ai_tools.forth - Realtime tool declarations and hot-reloadable implementations
Please install the following dependencies:
$ sudo apt-get install gcc-multilib g++-multilib
Build the compiler and the simulator:
$ make compiler
Build the firmware
$ make firmware
Start a local web server on port 80 (you need root for this):
$ sudo python3 -m http.server 80
or start local web server on port 8000 and redirect port 80 to 8000 (you need root for the iptables command):
$ sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8000
$ python3 -m http.server
