{"id":26146079,"url":"https://github.com/splch/presto-hub","last_synced_at":"2026-04-28T03:04:48.395Z","repository":{"id":280342001,"uuid":"941674041","full_name":"splch/presto-hub","owner":"splch","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-02T20:53:28.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T21:31:15.562Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/splch.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}},"created_at":"2025-03-02T20:43:35.000Z","updated_at":"2025-03-02T20:53:31.000Z","dependencies_parsed_at":"2025-03-02T21:31:17.287Z","dependency_job_id":"7b8d5ad5-b763-47f3-8708-f79999f2a59b","html_url":"https://github.com/splch/presto-hub","commit_stats":null,"previous_names":["splch/presto-hub"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splch%2Fpresto-hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splch%2Fpresto-hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splch%2Fpresto-hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splch%2Fpresto-hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/splch","download_url":"https://codeload.github.com/splch/presto-hub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242973970,"owners_count":20215249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-03-11T05:00:01.328Z","updated_at":"2025-12-25T03:38:26.486Z","avatar_url":"https://github.com/splch.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Presto Hub\n\nThis repository showcases a simple MicroPython project that displays dynamic information on a [Pimoroni Presto](https://shop.pimoroni.com/products/presto?variant=54894104052091) board (or a similarly configured Pico system).\n\nIt renders:\n\n1. Date and Time\n2. Weather (from configurable API)\n3. Time-of-Use (TOU) Electrical Cost\n4. Stock Quotes\n5. Crypto Prices\n6. A Small Dynamic “Artwork”\n\nAll settings (Wi-Fi credentials, APIs, and time-of-use pricing details) are managed through **config.json**.\n\n---\n\n## Files\n\n- **LICENSE**  \n  MIT license for this repository.\n\n- **README.md**  \n  You are here!\n\n- **cherry-hq.af**  \n  An Alright Fonts (.af) font used for fancy text.  \n  _(Optionally used in your Presto project if you need a decorative font.)_\n\n- **config.json**  \n  Contains all the user-configurable settings:\n\n  - **wifi**: Enable/disable Wi-Fi, plus SSID and password.\n  - **weather**: Enable, plus city and API endpoints (defaults to `wttr.in`).\n  - **stocks**: Enable, plus list of stock tickers and API key (defaults to Alpha Vantage).\n  - **crypto**: Enable, plus list of crypto tickers and API URL (defaults to CoinGecko).\n  - **tou_d_prime**: Time-of-use scheduling details for electricity cost.\n  - **main_loop**: `update_interval` in seconds (the pause between each refresh).\n\n- **main.py**  \n  The main MicroPython script that:\n  1. Loads **config.json**\n  2. Connects to Wi-Fi if enabled\n  3. Fetches weather, stock, and crypto data periodically\n  4. Determines time-of-use cost rates\n  5. Draws everything to the Presto display\n  6. Updates every `update_interval` seconds\n\n---\n\n## Getting Started\n\n1. **Copy Files**  \n   Place `main.py`, `config.json`, and the optional `cherry-hq.af` font onto the Presto’s filesystem.  \n   For example, if you’re using Thonny, drag-and-drop or open them in the “Raspberry Pi Pico” device and save them there.\n\n2. **Set Up config.json**\n\n   - **Wi-Fi**:\n     ```json\n     \"wifi\": {\n       \"enable\": true,\n       \"ssid\": \"YourNetworkSSID\",\n       \"password\": \"YourNetworkPass\"\n     }\n     ```\n     Set `enable` to `true` or `false` depending on whether you want to connect.\n   - **Weather**:\n     ```json\n     \"weather\": {\n       \"enable\": true,\n       \"city\": \"London\",\n       \"api_url\": \"http://wttr.in?format=j1\"\n     }\n     ```\n     You can specify your city or region.\n   - **Stocks**:\n     ```json\n     \"stocks\": {\n       \"enable\": true,\n       \"tickers\": [\"AAPL\", \"GOOG\"],\n       \"api_key\": \"YourAlphaVantageKey\"\n     }\n     ```\n   - **Crypto**:\n     ```json\n     \"crypto\": {\n       \"enable\": true,\n       \"tickers\": [\"bitcoin\", \"ethereum\"],\n       \"api_url\": \"https://api.coingecko.com/api/v3/simple/price?vs_currencies=usd\"\n     }\n     ```\n   - **Time-of-Use**:\n     ```json\n     \"tou_d_prime\": {\n       \"summer_months\": [6, 7, 8, 9],\n       \"weekend_days\": [5, 6],\n       ...\n     }\n     ```\n     Adjust “summer” and “winter” schedules to reflect your local electricity rates.\n   - **Main Loop**:\n     ```json\n     \"main_loop\": {\n       \"update_interval\": 10\n     }\n     ```\n     The number of seconds to wait between each screen refresh.\n\n3. **Install Dependencies**  \n   This script expects the “Presto” ecosystem, including modules like `requests` (from the MicroPython networking bundle) and `pico_graphics`.  \n   Make sure you’re using the custom MicroPython build for Presto or have these modules available.\n\n4. **Run main.py**\n   - After resetting or pressing “Play” in Thonny, the script should load your config and begin displaying data.\n   - If Wi-Fi is enabled and credentials are valid, the script will attempt to connect and then fetch real data.\n\n---\n\n## Troubleshooting\n\n- **Wi-Fi Failing**: Double-check your SSID and password in `config.json`.\n- **No Weather/Stocks**: Possibly missing or invalid API keys. Also make sure the device is indeed connected to Wi-Fi.\n- **Unresponsive Display**: Ensure you’ve flashed a Presto-compatible MicroPython firmware. Check that your cable/pins are correct.\n- **Performance**: The `update_interval` in `config.json` can be raised if you need fewer API calls or to lighten the CPU load.\n\n---\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE) – see the file for details.\n\n---\n\n**Enjoy your Presto Hub!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplch%2Fpresto-hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsplch%2Fpresto-hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplch%2Fpresto-hub/lists"}