Wunderground forecast rain total

I’ve been working with wunderground and the weather binding. I’m populating basic data just fine. I’m struggling, however, to locate the info I need. I’m migrating off of the vera platform and used a plugin that created a virtual switch based off of historical and forecasted inches of rain.

As of right now, I seem to only be able to get in/hr of rain. I doubt that multiplying by 24 gives me total rain for the day. It looks like the info is coming through using trace as: precip_today_in. I just don’t know how to get to the data.

I’m open to suggestions, different ways of doing things. I have mysql persistence setup and working already.

Basically, I use this virtual rain switch to bypass my irrigation system. I looked at the irrigation example but firstly it seems to be missing info explaining the .items and secondly, it appears they are guessing based on pictures. I don’t care for that path.

2015-12-24 18:05:19.008 [TRACE] [.b.w.i.p.AbstractWeatherParser] - Property not mapped: ‘current_observation.precip_today_in’ with value ‘0.58’

The two general approaches are:

  1. Ask a maintainer of the weather binding to add precip_today_in or equivalent to the Weather binding, or
  2. Stop using the weather binding and switch to using the HTTP binding and XSLT transformation.




Number WundPrecip "Precip [%.2f in.]" <rain> (Weather) { http="<[yourWeather:300000:XSLT(wunderground_conditions_precip_today_in.xsl)]" }


<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:output indent="yes" method="xml" encoding="UTF-8" omit-xml-declaration="yes" />

	<xsl:template match="/">
		<xsl:value-of select="//current_observation/precip_today_in"/>
1 Like

I would suggest to go to option n.1

In facts, why if we have a Weather binding, why don’t try to help the maintainer to complete that work as much as possible?

I will ask also to try to complete with meteoalarm warnings.

I’m switching from HTTP binding solution to that binding, the reason is to simplify as much as possible the configuration … Am I wrong, watou?

Any suggestion would be appreciated



You are not wrong at all. The best path is to help improve the weather binding so all can benefit from a simpler solution to get weather data. But in the case where someone wants an immediate solution, the older approach of HTTP+XSLT is still available. And there is at least one other approach where you could use both bindings together.

Thanks! I figured that was the case. I was hoping there was a simple extension that could be done on my side but I’ll lobby for the change.

Luckily, it’s winter here in New Hampshire so my irrigation system is all blown out. I have about 5 months to get this resolved.

I think I will review the trace again and ensure I know what all to ask for as I suppose asking for the maintainer to just add all would be asking too much :smile:

I’m sorry for the newb question… how would I contact the maintainer? I’m new to this community and not sure where to find that info. I found the binding in github: https://github.com/openhab/openhab/tree/master/bundles/binding/org.openhab.binding.weather

I just don’t want to start randomly contacting people!

You could either contact the maintainer group or contact the dev of the weather binding directly, it’s @gerrieg .

Have fun.

I would also recommend raising an Issue on the github so that progress can be tracked.

1 Like

Good idea! :smile: https://github.com/openhab/openhab/issues/3596

Well I must confess with some more reading of traces and API info, it appears the data I’m looking for is in fact the “type=precipitation, property=rain, unit=inches”. Adding forecast=1,2,3 etc gives me future. The mapping actually gets the info from forecast.simpleforecast.forecastday.qpf_allday.in. The current_observation.precip_1hr_string is just another place the same data comes through.

That being said, I did find that there are a lot of “property not mapped” that may come in handy for some in the future. I have parsed the data and pasted all of the “not mapped” items to this pastebin: http://pastebin.com/raw/XPciVSva

1 Like

I could add some properties if you are missing something, but i don’t like to add all the properties from all providers. I know, each provider sends more properties and i picked out the most useful and mapped them into a common model.

Remember that the rain property is mapped for different providers, so you can easily switch the provider and you don’t have to change your rules. If you like a special Wunderground property, it’s no problem to implement but you are tied to Wunderground.

So do you still need another property or is the rain property enough for your needs?

I understand fully. I think I’m ok.

I think what threw me off is the list of items in the wiki showed in/hr for “rain”. That suggests it’s the expected in/hr currently. I find that if I do {weather=“locationId=home, forecast=0, type=precipitation, property=rain, unit=inches”} I get what I believe is total IN for the current day.

Of course it doesn’t always match up with what the web version shows but is pretty close so I’m monitoring it to see what happens.

Thank you for your hard work!

That doesn’t sound like the same meaning as precip_today_in, does it? The rate of precipitation per hour would be only accidentally related to total precipitation for the current day. I could see how weather binding users would very much like a running total of rain for the current day, which is not conceptually related to forecasts at all.

You may be correct which is why I planned to watch the true weather and persistence info. In the trace I have from the other day, qpf_allday.in = 0.00 where as precip_today_in = .58

Perhaps we can get precip_today_in mapped?

see https://github.com/openhab/openhab/pull/3598

Thanks for updating it. Could somebody point me in the right direction to get my binding updated? I find the Precipitation.java file that was updated on github but don’t know how to get the changes inside my binding .jar file. I’m assuming it requires some form of collecting all the source and compiling it?

The change was merged yesterday morning, and that means it ought to be in the nightly build addons.zip file.

Oh so grab the SNAPSHOT-addons? I tried re-downloading the bundles.zip from the main page but it appeared to be stale.

Yes, you would remove the existing org.openhab.binding.weather-1.7.1.jar from addons and put the nightly build version org.openhab.binding.weather-1.8.0-SNAPSHOT.jar into addons.

Excellent, doing so now. I know I read someplace that the 1.8.0 addons work fine with 1.7.1. Side question. Should I pull all the nightly builds for the addons I’m using or only bother if I notice a need? I’m used to Vera updates breaking my whole system :frowning: I think you do/did use vera IIRC. HEHE.