Giter Club home page Giter Club logo

sunrise-arduino-iot-cloud's Introduction

sunrise-arduino-iot-cloud

About

Sends sunrise, sunset and air quality data for Seattle WA to Arduino IoT Cloud.

An Arduino can then grab this information from IoT Cloud and display it.

Learn more about this project (and corresponding Arduino sketch) on my blog at Regional Air Quality with Arduino Explore IoT Kit.

Server hosted on Heroku at https://sunrise-arduino-iot-cloud.herokuapp.com

Where does the data come from?

Example output

Example output from src/send.js script:

Example output from send.js script

Heroku Setup

Setup heroku CLI on MacOS via brew tap heroku/brew && brew install heroku.

heroku login

Clone repo then run heroku git:remote -a sunrise-arduino-iot-cloud to setup remote to Heroku for deploying.

Running Locally

Create a local .env file by copying .envSAMPLE and then updating all the env vars.

heroku local        # runs local server and loads .env vars

Run command that pushes data to Arduino IoT Cloud:

heroku local:run npm run send-sunrise

Heroku Setup

Add your config:

heroku config:edit

Then add:

CLIENT_ID=Arduino_IoT_ClientID_goes_here
CLIENT_SECRET=Arduino_IoT_ClientSecret_goes_here
DEVICE_ID=Arduino_IoT_DeviceID_goes_here
THING_ID=Arduino_IoT_ThingID_goes_here
SUNRISE_PROPERTY_ID=property_id_goes_here
SUNSET_PROPERTY_ID=property_id_goes_here
OZONE_PROPERTY_ID=property_id_goes_here
PM25_PROPERTY_ID=property_id_goes_here
UPDATED_PROPERTY_ID=property_id_goes_here
AIRNOW_API_KEY=key_from_https://docs.airnowapi.org

Test sending data from server via:

heroku run npm run send-sunrise

Useful Heroku commands

heroku logs --tail

sunrise-arduino-iot-cloud's People

Contributors

briangershon avatar

Stargazers

 avatar

Watchers

 avatar  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.