[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-83201":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":12,"stars7d":14,"stars30d":14,"stars90d":13,"forks30d":13,"starsTrendScore":15,"compositeScore":16,"rankGlobal":8,"rankLanguage":8,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":8,"pushedAt":8,"updatedAt":22,"readmeContent":23,"aiSummary":8,"trendingCount":13,"starSnapshotCount":13,"syncStatus":24,"lastSyncTime":25,"discoverSource":26},83201,"smart-home-button","Jasionf\u002Fsmart-home-button","Jasionf",null,"C++",190,7,3,0,48,18,2.71,"MIT License",false,"main",true,[],"2026-06-12 02:04:32","\u003Cdiv align=\"center\">\n\n\u003Cimg src=\"src\u002Fassets\u002Fimages\u002Flogo.png\" width=\"96\" alt=\"M5Stack Dial Smart Button logo\" \u002F>\n\n# Smart Home Button\n\n### A Circular HMI for Home Assistant, built with M5Stack Dial, ESPHome, and LVGL.\n\n[![ESPHome](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FESPHome-tested%202026.3.3-blue?style=flat-square&logo=esphome)](https:\u002F\u002Fesphome.io\u002F)\n[![Platform](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPlatform-ESP32--S3-red?style=flat-square&logo=espressif)](https:\u002F\u002Fwww.espressif.com\u002F)\n[![Display](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDisplay-GC9A01A%20240x240-purple?style=flat-square)](#hardware)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green?style=flat-square)](#license)\n\n\u003C\u002Fdiv>\n\n## What is this?\n\nThis is my M5Stack Dial firmware for controlling a Home Assistant setup from a small round desktop device.\n\nI built it because some smart home actions feel better with a real knob and a small screen. Turning a dial to change brightness, tapping a button for playback, or checking the room status at a glance is faster than opening a phone dashboard every time.\n\nThe project is based on ESPHome and LVGL. Most of the UI is split into separate page files, so it is easier to change one feature without touching the rest of the firmware.\n\n## What it can do\n\n- Show time, date, and weather data from Home Assistant.\n- Navigate with the rotary encoder, touch gestures, and the front button.\n- Control the built-in LED ring with brightness, color, and preset color flows.\n- Adjust an air conditioner entity from Home Assistant.\n- Show a music page with playback buttons, volume, progress, and album art.\n- Run a simple countdown timer.\n- Show a small fridge\u002Ffood status page.\n- Keep the device alive on battery power on M5Dial V1.1 by enabling the power-hold pin.\n\n## Gallery\n\n| | | | |\n| --- | --- | --- | --- |\n| \u003Cimg src=\"docs\u002Fimages\u002Fgallery\u002Fmusic-page.jpg\" alt=\"Music page\" width=\"240\"> | \u003Cimg src=\"docs\u002Fimages\u002Fgallery\u002Fclock-weather-page.jpg\" alt=\"Clock and weather page\" width=\"240\"> | \u003Cimg src=\"docs\u002Fimages\u002Fgallery\u002Fac-page.jpg\" alt=\"AC page\" width=\"240\"> | \u003Cimg src=\"docs\u002Fimages\u002Fgallery\u002Ftimer-page.jpg\" alt=\"Timer page\" width=\"240\"> |\n| \u003Cimg src=\"docs\u002Fimages\u002Fgallery\u002Fac-power-page.jpg\" alt=\"AC power control page\" width=\"240\"> | \u003Cimg src=\"docs\u002Fimages\u002Fgallery\u002Flight-page.jpg\" alt=\"Light page\" width=\"240\"> | \u003Cimg src=\"docs\u002Fimages\u002Fgallery\u002Ffridge-page.jpg\" alt=\"Fridge page\" width=\"240\"> | \u003Cimg src=\"docs\u002Fimages\u002Fgallery\u002Fmenu-page.jpg\" alt=\"Menu page\" width=\"240\"> |\n\n## Pages\n\n| Page | What it does |\n| --- | --- |\n| Clock | Time, date, weather, humidity, AQI, pressure, and wind speed |\n| Menu | Circular page navigation for the small round screen |\n| Light | LED ring brightness, color, and effects |\n| AC | Target temperature and power control; fan\u002Fswing UI can be mapped to your own climate services |\n| Music | SendSpin media state, cover art, progress, volume, and transport controls |\n| Fridge | Small food freshness\u002Fstatus cards |\n| Timer | Countdown timer with rotary adjustment |\n\n## Hardware\n\nThe firmware is written for M5Stack Dial V1.1.\n\nMain parts used by the project:\n\n- ESP32-S3 controller\n- 240 x 240 GC9A01A round display\n- FT5x06 capacitive touch\n- PCF8563 RTC\n- RC522 NFC module on I2C\n- Rotary encoder and front button\n- SK6812 RGB LED ring\n- Buzzer and display backlight\n- USB-C for flashing and power\n\n## Project structure\n\n```text\nm5dial-smart-button\u002F\n|-- dial.yaml                    # ESPHome entry point\n|-- secrets.example.yaml         # Copy this to secrets.yaml\n|-- requirements.txt             # ESPHome version used for this project\n|-- THIRD_PARTY_NOTICES.md        # Third-party code\u002Ffont\u002Ficon notes\n|-- src\u002F\n|   |-- main\u002F\n|   |   |-- hardware.yaml        # M5Dial pins, display, touch, RTC, power hold\n|   |   `-- entities.yaml        # Home Assistant entity IDs\n|   |-- pages\u002F                   # One LVGL page per feature\n|   `-- assets\u002F                  # Fonts and small image assets\n|-- components\u002F                  # Local ESPHome components, including SendSpin\n|-- hardware\u002F                    # 3D-printable enclosure files\n`-- docs\u002F                        # Setup notes and release checklist\n```\n\n## Setup\n\n### 1. Install ESPHome\n\nI tested this project with ESPHome `2026.3.3`. The first build may need internet access because ESPHome downloads Google Fonts and build libraries.\n\n```bash\npython3 -m venv .venv\nsource .venv\u002Fbin\u002Factivate\npip install -r requirements.txt\n```\n\n### 2. Create your secrets file\n\n```bash\ncp secrets.example.yaml secrets.yaml\n```\n\nThen edit `secrets.yaml`:\n\n```yaml\nwifi_ssid: \"YOUR_WIFI_SSID\"\nwifi_password: \"YOUR_WIFI_PASSWORD\"\n\nap_ssid: \"Dial Fallback Hotspot\"\nap_password: \"YOUR_FALLBACK_AP_PASSWORD\"\n\napi_encryption_key: \"YOUR_API_ENCRYPTION_KEY\"\nota_password: \"YOUR_OTA_PASSWORD\"\n```\n\n`secrets.yaml` is ignored by Git. Do not publish it.\n\nThe API key in `secrets.example.yaml` is only a public dummy value so `esphome config` can run after copying the file. Generate your own key before flashing a real device.\n\n### 3. Set your Home Assistant entities\n\nEdit `src\u002Fmain\u002Fentities.yaml`:\n\n```yaml\nsubstitutions:\n  weather_entity: weather.your_location\n  climate_entity: climate.your_ac\n  music_player_entity: media_player.your_player\n```\n\nYou can find these entity IDs in Home Assistant under **Developer Tools -> States**.\n\nFor the music page, choose the media player that actually plays audio. It should report useful attributes such as `volume_level`, `media_title`, `media_duration`, and `media_position`. If the entity is `unavailable`, the Dial cannot sync it.\n\n### 4. Check, build, and flash\n\n```bash\nesphome config dial.yaml\nesphome compile dial.yaml\nesphome upload dial.yaml --device \u002Fdev\u002Fcu.usbmodemXXXX\n```\n\nFor later OTA updates:\n\n```bash\nesphome upload dial.yaml\n```\n\n## Notes about the music page\n\nThe music page uses the local `sendspin` component for media state, transport commands, and album art. The Home Assistant media player entity is also read for status, volume, duration, and progress when those attributes are available.\n\nAlbum art is intentionally kept small because the M5Dial does not have PSRAM. If you increase the image size or LVGL buffer too much, the device may reboot when artwork is received.\n\nIf volume control does not work, first check the Home Assistant media player entity. Some players expose playback state but do not expose writable volume control. If you want a HA-only music page, replace the SendSpin command scripts with standard `media_player` services.\n\n## Notes about AC controls\n\nClimate entities are not all the same. Temperature and power are wired to Home Assistant services in this project. Fan speed and swing are shown as UI controls, but you may need to map them to `climate.set_fan_mode`, `climate.set_swing_mode`, or your own scripts depending on your air conditioner integration.\n\n## Notes about battery power\n\nM5Dial V1.1 needs the hold pin to stay enabled when running from battery. This project turns on GPIO46 during boot in `dial.yaml` and defines the `power_hold` switch in `src\u002Fmain\u002Fhardware.yaml`.\n\n## Common issues\n\n- **Device is unavailable in Home Assistant**: make sure the `api` section is enabled and port `6053` is reachable.\n- **Wrong weather values**: change `weather_entity` in `src\u002Fmain\u002Fentities.yaml`.\n- **Wrong AC entity**: change `climate_entity` in `src\u002Fmain\u002Fentities.yaml`.\n- **Music page shows unavailable**: choose the real player entity, not the Dial entity itself.\n- **Album art causes reboot**: keep the artwork small and do not increase LVGL memory use too much.\n- **First build cannot download fonts**: connect to the internet once so ESPHome can fetch Google Fonts, or replace `gfonts:\u002F\u002F` fonts with local font files.\n- **Battery does not keep the device on**: check the V1.1 power-hold configuration.\n\n## What you may want to change\n\nMost people will need to edit only these files:\n\n- `secrets.yaml` for Wi-Fi and ESPHome credentials.\n- `src\u002Fmain\u002Fentities.yaml` for Home Assistant entity IDs.\n- `src\u002Fpages\u002Fmain.yaml` if you want a different timezone or weather layout.\n- `src\u002Fpages\u002Fmusic.yaml` if you want to customize the music UI.\n\n## License\n\nMIT License for the original project files. See `LICENSE`.\n\nThird-party code, fonts, icons, and build dependencies keep their own licenses. See `THIRD_PARTY_NOTICES.md`.\n\n## Demo Video\n\nWatch the demo on YouTube: [Smart Home Button demo](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=51bXRBuSLpM)\n",2,"2026-06-11 04:10:24","CREATED_QUERY"]