{"id":17658669,"url":"https://github.com/ruuda/christmas-tree","last_synced_at":"2025-10-20T08:03:31.663Z","repository":{"id":66191233,"uuid":"75699567","full_name":"ruuda/christmas-tree","owner":"ruuda","description":"An API for lighting up my Christmas tree","archived":false,"fork":false,"pushed_at":"2017-11-12T16:32:07.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T12:23:04.603Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruuda.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":"2016-12-06T05:57:54.000Z","updated_at":"2020-07-04T11:35:35.000Z","dependencies_parsed_at":"2023-03-07T10:16:01.300Z","dependency_job_id":null,"html_url":"https://github.com/ruuda/christmas-tree","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fchristmas-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fchristmas-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fchristmas-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fchristmas-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruuda","download_url":"https://codeload.github.com/ruuda/christmas-tree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246305348,"owners_count":20756072,"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":"2024-10-23T15:28:15.990Z","updated_at":"2025-10-20T08:03:26.629Z","avatar_url":"https://github.com/ruuda.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Christmas Tree\n\nAn API for lighting up my Christmas tree.\n\n[![Build Status][ci-img]][ci]\n\n## Hardware\n\nI am using the components of the [Adalight][adalight]: a 25 pixel RGB LED\nstrand driven by an Arduino Uno. The standard Adalight driver program runs on\nthe Arduino and accepts color data over USB. The Arduino presents itself as a\nserial device to the computer, and the `christmas-tree` program writes color\ndata to the serial port.\n\n## Software\n\nThere are two programs:\n\n * `server`, the API server that runs on a publicly accessible server. It\n   exposes a simple API over https on one port (protected by basic auth). On a\n   different port it listens for connecting clients. When a client connects, it\n   the server sends it mode changes via the socket.\n\n * `cristmas-tree`, the program that runs in a local network and writes color\n   data to the serial port. Colors are determined by the current mode, and the\n   current mode is retrieved by connecting to the server and listening for mode\n   changes.\n\n## Running\n\nTo run the client on Ubuntu 16.04:\n\n    # Build the client program.\n    stack setup\n    stack build\n\n    # Give yourself permission to access /dev/ttyACM0\n    sudo usermod --append --groups dialout $USER\n\n    # Run the client, assuming the Arduino is at /dev/ttyACM0.\n    # Replace example.com:444 with your server domain and socket port.\n    stack exec christmas-tree /dev/ttyACM0 example.com:444\n\n## Modes\n\nA mode is a function `Float -\u003e Integer -\u003e Color`, that takes the current time\n(the amount of seconds since midnight) and the LED index, and produces a color\nfor the LED.\n\n## License\n\nChristmas Tree is free software. It is licensed under the\n[GNU General Public License][gplv3], version 3.\n\n[gplv3]:    https://www.gnu.org/licenses/gpl-3.0.html\n[adalight]: https://learn.adafruit.com/adalight-diy-ambient-tv-lighting\n[ci]:       https://travis-ci.org/ruuda/christmas-tree\n[ci-img]:   https://travis-ci.org/ruuda/christmas-tree.svg?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruuda%2Fchristmas-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruuda%2Fchristmas-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruuda%2Fchristmas-tree/lists"}