Code: Select all
https://openweathermap.org/api/one-call-api
Moderator: leecollings
Code: Select all
https://openweathermap.org/api/one-call-api
The one-call-api has much more forecast information and do potentially require a lot more virtual sensors in domoticz. The current code for the openweathermaps hardware module would require significant work to be able to deal with both sets of data.
That would be nice
Yes. if you look in commit 56e8b6c8 withbarts2108 wrote: ↑Wednesday 29 July 2020 15:05 On page https://www.domoticz.com/wiki/Developin ... rdware_tab
it says to do some work on the file www/app/HardwareController.js
I have a git clone on Ubuntu and one on Windows, but I cannot find that file. I is also not existing in the domoticz git. Propably here the file www/app/hardware/Hardware.js is meant. Is that correct ?
Code: Select all
git show c56e8b6c8 | grep rename
Code: Select all
rename from www/app/HardwareController.js
rename to www/app/hardware/Hardware.js
You could take the darkSky or Buienradar implementation as example. (they both store the lat / lon in the password field)barts2108 wrote: ↑Wednesday 29 July 2020 21:20 Now exploring how I can make sure the fields are filled correctly because the One Call api requires lat=1.234&lon=5.432 in the url. I already see that the database does not support float type for hardware, so I probably have to do some checks on the string stored in the password field.
Code: Select all
"current": {
"dt": 1596050589,
"sunrise": 1595993828,
"sunset": 1596052438,
"temp": 14.68,
"feels_like": 6.07,
"pressure": 1014,
"humidity": 75,
"dew_point": 10.3,
"uvi": 5.59,
"clouds": 100,
"visibility": 10000,
"wind_speed": 12.48,
"wind_deg": 286,
"weather": [
{
"id": 500,
"main": "Rain",
"description": "light rain",
"icon": "10d"
}
],
"rain": {
"1h": 0.13
}
},
Code: Select all
"hourly": [
{
"dt": 1596049200,
"temp": 14.68,
"feels_like": 6.07,
"pressure": 1014,
"humidity": 75,
"dew_point": 10.3,
"clouds": 100,
"visibility": 10000,
"wind_speed": 12.48,
"wind_deg": 286,
"weather": [
{
"id": 500,
"main": "Rain",
"description": "light rain",
"icon": "10d"
}
],
"pop": 0.58,
"rain": {
"1h": 0.13
}
},
Code: Select all
"daily": [
{
"dt": 1596020400,
"sunrise": 1595993828,
"sunset": 1596052438,
"temp": {
"day": 14.68,
"min": 14.55,
"max": 14.68,
"night": 14.55,
"eve": 14.68,
"morn": 14.68
},
"feels_like": {
"day": 5.96,
"night": 7.4,
"eve": 5.96,
"morn": 5.96
},
"pressure": 1014,
"humidity": 75,
"dew_point": 10.3,
"wind_speed": 12.63,
"wind_deg": 283,
"weather": [
{
"id": 500,
"main": "Rain",
"description": "light rain",
"icon": "10d"
}
],
"clouds": 100,
"pop": 0.84,
"rain": 0.81,
"uvi": 5.59
},
@ kiddidigital,kiddigital wrote: ↑Sunday 02 August 2020 22:00 I didn't see this thread earlier unfortunately so I wasn't aware that @barts2108 already started some work on the Open Weather Map module, but I created an update for this modules, see this Pull Request.
Not sure if it fills all the needs, but maybe it goes into the right direction and we can combine stuff and/or divide work?
Users browsing this forum: No registered users and 1 guest