{"id":35572785,"url":"https://github.com/r0bb10/wallpanel-mqtt-bridge","last_synced_at":"2026-01-20T08:00:36.780Z","repository":{"id":331323013,"uuid":"1125767281","full_name":"r0bb10/Wallpanel-MQTT-Bridge","owner":"r0bb10","description":"Raspberry Pi Wallpanel Kiosk exposure to use GPIO IR and Services via MQTT to bridge with Home Assistant.","archived":false,"fork":false,"pushed_at":"2026-01-04T16:14:22.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-14T00:13:01.311Z","etag":null,"topics":["gpio","homeassistant","kiosk","raspberry-pi","systemd","wallpanel"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r0bb10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-31T10:18:05.000Z","updated_at":"2026-01-04T16:12:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/r0bb10/Wallpanel-MQTT-Bridge","commit_stats":null,"previous_names":["r0bb10/wallpanel-mqtt-bridge"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/r0bb10/Wallpanel-MQTT-Bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r0bb10%2FWallpanel-MQTT-Bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r0bb10%2FWallpanel-MQTT-Bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r0bb10%2FWallpanel-MQTT-Bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r0bb10%2FWallpanel-MQTT-Bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r0bb10","download_url":"https://codeload.github.com/r0bb10/Wallpanel-MQTT-Bridge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r0bb10%2FWallpanel-MQTT-Bridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28598874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gpio","homeassistant","kiosk","raspberry-pi","systemd","wallpanel"],"created_at":"2026-01-04T18:14:45.586Z","updated_at":"2026-01-20T08:00:36.746Z","avatar_url":"https://github.com/r0bb10.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wallpanel MQTT Bridge\n\nA unified MQTT bridge for Raspberry Pi that exposes GPIO, IR remote control, and system management to Home Assistant with automatic discovery.\n\n## Features\n\n- **GPIO Control**: Control outputs and monitor inputs via MQTT\n- **IR Remote Control**: Send infrared commands\n- **Linked Outputs**: Toggle relays directly from GPIO buttons\n- **System Management**: Reboot host and restart/reload services from Home Assistant\n- **Home Assistant Integration**: Automatic discovery - all entities appear instantly\n- **Reliable**: Auto-reconnect, availability tracking, proper cleanup\n- **Efficient**: Native Go, single binary, low resource usage\n\n## Quick Install\n\n1. **Download the latest release** for your architecture:\n   - ARM64 (Pi 4/5): `wallpanel-mqtt-bridge-linux-arm64.tar.gz`\n   - ARMv7 (Pi 3/Zero 2/W): `wallpanel-mqtt-bridge-linux-armv7.tar.gz`\n\n2. **Extract and install**:\n   ```bash\n   tar -xzf wallpanel-mqtt-bridge-linux-*.tar.gz\n   cd wallpanel-mqtt-bridge-linux-*\n   sudo ./install.sh\n   ```\n\n3. **Configure** (edit `/opt/wallpanel-mqtt-bridge/config.json`):\n   ```bash\n   sudo nano /opt/wallpanel-mqtt-bridge/config.json\n   ```\n\n4. **Start the service**:\n   ```bash\n   sudo systemctl enable wallpanel-mqtt-bridge\n   sudo systemctl start wallpanel-mqtt-bridge\n   ```\n\n5. **Check status**:\n   ```bash\n   sudo systemctl status wallpanel-mqtt-bridge\n   sudo journalctl -u wallpanel-mqtt-bridge -f\n   ```\n\n## Configuration\n\nEdit `/opt/wallpanel-mqtt-bridge/config.json`:\n\n```json\n{\n  \"mqtt\": {\n    \"broker\": \"tcp://mqtt_host:1883\",\n    \"user\": \"mqtt_user\",\n    \"password\": \"mqtt_password\",\n    \"topic_prefix\": \"wallpanel/wallpanel-mqtt-bridge\"\n  },\n  \"chip\": \"gpiochip0\",\n  \"outputs\": [\n    {\n      \"name\": \"relay1\",\n      \"pin\": 23,\n      \"inverted\": true,\n      \"ha_name\": \"Display\",\n      \"ha_class\": \"switch\",\n      \"enabled\": true\n    }\n  ],\n  \"inputs\": [\n    {\n      \"name\": \"button1\",\n      \"pin\": 26,\n      \"pullup\": true,\n      \"inverted\": true,\n      \"linked_output\": \"relay1\",\n      \"ha_name\": \"Button\",\n      \"enabled\": true\n    }\n  ],\n  \"ir_remotes\": [\n    {\n      \"name\": \"UPERFECT\",\n      \"device\": \"/dev/lirc0\",\n      \"bits\": 32,\n      \"flags\": \"SPACE_ENC|CONST_LENGTH\",\n      \"header\": [9117, 4434],\n      \"one\": [642, 1624],\n      \"zero\": [642, 488],\n      \"ptrail\": 638,\n      \"repeat\": [9102, 2199],\n      \"gap\": 80000,\n      \"frequency\": 38000,\n      \"codes\": {\n        \"KEY_BRIGHTNESSUP\": {\n          \"code\": \"0x61D66897\",\n          \"ha_name\": \"Brightness Up\",\n          \"icon\": \"mdi:brightness-5\"\n        },\n        \"KEY_BRIGHTNESSUP_MAX\": {\n          \"code\": \"0x61D66897\",\n          \"send_mode\": \"hold\",\n          \"duration\": 3000,\n          \"ha_name\": \"Brightness Max\",\n          \"icon\": \"mdi:brightness-7\"\n        },\n        \"KEY_BRIGHTNESSDOWN\": {\n          \"code\": \"0x61D628D7\",\n          \"ha_name\": \"Brightness Down\",\n          \"icon\": \"mdi:brightness-4\"\n        },\n        \"KEY_BRIGHTNESSDOWN_MIN\": {\n          \"code\": \"0x61D628D7\",\n          \"send_mode\": \"hold\",\n          \"duration\": 3000,\n          \"ha_name\": \"Brightness Min\",\n          \"icon\": \"mdi:brightness-1\"\n        },\n        \"KEY_POWER\": {\n          \"code\": \"0x61D608F7\",\n          \"enabled\": false,\n          \"ha_name\": \"Power\",\n          \"icon\": \"mdi:power\"\n        },\n        \"KEY_MUTE\": {\n          \"code\": \"0x61D648B7\",\n          \"enabled\": false,\n          \"ha_name\": \"Mute\",\n          \"icon\": \"mdi:volume-mute\"\n        }\n      }\n    }\n  ],\n  \"system_controls\": {\n    \"reboot_host\": {\n      \"enabled\": true,\n      \"ha_name\": \"Reboot Wallpanel\",\n      \"icon\": \"mdi:restart\"\n    },\n    \"restart_services\": [\n      {\n        \"service\": \"wallpanel-mqtt-bridge\",\n        \"action\": \"reload\",\n        \"enabled\": false,\n        \"ha_name\": \"Reload Bridge\",\n        \"icon\": \"mdi:refresh\"\n      },\n      {\n        \"service\": \"greetd\",\n        \"action\": \"restart\",\n        \"enabled\": true,\n        \"ha_name\": \"Restart Kiosk\",\n        \"icon\": \"mdi:monitor-dashboard\"\n      }\n    ]\n  }\n}\n```\n\n### Configuration Options\n\n**MQTT Settings:**\n- `broker`: MQTT broker URL (format: `tcp://host:port`)\n- `user`: MQTT username\n- `password`: MQTT password\n- `topic_prefix`: Base topic for all messages\n\n**GPIO Chip:**\n- `chip`: GPIO chip device name (usually `gpiochip0`).\n\n**GPIO Output (Relay/Switch) Settings:**\n- `name`: Internal name (used in topics)\n- `pin`: GPIO pin number (BCM numbering)\n- `inverted`: Set `true` if relay is active-low (common for relay modules)\n- `ha_name`: Display name in Home Assistant\n- `ha_class`: Device class (usually `\"switch\"`)\n- `enabled`: Optional, defaults to `true`\n\n**GPIO Input (Button/Sensor) Settings:**\n- `name`: Internal name (used in topics)\n- `pin`: GPIO pin number (BCM numbering)\n- `pullup`: Enable internal pull-up resistor (typically `true` for buttons)\n- `inverted`: Set `true` if button grounds the pin when pressed (typical)\n- `linked_output`: Optional - name of output to toggle directly on button press (bypasses MQTT)\n- `ha_name`: Display name in Home Assistant\n- `ha_class`: Binary sensor class: `door`, `motion`, `occupancy`, `window`, etc. (optional)\n- `enabled`: Optional, defaults to `true`\n\n**System Control Settings:**\n- `reboot_host.enabled`: Enable/disable reboot button\n- `reboot_host.ha_name`: Display name for reboot button\n- `reboot_host.icon`: Optional Material Design icon\n- `restart_services`: Array of services to create control buttons for\n  - `service`: Systemd service name\n  - `action`: Action to perform - `\"restart\"`, `\"reload\"`, `\"start\"`, or `\"stop\"`\n  - `ha_name`: Display name in Home Assistant\n  - `icon`: Optional Material Design icon\n  - `enabled`: Optional, defaults to `true`\n\n**Service Actions:**\n- `restart`: Stop and start the service\n- `reload`: Reload service configuration without stopping (if supported)\n- `start`: Start a stopped service  \n- `stop`: Stop a running service\n\n## Advanced Features\n\n### Linked Outputs\nConfigure `linked_output` on an input to toggle a relay directly via GPIO without MQTT round-trip. Perfect for physical light switches controlling relays - provides instant response independent of network connectivity.\n\n## Home Assistant\n\nAfter starting the bridge, all entities automatically appear in:\n**Settings → Devices \u0026 Services → MQTT**\n\nLook for the device: **Wallpanel MQTT Bridge**\n\n### Entity Types\n\nThe bridge creates a single unified device with:\n- **Switches**: GPIO outputs for relays, LEDs, etc.\n- **Binary Sensors**: GPIO inputs for buttons, sensors, etc.\n- **Buttons**: IR remote commands\n- **Buttons (Diagnostic)**: System controls (reboot, service restart)\n\n## IR Remote Setup\n\n### Hardware Requirements\n\n1. **IR LED** connected to GPIO pin (commonly GPIO 17 or 18)\n2. **Enable GPIO IR transmitter** in `/boot/firmware/config.txt`:\n   ```\n   dtoverlay=gpio-ir-tx,gpio_pin=17\n   ```\n3. Reboot and verify `/dev/lirc0` exists: `ls -l /dev/lirc0`\n\n### Finding IR Codes\n\n**Method 1: Use LIRC tools to capture codes**\n```bash\n# Install lirc tools\nsudo apt install lirc\n\n# Capture raw IR codes from existing remote\nmode2 -d /dev/lirc0\n\n# Press button on remote, you'll see pulse timings\n# Example output:\n#   space 4434\n#   pulse 642\n#   space 488\n```\n\n**Method 2: Check LIRC remote database**\nMany remotes are already documented at [lirc.org/remotes](http://lirc.org/remotes). Download the `.conf` file for your device and extract the timings.\n\n### IR Protocol Configuration\n\nThe bridge directly programs the LIRC device using raw pulse timings (LIRC_MODE_PULSE). Key parameters:\n\n- **header**: Initial mark/space pair (usually longest pulses)\n- **one/zero**: Mark/space pairs for binary 1 and 0  \n- **ptrail**: Final mark pulse\n- **gap**: Time between transmissions (affects hold mode speed)\n- **frequency**: Carrier frequency (38kHz most common)\n\n**Example: NEC Protocol (most common)**\n```json\n\"header\": [9000, 4500],\n\"one\": [560, 1690],\n\"zero\": [560, 560],\n\"ptrail\": 560,\n\"gap\": 100000,\n\"frequency\": 38000\n```\n\n## System Controls\n\n### Sudo Permissions\n\nFor system controls to work, the service user needs passwordless sudo for specific commands.\n\n**Edit sudoers** (replace `pi` with your username):\n```bash\nsudo visudo\n```\n\nAdd these lines:\n```\npi ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart wallpanel-mqtt-bridge\npi ALL=(ALL) NOPASSWD: /usr/bin/systemctl reload wallpanel-mqtt-bridge\npi ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart greetd\npi ALL=(ALL) NOPASSWD: /sbin/reboot\n```\n\n**Or create a dedicated sudoers file:**\n```bash\nsudo visudo -f /etc/sudoers.d/wallpanel\n```\n\n### Custom Commands\n\nYou can define arbitrary shell commands that are exposed as diagnostic buttons in Home Assistant. Commands are executed through `bash -c`, allowing environment variable expansion and pipelines.\n\n**Example uses:**\n- Restart compositor: `pkill -u $USER labwc`\n- Clear cache: `rm -rf /tmp/cache/*`\n- Screenshot: `grim /home/$USER/screenshot.png`\n- Custom scripts: `/home/$USER/scripts/toggle-wifi.sh`\n\n**Config example:**\n```json\n\"custom_commands\": [\n  {\n    \"name\": \"restart_labwc\",\n    \"command\": \"pkill -u $USER labwc\",\n    \"enabled\": true,\n    \"ha_name\": \"Restart Compositor\",\n    \"icon\": \"mdi:window-restore\"\n  },\n  {\n    \"name\": \"clear_cache\",\n    \"command\": \"rm -rf /tmp/wallpanel-cache\",\n    \"enabled\": true,\n    \"ha_name\": \"Clear Cache\",\n    \"icon\": \"mdi:trash-can\"\n  }\n]\n```\n\n**Security considerations:**\n- Commands run as the service user (e.g., `pi`)\n- No sudo access unless explicitly granted in sudoers\n- Use caution with destructive commands\n- Consider disabling in production if not needed\n- Use absolute paths when possible\n\n### Security Note\n\nSystem control buttons appear in the \"Diagnostic\" category in Home Assistant, separate from regular controls. Consider restricting access to these entities in your HA user permissions if sharing dashboard access.\n\n## Troubleshooting\n\n**Check logs:**\n```bash\nsudo journalctl -u wallpanel-mqtt-bridge -f\n```\n\n**Expected log output:**\n```\nJan 01 17:17:38 wallpanel wallpanel-mqtt-bridge[12042]: Connected to MQTT\nJan 01 17:17:48 wallpanel wallpanel-mqtt-bridge[12042]: Display: OFF\nJan 01 17:17:53 wallpanel wallpanel-mqtt-bridge[12042]: Sent IR: Brightness Up\nJan 01 17:18:04 wallpanel wallpanel-mqtt-bridge[12042]: Service Restart Kiosk: DONE\n```\nStatus messages (Connected, ON/OFF, IR names, DONE) appear in green for easy monitoring.\n\n**Test MQTT messages:**\n```bash\n# Listen to all topics\nmosquitto_sub -h your-broker -u user -P pass -t '#' -v\n\n# Check discovery\nmosquitto_sub -h your-broker -u user -P pass -t 'homeassistant/#' -v\n\n# Check states\nmosquitto_sub -h your-broker -u user -P pass -t 'wallpanel/wallpanel-mqtt-bridge/#' -v\n```\n\n**IR not working:**\n```bash\n# Check IR device exists and permissions\nls -l /dev/lirc0\n# Should show: crw-rw---- 1 root video\n\n# Verify user is in video group\ngroups pi\n# Should include: video\n\n# Test LIRC device manually\nir-ctl -d /dev/lirc0 --features\n# Should show: send receive\n\n# Check dtoverlay is loaded\nvcgencmd get_config dtoverlay\n# Should include: gpio-ir-tx\n```\n\n## Building from Source\n\n```bash\ngit clone https://github.com/r0bb10/wallpanel-mqtt-bridge\ncd wallpanel-mqtt-bridge\ngo mod download\ngo build -o wallpanel-mqtt-bridge\n```\n\n## License\n\nMIT License - see LICENSE file\n\n## Author\n\nCreated by r0bb10","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr0bb10%2Fwallpanel-mqtt-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr0bb10%2Fwallpanel-mqtt-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr0bb10%2Fwallpanel-mqtt-bridge/lists"}