Page 1 of 5
Import weather data other than Wunderground
Posted: Tuesday 03 July 2018 15:24
by RTJC
Hi all,
allthough Wunderground doesn't work with free API's anymore, I still like the functionality of showing a forecast on my dashboard.
I currently use Darksky in Domoticz as a Virtual Weatherstation but I don't know how to import this into Dashticz.
Can anyone help me out?
Re: Import weather data other than Wunderground
Posted: Tuesday 03 July 2018 18:59
by Lokonli
Alternatives:
Use forecast.io in a frame like:
Code: Select all
var frames = {}
frames.weather = {refreshiframe:300000,height:230,frameurl:"//forecast.io/embed/#lat=49.2624&lon=-123.1155&name=Vancouver&color=#00aaff&font=Helvetica&fontColor=#ffffff&units=si&text-color=#fff&",width:12}
or use OpenWeatherMap. Support has been recently added to the beta of dashticz:
Code: Select all
//weather new OWM
config['owm_api'] = 'xxx';
config['owm_city'] = 'Mainaschaff';
config['owm_name'] = '';
config['owm_country'] = 'de';
config['static_weathericons'] = 1;
columns[2] = {}
columns[2]['width'] = 6;
columns[2]['blocks'] = ['currentweather_big_owm','weather_owm'];
You cannot use OWM and Wunderground simultaneously.
Re: Import weather data other than Wunderground
Posted: Wednesday 04 July 2018 14:58
by RTJC
Hi, how can I make the forecast.io frame in the Dutch language?
It looks very good by the way!
Re: Import weather data other than Wunderground
Posted: Wednesday 04 July 2018 16:48
by EdwinK
Add this to the url you used
lang=[language] optional
Return summary properties in the desired language. (Note that units in the summary will be set according to the units parameter, so be sure to set both parameters appropriately.) language may be:
en: English (which is the default)
nl: Dutch
in your case add lang=[nl] You need to do some digging in the Dashticz-files though
Re: Import weather data other than Wunderground
Posted: Monday 13 August 2018 21:15
by Derik
is there someone that have a windchill sensor or data can make a windchill?
Re: Import weather data other than Wunderground
Posted: Tuesday 14 August 2018 10:03
by waaren
Derik wrote:is there someone that have a windchill sensor or data can make a windchill?
Windchill is just the result of a formula with temperature and windspeed as factors.
Verstuurd vanaf mijn ONEPLUS A3003 met Tapatalk
Re: Import weather data other than Wunderground
Posted: Tuesday 21 August 2018 8:32
by Derik
waaren wrote: ↑Tuesday 14 August 2018 10:03
Derik wrote:is there someone that have a windchill sensor or data can make a windchill?
Windchill is just the result of a formula with temperature and windspeed as factors.
Verstuurd vanaf mijn ONEPLUS A3003 met Tapatalk
I now...
Only what i look is a device that give me the chill in a sensor..
I have multiple weather data sensors
Only no separate windchill device..
Looks great on my dashboard.
windchill -10: kids need warmer clothing's
Re: Import weather data other than Wunderground
Posted: Tuesday 21 August 2018 9:28
by waaren
Derik wrote: ↑Tuesday 21 August 2018 8:32
waaren wrote: ↑Tuesday 14 August 2018 10:03
Derik wrote:is there someone that have a windchill sensor or data can make a windchill?
Windchill is just the result of a formula with temperature and windspeed as factors.
Verstuurd vanaf mijn ONEPLUS A3003 met Tapatalk
I now...
Only what i look is a device that give me the chill in a sensor..
I have multiple weather data sensors
Only no separate windchill device..
Looks great on my dashboard.
windchill -10: kids need warmer clothing's
I can build a dzVents script if you give me the names of your outside temperature device and the name of your windspeed device.
btw: did you reload the dzVents script for the months and got it working ?
Re: Import weather data other than Wunderground
Posted: Tuesday 21 August 2018 23:18
by Derik
waaren wrote: ↑Tuesday 21 August 2018 9:28
Derik wrote: ↑Tuesday 21 August 2018 8:32
waaren wrote: ↑Tuesday 14 August 2018 10:03
Windchill is just the result of a formula with temperature and windspeed as factors.
Verstuurd vanaf mijn ONEPLUS A3003 met Tapatalk
I now...
Only what i look is a device that give me the chill in a sensor..
I have multiple weather data sensors
Only no separate windchill device..
Looks great on my dashboard.
windchill -10: kids need warmer clothing's
I can build a dzVents script if you give me the names of your outside temperature device and the name of your windspeed device.
btw: did you reload the dzVents script for the months and got it working ?
Nope months scripts not working unfortunately..
How do you want my data?
pm or?
When you install the buienradar plugin you get a windchill perhaps you can split this data also?
- ScreenShot259.png (14.57 KiB) Viewed 8629 times
Temp:
- ScreenShot260.png (13.69 KiB) Viewed 8628 times
Wind:
- ScreenShot261.png (15.26 KiB) Viewed 8628 times
Re: Import weather data other than Wunderground
Posted: Tuesday 21 August 2018 23:29
by waaren
Derik wrote: ↑Tuesday 21 August 2018 23:18
waaren wrote: ↑Tuesday 21 August 2018 9:28
Derik wrote: ↑Tuesday 21 August 2018 8:32
I now...
Only what i look is a device that give me the chill in a sensor..
I have multiple weather data sensors
Only no separate windchill device..
Looks great on my dashboard.
windchill -10: kids need warmer clothing's
I can build a dzVents script if you give me the names of your outside temperature device and the name of your windspeed device.
btw: did you reload the dzVents script for the months and got it working ?
Nope months scripts not working unfortunately..
Script to get windChill from temperature- and windSpeed device
Code: Select all
-- setWindChill.lua
return {
on = { timer = { "every 10 minutes" }}, -- the script will run every 10 minutes
-- logging = { level = domoticz.LOG_DEBUG, -- this sets the loglevel. Options are LOG_INFO, LOG_DEBUG, LOG_ERROR or LOG_FORCE
-- marker = "setWindchill" }, -- the marker will ensure you can see where information comes from
execute = function(dz) -- the parm dz (short for domoticz) will ensure all information from domoticz is available in this script
----- enter your settings below this line -------------------------------------------------------------------------------
myTemperature = dz.devices("Buiten: Terras") -- Name of your windDevice within quotes or idx without quotes
myWind = dz.devices("D.M.: Buienradar - Wind") -- Name of your temperatureDevice within quotes or idx without quotes
myWindChill = dz.devices("new Windchill") -- Name of your windchill Device within quotes or idx without quotes
----- enter your settings above this line -------------------------------------------------------------------------------
function windChill(windSpeed, temperature)
if temperature == nil then return -99 -- Should not happen
elseif windSpeed == nil then return -99 -- Should not happen
-- chill temperature cannot be calculated for these conditions
elseif windSpeed < 1.3 or windSpeed > 49 or temperature < -46 or temperature > 17 then return temperature
end
return dz.utils.round(13.12 + (0.6215 * temperature) - (13.96 * math.pow(windSpeed, 0.16)) + (0.4867 * temperature * math.pow(windSpeed, 0.16)), 1)
end
myWindChill.updateTemperature(windChill(myWind.speed,myTemperature.temperature))
end
}
Re: Import weather data other than Wunderground
Posted: Wednesday 22 August 2018 15:28
by Derik
waaren wrote: ↑Tuesday 21 August 2018 23:29
Derik wrote: ↑Tuesday 21 August 2018 23:18
waaren wrote: ↑Tuesday 21 August 2018 9:28
I can build a dzVents script if you give me the names of your outside temperature device and the name of your windspeed device.
btw: did you reload the dzVents script for the months and got it working ?
Nope months scripts not working unfortunately..
Script to get windChill from temperature- and windSpeed device
Code: Select all
-- setWindChill.lua
return {
on = { timer = { "every 10 minutes" }}, -- the script will run every 10 minutes
-- logging = { level = domoticz.LOG_DEBUG, -- this sets the loglevel. Options are LOG_INFO, LOG_DEBUG, LOG_ERROR or LOG_FORCE
-- marker = "setWindchill" }, -- the marker will ensure you can see where information comes from
execute = function(dz) -- the parm dz (short for domoticz) will ensure all information from domoticz is available in this script
----- enter your settings below this line -------------------------------------------------------------------------------
myTemperature = dz.devices("Buiten: Terras") -- Name of your windDevice within quotes or idx without quotes
myWind = dz.devices("D.M.: Buienradar - Wind") -- Name of your temperatureDevice within quotes or idx without quotes
myWindChill = dz.devices("new Windchill") -- Name of your windchill Device within quotes or idx without quotes
----- enter your settings above this line -------------------------------------------------------------------------------
function windChill(windSpeed, temperature)
if temperature == nil then return -99 -- Should not happen
elseif windSpeed == nil then return -99 -- Should not happen
-- chill temperature cannot be calculated for these conditions
elseif windSpeed < 1.3 or windSpeed > 49 or temperature < -46 or temperature > 17 then return temperature
end
return dz.utils.round(13.12 + (0.6215 * temperature) - (13.96 * math.pow(windSpeed, 0.16)) + (0.4867 * temperature * math.pow(windSpeed, 0.16)), 1)
end
myWindChill.updateTemperature(windChill(myWind.speed,myTemperature.temperature))
end
}
Thanks...
Zou ergens iets met afronden kunnen zijn??
- ScreenShot262.png (15.04 KiB) Viewed 8596 times
And how do you calculate this chill?Is this a formula that is normal used by more weather stations??
Works:
- ScreenShot263.png (51.53 KiB) Viewed 8596 times
And is it perhaps possible that u send the calculate value to a text device
Something like:
The windchill is now -25 degrees [ where -25 the value is @ that moment ] [ Or in NL: De winchill is nu -25 graden ]
Re: Import weather data other than Wunderground
Posted: Wednesday 22 August 2018 22:18
by waaren
Derik wrote: ↑Wednesday 22 August 2018 15:28
Thanks...
Zou ergens iets met afronden kunnen zijn??
Yes. See new code below
And how do you calculate this chill?Is this a formula that is normal used by more weather stations??
Using the JAG/TI-method
https://nl.wikipedia.org/wiki/Gevoelstemperatuur
And is it perhaps possible that u send the calculate value to a text device
Something like:
The windchill is now -25 degrees [ where -25 the value is @ that moment ] [ Or in NL: De winchill is nu -25 graden ]
Yes. See new code below
Code: Select all
-- setWindChill.lua
return {
on = { timer = { "every 10 minutes" }}, -- the script will run every 10 minutes
-- logging = { level = domoticz.LOG_DEBUG, -- this sets the loglevel. Options are LOG_INFO, LOG_DEBUG, LOG_ERROR or LOG_FORCE
-- marker = "setWindchill" }, -- the marker will ensure you can see where information comes from
execute = function(dz) -- the parm dz (short for domoticz) will ensure all information from domoticz is available in this script
----- enter your settings below this line -------------------------------------------------------------------------------
myTemperature = dz.devices("Buiten: Terras") -- Name of your temperatureDevice within quotes or idx without quotes
myWind = dz.devices("D.M.: Buienradar - Wind") -- Name of your windDevice within quotes or idx without quotes
myWindChillTemp = dz.devices("new Windchill") -- Name of your windchill temp Device within quotes or idx without quotes or remove line completely if no temp device
myWindChillText = dz.devices("windChillText") -- Name of your windchill text Device within quotes or idx without quotes or remove line completely if no text device
----- enter your settings above this line -------------------------------------------------------------------------------
function windChill(windSpeed, temperature)
if temperature == nil then return -99 -- Should not happen
elseif windSpeed == nil then return -99 -- Should not happen
-- chill temperature cannot be calculated for these conditions
elseif windSpeed < 1.3 or windSpeed > 49 or temperature < -46 or temperature > 17 then return temperature
end
return 13.12 + (0.6215 * temperature) - (13.96 * math.pow(windSpeed, 0.16)) + (0.4867 * temperature * math.pow(windSpeed, 0.16))
end
local windChill = dz.utils.round(windChill(myWind.speed,myTemperature.temperature))
if myWindChillTemp then
if myWindChillTemp.temperature ~= windChill then
myWindChillTemp.updateTemperature(windChill)
end
end
if myWindChillText then
local windChillText = "De windchill is nu " .. windChill .. " graden."
if myWindChillText.text ~= windChillText then
myWindChillText.updateText(windChillText)
end
end
end
}
Re: Import weather data other than Wunderground
Posted: Thursday 23 August 2018 6:25
by Derik
Dear Waaren..
Realy nice to see how you fix this..
The text is running also...
Only one thing
Probably your formula is wrong??
The chill is the same like outside temp..
And my other sensors give a different chill then your code:
- ScreenShot268.png (17.79 KiB) Viewed 8567 times
- ScreenShot267.png (17.6 KiB) Viewed 8567 times
Yours:
- ScreenShot269.png (8.15 KiB) Viewed 8567 times
So perhaps you can check?
edit:
The script is not running for more the a half hour.,,,
So where do i go wrong?
Re: Import weather data other than Wunderground
Posted: Thursday 23 August 2018 9:11
by waaren
Derik wrote: ↑Thursday 23 August 2018 6:25
Probably your formula is wrong??
The chill is the same like outside temp..
Hi Derik,
In the edited script below, I switched on debug logging so if you can check again and look at the relevant loglines (the ones with the text "setWindchill" in it)
I doublechecked the formula and it should report the windchill temp calculated using the JAG/TI-method
JAG/TI-method
Please note that according to this JAG/TI calculation the windchill temperature is equal to the standard temperature for temperatures > 17 Celsius and for windspeeds < 1.3 meter/second.
Also the script does not update the textdevice if the windChill temperature has not changed in the last 10 minutes.
Code: Select all
-- setWindChill.lua
return {
on = { timer = { "every 10 minutes" }}, -- the script will run every 10 minutes
logging = { level = domoticz.LOG_DEBUG, -- this sets the loglevel. Options are LOG_INFO, LOG_DEBUG, LOG_ERROR or LOG_FORCE
marker = "setWindchill" }, -- the marker will ensure you can see where information comes from
execute = function(dz) -- the parm dz (short for domoticz) will ensure all information from domoticz is available in this script
----- enter your settings below this line -------------------------------------------------------------------------------
myTemperature = dz.devices("Buiten: Terras") -- Name of your temperatureDevice within quotes or idx without quotes
myWind = dz.devices("D.M.: Buienradar - Wind") -- Name of your windDevice within quotes or idx without quotes
myWindChillTemp = dz.devices("new Windchill") -- Name of your windchill temp Device within quotes or idx without quotes or remove line completely if no temp device
myWindChillText = dz.devices("windChillText") -- Name of your windchill text Device within quotes or idx without quotes or remove line completely if no text device
----- enter your settings above this line -------------------------------------------------------------------------------
local function windChill(windSpeed, temperature)
if temperature == nil then return -99 -- Should not happen
elseif windSpeed == nil then return -99 -- Should not happen
-- chill temperature cannot be calculated for these conditions
elseif windSpeed < 1.3 or windSpeed > 49 or temperature < -46 or temperature > 17 then
return temperature
end
return 13.12 + (0.6215 * temperature) - (13.96 * math.pow(windSpeed, 0.16)) + (0.4867 * temperature * math.pow(windSpeed, 0.16))
end
dz.log("windspeed: " .. myWind.speed .. ", temperature: " .. myTemperature.temperature,dz.LOG_DEBUG)
local calculatedWindChill = dz.utils.round(windChill(myWind.speed,myTemperature.temperature))
if myWindChillTemp then
myWindChillTemp.updateTemperature(calculatedWindChill)
end
if myWindChillText then
local windChillText = "De windchill is nu " .. calculatedWindChill .. " graden."
if myWindChillText.text ~= windChillText then
myWindChillText.updateText(windChillText)
end
end
end
}
Re: Import weather data other than Wunderground
Posted: Thursday 23 August 2018 12:33
by Toulon7559
Is Accuweather as Device an alternative, optional source for your info?
Re: Import weather data other than Wunderground
Posted: Saturday 25 August 2018 22:17
by Derik
Dear waaren
Thanks for the great script!!!
Works fine until now...
Hope i can do sometime something for you!!!
xxx
Re: Import weather data other than Wunderground
Posted: Monday 01 October 2018 19:01
by renerene
Lokonli wrote: ↑Tuesday 03 July 2018 18:59
Code: Select all
//weather new OWM
config['owm_api'] = 'xxx';
config['owm_city'] = 'Mainaschaff';
config['owm_name'] = '';
config['owm_country'] = 'de';
config['static_weathericons'] = 1;
columns[2] = {}
columns[2]['width'] = 6;
columns[2]['blocks'] = ['currentweather_big_owm','weather_owm'];
Does not work for me. Dashticz ignores the code: no error, no weather block.
What should be in the omw_name?
How can I check city / country names? Is it case sensitive? Is every city a number?
Update: problem solved, was not on the latest beta of Dashticz
Re: Import weather data other than Wunderground
Posted: Tuesday 02 October 2018 20:26
by Thuis
Hi, I am stuck,
config['owm_api'] = 'some_key';
config['owm_city'] = 'Mainaschaff';
config['owm_name'] = '';
config['owm_country'] = 'de';
config['static_weathericons'] = 1;
and then in the column
'currentweather_big_owm','weather_owm'
Because I can not find anything to get this to dutch language:
//forecast.io/embed/#lat=xxxxx/&lon=xxxxx&name=xxxxxx&lang=nl&color=#00aaff&font=Helvetica&fontcolor=#ffffff&units=si
Thus i decided to try the openweathermap.
So my headache is growing and growing, I have been searching, reading and trying for 8 hours straight and really have no clue how to get the openweathermap forecast 'currentweather_big_owm','weather_owm' in Dashticz. Looked in the weather.js, also no mention of OWM. So how does this 'currentweather_big_owm' or 'weather_owm' know where it has to get its data from. Where is the link, between 'weather_owm' and the config[owm]. I see the link between the wunderground, config[wu_api] etc and the 'weather_big' it is in the weather.js.
The forecast.io iframe thingy is working great, but in English, so bummer, saw they had widgets to embed, but played around with it, not succeeded, so tomorrow maybe.
Well then, if anyone has forecast.io working in the Dutch language, please share, like the correct link to put in the url: for the iframe,
Or anyone has the openweathermap config 'weather_owm' working please do tell. And not just a cryptic message, that I have to decipher, just a plain answer, please¿? Maybe to you this is all very simple, but I am no professor, and I'm just trying to make it work thru logic.
Thanks in advance.
Re: Import weather data other than Wunderground
Posted: Wednesday 03 October 2018 20:15
by heggink
I have a weird problem whereby, using the latest beta, the font colour in frames.weather switches on refreshiframe. Like many others, I replaced WU with
Code: Select all
frames.weather = {refreshiframe:1800000,height:230,frameurl:"http://forecast.io/embed/#lat=52.536129&lon=-5.453455&name=Lelystad&color=#00aaff&font=Helvetica&fontcolor=#ffffff&units=si&text-color=#fff",width:12}
First time the font is white but on refresh, it turns grey.
Any idea why that is and how to resolve?
H
Re: Import weather data other than Wunderground
Posted: Thursday 04 October 2018 22:29
by Lokonli
Thuis wrote: ↑Tuesday 02 October 2018 20:26
Hi, I am stuck,
config['owm_api'] = 'some_key';
config['owm_city'] = 'Mainaschaff';
config['owm_name'] = '';
config['owm_country'] = 'de';
config['static_weathericons'] = 1;
and then in the column
'currentweather_big_owm','weather_owm'
Because I can not find anything to get this to dutch language:
//forecast.io/embed/#lat=xxxxx/&lon=xxxxx&name=xxxxxx&lang=nl&color=#00aaff&font=Helvetica&fontcolor=#ffffff&units=si
Thus i decided to try the openweathermap.
So my headache is growing and growing, I have been searching, reading and trying for 8 hours straight and really have no clue how to get the openweathermap forecast 'currentweather_big_owm','weather_owm' in Dashticz. Looked in the weather.js, also no mention of OWM. So how does this 'currentweather_big_owm' or 'weather_owm' know where it has to get its data from. Where is the link, between 'weather_owm' and the config[owm]. I see the link between the wunderground, config[wu_api] etc and the 'weather_big' it is in the weather.js.
The forecast.io iframe thingy is working great, but in English, so bummer, saw they had widgets to embed, but played around with it, not succeeded, so tomorrow maybe.
Well then, if anyone has forecast.io working in the Dutch language, please share, like the correct link to put in the url: for the iframe,
Or anyone has the openweathermap config 'weather_owm' working please do tell. And not just a cryptic message, that I have to decipher, just a plain answer, please¿? Maybe to you this is all very simple, but I am no professor, and I'm just trying to make it work thru logic.
Thanks in advance.
Are you using Dashticz beta? OWM is not included in master.