Complete documentation for the Pixoo REST Home Assistant add-on.
- Overview
- Installation
- Configuration
- API Usage
- Home Assistant Integration
- Troubleshooting
- Advanced Usage
The Pixoo REST add-on provides a RESTful API to control Divoom Pixoo LED displays (16x16, 32x32, and 64x64 pixels) and Time Gate devices. It enables you to:
- Display custom images and GIFs
- Show text with various fonts and colors
- Control brightness and screen rotation
- Display sensor data and visualizations
- Create countdown timers and stopwatches
- Play animations and effects
- Configure and target multiple Pixoo/Time Gate devices
Add this repository to your Home Assistant instance:
- Go to Settings → Add-ons → Add-on Store
- Click the three dots (⋮) in the top right
- Select Repositories
- Add:
https://github.com/PixelShober/Pixoo-REST - Click Add
- Find "Pixoo REST" in the add-on store
- Click on it and press Install
- Wait for the installation to complete
See the Configuration section below.
- Click Start to run the add-on
- Enable Start on boot if desired
- Enable Watchdog for automatic restart on failure
The simplest configuration uses automatic device discovery:
PIXOO_HOST_AUTO: true
PIXOO_DEVICE_TYPE: auto
PIXOO_SCREEN_SIZE: 64If automatic discovery doesn't work, specify the IP address manually:
PIXOO_HOST_AUTO: false
PIXOO_HOST: "192.168.1.100"
PIXOO_DEVICE_TYPE: auto
PIXOO_SCREEN_SIZE: 64PIXOO_HOST_AUTO: false
PIXOO_HOST: "192.168.1.200"
PIXOO_DEVICE_TYPE: time_gate
PIXOO_SCREEN_SIZE: 128Use the add-on UI to add devices. Each entry can have its own auto-detect, IP, type, and screen size.
If PIXOO_DEVICES is set, the single-device options are used only as defaults.
For auto-detect, set name to the device name shown by Divoom so the correct IP is selected.
PIXOO_DEVICES:
- name: office
host_auto: false
host: "192.168.1.100"
device_type: pixoo
screen_size: 64
- name: hallway
host_auto: true
device_type: auto
screen_size: 128PIXOO_HOST_AUTO: false
PIXOO_HOST: "192.168.1.100"
PIXOO_DEVICE_TYPE: auto
PIXOO_DEBUG: true
PIXOO_SCREEN_SIZE: 64
PIXOO_CONNECTION_RETRIES: 15
PIXOO_REST_DEBUG: true- Type: List
- Default:
[] - Description: Configure multiple devices. When set, the single-device options below are used only as defaults.
- Fields:
name,host_auto,host,device_type,screen_size,debug,connection_retries
- Type: Boolean
- Default:
true - Description: Enable automatic device discovery via Divoom cloud service
- When to use manual: If you have network restrictions or firewall rules blocking external requests
- Type: String (IP address)
- Default:
null - Required: Only when
PIXOO_HOST_AUTOisfalse - Example:
"192.168.1.100" - Description: Manual IP address of your Pixoo device
Finding your Pixoo IP:
- Check your router's DHCP client list
- Use the Divoom mobile app (Settings → Device Information)
- Check Home Assistant's network discovery
- Type: String
- Default:
auto - Options:
auto,pixoo,time_gate - Description: Device type selection. Auto-detect uses the Divoom discovery device name.
- Type: Integer
- Options:
16,32,64,128 - Default:
64 - Description: Pixel dimensions of your device
- Models:
- 16: Pixoo-16
- 32: Pixoo-32 (rare model)
- 64: Pixoo-64, Pixoo-Max
- 128: Time Gate
- Type: Boolean
- Default:
false - Description: Enable debug logging for the Pixoo Python library
- Use case: Troubleshooting device communication issues
- Type: Integer
- Range: 1-30
- Default:
10 - Description: Number of retry attempts when connecting to the device
- Recommendation: Increase if your device is slow to respond or on a congested network
- Type: Boolean
- Default:
false - Description: Enable debug logging for the REST API (Gunicorn)
- Use case: Troubleshooting API requests and responses
The API is available at: http://homeassistant.local:5000
Interactive Swagger documentation: http://homeassistant.local:5000/docs#/
No authentication is required. The API is accessible on your local network.
When multiple devices are configured, pass ?device=<name> or ?host=<ip> to any endpoint to target a specific device. If omitted, the first device in PIXOO_DEVICES is used.
curl -X POST http://homeassistant.local:5000/device/text \
-H "Content-Type: application/json" \
-d '{
"text": "Hello World",
"position": 0,
"color": "#FF0000",
"font": 3
}'Parameters:
text: String to displayposition: Y-position (0 = top)color: Hex color codefont: Font ID (0-7)
curl -X POST http://homeassistant.local:5000/device/image/url \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/image.jpg"
}'curl -X POST http://homeassistant.local:5000/timegate/play-gif \
-H "Content-Type: application/json" \
-d '{
"lcd_array": [0,0,0,1,0],
"file_name": ["http://f.divoom-gz.com/128_128.gif"]
}'curl -X POST http://homeassistant.local:5000/timegate/send-text \
-H "Content-Type: application/json" \
-d '{
"lcd_index": 4,
"text_id": 1,
"x": 0,
"y": 40,
"direction": 0,
"font": 4,
"text_width": 56,
"text": "Hallo",
"speed": 10,
"color": "#FFFF00",
"align": 1
}'curl -X POST http://homeassistant.local:5000/device/brightness \
-H "Content-Type: application/json" \
-d '{
"brightness": 75
}'Range: 0-100
curl -X POST http://homeassistant.local:5000/device/screen/clearcurl -X POST http://homeassistant.local:5000/device/countdown \
-H "Content-Type: application/json" \
-d '{
"minutes": 5,
"seconds": 0
}'Successful responses:
{
"status": "ok",
"message": "Command executed successfully"
}Error responses:
{
"error": "Device not reachable",
"status": "error"
}Add these to your configuration.yaml. The Time Gate payloads and URL are parameterized so you can change them in Developer Tools -> Services:
rest_command:
pixoo_text:
url: http://homeassistant.local:5000/device/text?device={{ device }}
method: POST
headers:
Content-Type: application/json
payload: >
{
"text": "{{ text }}",
"position": {{ position | default(0) }},
"color": "{{ color | default('#FFFFFF') }}",
"font": {{ font | default(3) }}
}
pixoo_brightness:
url: http://homeassistant.local:5000/device/brightness?device={{ device }}
method: POST
headers:
Content-Type: application/json
payload: >
{
"brightness": {{ brightness }}
}
pixoo_image_url:
url: http://homeassistant.local:5000/device/image/url?device={{ device }}
method: POST
headers:
Content-Type: application/json
payload: >
{
"url": "{{ url }}"
}
pixoo_clear:
url: http://homeassistant.local:5000/device/screen/clear?device={{ device }}
method: POST
timegate_play_gif:
url: "http://{{ host }}:5000/timegate/play-gif?device={{ device }}"
method: POST
headers:
Content-Type: application/json
payload: >
{{ {
"lcd_array": lcd_array,
"file_name": file_name
} | tojson }}
timegate_send_text:
url: "http://{{ host }}:5000/timegate/send-text?device={{ device }}"
method: POST
headers:
Content-Type: application/json
payload: >
{{ {
"lcd_index": lcd_index,
"text_id": text_id,
"x": x,
"y": y,
"direction": direction,
"font": font,
"text_width": text_width,
"text": text,
"speed": speed,
"color": color,
"align": align
} | tojson }}If you omit device, the first entry in PIXOO_DEVICES is used. You can also target by IP with ?host=....
Developer Tools example data for rest_command.pixoo_text:
host: 192.168.178.165
device: office
text: "Hello from Home Assistant"
position: 0
color: "#00FF00"
font: 3Developer Tools example data for rest_command.pixoo_brightness:
host: 192.168.178.165
device: office
brightness: 35Developer Tools example data for rest_command.pixoo_image_url (GIF):
host: 192.168.178.165
device: office
url: "https://example.com/animation.gif"Developer Tools example data for rest_command.timegate_play_gif:
host: 192.168.178.165
device: hallway
lcd_array: [0,0,0,1,0]
file_name:
- "http://f.divoom-gz.com/128_128.gif"Developer Tools example data for rest_command.timegate_send_text:
host: 192.168.178.165
device: hallway
lcd_index: 4
text_id: 1
x: 0
y: 40
direction: 0
font: 4
text_width: 56
text: "Hallo"
speed: 10
color: "#FFFF00"
align: 1Note: Time Gate text requires an active animation layer. Call timegate_play_gif first, then timegate_send_text.
automation:
- alias: "Pixoo - Show Temperature"
trigger:
- platform: state
entity_id: sensor.living_room_temperature
action:
- service: rest_command.pixoo_text
data:
text: "{{ states('sensor.living_room_temperature') }}°C"
color: "#00FF00"
position: 20
font: 5automation:
- alias: "Pixoo - Doorbell Alert"
trigger:
- platform: state
entity_id: binary_sensor.doorbell
to: "on"
action:
- service: rest_command.pixoo_text
data:
text: "DOORBELL!"
color: "#FF0000"
position: 15
font: 7
- delay: "00:00:05"
- service: rest_command.pixoo_clearautomation:
- alias: "Pixoo - Morning Brightness"
trigger:
- platform: time
at: "07:00:00"
action:
- service: rest_command.pixoo_brightness
data:
brightness: 80
- alias: "Pixoo - Evening Brightness"
trigger:
- platform: time
at: "22:00:00"
action:
- service: rest_command.pixoo_brightness
data:
brightness: 20automation:
- alias: "Pixoo - Weather Update"
trigger:
- platform: time_pattern
hours: "/1" # Every hour
action:
- service: rest_command.pixoo_text
data:
text: >
{{ states('weather.home') }}
{{ state_attr('weather.home', 'temperature') }}°C
color: "#00AAFF"
position: 10
font: 4Symptoms: Error message "No Pixoo device found on local network"
Solutions:
- Ensure device is powered on and connected to WiFi
- Check that device is on the same network as Home Assistant
- Try manual configuration with IP address
- Verify firewall isn't blocking external requests to
app.divoom-gz.com
Symptoms: "Failed to connect to device" or timeout errors
Solutions:
- Increase
PIXOO_CONNECTION_RETRIESto 20-30 - Verify IP address is correct
- Check network connectivity:
ping <device-ip> - Restart the Pixoo device
- Check for IP address changes (consider DHCP reservation)
Symptoms: API endpoints return 404 Not Found
Solutions:
- Verify the add-on is running (check logs)
- Check the correct port (5000)
- Try accessing Swagger UI:
http://homeassistant.local:5000/docs#/ - Restart the add-on
Symptoms: Image endpoint succeeds but nothing shows on device
Solutions:
- Verify image URL is publicly accessible
- Check image format (JPEG, PNG, GIF supported)
- Ensure image size is appropriate
- Try displaying a test image from a known URL
- Check device logs for errors
Symptoms: Add-on fails to start or immediately crashes
Solutions:
- Check add-on logs (click "Log" tab)
- Verify configuration is valid YAML
- Ensure
PIXOO_HOSTis provided whenPIXOO_HOST_AUTOisfalse - Check
PIXOO_SCREEN_SIZEis one of: 16, 32, 64, 128 - Try default configuration first
To view detailed logs:
- Go to add-on page in Home Assistant
- Click the Log tab
- Enable Auto-update
- For more detail, enable
PIXOO_DEBUGandPIXOO_REST_DEBUGin configuration
import requests
PIXOO_API = "http://homeassistant.local:5000"
def display_message(text, color="#FFFFFF"):
response = requests.post(
f"{PIXOO_API}/device/text",
json={
"text": text,
"position": 0,
"color": color,
"font": 3
}
)
return response.json()
# Usage
display_message("Hello from Python!", "#00FF00")Use the http request node:
- Method: POST
- URL:
http://homeassistant.local:5000/device/text - Payload: JSON
{
"text": "{{msg.payload}}",
"color": "#FFFFFF",
"position": 0,
"font": 3
}#!/bin/bash
PIXOO_API="http://homeassistant.local:5000"
# Function to display text
pixoo_text() {
local text="$1"
local color="${2:-#FFFFFF}"
curl -s -X POST "$PIXOO_API/device/text" \
-H "Content-Type: application/json" \
-d "{
\"text\": \"$text\",
\"color\": \"$color\",
\"position\": 0,
\"font\": 3
}"
}
# Usage
pixoo_text "System Update" "#FF0000"If you want to run outside Home Assistant:
version: '3.8'
services:
pixoo-rest:
image: ghcr.io/pixelshober/pixoo-rest:latest
ports:
- "5000:5000"
environment:
- PIXOO_HOST=192.168.1.100
- PIXOO_SCREEN_SIZE=64
- PIXOO_DEBUG=false
restart: unless-stoppedThe Pixoo device can handle approximately:
- Text updates: ~10 per second
- Image updates: ~2 per second
- Brightness changes: ~5 per second
Exceeding these rates may cause command delays or drops.
For best performance:
- Use wired Ethernet for Home Assistant
- Ensure Pixoo has strong WiFi signal
- Consider 5GHz WiFi for Pixoo if supported
- Minimize network hops between HA and Pixoo
- Add-on Issues: GitHub Issues
- Upstream Project: pixoo-rest
- Pixoo Library: pixoo
- API Reference: See AGENTS.md
- Home Assistant Community: Community Forum
MIT License - see LICENSE for details