Yes, Kai is quite aware. There are two PRs for removing the yahoo support from OH1 and OH2/ESH.
I like the meteoblue service, but I haven’t tried the others.
Yes, Kai is quite aware. There are two PRs for removing the yahoo support from OH1 and OH2/ESH.
I like the meteoblue service, but I haven’t tried the others.
Thank you! I took a look at all services! Then I’ve switched to darksky.net (former ForecatIO) 15 min ago.
And, it is running well!
.
.
.
.
And the weather forecast seems to deliver better weather there!
FYI
.
.
So I changed my providers:
for OH1 binding ‘weather1’:
from provider Yahoo to darksky.net (former ForecastIO)
.
.
from OH2 binding ‘yahooweather’
to OH2 binding ‘openweathermap’
I am still trying to figure out how this is supposed to work… in particular the path names… namely “conf”… which I do not have.
I have a standard OHv2 install, which sets these environment variables:
OPENHAB_BACKUPS=/var/lib/openhab2/backups
OPENHAB_CONF=/etc/openhab2
OPENHAB_GROUP=openhab
OPENHAB_HOME=/usr/share/openhab2
OPENHAB_HTTP_PORT=8080
OPENHAB_HTTPS_PORT=8443
OPENHAB_LOGDIR=/var/log/openhab2
OPENHAB_RUNTIME=/usr/share/openhab2/runtime
OPENHAB_USER=openhab
OPENHAB_USERDATA=/var/lib/openhab2
Also, there is no webapps folder.
Why are the relevant files spread over so many directories?
And to make matters worse, the runtime/bin/oh2_dir_layout
file point conf to:
if [ -z ${OPENHAB_CONF} ]; then
export OPENHAB_CONF="${OPENHAB_HOME}/conf"
fi
with
OPENHAB_HOME=/usr/share/openhab2
–> /usr/share/openhab2/conf
Sorry, I am really lost, and want to set this up properly.
Care to share your config? (Please?)
I dealt with Yahoo weather once, when I installed it four years ago.
Hence, if I can avoid it, I wouldn’t want to learn to set this up; just copy and be done with it.
Ok, I try to translate the windows paths to your linux paths:
/etc/openhab2/services/weather.cfg
/etc/openhab2/html/weather-data/images/
/etc/openhab2/html/weather-data/layouts/
/var/lib/openhab2/webapps/weather-data/layouts/example.html
EDIT the example.html and change the following:
<link rel="stylesheet" type="text/css" href="static/weather-data/layouts/example.css" />
<script type="text/javascript" src="static/weather-data/layouts/example.js"></script>
<td rowspan="2"><img id="weather-icon" src="static/weather-data/images/${param:iconset}/${weather:condition.commonId}.png"/></td>
<td><img src="static/weather-data/images/${param:iconset}/${forecast(0):condition.commonId}.png"/></td>
<td><img src="static/weather-data/images/${param:iconset}/${forecast(1):condition.commonId}.png"/></td>
<td><img src="static/weather-data/images/${param:iconset}/${forecast(2):condition.commonId}.png"/></td>
<td><img src="static/weather-data/images/${param:iconset}/${forecast(3):condition.commonId}.png"/></td>
.
.
If you had setup the weather.cfg (e.g. with Yahoo) then it should run until tomorrow! Then you have to change the provider in weather.cfg, e.g. DarkSky = ForecastIo !
here is mine:
# The apikey for the different weather providers, at least one must be specified
# Note: Hamweather requires two apikeys: client_id=apikey, client_secret=apikey2
apikey.ForecastIo=jfjsfsfasnkjwrnwngojgwgflkgfslkgsa
#apikey.OpenWeatherMap=
#apikey.WorldWeatherOnline=
#apikey.Wunderground=
#apikey.Hamweather=
#apikey2.Hamweather=
#apikey.Meteoblue=
# location configuration, you can specify multiple locations
location.home.name=Brisbane
location.home.latitude=-27.4145
location.home.longitude=153.0004
#location.home.woeid=
location.home.provider=ForecastIo
location.home.language=de
location.home.updateInterval=120
#location.<locationId2>.name=
#location.<locationId2>.latitude= (not required for Yahoo provider)
#location.<locationId2>.longitude= (not required for Yahoo provider)
#location.<locationId2>.woeid= (required for Yahoo provider)
#location.<locationId2>.provider=
#location.<locationId2>.language=
#location.<locationId2>.updateInterval=
Thanks for bearing with me.
This was the key bit of info… use the weather1 binding, and change it to ForecastIo using a DarkSky API key.
Thanks, will give it a go…
Huh, are you a Brisbanite?! I am a 100km out west…
NO, I’m not. But I saw in your profile that you are living in Queensland. So I used coordinates of Brisbane to make it easier for you.
Was anyone able to get this to work? I am struggling as well using openhab2 on a Raspberry PI. The weather applet is trying to look for files on the webapps directory and that directory doesn’t exist. Trying to follow threads like this but nothing seems to pan out.
I haven’t started yet; done too much migrating the last few days
But, I have done the ot-recorder today, and used the /etc/openhab2/html
directory to place my location web file into it and it worked by calling it with http://192.168.1.5:8080/static/geolocMap.html
in the sitemap, and this works.
Hence, I will place the weather html file there too.
Happy to report back when I finished it off (most likely Friday).
Wonderful, thank you, looking forward to your findings.
Yes, but I’m on Windows.
But at following link you can read all I wrote above:
In this migration documentation you can read the following:
/usr/share/openhab/webapps
- custom icons, custom webviews (e.g. [Weather Binding] Copy any custom webviews from webapps to $OPENHAB_CONF/html
Static webview files are now located in `$OPENHAB_CONF/html` instead of `/usr/share/openhab/webapps`
The dynamic data is located under Windows in the following folder “C:\Openhab2\userdata\webapps”
I don’t know where this now is located under linux. I thought it must be:
/var/lib/openhab2/webapps/
Maybe under linux you have to copy the dynamic data also to $OPENHAB_CONF/html ??
Thank you, let me read over that and give it a try.
Hello community.
Where is the dynamic html data located under linux?
In Windows it is "C:\Openhab2\userdata\webapps\
In linux it must be /var/lib/openhab2/webapps/ ,isn’t it??
Here is the solution:
First edit the example.html (change to the correct paths inside, see above) and then copy it into both folders:
/etc/openhab2/html/weather-data/layouts/
and
/var/lib/openhab2/webapps/weather-data/layouts/
Or make a symbolic link (symlink) to example.html (to /etc/openhab2/html/weather-data/layouts/example.html)
IMPORTANT: the paths inside example.html always have to begin with: static/weather-data/…
The string ‘static’ at the beginning of each path causes openhab2 to search in the folder /etc/openhab2/html/
While I realise that the thread sort of went off the rails
I can now say, after getting my head around this for 5 minutes, it was straight forward. … sort of.
On a pristine OHv2 install via apt-get, there will be two folders present:
/etc/openhab2/html/
/var/lib/openhab2/
The ‘old’ Yahoo folder called weather-data needs to be copied into
/etc/openhab2/html/ resulting in
/etc/openhab2/html/weather-data/
I created the required webapps in /var/lib/openhab2/
, like so:
sudo mkdir /var/lib/openhab2/webapps
resulting in:
/var/lib/openhab2/webapps/
Instead of copying files to the second location, I created a symbolic link, like so:
sudo ln -s /etc/openhab2/html/weather-data /var/lib/openhab2/webapps/weather-data
Then changed the ownership to OH, like so:
sudo chown openhab:openhab /var/lib/openhab2/webapps
In the widget file, in various posts here referred to as example.html, add the string static/
before all references to weather-data/
as described here.
In case you had a webview in your sitemap, it will just work.
Good luck @trhessel
Guys for some reason I am unable to update my weather widget after Yahoo stopped working.
apikey.ForecastIo=xxxxxxxxx (I’ve got it from the the Dark Sky)
location.home.name=home
location.home.latitude=41.874851
location.home.longitude=-88.019341
location.home.language=en
location.home.updateInterval=30
location.home.provider=ForecastIo
When I am trying to use any widget, sitemap etc. I am not able to get anything from the provider.
I am using binding-weather1 - 1.13.0
What the heck am I am doing wrong? Any help would be appreciated.
Your items were updated normally, but widget not?
@Celaeno1
Items is also not displaying the value that is the problem
Here is my Items file config. For now, I have just put two items to test.
Number Temperature “Temperature [%.2f °C]” {weather=“locationId=home, type=temperature, property=current”}
Number Humidity “Humidity [%d %%]” {weather=“locationId=home, type=atmosphere, property=humidity”}
And here is how the Sitemap looks. It is blank and I see the same in the widget. So something silly is what I am missing and I need some help.
What happens when you just put your data directly into this link and open it with your browser?
https://api.darksky.net/forecast/[key]/[latitude],[longitude]
Do you get correct data?
If not, then maybe your coordinates or your key is wrong.
Try to shorten latitude to 41.8749 and longitude to -88.0193 in above link.
See also this:
https://darksky.net/dev/docs