{"id":20080725,"url":"https://github.com/cloud8421/ada","last_synced_at":"2025-05-05T23:31:22.931Z","repository":{"id":139442505,"uuid":"184379193","full_name":"cloud8421/ada","owner":"cloud8421","description":"Nerves powered personal assistant","archived":false,"fork":false,"pushed_at":"2019-07-17T10:27:47.000Z","size":1371,"stargazers_count":8,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T05:51:08.295Z","etag":null,"topics":["elixir","elixir-lang","nerves","nerves-project","pimoroni","pimoroni-scroll-bot"],"latest_commit_sha":null,"homepage":"https://cloud8421.github.io/ada","language":"Elixir","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/cloud8421.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-05-01T06:45:47.000Z","updated_at":"2023-10-17T09:25:01.000Z","dependencies_parsed_at":"2023-05-19T23:00:45.612Z","dependency_job_id":null,"html_url":"https://github.com/cloud8421/ada","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud8421%2Fada","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud8421%2Fada/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud8421%2Fada/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud8421%2Fada/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloud8421","download_url":"https://codeload.github.com/cloud8421/ada/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252593037,"owners_count":21773395,"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":["elixir","elixir-lang","nerves","nerves-project","pimoroni","pimoroni-scroll-bot"],"created_at":"2024-11-13T15:29:46.777Z","updated_at":"2025-05-05T23:31:22.918Z","avatar_url":"https://github.com/cloud8421.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ada\n\n[![CircleCI](https://circleci.com/gh/cloud8421/ada.svg?style=svg\u0026circle-token=e4d5543095470815e9108a94840d4e57c4f77070)](https://circleci.com/gh/cloud8421/ada)\n\nAda is personal assistant designed to run on the [Pimoroni Scroll Bot](https://shop.pimoroni.com/products/scroll-bot-pi-zero-w-project-kit) (i.e. a [Raspberry Pi Zero W ](https://www.raspberrypi.org/products/raspberry-pi-zero-w/) and a [Scroll pHAT HD](https://shop.pimoroni.com/products/scroll-phat-hd)).\n\nIt’s powered by [Nerves Project](https://nerves-project.org) and [Elixir](https://elixir-lang.org).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Ada Device\" src=\"https://github.com/cloud8421/ada/blob/master/ada.jpg?raw=true\"\u003e\n\u003c/p\u003e\n\n## Features\n\nAda fits a specific use case: a small device, using little energy, that helps me with things I do on a daily basis. Hardware-wise, the Pimoroni kit is a perfect fit: it looks cool, has a low-fi screen that I can use to report basic useful information even in bright light conditions and I can pack it with me when I travel.\n\nAt this point Ada support these workflows:\n\n- Email me Guardian News about a specific topic (via [theguardian / open platform](https://open-platform.theguardian.com/documentation/))\n- Email me the weather forecast for the day at a specific location (via [Dark Sky](https://darksky.net/dev))\n- Email me what I’ve listened to in the last day/week (via [Last.fm](https://www.last.fm/api))\n\nWorkflows can be scheduled at hourly, daily or weekly intervals, with configurable parameters like locations or email recipients.\n\nThe display is used primarily as a digital clock, but it can display if one or more scheduled tasks are running.\n\nAda’s timezone can be configured and its clock is synchronised automatically.\n\nAda’s default email adapter is [Sendgrid](https://sendgrid.com/docs/for-developers/sending-email/api-getting-started/).\n\nAda’s default backup strategy uses [Dropbox via a custom app](https://www.dropbox.com/developers/apps).\n\n## Interaction modes\n\nAda can be controlled by a command line UI (CLI) and an HTTP API.\n\n### CLI interaction\n\nThe CLI can be setup by [following these instructions](#Build-the-CLI). To function, it requires the ability to connect to the running device via the Erlang distribution. By default, it will assume that the target device is available at `ada.local`.\n\nRunning `./ada` will show a list of available commands. If you happen to use the [Fish shell](https://fishshell.com), you can run `./ada fish_autocomplete | source` to load basic completions for the current shell (pull requests are welcome to support other shells!).\n\nGenerally speaking, with the CLI you can:\n\n- control the display brightness\n- manage device data (users, locations, tasks)\n- manage device preferences\n- run or preview tasks\n- backup the database with the active backup strategy\n- pull the device database to a local file\n- restore the device database from a local file\n\nAs an example, we can add a new user and setup a news digest about UK news, sent every day at 9am:\n\n```\n$ ./ada create_user mary mary@example.com\n\n  Created User with ID 3\n\n$ ./ada create_scheduled_task send_news_by_tag daily:9 --user_id 3 --tag 'uk/uk'\n\n  Created scheduled_task with ID 9\n\n```\n\nYou can run a task (irrespectively of its frequency) with:\n\n```\n$ ./ada run_scheduled_task 9\n```\n\nIf you're interested in previewing its data, the CLI can render a\nshell-friendly version of a task's result with:\n\n```\n$ ./ada preview_scheduled_task 9 | less -r\n```\n\nAs shown in the example, you can pipe the result to `less -r` to scroll down\nvia keyboard in ANSI colors.\n\nCurrent tasks render as follows:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Last.fm report shell preview\" src=\"https://github.com/cloud8421/ada/blob/master/screenshots/last_fm.png?raw=true\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Weather report shell preview\" src=\"https://github.com/cloud8421/ada/blob/master/screenshots/weather.png?raw=true\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"News report shell preview\" src=\"https://github.com/cloud8421/ada/blob/master/screenshots/news.png?raw=true\"\u003e\n\u003c/p\u003e\n\n### HTTP interaction\n\nHTTP api documentation is available at `http://ada.local/swagger-ui`.\n\n## Setup\n\nFirst of all, we need working installations of Elixir and Erlang. The recommended way to achieve this is via [asdf](https://asdf-vm.com/#/). Once it's installed and working, you can run `asdf install` from the project root to install the correct versions required by Ada (see the `.tool-versions` file for details).\n\nNext, make sure you setup the required environment variables as detailed in `.envrc.example`. We recommend using a program such as [direnv](https://direnv.net) to make this process automatic.\n\nTo support over-the-air updates, the firmware requires an ssh public key at `~/.ssh/id_rsa.pub`. This is not needed unless you try to produce a firmware file.\n\nOnce they're setup, you can run `make dev.setup` to install required tools and dependencies. Note that this will not install system-wide dependencies which are required to burn the Ada firmware to a card (see the MacOS and Linux sections at \u003chttps://hexdocs.pm/nerves/installation.html#content\u003e for details).\n\nAt this stage, you should be able to perform the most common tasks:\n\n### Running tests\n\nYou can run `make host.test`.\n\n### Build the CLI\n\nYou can run `make host.cli`, which will leave you with the `ada` executable in the current directory. You can move it anywhere, but to function properly it requires a compatible version of Erlang available globally. You can checkout the [asdf documentation](https://asdf-vm.com/#/core-manage-versions?id=set-current-version) to configure that.\n\n### Run dialyzer\n\nYou can run `make host.dialyzer` to perform a static analysis of the source code to find type inconsistencies. The first time you run it might take a while, it will be considerably faster after that.\n\n### Build docs\n\nYou can run `make host.docs`. Key parts of the source are documented, so this should help in case you feel like contributing.\n\n### Open a local iex session\n\nYou can run `make host.shell`.\n\n### Produce a firmware\n\nYou can run `make rpi0.firmware` to produce a firmware file. Running `make rpi0.burn` will produce a file and try to burn it to a SD/MicroSD card if possible.\n\n### Update the device on the fly\n\nYou can run `make rpi0.push` to perform a over-the-air device update.\n\n### Remote shell to the running device\n\nYou can run `make rpi0.ssh`.\n\n## Data backups\n\nAda is capable of backing up its own db file at 3am every night. To do that, it uses a configured backup strategy (with Dropbox being the one currently implemented). To activate it, it's enough to define a `DROPBOX_API_TOKEN` env variable (the token can be created at \u003chttps://www.dropbox.com/developers/apps\u003e).\n\n## Commit legend\n\n- [F] Feature\n- [C] Chore\n- [B] Bugfix\n- [D] Documentation\n- [R] Refactor\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud8421%2Fada","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloud8421%2Fada","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud8421%2Fada/lists"}