I am having issues with the weather binding. My log always says that I got an invalid API key.
I am using OpenWeatherMap with the free keys. However when copying the keys from their website and putting them into my wather config file
[ERROR] [nal.provider.AbstractWeatherProvider] - OPENWEATHERMAP[home]: Can't retreive weather data: Invalid API key. Please see http://openweathermap.org/faq#error401 for more info.
this error continues after creating a new account on their website and using a new API key. Anyone got an idea?
it works! getting lots of information xP
yup the binding got some problems, I downloaded a binding from github from a conversation that talked about the not working of the binding. There they made a snapshot that supposingly works. However I didnt get it to install.
is there anything else to do? I unistalled the official one, put the jar into the folder and rebooted. I dont have much knowledge in installing 3rd parties addons
Hi!
Great, so far.
Please,try,
You have to had the binding like openhab-runtime-compat1x installed, due to that binding weather is an OH1 Add-on.
Install this binding as:
Then:
Place JAR file into your openhab2-addons folder.
Edit the file \openhab2-conf\services\addons.cfg
Un-comment and add the binding to this line as follows
binding = org.openhab.binding.weather, openhab-runtime-compat1x, anymore bindings here
Restart Openhab2 , #sudo /bin/systemctl restart openhab2.service
It might be that you have to install binding weather also as above, I am a little insecure about that.
Just try, if it starts without installation, it’s OK.
Hi again,
Just saw that the link you referenced to is regarding to an OH2 ADD-ON, and I do think that this downloaded binding is an OH2 ADD-ON
The info. I just wrote about is regarding to the older OH1 ADD-ON.
My apologizes, and just be aware that this is 2 different bindings.
I myself has the OH1-binding running ( I have removed the daily ), but I have not found the code in ESH for the OH2-binding so I can’t compare them. But it might be that there is the very same problem.
So you got an OH1 Binding? can you give me a link where to download it (and what about the cfg file fore the binding)? and then the installation you talked abput in the post before?
I am sorry, installation of bindings and the linux command line aren’t my speciality^^ A huge Thanks for your help!
Hi!
This is interesting and a little bit confusing about the different versions, isn’t it, but the very good thing is that we have to somehow have it sorted out
I am still running openHAB 2.3.0 and I’m sure that the Weather binding in this distribution is regarding to OH1 Add-ons. #sudo ssh -p 8101 openhab@localhost
habopen
openhab>bundle:list
205 | Active | 80 |1.12.0 |openHAB Weather Binding
There must have been some changes in the way OpenWeatherMap will deliver the different forecasts, I have just used this binding for a month so I don’t know anything about the past.
Anyhow so can I see the very same link in 1.12.0 and 1.13.0. so I assume that none of these bindings will work as expected, they will booth throw the exception like ‘Invalid API key. xxxx’
At least if you use the Free account at OpenWeatherMap.
I have redesigned the binding, (changed the link) but this is a very ugly way too handle the problem, due to that I am not the maintainer of this binding. So it works but I can only see forecast for the next 12 hours with steps of 3 hours. I have not distribute it due to that.
Hi!
This is strange, as far as I can see are you doing right.
I have seen some links about to login, regarding RaspberryPi, It may take a while to be logged in, in some times a couple of minutes.
Please, see also following,
User password needed for SSH or sudo (e.g. “openhabian:openhabian”)
Samba share password (e.g. “openhabian:openhabian”)
openHAB remote console (e.g. “openhab:habopen”)
Amanda backup password (no default, applied when installing)
Nginx reverse proxy login (no default, applied when installing) For manual configuration see here.
InfluxDB (No password set by default)
Grafana visualization (“admin:admin”)
This link is also about The Console.
I have just upgraded my openHAB to 2.4 so I will asap have a look at the latest OpenWeatherMap binding too.
2.4 works just great, I am running openHAB on Linux Mint 18.4 (I will remember) and there is an automated upgrade in this OS, so I used it for openhAB and it works, just have to reboot.
You can try to access the console via $OPENHAB_RUNTIME/bin/client command instead of using ssh.
Did you perhaps changed your password?
To reset the password edit the /var/lib/openhab2/etc/users.properties file manually by replacing the password or password hash (including {CRYPT}) with your new password in clear text (see section Changing the Password). By default, the line with the password contains the text openhab = , followed by the current password (e.g. habopen ) or a password hash (e.g. {CRYPT}4AE1A0FD...{CRYPT}).
Indeed I changed my password. However I only changed the openhab password. This is irrelevant for the console right? And I tried logging in into the console with the original “openhabian” and my changed password.
Prime cause is that the forecast daily is no longer included in the FreePlan of OW, read this OW-conversation. Forecast is now part of the 16day Forecast option…
The “only” free part is a forecast of 3 hours…
The forecast query is called in succession to the standard call and as such, “hard coded” into the (old) bundle weather provision:
…/addons1/bundles/binding/org.openhab.binding.weather/./src/main/java/org/openhab/binding/weather/internal/provider/OpenWeatherMapProvider.java
One will need to “update/compile” the source (disable FORECAST url) and go into the hassle in updating the platform where OH is running etc.etc.
Wat I did was updating the source (OpenWeatherMapProvider.java) , and nullified (return null) for “getForecastUrl()”.
Add/update on its own a relatively simple but sequence tedious activity:
compile source java/jar (execute mvn clean install) in : …/…/addons1/bundles/binding/org.openhab.binding.weather/
– which will generate a jar file in: …/…/org.openhab.binding.weather/target/x.y.z.SNAPSHOT.jar
– One can also use Eclipse-IDE, export target but I prefer the simple command-line.
Remove the old 1.11 weather-binding, best doing this via PaperUI
Temporarily move away the …/services/weather.cfg (this will allow openHab to clean the cache).
Using the Karaf-console, remove the openweather in-memory config:
– check existence of: config:list "(service.pid=org.openhab.weather)"
– delete the dynamic config: config:delete org.openhab.weather
– check absence of: config:list "(service.pid=org.openhab.weather)"
Insert/bring back the weather config file into openhab folder: …/services/weather.cfg
Insert/copy the compiled jar-result file ( from step 1) into openhab folder: …/addons
I just tried to use this binding for the first time …
I think you are right although I could not see the API call even after enabling DEBUG logging for the binding. The bridge stays offline and I get the same error in the logs
So I guess this binding is officially broken unless somebody changes the API call