1.0.0 • Published 7 years ago

homebridge-weatherlocation1 v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

homebridge-weatherLocation1

A homebridge temperature sensor for displaying the weather (and optional the humidity) at your current location.

Cloned from David Werth to support multiple Locations

github.com/werthdavid/homebridge-weather

Installation

  1. Install Homebridge using: npm install -g homebridge
  2. Install this plugin using: npm install -g homebridge-weatherLocation1
  3. Get an API-Key from openweathermap.org
  4. Find your city (make sure the query only returns a single result). Alternatively you can use a different query parameter (see 'Fields')
  5. Update your Homebridge config.json using the sample below.

Configuration

By City

{
  "accessory": "Weather",
  "apikey": "YOUR_KEY_HERE",
  "location": "Stuttgart,de",
  "name": "OpenWeatherMap Temperature"
}

By ID

{
  "accessory": "Weather",
  "apikey": "YOUR_KEY_HERE",
  "locationById": "2172797",
  "name": "OpenWeatherMap Temperature"
}

By Coordinates

{
  "accessory": "Weather",
  "apikey": "YOUR_KEY_HERE",
  "locationByCoordinates": "lat=35&lon=139",
  "name": "OpenWeatherMap Temperature"
}

Fields:

  • accessory must be "Weather" (required).
  • apikey API-Key for accessing OpenWeatherMap API (required).
  • location city-name query string (resembles to q-parameter) (required).
  • OR locationById cityid query string (resembles to cityid-parameter) (required).
  • OR locationByCoordinates geo query string (resembles to geo-parameter) (required).
  • OR locationByZip zip query string (resembles to zip-parameter) (required).
  • name is the name of the published accessory (required).
  • showHumidity weather or not show the humidity (optional).