Skip to content

SmartThings Integration for Ambient Weather Station

License

Notifications You must be signed in to change notification settings

wkhenon/st-ambient-weather

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartThings SmartApp - Ambient Weather Statioin Integration

The purpose of this repo is to provide an updated implementation for accessing data from your local Ambient Weather Station (AWS) on the SmartThings platform. This was done in the past using a SmartThings SmartApp that was built with groovy, but that has since been deprecated. SmartThings now utilizes a Node.js SDK for developing SmartApps for their platform

Preliminary Research

Node.js Server - Simple App Set-up

  • The scope of this project will initially be local testing so Node.js, ngrok, and npm will be needed as dependencies
    sudo apt install nodejs npm
    snap install ngrok
    
  • server.js: This is where the SmartApp will be created for the platform; for now it just starts a simple app with the Express framework.
    • The ambient-weather-api/ambient-api and SmartThings SmartApp Node.js SDK will need to be imported in.
  • Run the server: node server.js
  • The app can be exposed to a public URL using ngrok: ngrok http 3000
    • A ngrok account is needed for this step (it's free!)
    • The app needs to be running for public URL access through ngrok

SmartThings SmartApp Creation

  • Following the steps provided in Create a SmartApp.

  • Need to have the app running with the public URL

  • SmartThings Developer Workspace -> Create a New Project -> Automation for the SmartThings App

  • Project Name: "Ambient Weather"

  • Select "Register App" -> Webhook Endpoint

  • There is a requirement by the SmartThings SmartApp to handle a confirmation request from SmartThings by issuing a HTTP GET request to confirmationURL:

  • The current implemenation for the SmartApp is returning a 404 whenever SmartThings attempts to verify it with this request:

  • This is due to how barebones the implementation is now, but it lets us know that we're in a position to start developing the actual implementation for the SmartApp!

Project Log

  • Repo Refactor: update readme, move unsupported to new smartthings folder
  • Added readme to unsupported directory
  • Initial Simple App set-up with local server for testing/development
  • SmartThings SmartApp creation on the Developer Workspace
  • ambient-api Integration: locally serve weather data at the endpoint

Potential Setbacks

  • ambientweather.net fails to load at points
  • glitch.com fails to load at points
  • Web-hosting fees depending on the size/service calls of the SmartApp
  • ngrok generates a random URL everytime the server is started; this could potentially be fixed by following these steps.

About

SmartThings Integration for Ambient Weather Station

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Groovy 99.9%
  • JavaScript 0.1%