Code Monkey home page Code Monkey logo

stambientweather's Introduction

Ambient Weather® Station™

SmartThings® Integration for Ambient Weather® Stations by SanderSoft™

Version: 6.0.0

Change-log & Version Release Features

This app is Unsupported by the devloper who now uses Hubitat. The new SmartThings mobile client and platform is unreliable and buggy.


*:new: Updated Device Tile Handlers (DTH) to support the new ST Mobile Client! *

  • Displays temperature and refresh on the Dashboard tile.

  • Displays a limited number of standard capabilities in the detailed view.

    • Temperature Measurement
    • Relative Humidity Measurement
    • Illuminance Measurement
    • Water Sensor
    • Ultraviolet Index
    • Sensor
    • Refresh
    • Battery
    • Wind Motion Sensor (Active = Wind Speed > 0)
    • Wind Speed 'Psuedo' Capabilities for display in 3rd party applications
      • "Power Meter" (Wind Speed)
      • "Energy Meter" (Wind Speed)
  • WebCore, ActionTiles and/or Sharptools is highly recommended to view and act on Weather Station sensor events & values.

Main and Detail Tiles:

Description:

A custom SmartThings® SmartApp and Device Handlers (DTH) which provides a connection to the weather data generated from your personal Ambient Weather® station.

This SmartThings® application provides access to your Ambientweather.net weather data via the AmbientWeather API. The user can set the SmartThings Tile update/refresh rate of their weather data from either a manual or automatic refresh cycle (1 min to 180 mins (3 hours)).

Weather Station Tile and Details View

Multiple Ambient Weather® Station Instances of Independent Operating Nodes

Allows for multiple Ambient Weather® system models or geolocation instances

Screenshots of Device Attributes

Ambient Weather® Station Console

Remote Ambient Weather® Station

Ambient Weather® Station with Particle Monitor PM25

Weather Event SMS Alerts

Select the following events to send Weather SMS Text Alerts for user defined values:

  • Outside Low Temperature¹
  • Outside High Temperature¹
  • Rain Detected¹
  • Severe Weather (TWC® Alerts for Zipcode or lat/long coordinates)

¹Alerts are hidden if the installed weather station does not provide a value.

Weather SMS Alerts are sent per user preferences for once every {1,2,4,6,12,24} hours. 

Weather Event Pushover™ Alerts

Pushover™ makes it easy to get real-time notifications on your Android, iPhone, iPad, and Desktop (Android Wear and Apple Watch). The Pushover™ service allows one to receive application messages anywhere without using SMS which SmartThings is beginning to limit.

If you have a Pushover™ account, you can enter your user key and application token in the Ambient Weather Station user preferences for Weather Notifications and receive highlighted messages as below:

Filtering/Suppressing Selected Weather Alerts

One can filter/suppress selected Weather Alerts from the Ambient Weather Station's preferences options menu by selecting one or more of the listed Nation Weather Services' Product Identifiers. The default option (nothing selected) allows all Weather Alerts to be reported for the Zipcode or lat/long coordinates entered.

Requirements:

YOU DO NOT NEED AN AMBIENT DEVELOPERS APP KEY

  • Your Ambient Weather® Station API Key (Required)
    • An Ambient Weather® Station API Key CAN BE SELF GENERATED FROM YOUR AMBIENT DASHBOARD ACCOUNT VIEW. The API key is used to securely connect this SmartThings application to your personal Ambient Weather® station data. Just locate your Ambient API key from your Ambient Weather® station account.

Enter your Ambient API key in the ST IDE Editor for the SmartApp in the Settings section.



  1. A personal Ambient Weather® Station which connects to the Ambient Weather® Network: (e.g., Model 2902A for example) and optionally up to 99 Ambient remote temperature/hydro sensor(s).
  2. Complete all AWS location information for your weather station.


  3. SmartThings Hub
  4. Supported mobile device with ST Legacy Client. This app will not work in the new Samsung SmartThings App.
  5. A working knowledge of the SmartThings IDE

Installation & Configuration

GitHub Repository Integration

Create a new SmartThings Repository entry in your SmartThings IDE under 'Settings' with the following values:

Owner Name Branch
kurtsanders STAmbientWeather master

Required Files in your SmartThings IDE Repository These files below are required for this version to operate. You will need to Update from Repo

IDE Repository Filename Status Version
My SmartApps kurtsanders : Ambient Weather Station 🆕 Updated 5.03
My Device Handler kurtsanders : Ambient Particulate Monitor Unchanged 4.21
My Device Handler kurtsanders : Ambient Weather Station Unchanged 4.21
My Device Handler kurtsanders : SmartWeather Tile Station Unchanged 4.21
My Device Handler kurtsanders : Ambient Weather Station Remote Sensor Unchanged 4.21
  • It is strongly recommended that all previous versions/files of Ambient Weather Station be removed from your ST IDE and only the V4 files from the above table are listed in your SmartThings IDE.
  • Note: V3 cannot be updated to V4 due to the extensive re-coding to accomodate multiple instances of Ambient Weather® Station nodes and SMS alerts. A fresh/clean install of Ambient Weather Station is only supported.

Instructions

  1. Using the 'Update from REPO' button in the 'My SmartApps' SmartThings IDE, check the 'Ambient Weather Station' SmartApp and publish & press Save.
  2. Using the 'Update from REPO' button in the "My Device Handlers" SmartThings IDE, check all three Ambient Weather DTH's listed above. (See GitHub IDE integration) from this STAmbientWeather(master) repository to your SmartThings IDE.
  3. Required Next Step before setup on mobile client: You must edit the newly added 'Ambient Weather Station' SmartApp in the IDE SmartApps browser Tab 'App Settings' and enter your apiString (Your Ambient API Key). Update/Save your changes. Known Issue: If you receive an error "Unauthorized" message trying to save/update the settings page for your API key, you might need to use the Incognito mode of Chrome or private settings of your browser to update this page.
  4. Locate the Ambient Weather Station app in the MarketPlace/SmartApps/My Apps list and click to launch the smartapp.

  1. Update the following fields from Ambient Weather Station Preferences

  • Preferences
    • Zipcode or lat/long coordinates for Weather Forecast Info
    • Run Weather Station Refresh ('0' is 'Off/Manual Refresh')
    • (# mins for the APP to update weather values from your weather station)
    • Select Solar Radiation Units of Measure
    • Weather Alerts/Notifications >
    • Base Prefix Name
    • This SmartApp's Name (Used to name this App Instance in your Automation List)
    • IDE Logging (Optional)
      • debugVerbose
      • infoVerbose bool
      • Weather Underground API Calls
  1. If you have Ambient remote temperature/hydro sensors attached to your Ambient Weather® network station, you will be presented with a "remote sensor" screen in which you must provide a short descriptive name for each using only alpha or numeric characters. The remote sensors will be numbered on the screen according to their dip switch setting.
  2. Display the new SmartThings Tile in your ST Mobile Client
  3. It is recommended that one create a ST Room to organize the created weather devices.
  4. Add the created weather devices to WebCore and any other smartApps to create weather related events.
  5. Important: Please verify and deactivate in SmartThings Smart Home Monitor (SHM) the use of the wildcard settings, "All Leak Detectors and All Motion Sensors' for SHM actions. Ambient Weather Station SmartAPP uses 'Leak Detection' sensor and 'Motion' sensor for Rain and Wind respectively. If you use the wildcard settings, you may get unexpected results for SHM when rain or wind is detected.

ActionTiles™ and STAmbientWeather

Ambient Weather® Station ActionTiles™ Integration

ActionTiles™



Ambient Weather Station ActionTiles™ Integration

  1. A STAmbientWeather APP preference option is available to "Create a SmartWeather Station Tile for use as an Ambient Weather® ActionTiles™ Weather Tile?".
  • When this new preference option is set to 'ON', and after SAVING from the APP, a local "special use" version of the SmartWeather Station Tile child device will be created with the title "Ambient SmartWeather Station". It will only receive the required weather data fields from the Ambient Weather Station at the same update frequency as the STAmbientWeather APP refresh setting.
  • Please refer to the instructions on ActionTiles™ website on how to create a SmartWeather Station Weather Tile on your dashboard.
  • If one has already installed the SmartThings namespace SmartWeather Tile Station installed and reporting their local weather, the child device created by STAmbientWeather will not impact that existing device.
  • If one does not have SmartThings namespace SmartWeather Station Tile, you may choose to install and configure it separately so that your ActionTiles™ dashboard has both Ambient and local weather.
  • Do not modify the kurtsanders namespace SmartWeather Station Tile DTH or device as it is pre-configured to work only with STAmbientWeather.

Ambient Special Attributes

  • Only a subset of Ambient weather attributes can be viewed from ActionTiles™. Per ActionTiles™ website, ActionTiles™ only supports Things that are fully compliant with a standard Capability (device type abstraction) as defined by SmartThings Capabilities.
  • SmartThings publishes a partial list of "WWST" (Works with SmartThings) Certified Devices but not all of those are compatible with ActionTiles, because some of them claim a "Capability" that ActionTiles™ has not built a Tile Type for.
  • Units of measure on ActionTiles™ cannot be modified

  • One will need to edit the tile settings each of the three ActionTiles™ title headers to show decimals and custom labels as shown below.

Ambient Weather Station ➡️ ActionTiles™

ActionTiles™ Thing ☑️ Ambient Weather® Attribute Show Decimals Recommended Custom Label
Energy Max Daily Gust, mph ☑️ Wind Gust Daily Max
Power Wind Speed, mph ☑️ Wind Speed
Illuminance Measurement Solar Radiation, lux, fc or w/m² Light
Motion Sensor¹ windspeedmph > 1 = active Wind State
Relative Humidity Measurement Outside Relative Humidity, % Humidity
Temperature Measurement Outside Temperature, °F ☑️ Temperature
Ultraviolet Index Ultraviolet Index, uv UVI
Water Sensor¹ hourlyrainin > 0 = wet Rain Detected

¹ It is STRONGLY recommended that one specifically designate the "motion sensors" and/or “leak detectors” in one’s Smart Home Alarm app to be notified rather than use the “Use every Motion or Moisture sensor” to avoid false alarms fro your Ambient Weather Station which uses these standard capabilities for weather conditions.

ActionTiles™ Things Panel

WebCore

Tiles Dashboard

You can import this WebCore piston template into your WebCore using the backup code: 6dj8. Remember to:

  1. Change the name to your SmartThings weather station name.
  2. Use ‘Tiles’ mode in the webCore browser settings for categories to display this piston as tiles!

Reporting Historical Rainfall

Here is a WebCore piston that will collect one's daily reported rainfall Ambient Weather Station Increment Rainfall over a defined period of days. You can create a new Webcore piston with the backup code of '825p'. When installed and configured successfully, the piston will execute each day after midnight to update a global WebCore variable of the rainfall in inches for n days.

Requirements:

Optional

Configuration

  1. Create a new WebCore Piston from the backup code '07ye'

  2. Enter your AWS macAddress, apiKey string and AWS applicationKey into the predefined local WebCore variables at the top of the WebCore piston.

    • I have chosen to create new global variables in this shared public piston to store these same AWS private data keys, but you can choose to enter your private strings directly into the WebCore local variables as well depending on your personal preference.
  3. Enter an integer for the number of days to summarize your AWS daily rainfall, ie '7' for 7 days from yesterday.

  4. Create a new WebCore global variable named '@AWSrainfall' with a data type of either decimal or dynamic.

    • This global variable will report the number of inches of rainfall over the defined number of days. One can use this same global variable in another WebCore piston (that you can create) that can read and act on this data to subsequently automate a routine or devices, like an irrigation system, echo speaks audio reminder, SMS message, etc.
  5. Test the WebCore piston and verify that the piston's state message is successfully updated with the text message, as exampled below:

    Piston state: Total rainfall is X.X inches over the last Y days at {datetime stamp}

Public WebCore Piston Image

Capabilities, Attributes & Commands

The following device capabilities, attributes and commands are available for your own subscriptions from WebCore(tm) or a custom smartApp.

    capability "Illuminance Measurement"
    capability "Temperature Measurement"
    capability "Relative Humidity Measurement"
    capability "Sensor"
    capability "Refresh"
    capability "Water Sensor"
    capability "Ultraviolet Index"
    capability "Battery"

    // Wind Motion Detection
    capability "Motion Sensor"
    // Wind Speed Psuedo Capability
    capability "Power Meter"
    capability "Energy Meter"

    // Start of Ambient Weather API Rest MAP
    // Actual numeric values from Ambient Weather API non rounded"
    attribute "windspeedmph_real", "number"
    attribute "windgustmph_real", "number"
    attribute "maxdailygust_real", "number"
    attribute "tempf_real", "number"
    attribute "hourlyrainin_real", "number"
    attribute "eventrainin_real", "number"
    attribute "dailyrainin_real", "number"
    attribute "weeklyrainin_real", "number"
    attribute "monthlyrainin_real", "number"
    attribute "totalrainin_real", "number"
    attribute "baromrelin_real", "number"
    attribute "baromabsin_real", "number"
    attribute "humidity_real", "number"
    attribute "tempinf_real", "number"
    attribute "humidityin_real", "number"
    attribute "solarradiation_real", "number"
    attribute "feelsLike_real", "number"
    attribute "dewPoint_real", "number"

	// Numeric values from Ambient API are rounded to 0.1 if 0 < X < 0.1 
	// because SmartThings Tiles cannot display values 
	// less than 0.1 and greater than zero
    attribute "baromabsin", "string"
    attribute "baromrelin", "string"
    attribute "city", "string"
    attribute "dailyrainin", "string"
    attribute "date", "string"
    attribute "dateutc", "string"
    attribute "dewPoint", "string"
    attribute "dewpoint", "string"
    attribute "eventrainin", "string"
    attribute "feelsLike", "string"
    attribute "feelslike", "string"
    attribute "hourlyrainin", "string"
    attribute "humidity", "string"
    attribute "humidityin", "string"
    attribute "lastRain", "string"
    attribute "location", "string"
    attribute "lastRainDuration", "string"
    attribute "macAddress", "string"
    attribute "maxdailygust", "string"
    attribute "monthlyrainin", "string"
    attribute "pwsName", "string"
    attribute "solarradiation", "string"
    attribute "temperature", "string"
    attribute "tempinf", "string"
    attribute "totalrainin", "string"
    attribute "weeklyrainin", "string"
    attribute "winddir", "string"
    attribute "winddirection", "string"
    attribute "windgustmph", "string"
    attribute "windspeedmph", "string"
    attribute "ultravioletIndexDisplay", "string"
    // End of Ambient Weather API Rest MAP

    // Weather Forecast & Misc attributes
    attribute "moonAge", "number"
    attribute "rainForecast", "string"
    attribute "windPhrase", "string"
    attribute "lastSTupdate", "string"
    attribute "localSunrise", "string"
    attribute "localSunset", "string"
    attribute "weatherIcon", "string"
    attribute "secondaryControl", "string"
    attribute "forecastIcon", "string"
    attribute "scheduleFreqMin", "string"
    attribute "sunriseDate", "string"
    attribute "sunsetDate", "string"
    attribute "alertDescription", "string"
    attribute "alertMessage", "string"
    attribute "version", "string"
    attribute "date", "string"

    command "refresh"

Known Issues

  1. As of release 4.10, the 'Units of Measure' for Temperature, Wind, Rain and Barometric values shown on the DTH are set from the Ambient Weather Station SmartApp and NOT your Ambient Dashboard Unit Settings. If you have not re-run the Ambient Weather Station SmartApp setup when migrating to release 4.10 or higher, the units of measure will be set from your SmartThings hub's location Temperature Setting as either all imperial (F) or all metric (C).
  2. Setting this application's Refresh rate to 1 minute may cause an occasional ST console debug log "excessive http requests" debug error from ST. ST rate limits their external http calls to avoid blacklisting. The application will re-send the Ambient Weather® API http request when it encounters a ST rate limiting error.
  3. SmartThings devices force a 'round down' on ALL displayed numeric values in the devices' Tile less than 0.1 to GT 0. Therefore, when an Ambient sensor reports a sensor that is below 0.1 and GT 0, this app will round the numeric value up to .1. To get at the unrounded values, please use the attribute names with a suffix of '_real'.
  4. Only enter +-NNNNN.NNNN,+-NNNNN.NNNN for latitude and longitude coordinates. Do not enter a degree symbol or spaces for latitude,longitude coordinates in the Zipcode field.

Previous Old/Legacy Versions

(Available in Releases and 'Depreciated Versions' GitHub Branch)

- V3 Depreciated 3/5/2019 
- V2 Depreciated 12/01/2018 
- V1 Depreciated 06/01/2018

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.