Comments (10)
As the data simply isn't available to the 2.5 API, the user can just go the plugin settings, expand the 'Hide values' section and check UV Index, Dew Point, Sunrise Time and Sunset Time. Then those items won't appear in HomeKit.
A possible programatic solution is lazily add the Characteristics. If, when updating that weather data, the Accessory is missing the Characteristic for a given reportCharacteristics
name, then create and add it on the fly. (Or remove it on the fly - though this would be more work IMO)
In this scenario, UV, Dewpoint, SunriseTime and SunsetTime would be added to the list of reportCharacteristics
only when the 3.0 API availability is confirmed.
from homebridge-weather-plus.
I have the same issue. The UV is the only thing I want so I can send an alert when it gets over 6 to put sunblock on the kids. I hope someone can work it out.
from homebridge-weather-plus.
Please attach logs
from homebridge-weather-plus.
Duplicate of #264
from homebridge-weather-plus.
This seems to depend on whether you have a paid subscription for the 3.0 API.
If you don't, the plugin falls back to use /data/2.5/weather
instead of /data/3.0/onecall
- and /data/2.5/weather
doesn't have dew point and UV index.
The real question here is weather the 3.0 Onecall API is really needed here at all. /data/2.5/onecall
seems to provide virtually the same data in the same structure. (See 3.0 and 2.5 docs).
This change makes dew point and UV index work for me. (That is, the whole 2.5 legacy code probably can be removed):
diff --git a/apis/openweathermap.js b/apis/openweathermap.js
index 9341d04..f1f0894 100644
--- a/apis/openweathermap.js
+++ b/apis/openweathermap.js
@@ -459,7 +459,7 @@ class OpenWeatherMapAPI
}
else
{
- return this.apiBaseURL + "/data/3.0/onecall"
+ return this.apiBaseURL + "/data/2.5/onecall"
}
}
from homebridge-weather-plus.
The real question here is weather the 3.0 Onecall API is really needed here at all. /data/2.5/onecall seems to provide virtually the same data in the same structure. (See 3.0 and 2.5 docs).
Doing a diff between to the two sample results, I see 3.0 had a current.wind_gust value, a daily.summary value. Otherwise it had all the same fields. Moving to 2.5 onecall would seem to solve all the issues.
from homebridge-weather-plus.
Now for the bad news: Apparently 2.5/onecall
is disabled for newer accounts (see domoticz/domoticz#5336 (comment)). So the only real solution for dew point and UV index is to get a base subscription, so that you can use 3.0/onecall
: Basically enter payment details, then set a limit so you don't ever get over the 1000 free calls.
This issue and #264 then probably should be closed as "won't fix" because that behaviour is documented in the README.md
from homebridge-weather-plus.
To stop Dew Point and UV index from appearing when 2.5 API is used, there is code tries to remove it from the reported characteristics:
that.log.info("Could not retreive weather report with API 3.0, trying API 2.5 now ...")
this.api = "2.5";
this.removeCharacteristic(this.reportCharacteristics, "UVIndex");
this.removeCharacteristic(this.reportCharacteristics, "DewPoint");
this.removeCharacteristic(this.forecastCharacteristics, "UVIndex");
this.removeCharacteristic(this.forecastCharacteristics, "DewPoint");
this.removeCharacteristic(this.forecastCharacteristics, "SunriseTime");
this.removeCharacteristic(this.forecastCharacteristics, "SunsetTime");
this.forecastDays = 5;
The code for removeCharacteristic() is later in the same file:
removeCharacteristic(characteristics, item)
{
let index = characteristics.indexOf(item);
if (index !== -1)
{
characteristics.splice(index, 1);
}
}
Which just removes it from the array of data that is reported. Unfortunately, by this time the characteristic has already been added by the function CurrentConditionsWeatherAccessory()
as a Characteristic of the Accessory. So the effect that the removeCharacteristic()
function has is to always fail to report that value.
from homebridge-weather-plus.
Can you please try 3.3.4-beta.1
and verify that it works.
from homebridge-weather-plus.
Closing as fixed. Try 3.3.4
or later
from homebridge-weather-plus.
Related Issues (20)
- Remove support for DarkSky HOT 3
- Each sensor is named "Now" HOT 9
- Temperature data is merged when you have multiple weather stations HOT 1
- OpenWeatherMap nor forcast devices, data available in Browser HOT 3
- Cannot read properties of undefined (reading 'list') HOT 6
- [Tempest Weatherflow] When station offline: 1) history repeats last measurement forever, 2) one warning per minute in log HOT 11
- [Tempest WeatherFlow] v3.3.2 ReferenceError: accumulation is not defined HOT 9
- [Weatherflow Tempest] Report additional failed sensors HOT 2
- Error retrieving weather report: undefined HOT 10
- thresholdCloudCover on openweathermap.org HOT 16
- Add Light Level history/graphing support HOT 4
- [Weatherflow Tempest] Bizarrely reporting 0ΒΊC, even though the Tempest app does not HOT 42
- Unable to uninstall or update HOT 1
- Getting error "Could not retreive weather report with API 3.0, trying API 2.5 now" HOT 3
- No wind sensor with 3.3.4 Beta 1 HOT 13
- Exceed quota on OWM and/or Wunderground when used in conjunction with Tempest
- Wondered why my threshold entries were empty in the settings HOT 6
- Homekit dropping occupancy sensors when Home Hub changes HOT 4
- Wind speed threshold error in v3.3.5 HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-weather-plus.