[New Binding] Ambient Weather WS-1400IP weather station

Tags: #<Tag:0x00007faed18180a8> #<Tag:0x00007faed181ff10> #<Tag:0x00007faed181fda8>

My mistake about the degrees C, I forgot I had played with the ability for the binding to follow the regional settings of Openhab, this is only done for the temperature and nothing else. I had not done it for the other settings as some of them have 4 different units they can be set to like wind. KM/hr, m/sec, Knotts, miles/hr, fps…
It would be possible to automate this by scraping the settings page just like what is done for the livedata and then setting up the %units% but that is a LOT of work which I am not keen on doing until I hear back from @captndelta so I can upload the changes to his github page in a way that wont effect the other bindings all in the same project.

@Fa_Bien
It is not worth the time to change it as it is a scrape of what the station provides at the livedata page and I don’t see a way of changing it in the IP Observer settings… You could use a rule that whenever the channel changes, set another String to the current time using Openhabs methods to display it in whatever format you wish.

@matt1 sorry I forgot it was a scraping of the live page! Yes, seems the easiest would be to create an other item with the current time. Thanks

Trying to install this binding, but when I add the .jar to Addons, OpenHAB barfs on it with this error:

/usr/share/openhab2/addons/org.openhab.binding.ambientweather1400ip-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: A bundle is already installed with the name "org.openhab.binding.ambientweather1400ip" and version "2.5.0.201901311229"
	at org.eclipse.osgi.container.ModuleContainer.install(ModuleContainer.java:267) ~[?:?]
	at org.eclipse.osgi.storage.Storage.install(Storage.java:544) ~[?:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.installBundle(BundleContextImpl.java:146) ~[?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.installOrUpdateBundle(DirectoryWatcher.java:1037) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:963) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:884) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:489) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]
2019-03-26 12:31:09.681 [WARN ] [ig.xml.osgi.XmlDocumentBundleTracker] - The XML document '/ESH-INF/thing/thing-types.xml' in module 'org.openhab.binding.ambientweather1400ip' could not be parsed:  : ParseError at [row,col]:[183,33]
Message: /var/lib/openhab2/cache/org.eclipse.osgi/261/0/bundleFile :  : ParseError at [row,col]:[183,33]

I don’t already have it installed, it’s not in the bundle:list, and I’ve cleared cache, so I think the error message is a red herring. But thing-types.xml [183,33] is just a label close for Outdoor Battery, so I don’t see any problem there.

Any suggestions?

Have you tried turning it off and back on again? old trick works as it appears to be look at a cache file and you said you deleted them.

:smile: Yep, I’ve rebooted since clearing cache, didn’t help.

Does the binding work? What version openhab, java version and is it Zulu and what platform are you running it on? If the binding works then just ignore it till next time you upgrade.

No, unfortunately the binding doesn’t work (doesn’t show up in Bindings list). I’m running OpenHABian 2.4.0-1 on an RPi; versions are all “latest stable” releases.

At this point, I’m thinking of three main possibilies:
A) there’s another cached version of the plugin somewhere I can’t find;
B) my HAB install has something broken that is preventing it from loading any external addons;
C) there’s a version incompatibility between this particular plugin and the version of HAB I’m running.

To eliminate B I’m going to try installing some other external plugin just to see if it works.
For C, I guess I’ll have to try upgrading.
For A… No idea. I’ve done system searches and can’t find anything named “ambient” left over.

Do a bundle:list in Karaf console.

Also worth putting karaf into debug logging to see if it gives clues.

Thanks Matt1. I did check bundle:list, but haven’t tried debug karaf; will give that a shot.

Fixed! All I did was change log level to debug and restart OpenHAB; it then accepted the ambientweather addon! I’ve changed logging back to INFO and everything appears to be working fine.

Thanks for the help!

I know this is from over 6 months ago but could you provide your changes on github? Fork the Hentschel addons repo, apply your changes, commit/push, and maybe even submit a pull request to incorporate your stuff into master. This doesn’t require captndelta to reply to you here.

You made some good changes. I really appreciate them but since they’re not under source control we can’t build on what you did.

1 Like

Yes as Thomas released it with EPL1 license marked on the repository I believe that is not an issue, however out of respect for Thomas I did not wish to create a new repository but to have the changes added to his project. Now Thomas has not been around or answered in >12 months (June 2018 was last contact) I feel at some point we need to do something to keep his hard work (Thank you) creating the binding useful for the community. I just don’t know what the correct way to go about it is.

I don’t believe we can submit this to the official Openhab project as the person who does that needs to sign off that the majority of the work is theirs and not the work of other people. I can not do that and this is the reason why I will not be spending any time doing coding on this until this situation is sorted out.

I have it sitting in a private GitHub repository currently so it is backed up and could be made public with the tick of a box. The jar you can download is also already converted to the bnd build system so will work on future Openhab releases. If you are wanting to develop it further then I am happy to send you a zip file but we need to think about making it easy for multiple people to contribute to and also have the goal of getting it into the Openhab project.

What do you see as the correct way to move forward is?

I went to latest build and get : -(
:19:09.177 [ERROR] [.core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-ambientweather': Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-misc-openhabcloud; type=karaf.feature; version="[2.5.0.SNAPSHOT,2.5.0.SNAPSHOT]"; filter:="(&(osgi.identity=openhab-misc-openhabcloud)(type=karaf.feature)(version>=2.5.0.SNAPSHOT)(version<=2.5.0.SNAPSHOT))" [caused by: Unable to resolve openhab-misc-openhabcloud/2.5.0.SNAPSHOT: missing requirement [openhab-misc-openhabcloud/2.5.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.io.openhabcloud; type=osgi.bundle; version="[2.5.0.201908140429,2.5.0.201908140429]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.io.openhabcloud/2.5.0.201908140429: missing requirement [org.openhab.io.openhabcloud/2.5.0.201908140429] osgi.wiring.package; filter:="(&(osgi.wiring.package=io.socket.client)(version>=1.0.0)(!(version>=2.0.0)))"]]

@shorty707

This thread is about a binding that is not part of the official distro. It looks like the issue you’re reporting involves the binding that’s part of the disto. Correct? If so, you should report in this thread.

Thanks for pointing this out. I did not see that there are 2 bindings.
I understand yours needs an ambient weather API which unfortunately stops me for going your way.
In Europe there are actually only rebranded versions of the observerIP unit which are recognized by their deviceID from AW and not allowed to use their cloud services.

Well this is the nature of open source that somebody can fork and continue.
IMHO we should not hope and wait but just push your version now to an offical openhab binding.
you can give some credits to him in the wiki :slight_smile:

btw. do you have a link to download the JAR with your modifications?

You can download the jar precompiled for you here.
http://www.pcmus.com/openhab/WeatherStationBinding/

Source code is here should you wish to make changes/fork…

Only issue I know of is if my router/switch reboots I get multiple different errors in the logs until it starts back up again. Comes back fine when switch is working again so have not bothered to fix, but if someone is making changes this would be great to fix :slight_smile:

I am missing the “daily gust” as possible channel here :-/

in my RegEx I had 3 different “winds”

Number LOCALWEATHER_avgwind "Windgeschwindigkeit  [%s km/h]" <temperature> { http="<[WeatherObserverCache:5001:REGEX(.*?avgwind.*?value=\"([0-9]*.[0-9]*)\".*)]" }
Number LOCALWEATHER_gustspeed "Windböe  [%s km/h]" <temperature> { http="<[WeatherObserverCache:5001:REGEX(.*?gustspeed.*?value=\"([0-9]*.[0-9]*)\".*)]" }
Number LOCALWEATHER_dailygust "Stärkste Windböe Heute [%s km/h]" <temperature> { http="<[WeatherObserverCache:5001:REGEX(.*?dailygust.*?value=\"([0-9]*.[0-9]*)\".*)]" }

like on the devices page:

I can confirm that mine does NOT have the max daily gust. What brand is yours and what version is shown at this link? Mine is 2.2.5

http://192.168.xx.xx/livedata.htm

It is very easy to add it if you show a small section of the file returned from that link. Use inspect source or save and open the file in a text editor. I’m too busy to add it but you can compare what I changed to add the Last updated time channel. Need to edit 3 files and compile.