Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Playdate HA

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

Requirements

  • 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)

Setup

  1. Edit source/main.lua and set your broker details in the defaults block:
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.

  1. Compile with the Playdate SDK:
pdc source playdate-ha.pdx
  1. Copy playdate-ha.pdx to the Games/ folder on your Playdate (via USB data disk mode).

  2. Launch the game. The Playdate device will appear in HA under Settings → Devices & Services → MQTT → Devices.

Entities

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)

License

MIT — see LICENSE

About

Home Assistant integration for Playdate — exposes buttons, crank and accelerometer as HA entities via MQTT discovery, and displays HA text on screen

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages