UNPKG

@danimal4326/homebridge-weather-plus

Version:

A comprehensive weather plugin for homekit with current observations, forecasts and history.

527 lines (526 loc) 17.9 kB
{ "pluginAlias": "WeatherPlus", "pluginType": "platform", "singular": true, "headerDisplay": "Find the full documentation and report bugs [here](https://github.com/naofireblade/homebridge-weather-plus).", "schema": { "units": { "type": "string", "default": "si", "required": true, "oneOf": [ { "title": "Imperial", "const": "us" }, { "title": "Metric (m/s)", "const": "si" }, { "title": "Metric (m/s + mmhg)", "const": "sitorr" }, { "title": "Metric (km/h)", "const": "ca" }, { "title": "Metric (mph)", "const": "uk" } ] }, "interval": { "type": "integer", "default": 5, "minimum": 1 }, "stations": { "type": "array", "items": { "type": "object", "properties": { "nameNow": { "type": "string", "default": "" }, "service": { "type": "string", "default": "openweathermap", "required": true, "oneOf": [ { "title": "OpenWeatherMap", "const": "openweathermap" }, { "title": "Weather Underground", "const": "weatherunderground" }, { "title": "Weewx", "const": "weewx" }, { "title": "Tempest Weather Station", "const": "tempest" } ] }, "key": { "type": "string", "required": true }, "locationGeo": { "type": "array", "maxItems": 2, "minItems": 2, "items": { "type": "number" } }, "locationCity": { "type": "string" }, "stationId": { "type": "string" }, "language": { "type": "string", "default": "en", "required": true, "enum": [ "ar", "az", "be", "bg", "bn", "bs", "ca", "cs", "da", "de", "el", "en", "eo", "es", "et", "fi", "fr", "he", "hi", "hr", "hu", "id", "is", "it", "ja", "ka", "kn", "ko", "kw", "lv", "ml", "mr", "nb", "nl", "no", "pa", "pl", "pt", "ro", "ru", "sk", "sl", "sr", "sv", "ta", "te", "tet", "tr", "uk", "ur", "zh", "zh-tw" ] }, "compatibility": { "type": "string", "default": "home", "required": true, "oneOf": [ { "title": "Apple Home", "const": "home" }, { "title": "Apple Home (plus Eve)", "const": "both" }, { "title": "Eve and other 3rd party apps", "const": "eve" }, { "title": "Eve (with grouping)", "const": "eve2" } ] }, "forecast": { "type": "array", "items": { "type": "string", "enum": [ "Today", "Tomorrow", "In 2 days", "In 3 days", "In 4 days", "In 5 days", "In 6 days", "In 7 days" ] }, "uniqueItems": true }, "nameForecast": { "type": "string", "default": "" }, "conditionCategory": { "type": "string", "default": "simple", "required": true, "oneOf": [ { "title": "4", "const": "simple" }, { "title": "10", "const": "detailed" } ] }, "now": { "type": "boolean", "default": true }, "extraHumidity": { "type": "boolean", "default": false }, "extraLightLevel": { "type": "boolean", "default": false }, "hidden": { "type": "array", "items": { "type": "string", "enum": [ "Air Pressure", "Cloud Cover", "Condition", "Condition Category", "Dew Point", "Forecast Day", "Humidity", "Light Level", "Observation Station", "Observation Time", "Ozone", "Rain", "Rain 1h", "Rain Day", "Rain Chance", "Snow", "Solar Radiation", "Sunrise Time", "Sunset Time", "Temperature Min", "Temperature Apparent", "UV Index", "Visibility", "Wind Direction", "Wind Speed", "Wind Speed Max" ] }, "uniqueItems": true }, "fakegatoParameters": { "type": "string" }, "thresholdAirPressure": { "type": "integer" }, "thresholdCloudCover": { "type": "integer" }, "thresholdUvIndex": { "type": "integer" }, "thresholdWindSpeed": { "type": "integer" } } } } }, "layout": [ { "type": "help", "helpvalue": "<h4>General options</h4>" }, { "key": "units" }, { "type": "help", "helpvalue": "<h6>Update interval (minutes)</h6><p class='help-block'>Check your weather service provider to find out the allowed value for free api keys. Please don't update more often then you really need.</p>" }, { "key": "interval", "notitle": true }, { "type": "help", "helpvalue": "<h4>Stations</h4><p class='help-block'>Add multiple stations for different cities or services with the ADD STATIONS button below</p>" }, { "key": "stations", "type": "array", "notitle": true, "listItems": 1, "items": [ { "type": "div", "displayFlex": false, "flex-direction": "row", "items": [ { "key": "stations[].nameNow", "title": "Name", "placeholder": "A nice name for your station" }, { "key": "stations[].service" }, { "type": "help", "helpvalue": "<h6>API Key</h6><p class='help-block'>Generate your free api key after registering <a target='_blank' href='https://home.openweathermap.org/users/sign_up'>here</a>.</p>", "condition": { "functionBody": "return model.stations[arrayIndices[0]].service === 'openweathermap'" } }, { "type": "help", "helpvalue": "<h6>API Key</h6><p class='help-block'>Registration is available for users with a PWS. Get your free api key <a target='_blank' href='https://www.wunderground.com/member/api-keys'>here</a>.</p>", "condition": { "functionBody": "return model.stations[arrayIndices[0]].service === 'weatherunderground'" } }, { "type": "help", "helpvalue": "<h6>JSON URL</h6><p class='help-block'>URL for JSON File (Include full URL).</p>", "condition": { "functionBody": "return model.stations[arrayIndices[0]].service === 'weewx'" } }, { "type": "help", "helpvalue": "<h6>Token</h6><p class='help-block'>(Optional) Personal Access Token to obtain forecasts. Log into <a target='_blank' href='http://tempestwx.com'>Tempest</a> and go to Settings -> Data Authorizations -> Create Token</p>", "condition": { "functionBody": "return model.stations[arrayIndices[0]].service === 'tempest'" } }, { "key": "stations[].key", "notitle": true }, { "type": "help", "helpvalue": "<h6>City</h6><p class='help-block'>Find your city <a target='_blank' href='https://openweathermap.org/find'>here</a>.</p>", "condition": { "functionBody": "return model.stations[arrayIndices[0]].service === 'openweathermap'" } }, { "type": "help", "helpvalue": "<h6>City</h6><p class='help-block'>City only needed with Tempest when Eve app is used with multiple weather stations (same or different homes)</a>.</p>", "condition": { "functionBody": "return model.stations[arrayIndices[0]].service === 'tempest'" } }, { "key": "stations[].locationCity", "notitle": true, "placeholder": "Berlin, DE", "condition": { "functionBody": "return model.stations[arrayIndices[0]].service === 'openweathermap' || model.stations[arrayIndices[0]].service === 'tempest'" } }, { "type": "help", "helpvalue": "<h6>Geo coordinates</h6><p class='help-block'>Optional: Enter geo coordinates (1. latitude, 2. longitude). Find your coordinates <a target='_blank' href='http://www.mapcoordinates.net/en'>here</a>.</p>", "condition": { "functionBody": "return model.stations[arrayIndices[0]].service === 'openweathermap'" } }, { "key": "stations[].locationGeo", "notitle": true, "type": "array", "listItems": 2, "items": [ { "key": "stations[].locationGeo[]", "placeholder": "Coordinate, e.g. 10.0000" } ], "condition": { "functionBody": "return model.stations[arrayIndices[0]].service === 'openweathermap'" } }, { "type": "help", "helpvalue": "<br/>", "condition": { "functionBody": "return model.stations[arrayIndices[0]].service === 'openweathermap'" } }, { "key": "stations[].stationId", "title": "Station Id", "description": "Your personal StationID.", "condition": { "functionBody": "return model.stations[arrayIndices[0]].service === 'weatherunderground' || model.stations[arrayIndices[0]].service === 'tempest'" } }, { "key": "stations[].language", "title": "Daily weather report language", "condition": { "functionBody": "return model.stations[arrayIndices[0]].service != 'weewx'" } }, { "key": "stations[].compatibility" }, { "key": "stations[].thresholdAirPressure", "title": "Threshold for air pressure sensor", "condition": { "functionBody": "return model.stations[arrayIndices[0]].compatibility === 'home' || model.stations[arrayIndices[0]].compatibility === 'both'" } }, { "key": "stations[].thresholdCloudCover", "title": "Threshold for cloud cover sensor", "condition": { "functionBody": "return model.stations[arrayIndices[0]].compatibility === 'home' || model.stations[arrayIndices[0]].compatibility === 'both'" } }, { "key": "stations[].thresholdUvIndex", "title": "Threshold for uv index sensor", "condition": { "functionBody": "return model.stations[arrayIndices[0]].compatibility === 'home' || model.stations[arrayIndices[0]].compatibility === 'both'" } }, { "key": "stations[].thresholdWindSpeed", "title": "Threshold for wind speed sensor", "condition": { "functionBody": "return model.stations[arrayIndices[0]].compatibility === 'home' || model.stations[arrayIndices[0]].compatibility === 'both'" } }, { "type": "fieldset", "title": "Forecast", "description": "<i>Choose which forecasts you are interested in.</i>", "expandable": true, "items": [ { "key": "stations[].forecast", "notitle": true }, { "type": "help", "helpvalue": "<h6>Prefix</h6><p class='help-block'>Add a prefix to your forecast days. This is especially useful if you use multiple stations.</p>" }, { "key": "stations[].nameForecast", "notitle": true } ], "condition": { "functionBody": "return model.stations[arrayIndices[0]].service === 'openweathermap' || model.stations[arrayIndices[0]].service === 'tempest'" } }, { "type": "fieldset", "title": "Advanced options", "description": "<i>For expert users.</i>", "expandable": true, "items": [ { "type": "help", "helpvalue": "<h6>Number of condition categories</h6><p class='help-block'>These can be used for homekit rules in the Eve app.<br/><br/><b><u>Simple weather categories</u></b> (4)<br/>0: Clear<br/>1: Overcast<br/>2: Rain<br/>3: Snow<br/><br/><b><u>Detailed weather categories</u></b> (10)<br/>0: Clear<br/>1: Few clouds<br/>2: Broken clouds<br/>3: Overcast<br/>4: Fog<br/>5: Drizzle<br/>6: Rain<br/>7: Hail<br/>8: Snow<br/>9: Severe weather</p>" }, { "key": "stations[].conditionCategory", "notitle": true }, { "key": "stations[].now", "title": "Show current conditions", "description": "Deselect to hide the current conditions and only show forecasts." }, { "key": "stations[].extraHumidity", "title": "Separate humidity", "description": "Separate humidity from the weather accessory to an own accessory.", "condition": { "functionBody": "return model.stations[arrayIndices[0]].compatibility === 'eve' || model.stations[arrayIndices[0]].compatibility === 'both'" } }, { "key": "stations[].extraLightLevel", "title": "Separate light level", "description": "Separate light level from the weather accessory to an own accessory.", "condition": { "functionBody": "return model.stations[arrayIndices[0]].compatibility === 'eve' || model.stations[arrayIndices[0]].compatibility === 'both'" } }, { "type": "help", "helpvalue": "<h6>History Storage Configuration</h6><p class='help-block'>By default the history is persisted on the filesystem. You can set your own option using this parameter. In order to change the location of the <a href='https://github.com/simont77/fakegato-history#file-system' target='_blank'>persisted file</a> or to use <a href='https://github.com/simont77/fakegato-history#google-drive' target='_blank'>GoogleDrive</a>. Do not modify the parameter for the fakegato internal timer.</p>" }, { "key": "stations[].fakegatoParameters", "notitle": true } ] }, { "type": "fieldset", "title": "Hide values", "description": "<i>Hide weather data you are not interested in.</i>", "expandable": true, "items": [ { "key": "stations[].hidden", "notitle": true } ] } ] } ] } ] }