Compartilhar via


Wind Alerts on Microsoft Band

WP_20160122_20_26_40_Pro_LI (2)

The Microsoft Band SDK gives developers access to the sensors available on the band, as well as the ability to create and send notifications to tiles.

A simpler method with no development involved is the Microsoft Band Web Tiles. These allow developers to deliver information to the Microsoft Band from virtually any data source on the web.

To experiment with this, I decided to explore some of the data that I keep a watch on. Being an avid windsurfer, I tend to check wind speeds on Lake Washington pretty frequently. The easiest way to access the data was through the Weather Underground API and use Web Tiles to deliver the data to the Microsoft Band.

The source of the data that I was looking for was from my most frequent launch site: Sail Sand Point in Magnuson Park. It has a weather station that I frequently monitor: KWASEATT232. You can view the data at https://www.wunderground.com/personal-weather-station/dashboard?ID=KWASEATT232#history

image

To access the data, I used the Weather Underground API: https://www.wunderground.com/weather/api

This is the API that I used for querying the weather station in Magnuson Park: https://api.wunderground.com/api/\<YOUR_KEY>/conditions/q/pws:KWASEATT232.json

I then used the 5-step authoring tool to design the web tile: https://developer.microsoftband.com/WebTile

image

I used the Single Page Tile option. In the next screen, input the URL for the JSON query.

image

This will return the XML response from the query:

image

Drag and drop the data you want to display from your data tree to a space on your new tile. I used Wind Speed, Gust and Direction as the data to display. You can also type in additional static text in the field.

image

You can send a notification to your web tile by setting up a condition. Click plus (+) to add a notification to your web tile.

image 

I wanted the notifications to be sent if the wind speed exceeded 15mph, so I dragged in the Windspeed to my conditions field and set it up for > 15.

image

You are almost done. At this point all you need to do is add a title, description and icon for your web tile:

image

The final step is to follow the instructions to set it up on your Microsoft Band:

  1. Download Microsoft Band web tile package below and either:
    • Send it to your phone as email attachment
    • Save it in your cloud share (such as OneDrive)
    • Host it in your own cloud server and create a URL with custom URL scheme (mshealth-webtile)
  2. On your phone:
    • Directly open the attached Microsoft Band tile package from your email
    • Directly open the saved Microsoft Band tile package from cloud share app (if available)
    • Click on Microsoft Band web tile link that you've created
  3. The Microsoft Health mobile app will launch with further instructions

This opens up several possibilities of sending alerts to your Microsoft Band. From a Retail Industry perspective I can think of several things like alerts & monitoring for:

  • Out of Stock
  • On Shelf Availability
  • Pick Up Order for Click & Collect
  • I would love to hear about your ideas for the Microsoft Band