Skip to content

Commit

Permalink
Version 2.0.0 with multiple apis
Browse files Browse the repository at this point in the history
  • Loading branch information
naofireblade committed Jul 31, 2018
1 parent 1b7f467 commit 77425de
Show file tree
Hide file tree
Showing 8 changed files with 1,013 additions and 499 deletions.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,7 +1,7 @@
The MIT License (MIT)

Copyright for portions of this project are held by Kevin Harwood, 2015 as part of his original project kcharwood/homebridge-weather-station.
Copyright for this project is held by Arne Blumentritt, 2018
Copyright for portions of this project are held by Kevin Harwood, 2015 as part of his original project kcharwood/homebridge-weather-station.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
127 changes: 85 additions & 42 deletions README.md
@@ -1,46 +1,55 @@
# homebridge-weather-station-extended
[![npm](https://img.shields.io/npm/v/homebridge-weather-station-extended.svg?style=flat-square)](https://www.npmjs.com/package/homebridge-weather-station-extended)
[![npm](https://img.shields.io/npm/dt/homebridge-weather-station-extended.svg?style=flat-square)](https://www.npmjs.com/package/homebridge-weather-station-extended)
[![GitHub last commit](https://img.shields.io/github/last-commit/naofireblade/homebridge-weather-station-extended.svg?style=flat-square)](https://github.com/naofireblade/homebridge-weather-station-extended)
[![Weather](https://img.shields.io/badge/weather-sunny-edd100.svg?style=flat-square)](https://github.com/naofireblade/homebridge-weather-station-extended)
# homebridge-weather-plus
[![npm](https://img.shields.io/npm/v/homebridge-weather-station-extended.svg?style=flat-square)](https://www.npmjs.com/package/homebridge-weather-plus)
[![npm](https://img.shields.io/npm/dt/homebridge-weather-station-extended.svg?style=flat-square)](https://www.npmjs.com/package/homebridge-weather-plus)
[![GitHub last commit](https://img.shields.io/github/last-commit/naofireblade/homebridge-weather-plus.svg?style=flat-square)](https://github.com/naofireblade/homebridge-weather-plus)
[![Weather](https://img.shields.io/badge/weather-sunny-edd100.svg?style=flat-square)](https://github.com/naofireblade/homebridge-weather-plus)

This is a weather station plugin for [homebridge](https://github.com/nfarina/homebridge) that features current observations, daily forecasts and history graphs. You can download it via [npm](https://www.npmjs.com/package/homebridge-weather-station-extended).
This is a weather plugin for [homebridge](https://github.com/nfarina/homebridge) that features current observations, daily forecasts and history graphs. You can download it via [npm](https://www.npmjs.com/package/homebridge-weather-plus).

If you **update from a version before 1.2.0** and want to see the history graphs, you have to remove and reinstall the eve app. Your devices and rules will remain unchanged.
If you **update from a version before 2.0.0** you have to adapt your config. See the samples below. You might consider switching your weather service to the newly supported dark sky service.

Feel free to leave any feedback [here](https://github.com/naofireblade/homebridge-weather-station-extended/issues).
Feel free to leave any feedback [here](https://github.com/naofireblade/homebridge-weather-plus/issues).

## Current Observations

The following current observation values can be displayed and used in HomeKit rules. Use a 3rd party app like Elgato Eve to see all values, translations and some nice [icons](#screenshot).
The following **16 current observation values** can be displayed and used in HomeKit rules. Use a 3rd party app like Elgato Eve to see all values, translations and some nice [icons](#screenshots).

- Temperature
- Air Pressure
- Relative Humidity
- Cloud Cover
- Condition
- Condition Category (Sun = 0, Clouds = 1, Rain = 2, Snow = 3)
- Dew Point
- Humidity
- Ozone
- Rain Last Hour
- Rain All Day
- UV-Index
- Solar Radiation
- Temperature
- UV-Index
- Visibility
- Weather Condition
- Weather Condition Category (Sun = 0, Clouds = 1, Rain = 2, Snow = 3)
- Wind Direction
- Wind Speed
- Wind Speed Maximum
- Observation Station
- Observation Time
- *Observation Time*
- *Observation Station*

## Forecast

The plugin also features a daily forecast for today and the next 3 days. The following forecast values can be displayed.
The plugin also features forecasts for up to **7 days**. The following **16 forecast values** can be displayed.

- Temperature
- Temperature Minimum
- Relative Humidity
- Chance Rain
- Air Pressure
- Cloud Cover
- Condition
- Condition Category (Sun = 0, Clouds = 1, Rain = 2, Snow = 3)
- Dew Point
- Humidity
- Ozone
- Rain Chance
- Rain All Day
- Weather Condition
- Weather Condition Category
- Temperature Min
- Temperature Max
- UV-Index
- Visibility
- Wind Direction
- Wind Speed
- Wind Speed Maximum
Expand All @@ -49,57 +58,87 @@ The plugin also features a daily forecast for today and the next 3 days. The fol

With the eve app you can view the history for

- Temperature
- Air Pressure
- Relative Humidity
- Humidity
- Temperature

## Choose your weather service

This plugin supports multiple weather services. Each has it's own advantages. The following table shows a comparison to help you choosing one.

| | Dark Sky (recommended) | Weather Underground (legacy) |
|----------------------------|:--------------------------------------------:|:----------------------------------------------------------------:|
| Current observation values | 15 | 13 |
| Forecast values | 16 | 10 |
| Forecast days | 7 | 4 |
| Location | geo-coordinates | city name or zip |
| Personal weather stations | :x: | :heavy_check_mark: |
| Free | :heavy_check_mark: | :x: (only legacy accounts) |
| Register | [here](https://darksky.net/dev/register) | [here](https://www.wunderground.com/weather/api/) |

*You can add more services by forking the project and submitting a pull request.*

## Installation

1. Install homebridge using: `npm install -g homebridge`
2. Install this plugin using: `npm install -g homebridge-weather-station-extended`
3. Gather a free developer key for Weather Underground [here](http://www.wunderground.com/weather/api/).
2. Install this plugin using: `npm install -g homebridge-weather-plus`
3. Gather an API key for a weather service from the register link in the table above
4. Update your configuration file. See the samples below.

## Configuration

Add the following information to your config file. Make sure to add your API **key** and provide your city or postal code in the **location** field.
Add one of the following samples to your config file.

### Dark Sky

The **key** parameter is the API key that you get by registering for a weather service in the table above.

The **location** parameter must be a list with the latitude longitude for your location (dont forget the square brackets). You can get them by looking up your location on Google Maps, click right and then selecting "What's here?".

The **language** parameter is *optional* and sets the translation for the description of the current day and condition. Available languages can be found [here](https://github.com/darkskyapp/translations/tree/master/lib/lang). Default is en.

### Simple
The **forecast** parameter is *optional* and defines a list of forecast days to show starting with 1 for today, 2 for tomorrow etc. Default are none.

```json
"platforms": [
{
"platform": "WeatherStation",
"name": "Weather Station",
"platform": "WeatherPlus",
"name": "WeatherPlus",
"service": "darksky",
"key": "XXXXXXXXXXXXXXX",
"location": "78613"
"location": [57.322956, -4.424380],
"language": "en",
"forecast": [1,2,3,4,5,6,7]
}
]
```

### Advanced
### Weather Underground

The following config contains advanced optional settings that must not be specified.
The **key** parameter is the API key that you get by registering for a weather service in the table above.

The parameter **interval** sets the interval (minutes) in which the weather will be updated from Weather Underground. The default value is 4 minutes, which fits in the maximum of 400 updates per day for free accounts.
The **location** parameter can be a city name or a zip. You can also use a station from the **[Personal Weather Station Network](https://www.wunderground.com/weatherstation/overview.asp)** to receive weather information. Just enter pws:YOURID.

The parameter **forecast** sets which forecasts you want to see. You can set one of these three values: none, today, 3days. The default value is 3days.
The **forecast** parameter is *optional* and defines a list of forecast days to show starting with 1 for today, 2 for tomorrow etc. Default are none.

You can also use a station from the **[Personal Weather Station Network](https://www.wunderground.com/weatherstation/overview.asp)** to receive weather information. Just enter pws:YOURID in the **location** parameter.

```json
"platforms": [
{
"platform": "WeatherStation",
"name": "Weather Station",
"platform": "WeatherPlus",
"name": "WeatherPlus",
"service": "weatherunderground",
"key": "XXXXXXXXXXXXXXX",
"location": "pws:ICALIFOR123",
"interval": "4",
"forecast": "3days"
"location": "New York",
"forecast": [1,2,3,4]
}
]
```

### Advanced

You can add the parameter **interval** to set the update interval in minutes. The default value is 4 minutes.

## Example use cases

- Switch on a blue light in the morning when the chance for rain is above 20% today (or white when the forecast condition is snow / yellow when it's sunny).
Expand All @@ -120,3 +159,7 @@ Many thanks go to
- [GatoPharaoh](https://github.com/GatoPharaoh) for his interval option pull request

This plugin is a fork of [homebridge-weather-station](https://github.com/kcharwood/homebridge-weather-station) which is no longer being developed. That one is a fork of [homebridge-wunderground](https://www.npmjs.com/package/homebridge-wunderground).

## Attribution
- [Powered by Dark Sky](https://darksky.net/poweredby/)
- [Powered Weather Underground](https://www.wunderground.com/)

0 comments on commit 77425de

Please sign in to comment.