{"id":20925783,"url":"https://github.com/udxs/micromate","last_synced_at":"2026-05-04T22:33:12.301Z","repository":{"id":116759714,"uuid":"143130729","full_name":"UDXS/micromate","owner":"UDXS","description":"Who needs a $200 smart display when you have a BBC Micro:bit and a Pi lying aound?","archived":false,"fork":false,"pushed_at":"2018-08-11T18:51:02.000Z","size":200,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-12T02:05:21.790Z","etag":null,"topics":["actions-on-google","dialogflow","google-assistant","microbit","nodejs","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/UDXS.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":"2018-08-01T08:59:57.000Z","updated_at":"2018-08-11T18:51:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"17f7c335-29d0-4e02-9473-7f8a44ac3ec1","html_url":"https://github.com/UDXS/micromate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/UDXS/micromate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UDXS%2Fmicromate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UDXS%2Fmicromate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UDXS%2Fmicromate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UDXS%2Fmicromate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UDXS","download_url":"https://codeload.github.com/UDXS/micromate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UDXS%2Fmicromate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267842971,"owners_count":24153133,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["actions-on-google","dialogflow","google-assistant","microbit","nodejs","raspberry-pi"],"created_at":"2024-11-18T20:34:52.192Z","updated_at":"2026-05-04T22:33:12.264Z","avatar_url":"https://github.com/UDXS.png","language":"JavaScript","funding_links":["https://www.paypal.me/udxs"],"categories":[],"sub_categories":[],"readme":"# UDXS Micro:mate\n\nWho needs a $200 smart display when you have a micro:bit and a Pi lying aound?\n\n## Setup\n---\n### 1. Installing Node\n\nFirst, we have to install NVM with this command:\n\n`curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash`\n\nThen, we must install Node and NPM through NVM:\n\n`nvm install 8`\n\nThen, we update NPM:\n\n`npm install -g npm`\n\nFinally, we have to allow Node to work with `sudo`:\n\n```bash\nn=$(which node); \\\nn=${n%/bin/node}; \\\nchmod -R 755 $n/bin/*; \\\nsudo cp -r $n/{bin,lib,share} /usr/local\n```\n\n(Credit: [DigitalOcean](https://www.digitalocean.com/community/tutorials/how-to-install-node-js-with-nvm-node-version-manager-on-a-vps#-installing-nodejs-on-a-vps). Found from [StackOverflow](https://stackoverflow.com/a/29903645).)\n\n### 2. Installing Micro:mate\n\nFirst, we need to install all dependencies to the Pi:\n```bash\nsudo apt install git bluetooth bluez libbluetooth-dev libudev-dev\n```\n\nWe then need to link `node` to the command `nodejs` for Noble to work correctly\nDo it with this command:\n```bash\nsudo ln -s /usr/bin/nodejs /usr/bin/node\n```\n\nThen, we can go ahead and get Micro:mate onto the Pi.\nWe can do that with the following commands:\n```bash\n#Download the Repo\ngit clone https://github.com/UDXS/micromate.git\n#Go into it\ncd micromate\n#Install all the dependencies from NPM\nsudo npm install\n```\nNext, we have to configure Micro:mate.\nTo do this, open up `config.json` and follow the instructions.\n[You can get an OpenWeatherMap key here.](https://openweathermap.org/appid)\nThe rest will be configured later in the Dialogflow console.\n\n### 3. Setting up the server\n\nBefore we can run anything, we need to set up Dataplicity.\nThis is done because Dialogflow expects an HTTPS connection.\nDataplicity allows us to remotely access the Pi from anywhere as well as tunnel HTTP (Port 80) traffic to a\nDataplicity URL. This tunnel also converts HTTP to HTTPS.\nThe best part is that this is all free\n(though you can pay to tunnel other ports).\n\nTo do this, go to the [Dataplicity website](https://www.dataplicity.com/)\nand sign up. Then, follow the instructions to\ncopy the code to the Pi's terminal.\nYou should then be able to view your devices.\nSelect the Pi and open the terminal.\nEnsure the sidebar is open and then enable Wormhole.\nYou should see a `dataplicity.io` link.\n\nFollow [this tutorial](https://docs.dataplicity.com/docs/superuser)\nfrom Dataplicity to get into your `pi` account\nand then [this one](https://docs.dataplicity.com/docs/run-your-scripts-in-background)\nto run the server without Dataplicity open.\n\n**Note:** You will no longer be able to run web servers on port 80\n\nAt this point, copy `node-bbc-microbit-v0.1.0.hex` to the Micro:bit.\nAfter it is done uploading, it should ask you to do the compass\ncalibration. Go ahead and complete it. \n\nIf it freezes, ensure the server isn't running yet, as it can\ncorrupt the process.\n\nAt this point, you can start the server by typing:\n```bash\nsudo node micromate.js\n```\n\n**If all goes well, you should see the text `Micro:mate` scrolling\non the Micro:bit.**\n\n\nIf it says `Test Message Sent.` but you see no message on the display, type the following command to fix it:\n```bash\nsudo hciconfig reset hci0\n```\nand then restart the server.\n\n### 3. Setting up Dialogflow\n\nAt this point, our server is running but it has no way to\nreceive and process commands. To do this, we need to set up\nDialogflow.\n\nFirst, you need to go to [the Dialogflow website](https://dialogflow.com/)\nand sign in with your Google Account by clicking\n`Go To Console`. Once you logged in, you will likely\nbe given a tutorial and shown around the console.\nIt will give you a demo agent where you are free\nto poke around and understand how Dialogflow works.\n\nClick on the list below the Dialogflow logo where\nit shows the current project name and select `Create New Agent`.\n\nName it `Micro:mate` and select your time zone. Then, click create. You should be brought into an empty project. Again at the top-left, click on the gear icon next to your project.\n\nThen, click on `Export and Import`. Here, select `Restore From ZIP`. Select `Micromate.zip` from the `micromate` folder.\n\nAt this stage, we have to configure the default city for weather.\nSelect `Intents` in the sidebar and click on `Show Weather`.\nScroll down to `Action and parameters` and where it shows the\n`location` parameter, select `⋮`. Then, click on `Default Value`.\nHere, you can type in your city of residence.\n\nWhen you are done, click `Save` at the top right.\n\nNext, we must tell Dialogflow to use our server.\nTo do this, click on `Fulfillment` on the sidebar.\nWhere it says URL, type\n`\u003cYOUR DATAPLICITY URL\u003e.dataplicity.io/action`\nreplacing it with your unique URL.\n**Make sure you have `/action` at the end.**\nThen, scroll down to the very bottom and click `Save`.\n\n### 4. Talking to the Google Assistant\n\nNext, we need to allow Dialogflow to work with the Google Assistant.\nStart by clicking `Integrations` on the sidebar.\nThen, click on Google Assistant. Here, we have settings\nfor the Assistant. Everything should already be set up.\nAll you have to do is scroll down to `Auto-preview changes`\nand enable it. Then, click `Test` at the bottom\nof the dialog box.\n\nAt this point, you should be in the simulator but\nit isn't properly set up yet.\n\nFirst, go to `Invocation` on the sidebar and give it a name. Unfortunately, you cannot name it `Micro mate` like I did.\n Then, if you'd like, you can change the voice.\nWhen done, click `Save`.\n\nThen, go back to the `Simulator` and test it by saying `Talk to \u003cName\u003e` and then one of the intent phrases such as `Show the weather` and see if it works. Also try doing the shorthand commands. These look like `Ask \u003cName\u003e to show the time`.\n\nIf these commands work and show up on your Pi\nand on your Micro:bit, that means it is working correctly.\n\nBefore we can deploy the app to a phone, we need to fill in\nthe correct info. Go to the `Overview` page on the sidebar\nand see what it needs you to do. If it asks for a logo, I\nrecommend the Micro:bit logo.\n\nWhen this is all done, go to the `Release` page in the sidebar\nand click `Submit For Alpha`. This may take a while to work.\nOnce it does work, though, and it shows the release as `Deployed`,\nclick on `Manage Alpha Testers`. Copy the Opt-in link to your phone and, when asked where to open it, select Google Assistant.\nIt should then be added. You should be able to use any command\nyou want like you did in the simulator.\n\nYou can see all the possible commands by looking at\nthe list of intents in Dialogflow.\n\n## Thanks for following this tutorial! \n**If you liked it, please consider [donating!](https://www.paypal.me/udxs)** I'm on twitter as [@UDXSDavid](https://twitter.com/UDXSDavid). Also check out my site [UDXS.me](https://udxs.me/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudxs%2Fmicromate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fudxs%2Fmicromate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudxs%2Fmicromate/lists"}