Giter Site home page Giter Site logo

apilipis / project-oasis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlecreativelab/project-oasis

0.0 0.0 0.0 17 KB

A voice controlled terrarium that recreates outside weather inside a box

Home Page: https://experiments.withgoogle.com/voice/project-oasis

License: Apache License 2.0

C++ 20.27% JavaScript 79.73%

project-oasis's Introduction

Project Oasis

Project Oasis is a voice controlled terrarium that recreates outside weather inside a box. You can talk to it to ask about weather or ask it to create certain conditions. It currently recreates rain, clouds and lighting in a self sufficient closed and living ecosystem.

Overview

This project comprises of three modules: 1) Dialogflow functions, 2) Cloud PubSub NodeJS listener, and 3) Arduino sketch

We use Google's Dialogflow to parse natural language for the required parameters of city, location or action. User's voice input are mapped to actions or functions exported in the Dialogflow fulfillment.

These functions use openweathermap api to extract information about clouds, rain, light conditions at a particular location. The result JSON is passed onto the terrarium using Google's Cloud PubSub - a realtime notification system. PubSub messages then trigger appropriate components within the terrarium.

Hardware

We run the Cloud PubSub nodejs client in a Raspberry Pi 3. An arduino is connected over USB with RPi. On receiving PubSub messages, the nodejs client sends serial codes to an arduino.

The Arduino has been programmed through a sketch to receive these serial codes and trigger corresponding relays on/off.

Raspberry Pi 3 -> Arduino (USB Serial) | | | | | Mist Rain Lights [5V Ceramic [5-12V Peristaltic [5V LED lights] Resonators] Pump]

Before you start

** DialogFlow / Actions on Google ** Follow the steps here to create a Dialogflow agent. We use a welcome intent that allows the user to start talking to the terrarium. There are additional intents for the user to enquire about the weather at certain location, time (e.g: 'show me the weather in seattle') or invoke an explicit action (e.g: 'make it rain')

You will need to deploy your cloud functions which are mapped to user's actions. -> Follow the instructions [here] (https://dialogflow.com/docs/how-tos/getting-started-fulfillment) to enable the cloud functions for firebase. -> Steps to deploy the functions from CLI are under Deploy Your Functions with the Firebase CLI on the same link

Specific instructions for terrariumDialogflow agent are here.

** Cloud PubSub ** Setup a Cloud PubSub project as in this link

Follow the steps to create a topic. We created a Topic named 'Weather' in our project, to which we added our subscriptions. We only use pull subscriptions in this project. The subscription was terrarium was named as weather-detail

Note the project id for this project as it'll come in handy to run the listener client later.

** Openweather API ** Get your API key from openweathermap.org Add this key in the cloud functions so that those functions can ping the weather servers when the user asks for specific info.

** Install NodeJS ** Install NodeJS on your RPi

How to run these modules

** Dialogflow Cloud function deployment ** Navigate to the directory of your functions and the run the following in order npm install firebase login firebase init

And finally run firebase deploy to deploy your functions

The deployed functions' link becomes the webhook URL for Dialogflow.

** Cloud PubSub ** Naivgate to the directory of the subscription.js & package.json file and run npm install to install the dependencies. When you're ready, run node subscritpions.js listen-messages weather-detail where weather-detail is the subscription you created from a previous step.

** Google Home / AIY Voice Kit test deployment ** Your can either use a Google Home or an AIY Voice Kit to interact with the terrarium. We included an AIY Voice Kit on top of Raspberry Pi 3 so as to interact with the terrarium directly as well.

Follow the instructions here to test and deploy your app on Google Home. You can then use a Google Home associated with your associated account by talking to it to trigger the terrarium and asking it about the weather

Build your own terrarium

You can also build your own terrarium. Detailed instructions of fabrication and electronics are here.

Contributors

Made by Harpreet Sareen and friends at the Google Creative Lab.

This project follows Google's Open Source Community Guidelines.

Note: This is not an officially supported Google product

project-oasis's People

Contributors

mrayinteractive avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.