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

That is the display that my unit has which does not work with the binding, however the outdoor unit is a one way comms so you can send the outdoor data to the screen you like and also to the ip observer unit that will allow the binding to work. I purchased the extra box for $50

@matt1 What’s been your experience with the IP Observer module. Mine flakes out to the point where I am now automatically cycling the power every night at 00:15. At some point the response time goes from about 600 ms to 8000ms or more. I’m on the latest firmware.

FYI, I think I’m going to write a binding for the Ambient Weather Service. Instead of scraping the Observer IP HTML, the binding will talk to the online Ambient Weather API.

I normally prefer doing this kind of stuff locally, but I’m going to use the online service for two primary reasons:

  • I’m unhappy with the Observer IP reliability when scraping the HTML
  • I want data from both my WS-1401-IP station and from my WS-8482 station. I use the WS-8482 to monitor the temp of my garden (and hopefully the soil moisture with the soon to be release soil moisture sensor).

The binding will initially support two thing types: WS-1400-IP series stations and WS-8482 stations.

I’m hoping to use their Websocket-based real-time API, so that events will come to the binding as soon as the data is updated on the Ambient Weather service (i. no polling required).

I’ll post something when I get something working in case anyone is interested in testing.

I’ve got a working binding that would benefit from some feedback from additional testing. Please see my post here.

I don’t have much experience with mine yet, waiting for Christmas break to setup a number of projects. I have read that the ip observer is not stable when scraped on other websites which is why I have always planned to one day sniff the packets direct from the outdoor unit and capture it with a esp8266 that can talk to openhab as well as upload to wunderground.

Have you tried the wunderground binding? How is your new binding compared to wunderground binding and the scraping method?
Personally I would prefer a method that works during internet outages as that usually happens in a storm right when you want the data.

I use the weatherunderground binding to pull the daily forecast. For that purpose it works great. I’m pretty sure it doesn’t pull data uploaded from a PWS. Unfortunately, the weather underground API is scheduled to be turned off on Feb 15.

I’m happy with my new binding compared to the one that scrapes the HTML. In addition to getting my WS-1401-IP data, now I can also get the data from my WS-8482. which I use to monitor the temps in the raised beds in my garden.

I hear you about preferring a local solution. I would’ve much preferred to pull the data direct from the Observer IP, but it’s just too unreliable when scraping the HTML, even when cycling the power every night.

I have not done it but I was sure I had seen the URL somewhere for fetching the PWS (personal weather station) as the url format was hard to find I had to hunt for it which is why I am sure it is possible. That is not important if they are going to discontinue it and I would prefer a local non cloud based solution.

What I was planning would work around the unreliable IP observer as the ESP8266 would listen directly to the packets from the outdoor unit. This is probably a 120 hour job for me to find the time for as I have found bits and pieces of the RF protocol and know that they use 4bits for 1 sensor, 2 bits for another and the last 2 bits for yet another sensor making it slightly harder then watching a full byte in a sniffing/terminal program.

Have you played with scraping at different rates to see if a slower poll would solve the instability? Maybe there is a workaround other than power cycling?

While the API that the binding uses will be discontinued, there will be a free low-volume API available for PWS users. But I suspect the weatherunderground binding will need considerable rework to adapt to it.

Nice idea.

I wanted to get the data at least at the rate I’m uploading it to ambientweather.net, which is once a minute. Scraping at that rate causes issues every few days. I expect it would be fine for quite a while at a poling rate of every few minutes.

I wish there was another workaround. Whatever web serving software is running inside the Observer IP seems to have some serious issues.

I setup mine today to start some testing to see if mine is stable with this binding and scraping the live data page…

What firmware are you running? The following thread may have some helpful info about known issues with different firmware versions. The forum is a great resource to search and ask questions that are related to the ObserverIP.

http://www.wxforum.net/index.php?topic=31805.msg324204#msg324204

I am using Firmware 2.2.5 which is not from Ambient Weather but direct from Fine Offset. I noticed that in my firmware the webpage allows you to specify the website that you send the data to. I can choose custom and then specify a server IP and port to send the PHP/ASP/JSP data to. It may be possible to redirect this data to a new Openhab binding and then it would just need some very simple decoding of the packets into sensor data. This blog has useful info and shows others have done it before…

@captndelta
I am having some issues with the jar downloaded from the link in the first post of this thread:

  • When I setup the channel outdoor_temp it updates fine but it places degrees F after the number. I use Celcius here and the number is in Celcius when looking in paperUI, so the label that gets added after the number is confusing as the number does not match the label.

Suggest you make a change in this file and this section…

/ESH-INF/thing/thing-types.xml

    <channel-type id="temp_chan_outdoor">
        <item-type>Number</item-type>
        <label>Outdoor Temperature</label>
        <description>Current Temperature Outdoor</description>
        <category>Thermostat</category>
        <state pattern="%.1f °F" readOnly="true"/>
    </channel-type>
  • I also can not get the binding to accept a different update rate. Any ideas? when I save any value other than 60 it reverts back to 60.

  • Suggest you change the <category>Thermostat</category> to be more correct as there are Humidity
    Temperature categories that closer match the channels. See this link…
    https://www.eclipse.org/smarthome/documentation/concepts/categories.html

EDIT: In case it helps others to view more details in your logs use this in the Openhab console

log:set TRACE org.openhab.binding.ambientweather1400ip

I’m on the latest. v4.5.1. But, I’ve also tried earlier versions, as well.

The problem also is described here/
https://www.ambientweather.com/wswsfiup.html

I saw that, and considered it. But, in addition to my WS-1401-IP, I also want the data from my WS-8482, which I use to measure conditions in my garden (hoping soil moisture sensor will be available soon).

The easiest way to get timely data from both devices is to use the API to get the real-time event stream from ambientweather.net.

I reported this further up in this thread. The binding currently does not update the thing config when a parameter value is changed. You could manually change it in the jsondb. You need to stop OH before making the change or your edit will be lost.

True. The binding also could implement UoM, which let’s the framework take care of the unit conversion based on the locale.

I found and fixed a bug that stops the channels updating, due to the thing being offline when it updates the channels for the first time and hence you had to wait for a value to change to finally get shown. With rain not occurring every day this was a big issue as channels had zero values after a restart… Bug is now fixed and few other changes have been made, works great.

I have now been scraping for 24 hours scraping at 60 second intervals, and then a further 36 hours scraping at 20 seconds apart. No stability issues seen and it takes 380ms to fetch the livedata even after days I have not seen the value rise. Going to look at adding the ability to restart the hardware via the binding and then I can share the JAR with anyone wanting to help test the new changes.

New JAR file can be downloaded here and should work with any weather station that has an IP Observer.
www.pcmus.com/openhab/WeatherStationBinding

Weather stations that should work are:
WS-0900
WS-1400
WS-1550-IP
WS-2902A (if you add on the ip Observer)
WH-2950 (if you add on the ip Observer)
Plus any others that come with the IP Observer

You can add an IP Observers onto your setup if your outdoor unit is compatible and still keep your normal screen working at the same time.

To upgrade you need to remove the old Jar and place this one into the addons folder (after unzipping). Then remove any old ‘things’ and re-add the weatherstation ‘thing’ using PaperUI or the textual config at bottom of this post.

Quick list of changes are:

  • UV index channel fix.
  • Now waits until unit is ONLINE before trying to update channels which was causing missing info.
  • Can reboot the unit manually via a switch, or using an openhab rule, or also it is possible to auto reboot.
  • Displays the web delay when fetching the livedata.
  • Refresh time is now easily changed.
  • Should be easier to run ‘mvn clean install’ with less errors and warnings.
  • Removed unit labels as these can be added easily by user by adding labels in sitemap or item definitions.
  • Timestamp of last update scraped from livedata.

@captndelta
Please contact me so I can provide the changes to the code I have made. A big thank you for making this binding.

@mhilbush Thanks for helping with the url for doing a reboot.

@shorty707
Since you have the original binding working it would be great if you could test these changes.

Binding Configuration

*.things


Thing ambientweather1400ip:weatherstation:Weather1 [hostname="192.168.1.243", autoReboot=5000, scanrate=20]

*.items


Number WeatherOutdoorTemp "Outdoor Temp (°C)" {channel="ambientweather1400ip:weatherstation:Weather1:outdoor_temp"}
Number WeatherOutdoorHumidity "Outdoor Humidity" {channel="ambientweather1400ip:weatherstation:Weather1:outdoor_humidity"}
Number WeatherWindDir "Wind Direction" {channel="ambientweather1400ip:weatherstation:Weather1:wind_direction"}
Number WeatherWindSpeed "Wind Speed" {channel="ambientweather1400ip:weatherstation:Weather1:wind_speed"}
Number WeatherWindGust "Wind Gust" {channel="ambientweather1400ip:weatherstation:Weather1:wind_gust"}
Number WeatherSolarRad "Solar Radiation" {channel="ambientweather1400ip:weatherstation:Weather1:solar_radiation"}
Number WeatherUV "UV" {channel="ambientweather1400ip:weatherstation:Weather1:uv"}
Number WeatherUVIndex "UV Index" {channel="ambientweather1400ip:weatherstation:Weather1:uvi"}
Number WeatherRainHourly "Rain Hourly (mm)" {channel="ambientweather1400ip:weatherstation:Weather1:hourly_rain"}
Number WeatherRainDaily "Rain Last 24 hours (mm)" {channel="ambientweather1400ip:weatherstation:Weather1:daily_rain"}
Number WeatherRainWeekly "Rain this week (mm)" {channel="ambientweather1400ip:weatherstation:Weather1:weekly_rain"}
Number WeatherRainMonthly "Rain this month (mm)" {channel="ambientweather1400ip:weatherstation:Weather1:monthly_rain"}
Number WeatherRainYearly "Rain this year (mm)" {channel="ambientweather1400ip:weatherstation:Weather1:yearly_rain"}
String WeatherBatteryOut "Battery Status" {channel="ambientweather1400ip:weatherstation:Weather1:battery_out"}
Number WeatherResponse "Response (ms)" {channel="ambientweather1400ip:weatherstation:Weather1:web_response"}
Switch WeatherReboot "Reboot Station" {channel="ambientweather1400ip:weatherstation:Weather1:reboot"}
String WeatherTime "Time of last update" {channel="ambientweather1400ip:weatherstation:Weather1:receiver_time"}

*.sitemap


	Text label="WeatherStation" icon="rain"{
		Default item=WeatherOutdoorTemp icon=temperature
		Default item=WeatherOutdoorHumidity icon=humidity
		Default item=WeatherWindDir icon=wind
		Default item=WeatherWindSpeed icon=wind
		Default item=WeatherWindGust icon=wind
		Default item=WeatherSolarRad icon=sun
		Default item=WeatherUV icon=sun
		Default item=WeatherUVIndex icon=sun
		Default item=WeatherRainHourly icon=rain
		Default item=WeatherRainDaily icon=rain
		Default item=WeatherRainWeekly icon=rain
		Default item=WeatherRainMonthly icon=rain
		Default item=WeatherRainYearly icon=rain
		Default item=WeatherBatteryOut icon=battery
		Default item=WeatherResponse icon=time
		Default item=WeatherReboot
		Default item=WeatherTime icon=time
	}

2 Likes

@mhilbush
Just a note in case you are interested. I did see the response of my ip observer go very high say 6000ms once but it has not done it in over a week. For now I suspect it was caused by two openhab instances running, one set to update every second whilst I was doing testing and developing. Since only doing an update every 20 seconds it has been great.

Thanks. It sounds like the firmware you’re using is much more stable than the version I’m using. Are there any features missing in the version you’re running compared with the version you were running from Ambient Weather? I might switch.

@mhilbush
I have not changed firmware. Ambient weather do not make the weather stations, nor do they sell or ship outside the USA. People in other countries need to buy under different brands. I purchased an IP observer separately as a spare part with the brand Misol on it for $50 shipped to my door. So I have this weather station which sends the data to a colour screen at the same time as to the Ip Observer unit. Be sure to check the freq matches before buying as they are made in 433, 868, 915 mhz models.

Ambient weather are 915mhz
Aercus (sold in the UK), Pantech and Misol are all 433mhz

http://www.foshk.com/Wifi_Weather_Station/WH2950.html

The outdoor units only send RF blindly so you can have unlimited indoor units listening to the 1 outdoor unit. If you suspect your hardware has bad flash or ram possibly causing unstability then buying another Ip Observer as a spare part is pretty cheap and would allow you to keep the firmware stock on one whilst playing with a second.

My firmware version has a custom upload feature which does not appear to work. I cannot enter in the URL to the ambient weather website as it appears to have a character limit and I cannot enter the full url. It cuts the URL short. So I tried to enter in a local IP address which fits, but my router logs show that the weather station does not attempt to send packets to the IP I gave it. This would mean you would need to capture and re-direct the packets headed to WU to resend them to your desired URL.

I do not know who writes the firmware and which version Ambient possibly split off from the version I have. It is possible that Ambients is split from an older version and since they made so many customisations they are vastly different to what other brands use. The weewx forum is the best place to ask what version is best.

1 Like

Hello @matt1,
can you please create another channel to include the receiver time so we know when the readings were observed ?

Thanks

Done, uploaded to here
www.pcmus.com/openhab/WeatherStationBinding

Cheers @matt1 for the quick reply and action !

Hi Guys. I have this weather station. Will this work with openhab.
And can you please summarize the topic above. What exactly I have to do with this JAR file? I am not an expert just use Paper UI and some text config file.