在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:werthdavid/homebridge-weather开源软件地址:https://github.com/werthdavid/homebridge-weather开源编程语言:JavaScript 100.0%开源软件介绍:homebridge-weatherHomebridge plugin for displaying the weather, humidity and min- or max-temperature from openweathermap.org If you find my work useful you can buy me a coffee, I am very thankful for your support. Installation
ConfigurationWeatherExample for configuration by City "accessories": [
{
"accessory": "Weather",
"apikey": "YOUR_KEY_HERE",
"location": "Stuttgart,de",
"name": "OpenWeatherMap Temperature"
}
] By IDreplace "locationById": "2172797", By Coordinatesreplace "locationByCoordinates": "lat=48.70798341&lon=9.17019367", Celsius/Fahrenheit (you probably don't have to change anything here)iOS should take care of the correct unit, HomeApp converts the values internally. If you want a different unit than your OS' settings, you can change the unit explicitly by adding
"unit": "metric", for Celsius (default) or "unit": "imperial", for Fahrenheit ForecastTo show daily min/max values, you have to add two additional accessories: "accessories": [
{
"accessory":"Weather",
"apikey":"YOUR_KEY_HERE",
"locationByCoordinates":"lat=48.70798341&lon=9.17019367",
"name":"Today Min",
"type":"min"
},
{
"accessory":"Weather",
"apikey":"YOUR_KEY_HERE",
"locationByCoordinates":"lat=48.70798341&lon=9.17019367",
"name":"Today Max",
"type":"max"
}
] CloudinessTo show cloudiness in percent configure as follows: "accessories": [
{
"accessory":"Weather",
"apikey":"YOUR_KEY_HERE",
"locationByCoordinates":"lat=48.70798341&lon=9.17019367",
"name":"Cloudiness",
"type":"clouds"
}
] Wind-speedTo show wind-speed in "accessories": [
{
"accessory":"Weather",
"apikey":"YOUR_KEY_HERE",
"locationByCoordinates":"lat=48.70798341&lon=9.17019367",
"name":"Wind",
"type":"windspeed"
}
] To display in "unit": "imperial" Sunrise/noon/sunsetThis type publishes a value between 0 and 100 that indicates how far through the day we are where 0% is the sunrise (and everything before) and 100% is sunset (and everything after). 50% is noon accordingly. For using this value as trigger, you have to define a "pollingInterval" as well, otherwise the value only gets updated while having HomeApp in foreground. "accessories": [
{
"accessory":"Weather",
"apikey":"YOUR_KEY_HERE",
"locationByCoordinates":"lat=48.70798341&lon=9.17019367",
"name":"Sun",
"type":"sun",
"pollingInterval": 10
}
] HintYou can add multiple accessories if you want to display additional information like min/max or the temperature of different locations. Just make sure that the field PollingBy default, no polling-interval is specified. That means, the temperature is only updated when the Home-App is opened. There might be scenarios though, where you would want to periodically update the temperature e.g. as source for trigger-rules. OpenWeatherMap has a generous amount of free calls per API-key: you can poll the temperature up to 60 times a minute. Beware that just because you can doesn't mean you should I'd also suggest that you add a polling-interval only for the Elgato Eve App (FakeGato support)Temperature profile withWith the Since FakeGato requires to log an entry at least every 10 minutes, this feature only becomes active if you set I suggest the following settings: "accessories": [
{
"accessory": "Weather",
"apikey": "YOUR_KEY_HERE",
"location": "Stuttgart,de",
"name": "OpenWeatherMap Temperature",
"pollingInterval": 10,
"enableHistory": true
}
] Config fileTake a look at the example config.json Fields:
Known Issues
Advanced usageIf you need more features like a more detailed forecast, take a look at homebridge-weather-plus (here), it now supports OpenWeatherMap as well.
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论