A Playdate game that integrates with Home Assistant over Wi-Fi via MQTT.
- Exposes all Playdate inputs as Home Assistant entities (buttons, crank, accelerometer)
- Displays text sent from Home Assistant on the Playdate screen
- Uses MQTT discovery — entities appear in HA automatically, no manual configuration needed
- Playdate with OS 2.7 or later (Wi-Fi support)
- Home Assistant with the MQTT integration enabled
- An MQTT broker (e.g. the Mosquitto add-on in HA)
- Edit
source/main.luaand set your broker details in thedefaultsblock:
local defaults = {
mqtt_host = "192.168.1.x", -- IP address of your MQTT broker
mqtt_port = 1883,
mqtt_user = "your_mqtt_username",
mqtt_pass = "your_mqtt_password",
}Use an IP address rather than a hostname — the Playdate does not support mDNS.
- Compile with the Playdate SDK:
pdc source playdate-ha.pdx-
Copy
playdate-ha.pdxto theGames/folder on your Playdate (via USB data disk mode). -
Launch the game. The Playdate device will appear in HA under Settings → Devices & Services → MQTT → Devices.
| Entity | Type | Description |
|---|---|---|
sensor.playdate_crank_angle |
Sensor | Crank position in degrees (0–360) |
sensor.playdate_accel_x/y/z |
Sensor | Accelerometer axes in g |
binary_sensor.playdate_button_a |
Binary sensor | A button |
binary_sensor.playdate_button_b |
Binary sensor | B button |
binary_sensor.playdate_dpad_up/down/left/right |
Binary sensor | D-pad directions |
binary_sensor.playdate_crank_docked |
Binary sensor | Whether the crank is docked |
text.playdate_display_line1 |
Text | Top display line (max 48 chars) |
text.playdate_display_line2 |
Text | Bottom display line (max 48 chars) |
MIT — see LICENSE