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

Tags: #<Tag:0x00007f2fb1746f70> #<Tag:0x00007f2fb1746d90> #<Tag:0x00007f2fb1746c00>

I finally got around to finish up the binding for the Ambient Weather WS-1400IP weather station (see https://www.ambientweather.com/amws1400ip.html). They’re also sold under other brand names. The binding works locally, no need for cloud accounts such as WeatherUnderground etc.

Some documentation and the source code is here: https://github.com/HentschelT/openhab2-addons/tree/master/addons/binding/org.openhab.binding.ambientweather1400ip
For configuration, it needs the IP address or hostname of the little gateway device (IPObserver) that comes with the weather station.

You can download the latest addon jar file at https://github.com/HentschelT/openhab2-addons/tree/master/addons/binding/org.openhab.binding.ambientweather1400ip/releases , just drop the jar file into the addon folder of your OpenHAB installation. Once I got some feedback, I’ll probably add it to the market place for easier installation.

Cheers,
-Th

I will try it.
Dropping the jar didnt load the binding.
Maybe OH needs a restart and I will try later

IIRC, you’ll need to restart openhab for the addons to be picked up. There are a few threads on this forum how to trouble shoot this when that doesn’t happen.

normally not
it just picks them up when dragging them to addons

in this case not- also after oh restart its the only binding which is not starting and not seen with bundle:list

Great news you may have saved me from doing this myself should it solve the issues I have with my setup.

Will it work with mine, see link below? Both of our units are made by the chinese company FINE OFFSET and then rebadged by many different marketing companies around the world.
http://www.foshk.com/Wifi_Weather_Station/WH2950.html

I was going to look at picking up the RF packets directly from the outdoor unit so I had a fully redundant setup where the indoor unit still sends to weatherunderground and I had a binding to uses the data locally fully independant. I like backup systems and the second method can check and upload missing data to weather underground.

I have two issues with my unit which I was going to try and solve.

  1. Internet connection goes down and you loose all rain data being sent to weather underground, and you normally loose net connection in the middle of a storm right when you want the rain data being collected.
  2. My indoor unit has a glitch where it keeps trying to use 12.0.0.1 as my gateway instead of 192.168.1.1 Cause seems to be the router takes longer to come back up then the weather station so it defaults to the wrong address. Was going to put a timer delay on the weather station to delay it powering back up to solve this.

Not in my experience, you need to do the following if placing JAR files in manually. Then each time you upgrade you can just keep dropping the newer already enabled file in and forget you ever added this :slight_smile:

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 = ambientweather1400ip, anymore bindings here
Restart Openhab2

It may need a dependancy added to the addons folder as well. Try adding the jsoup file from here

I have it running in Eclipse IDE and all I get is this error as I have a different weatherstation that does not have the observerIP unit.
[ERROR] [.h.AmbientWeather1400IPHandler:109 ] - Connection refused: connect

Looking through the code I see that it fetches the data from this link which fails to work in a browser for me:

http://192.168.1.4/livedata.htm

If that link does not work for your weatherstation, then this binding will not work.

This project is worth looking at as it also has a screen scrapper for these weather stations and many other methods.
http://www.weewx.com/

Not sure what’s going on with your setup , and in all honesty, I compile my own distribution with the relevant bindings added to the bindings/pom.xml , so I’m not using.the addon folder.

However, the .jar is made via maven the same way any other binding is build. I’m currently away on a short vacation, once I’m back home Monday, I’ll try it and see what’s going on using the addon folder method.

Cheers,
-Th

Yep, the binding works by scraping the local data web page generated by the IPObserver unit connected via the network. If that’s different in your case, it’ll not work as is.
If there is a similar local generated xml/html/json document for your device, then sent me what the local URL is and a copy of the generated data page, I’ll see what I can do.
I’ll check your link when I get back home, perhaps there is something to glean from, but this also always needs someone with the real device to test it.

Cheers,
-Th

Thanks for creating the binding.

Example of a weather station for the binding here:
https://www.aliexpress.com/item/MISOL-IP-OBSERVER-Solar-Powered-Wireless-Internet-Remote-Monitoring-Weather-Station/32623952240.html

EDIT: I just purchased the receiver “ObserverIP” unit as a spare part from the seller in the link above for $50 delivered. Since the outdoor units are 1 way RF it should send data to both my LCD screen and also to the IP Observer unit at the same time.

This saves me hours of work using an esp8266 inside with the correct rf radio to sniff the packets and then forward the data on to WU and Openhab via mqtt.

So, you’re saying your unit doesn’t have any server ports open on the IP connected to the network? Just for kicks, ever nmap’d it?

But yeah, if there’s nothing to scrape from, it’s pretty though. Maybe a local DNS spoof to intercept the data upload to Wunderground?

Cheers,
-Th

Sounds like how weewx are doing it for the fancier units. Also to note they have reported stability issues scrapping the livedata in the weewx guides. It may not be true or only true of older firmwares, but it was enough for me to stay clear and buy my model. I have not spent any time looking at it yet, I have been too busy doing other development that is higher on the to do list. After I finish my DIY watering system controller I will want this working thou. I want a fully offline working system that keeps working when the internet goes down.

EDIT: Since I am interested in this, if you need any help finding the cause of it not running as a standalone JAR please let me know as I have recently gotten 2 bindings going.

so currently I do regex on the livedata.html with the http binding.

this binding makes it easier if you just start with it…
However I miss the battery values

I regex those aswell:

String LOCALWEATHER_inBattSta "Batt innen [%s]" <bat> { http="<[WeatherObserverCache:5001:REGEX(.*?inBattSta.*?value=\"(.*?)\".*)]" }
String LOCALWEATHER_outBattSta1 "Batt aussen [%s]" <bat> { http="<[WeatherObserverCache:5001:REGEX(.*?outBattSta1.*?value=\"(.*?)\".*)]" }

@shorty707 So what was the trick to getting the binding running?

corrupt jar
after a new download it works as every other jar by dropping it in the folder
sometimes the easiest things should be checked first :D:D:D

1 Like

Ha, good catch!

Reason was that I started out with all the number type channels, planning to come back to string value channels later. That “later” evidently never happened - until now. I updated the binding, please re-download, the two battery channels should be there.

Cheers,
-Th

I recently purchased an Ambient WS-2902A and was planning to use the Weather Underground bindings, but discovered that they have ceased issuing API keys and have changed direction since being acquired by The Weather Station (IBM). I discovered this post and was wondering if this binding utilizes the Ambient Weather Rest API. I’m thinking that this might be a good generic way to create a binding compatible with all Ambient weather stations. I’m an OpenHab newbie, but a seasoned Java developer. If there are no generic Ambient bindings that leverage the Ambient Weather REST API, I will probably write one.

2 Likes

See my post above where I mention a link to livedata url. The binding works by fetching a webpage from the ip observer unit. Also see the weewx project I link to as it has a forum which contain a lot of info on people hacking them and getting the feeds from all models.

If you do not own a ip observer unit, I purchased one for $50 as a spare part from China. Have not made time to play with it yet. I was considering doing a binding as well but it was just easier to buy the spare part and use this one which means I have a redundant system.

Any binding is best called something like “weatherstationFineOffset” as that is the company that makes them before getting rebranded into many brands around the world. Then you can mention the brands in the description like ambient weather.

As @matt1 mentions, this binding only uses the data the local ip observer unit provides, it doesn’t need or use any of the different cloud API’s. There are obvious advantages and disadvantages to that, but that’s what I needed :slight_smile:

@matt1, yea, I noticed the origins of the Wifi/IP unit after I already had published the binding, and thus didn’t wanna rename it.

Cheers,
-Th

I just installed this binding in my 2.4 snapshot release. It’s working very well with my WS-1401-IP station. Thanks for putting this binding together!!

A couple questions:

  • I tried to change my scan rate in the Thing config, but the change didn’t take effect. I’m wondering if this is an issue because I’m running on OH 2.4.

  • Speaking of scan rate, what’s considered a good scan rate?

  • It would be great to have a channel for the max daily wind gust. I could do it with a rule, of course, but since it’s on the livedata.htm page… (Unless it’s not supported in all versions of the firmware).

Again, thanks for this binding.

Edit: Do you need a call to updateConfiguration in the handleConfigurationUpdate method?

Edit 2: Just to be completely clear… The change to scan rate does change the scanning frequency. It just doesn’t persist the configuration to the Thing config.

I am on the fence of deciding what weather station to buy. I prefer the WS-2902A as it has a display and therefore it will give me info even when OpenHab is down.
Question is: Will it work with @captndelta Binding? I do like your local IP connection as I do not want to transmit station data to the cloud, as all of my stuff is running local (aside from Astro).
Anybody out there having any experience?