{"id":25090669,"url":"https://github.com/4strium/cristal-home-assistant","last_synced_at":"2025-04-15T21:16:46.446Z","repository":{"id":246899153,"uuid":"824636560","full_name":"4strium/Cristal-Home-Assistant","owner":"4strium","description":"🤖 Cristal-Home-Assistant is a fully customizable voice/home assistant adapted to the specific needs of the user, in fact I seek here to make Cristal compatible with varied APIs.","archived":false,"fork":false,"pushed_at":"2025-01-26T10:07:57.000Z","size":12664,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T21:16:38.708Z","etag":null,"topics":["arduino","cpp","esp32","home-assistant","max9814"],"latest_commit_sha":null,"homepage":"https://romainmellaza.fr/posts/diy-home-assistant/","language":"C++","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/4strium.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":"2024-07-05T15:07:13.000Z","updated_at":"2025-01-26T10:12:08.000Z","dependencies_parsed_at":"2024-08-08T16:31:04.637Z","dependency_job_id":"d9ac5609-ae68-46a0-a3f9-c9fe5ffc7734","html_url":"https://github.com/4strium/Cristal-Home-Assistant","commit_stats":null,"previous_names":["4strium/cristal-home-assistant"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4strium%2FCristal-Home-Assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4strium%2FCristal-Home-Assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4strium%2FCristal-Home-Assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4strium%2FCristal-Home-Assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4strium","download_url":"https://codeload.github.com/4strium/Cristal-Home-Assistant/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249153951,"owners_count":21221330,"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":["arduino","cpp","esp32","home-assistant","max9814"],"created_at":"2025-02-07T12:19:45.195Z","updated_at":"2025-04-15T21:16:46.424Z","avatar_url":"https://github.com/4strium.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eCristal Home Assistant\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/4strium/Cristal-Home-Assistant/blob/main/image/cover-1.png?raw=true\" alt=\"Cristal Home Assistant logo\"\u003e\n\u003c/p\u003e\n\n## Introduction \nThis personal project is based on a simple observation: nowadays there are a significant number of voice assistants coupled with numerous tools promising hyper connectivity and boosted productivity. We therefore end up getting lost in all these opaque layers processing our personal data as well as in subscriptions that are often prohibitively expensive compared to the simplicity of the tasks that we want our electronic companion to carry out.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://romainmellaza.fr/img/cristal-home-assistant/pres1.jpg\" alt=\"Cristal Home Assistant\"\u003e\n\u003c/p\u003e\n\nToday I decided to show you in the smallest details how I managed to design **Cristal** a voice assistant which can respond to all your wishes as long as you are ready to fiddle a minimum between the hardware and the software.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"30%\" src=\"https://romainmellaza.fr/img/cristal-home-assistant/pres2.jpg\" alt=\"Cristal Home Assistant\"\u003e\n\u003c/p\u003e\n\n## Project presentation\n\n[![](https://github.com/4strium/Cristal-Home-Assistant/blob/main/image/youtube-thumbnail.png?raw=true)](https://www.youtube.com/watch?v=M7OH803nQkw)\n\n## The necessary equipment\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"30%\" src=\"https://www.gotronic.fr/ori-module-nodemcu-esp32-28407.jpg\" alt=\"\"\u003e\n\u003c/p\u003e\n\n* An [ESP32](https://www.amazon.fr/esp32-wroom/s?k=esp32+wroom) will be the microcontroller of our project! We will take full advantage of its WiFi capacity but also of its integrated ADCs.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"30%\" src=\"https://www.az-delivery.de/cdn/shop/products/13-zoll-oled-i2c-128-x-64-pixel-display-kompatibel-mit-arduino-und-raspberry-pi-466478.jpg?v=1679397952\u0026width=1200\" alt=\"\"\u003e\n\u003c/p\u003e\n\n* An [OLED screen (128x64) using the SH1106 chip](https://www.az-delivery.de/en/products/1-3zoll-i2c-oled-display), it will be the main means of feedback with the user.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"30%\" src=\"https://www.electronicwings.com/storage/PlatformSection/TopicContent/452/description/MicroSD.jpg\" alt=\"\"\u003e\n\u003c/p\u003e\n\n* A [MicroSD Card Module](https://www.amazon.fr/esp32-sd/s?k=esp32+sd) as well as a microSD card with the smallest capacity you have, in fact it will be useful to us only to temporarily store the audio file recorded by the microphone as well as the secret identifiers specific to your assistant, so it only takes a few kilobytes , but if you have personal upgrades requiring storage then judge the card's capacity accordingly. **⚠️ IMPORTANT NOTE : the card must be formatted in [FAT32 format](https://support.microsoft.com/fr-fr/topic/comment-convertir-un-lecteur-en-fat32-%C3%A0-l-aide-du-convertisseur-de-lecteur-5f751b9d-60a2-01bc-4079-2f536b876cc3)**\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://www.teachwithict.com/uploads/5/5/8/2/5582303/published/hc-sr04-5v-fig-1.png?1530648040\" alt=\"\"\u003e\n\u003c/p\u003e\n\n*©TeachWithICT*\n\n* An [Ultrasonic Sensor](https://www.amazon.com/ultrasonic-sensor/s?k=ultrasonic+sensor), **HC-SR04** is the safe bet.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"30%\" src=\"https://www.az-delivery.de/cdn/shop/products/max9814-mikrofon-964239.jpg?v=1679402420\u0026width=1200\" alt=\"\"\u003e\n\u003c/p\u003e\n\n* A microphone using the i2s protocol, personally I use the [MAX9814](https://www.az-delivery.de/fr/products/max9814-mikrofon) which is widespread in the field of microelectronics in particular because it carries a high quality amplifier with automatic gain control (AGC) and low noise microphone polarization.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"30%\" src=\"https://m.media-amazon.com/images/I/614vPNmpmuL._AC_UF894,1000_QL80_.jpg\" alt=\"\"\u003e\n\u003c/p\u003e\n\n* LED's of the color you want. *(the best is that it matches the color of your case)*\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"30%\" src=\"https://m.media-amazon.com/images/I/61G3+cfJHwL._SL1000_.jpg\" alt=\"\"\u003e\n\u003c/p\u003e\n\n* A [push button](https://www.amazon.fr/s?k=push+button\u0026__mk_fr_FR=%C3%85M%C3%85%C5%BD%C3%95%C3%91\u0026ref=nb_sb_noss). \n\n## A small server\nUnfortunately, although the esp32 is a true marvel due to the extent of its capabilities, certain actions are either not possible, or possible but within a period of time which makes use uncomfortable and not smooth.\n\nThis is the case for voice recognition for example, which is therefore central to our project, which is why it is necessary to first record the audio file before transmitting it to a more powerful device so that the latter achieves recognition. But be careful by \"more powerful\" I don't mean a server with 32GB of ram and a premium CPU, no it's quite the opposite! You can either rent the smallest server configuration from a host, or use a Raspberry Pi at home.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"50%\" src=\"https://m.media-amazon.com/images/I/61K2IaK2b9L._AC_UF1000,1000_QL80_.jpg\" alt=\"\"\u003e\n\u003c/p\u003e\n\nIn my case for example, I rent a server thanks to DigitalOcean, I selected the lowest possible configuration with only 1GB of Ram and an inefficient Intel processor. But it is more than sufficient as you can see in the graphs below, in terms of the memory or processor usage percentages with actions initiated by my custom assistant.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"80%\" src=\"https://romainmellaza.fr/img/cristal-home-assistant/digital-ocean.png\" alt=\"\"\u003e\n\u003c/p\u003e\n\n*Screenshot of data measured on the server I used for this project*\n\n**If you would like to see in more detail how to set up your Linux server for the voice assistant and enable the [Google Assistant](https://assistant.google.com/intl/en_en/) SDK, [click here](https://romainmellaza.fr/posts/cristal-setup-server/).**\n\n## 3D models for those who want/can print them...\nYou can print the four parts of the project, here are the 3d files, feel free to modify them as you wish! *(namely I printed it with my Ender-3 V3 SE)*\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://romainmellaza.fr/img/cristal-home-assistant/printing-1.jpg\" alt=\"\"\u003e\n\u003c/p\u003e\n\n* [The button to activate voice recording.](https://github.com/4strium/Cristal-Home-Assistant/blob/main/models/Bouton-Cristal-AI.3mf)\n* [The head of the robot with its two antennas.](https://github.com/4strium/Cristal-Home-Assistant/blob/main/models/Head%20cristal.3mf)\n* [The body that will carry all the electronics.](https://github.com/4strium/Cristal-Home-Assistant/blob/main/models/body.3mf) \n* [The hood to make the link between the head and the body.](https://github.com/4strium/Cristal-Home-Assistant/blob/main/models/capuchon.3mf)\n\n## Wiring \n\nMake the connections follow this:\n\n### Micro SD Card Module :\n* 3.3 V\n* MISO : GPIO 19\n* CLK : GPIO 18\n* MOSI : GPIO 23\n* CS : GPIO 5\n* GND\n\n### Ultrasonic sensor :\n* VCC : 5V\n* Trig : GPIO 15\n* Echo : GPIO 2\n* GND\n\n### OLED Display :\n* VDD : 5V\n* GND\n* SCK : GPIO 22\n* SDA : GPIO 27\n\n### Blue LED'S :\n* GPIO 12\n* GND \n\n### Push Button :\n* 3.3 V\n* GPIO 4\n* GND\n\n### Microphone MAX9814 :\n* VDD : 3.3 V\n* OUT : GPIO 35 (ADC1_CHANNEL_7)\n* GND\n\n## Functionalities :\n\n* If you want to see how to display live weather on screen via I2C, [click here](https://romainmellaza.fr/posts/live-weather-i2c-screen/).\n\n* If you want to see how to display live date and time based on GPS coordinates (to get timezone) on an I2C screen, [click here](https://romainmellaza.fr/posts/date-time-i2c-screen/).\n\n* If you want to see how to display daily news on screen via I2C, [click here](https://romainmellaza.fr/posts/live-news-i2c-screen/).\n\n* If you want to see how to record sound on microSD card via MAX9814 microphone, [click here](https://romainmellaza.fr/posts/record-sound-max9814/).\n\n* If you want to see how to keep your [API](https://en.wikipedia.org/wiki/API) identifiers secret for this ultra-connected project, [click here](https://romainmellaza.fr/posts/secure-credentials-esp32/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4strium%2Fcristal-home-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4strium%2Fcristal-home-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4strium%2Fcristal-home-assistant/lists"}