Peter Rukavina's Podcast

Making a Siri Shortcut to tell me how much electricity we're generating from the wind

Informações:

Synopsis

Shortcuts are a delightfully powerful set of digital Lego blocks for iOS, a modern day HyperCard, in a way. This guide from Apple to creating Siri Shortcuts using web APIs prompted me to try creating one for myself, a Shortcut to retrieve the percentage of PEI’s electricity load generated from the wind. As a starting place, I used this wind energy API endpoint, the same endpoint that my PEI Electricity web app uses. It returns real time data about wind energy load and generation on Prince Edward Island, like this: {   "current": {     "updatetime": "2020-11-05 12:59:00",     "uptimetimehuman": "Thursday at 12:59 PM",     "on-island-load": "202.86",     "on-island-wind": "163.86",     "on-island-fossil": "0.00",     "wind-local": "77.98",     "wind-export": "85.88",     "percentage-wind": "80.77"   },   "previous": {     "updatetime": "2020-11-05 12:44:00",     "uptimetimehuman": "Thursday at 12:44 PM",     "on-island-load": "202.80",     "on-island-wind": "164.65",     "on-island-fossil": "0.00",     "wind