Are you sure?
I’m on OH 4.2.1 using the addon-store version of the Weather calculations (4.1.0), and it works fine.
Hi,
Last month I published a version for 4.2.x to the marketplace. Can you try uninstalling your current binding and getting the new one? I don’t think the new version was completely necessary, I was just trying to be proactive, in case there was a problem with dependencies between 4.1 and 4.2 (which I don’t think there were any that affect us.)
Bill
My mistake, I did have it manually installed via jar-file.
I’ve removed it and installed the addon-store version, which now shows:
Weather Calculations [4.2.0;4.2.99].
idn …
is there anywhere better log to see what’s what?
edit found the issue: @hww3
Bundle IDs:
Error executing command: Error installing bundles:
Unable to install bundle https://bitbucket.org/hww3/org.openhab.binding.weathercalculations/downloads/org.openhab.binding.weathercalculations-4.2.0.jar: org.osgi.framework.BundleException: Error reading bundle content.
Hi-
That URL looks okay, I just tried to retrieve it, (though there’s a redirect or two from bitbucket to aws-s3)… can you try uninstalling the binding and re-adding it? Removing the binding should not cause your existing configuration to be harmed.
It’s not installed (or i can’t find it anywhere already). Strangely I did not uninstalled it, after 4.2.1 it just dissapeared and cannot be instelled again from marketplace nor manually
That’s strange. There were no code changes, just using newer version of the openhab libraries and dependencies.
Are you getting error messages in the log? Does it (or any other version) appear in the output of bundle:list?
sandly it isnt, so can’t uninstall nor install now.
openhab> bundle:list | grep Calculations
openhab> bundle:install https://bitbucket.org/hww3/org.openhab.binding.weathercalculations/downloads/org.openhab.binding.weathercalculations-4.2.0.jar
Bundle IDs:
Error executing command: Error installing bundles:
Unable to install bundle https://bitbucket.org/hww3/org.openhab.binding.weathercalculations/downloads/org.openhab.binding.weathercalculations-4.2.0.jar: org.osgi.framework.BundleException: Error reading bundle content.
openhab>
not sure where to look at now
Did you try to download the jar file and place it into the addons directory?
Then restart OH.
It’s probably here: /usr/share/openhab/addons/
that worked for some absolutely unknown reason tho … so confused
It’s /possible/ that openhab/karaf isn’t properly reading redirects from the bitbucket download site. Could you try downloading that file and dropping it in your addons directory?
I’ve started moving away from bitbucket, so this won’t likely continue to be a problem.
Actually, I just checked and this file is in the new location now, so you might be trying to download from a location that doesn’t exist.
Try this:
http://bill.welliver.org/dist/openhab/org.openhab.binding.weathercalculations-4.2.0.jar
that indeed worked.
so it must be something weird in bitbucket and my security for internal network… {paranoia-hat-on}
Just following up… glad that worked. Bitbucket seems to store their downloads in amazon s3, so when you click on the download link, it redirects to s3. I’m guessing karaf (the framework openhab uses) doesn’t like that for some reason. I’m trying to move away from bitbucket for these things, so hopefully it won’t be a problem in the future.
@hww3 Bill, can you please give me hint where to look (some logs or smthing) if calculations are not being calculated again?
addon is installed, but data are not being populated. Don’t see any errors in the OHLog file, but maybe it’s logging somewhere else?
Thank you
I’d start by making sure the items you’re using to drive the calculations are properly specified in the binding config. Then, you might want to turn logging up for the binding and for events in general:
log:set DEBUG org.openhab.event
log:set DEBUG org.openhab.binding.weathercalculation
This will generate quite a bit of log traffic depending on the amount of items you have. To set the logging back to defaults, use:
log:set DEFAULT org.openhab.event
log:set DEFAULT org.openhab.binding.weathercalculation
Here’s an example showing the wind direction item I’m using to drive some of the calculations:
17:09:56.446 [INFO ] [openhab.event.ItemStateChangedEvent ] - **Item 'SmartWeatherSky_WindDirection' changed from 235 ° to 285 °**
17:09:56.446 [INFO ] [rnal.WeatherCalculatorEventSubscriber] - **Receive Update: Item 'SmartWeatherSky_WindDirection' changed from 235 ° to 285 °, SmartWeatherSky_WindDirection, ItemStateChangedEvent**
17:09:56.446 [INFO ] [ns.handler.WeatherCalculationsHandler] - **Item <SmartWeatherSky_WindDirection> changed to 285 °**
17:09:56.447 [DEBUG] [ns.handler.WeatherCalculationsHandler] - toUnit: val: 285 °, 285 °, unit °
17:09:56.447 [DEBUG] [ns.handler.WeatherCalculationsHandler] - System zone: UTC
17:09:56.447 [DEBUG] [ns.handler.WeatherCalculationsHandler] - Configured zone: America/New_York
17:09:56.447 [DEBUG] [ns.handler.WeatherCalculationsHandler] - Wind direction changed
17:09:56.447 [INFO ] [openhab.event.ItemStateChangedEvent ] - **Item 'WeatherCalculations_WindDirection' changed from SW to W**
If your items are all specified correctly, and you’re not seeing event subscriber messages showing that the weather calculations binding has received the update, it’s possible you need to either restart the binding (to get the subscriber to reconnect), or maybe something as drastic as restarting openhab. I’ve only ever had to do that when I was making a lot of changes to the binding and openhab got confused, but it should clean up any lingering subscriptions, etc.
Let me know if that provides any hints as to what might be going on.
Bill
thank you, well there is nothing in the log (so far)
oh restarted as well just to be sure.
all items are still the same, all populated, all there
can I somehow force calculations to start - to see something in logs?
edit: uninstalled & installed binding again, and now it works … well this is strange indeed. Maybe because I had it some time ago installed manually something somewhere is broken
That is a bit unexpected, though if openhab gets confused and doesn’t deliver the events to the binding like it’s supposed to, then it won’t work… it really does depend on that, and every so often, openhab gets confused (this happens more frequently when you’re running multiple versions of the binding, either intentionally or accidentally, etc).
If you end up having problems again, let me know and we can try to debug in more depth, and maybe even find out the root cause of these problems.
thank you for your time indeed!
by the look of it yesterday, it was installed but not listed under Things, after remove&reinstall it’s back again (i have it in text configuration - so it does not need anything to be added by UI just remove/install)
But that leads me to something fishy in my OH as oh was updated to 4.2.2 therefore restarted and WC has been somehow broken again by this.
Any idea where to look, what to remove eg. caches, folder somewhere or something?
I’ve had that too on the latest OH stable update. I’ve installed the Weathercalculations binding via the “store”, and noticed that my thing was uninitialized. Found out that the binding was listed as not installed. Installed it again from the store and it works again.