{"id":20348564,"url":"https://github.com/UlisesGascon/POC-johnny-five-firebase-realtime","last_synced_at":"2025-05-08T04:31:14.116Z","repository":{"id":173339265,"uuid":"650481477","full_name":"UlisesGascon/POC-johnny-five-firebase-realtime","owner":"UlisesGascon","description":"Proof of Concept - how to use Firebase Realtime Database with Johnny-five","archived":false,"fork":false,"pushed_at":"2023-06-07T16:27:27.000Z","size":16492,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T11:56:20.395Z","etag":null,"topics":["arduino","iot","johnny-five","nodejs","realtime","realtime-database"],"latest_commit_sha":null,"homepage":"https://poc-j5-firebase-realtime.web.app/","language":"HTML","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/UlisesGascon.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":"2023-06-07T06:57:09.000Z","updated_at":"2023-07-18T09:30:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8b54eb2-f0e4-4419-a045-aa794892eb81","html_url":"https://github.com/UlisesGascon/POC-johnny-five-firebase-realtime","commit_stats":null,"previous_names":["ulisesgascon/poc-johnny-five-firebase-realtime"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UlisesGascon%2FPOC-johnny-five-firebase-realtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UlisesGascon%2FPOC-johnny-five-firebase-realtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UlisesGascon%2FPOC-johnny-five-firebase-realtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UlisesGascon%2FPOC-johnny-five-firebase-realtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UlisesGascon","download_url":"https://codeload.github.com/UlisesGascon/POC-johnny-five-firebase-realtime/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252999438,"owners_count":21838214,"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","iot","johnny-five","nodejs","realtime","realtime-database"],"created_at":"2024-11-14T22:21:09.455Z","updated_at":"2025-05-08T04:31:12.997Z","avatar_url":"https://github.com/UlisesGascon.png","language":"HTML","funding_links":[],"categories":["Internet Of Things"],"sub_categories":[],"readme":"# POC - Johnny Five with Firebase Realtime DB\n\nProof of Concept - how to use Firebase Realtime Database with Johnny-five\n\n### 🔮 About\n\nThis project is a proof of concept that demonstrates the potential of Firebase Realtime Database as a communication channel between a device and the cloud. It is based on the [Johnny-five](http://johnny-five.io/) library, which is a framework that enables hardware control using JavaScript.\n\nThe main goal of this POC is to showcase the use of Firebase Realtime Database and Firebase Hosting as an alternative to more complex solutions available in the market. It is a simple and extensible out-of-the-box architecture that allows you to control any device with low resources or in a very isolated environment. With the support of the Firebase Cloud, you can provide high-quality dashboards to manage the device(s).\n\n\n### 📺 Tutorial\n\n_soon_\n\n\n### :shipit: Architecture\n\n![Architecture diagram](.github/__other__/diagram.png)\n\nThe hardware device is connected to the host machine via USB. The host machine runs a Node.js application that uses the Johnny-five library to control the device. The Node.js application is also connected to the Firebase Realtime Database and pushes changes to the database.\n\nThe website is connected to the Firebase Realtime Database and listens to changes in the database. When the website receives a new value, it updates the UI accordingly.\n\nThe website is hosted on Firebase Hosting and is available to the public.\n\n### 🤖 Hardware\n\nIn this example, I am using the [Edubasica Shield](https://edubasica.github.io/) and Arduino Uno, but any board compatible with Johnny-five and any other shield that provides a potentiometer can be used.\n\nFor more information on compatible potentiometers, please refer to the [Johnny-five documentation](http://johnny-five.io/examples/potentiometer/).\n\nIn this example, I am using the potentiometer located in the `A0` pin.\n\n\n![I am manipulating the potentiometer in the Shield](.github/__other__/potentiometer_in_action.gif)\n\n### 🌎 Website\n\nThe website is hosted on Firebase Hosting, and it is a simple dashboard that allows you to control the potentiometer remotely. The dashboard is subscribed to the Firebase Realtime Database, and it is updated in real-time when the potentiometer is triggered.\n\n![Simple dashboard with a single card that is showing the potentiometer value (range from 0 to 1024)](.github/__other__/potentiometer_ui.gif)\n\n\nThe website is built using simple and plain JavaScript, HTML, and CSS in order to avoid any learning curve.\n\n### 📡 Usage\n\nThis project is a proof of concept and is not intended for production use. It is not recommended to expose the Firebase Realtime Database to the public. In this example, the database is partially open to the public for demonstration purposes.\n\nTo run this project in your local environment, follow these steps:\n1. Create a Firebase project from scratch, including credentials, with database and hosting enabled.\n2. Copy the following files: `./package*.json`, `./arduino.js`.\n3. Add the database credentials to `./serviceAccountKey.json`.\n4. Use the correct Node.js version (`nvm use`).\n5. Run `npm install`.\n6. Connect the hardware device to your machine.\n7. Run `npm start:arduino`.\n8. Open the file `public/index.html` in your browser or use any other Live Server extension or similar.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUlisesGascon%2FPOC-johnny-five-firebase-realtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUlisesGascon%2FPOC-johnny-five-firebase-realtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUlisesGascon%2FPOC-johnny-five-firebase-realtime/lists"}