Page 1 of 3

Other uses for easyweather.dat file

Posted: Mon 10 Jan 2011 4:30 pm
by steve
I could put a couple of quick hacks in the next build:

1. Do the check that TgT suggests (but this would not persist across sessions, i.e it would always take the latest entry as new data at start up)
2. Change the easyweather.dat interval to be a float (so you could specify 0.08, for example, to get an interval of approx 5 seconds)

But note that this would all be subject to the same limitations as the current code, i.e. the actual date and time would be ignored (all data would be taken as 'now'), it would only ever read the last line of the file etc etc

[Note to the possibly confused: this thread was split off from the WMR100/200 poll thread]

Re: WMR100/200 poll

Posted: Mon 10 Jan 2011 9:47 pm
by DigbyDave
Steve,

In my case that may be a viable solution, the way I have configured the WUHU to easyweather.dat format generation is that it only supplies a single line of data to the easyweather.dat file, not accumulative (don't need yet another DB of the same data). Cumulus is happy at the moment with this arrangement. WUHU can generate this line of data at time of reception of data or at a specified rate.
Can you inform me of what fields of the easyweather.dat file Cumulus actually maps so I can streamline the data line?

Regards

Re: Other uses for easyweather.dat file

Posted: Tue 11 Jan 2011 8:49 am
by steve
Here's the format of the comma-separated easyweather.dat file, with the fields Cumulus uses in red

easyweather.dat fields:
0 - Record no
1 - Transfer date
2 - Transfer time
3 - Reading date
4 - Reading time
5 - Interval
6 - Indoor Hum
7 - Indoor Temp
8 - Outdoor Hum
9 - Outdoor Temp
10 - dew point
11 - wind chill
12 - abs pressure
13 - rel pressure
14 - wind average
15 - wind average bft
16 - wind gust
17 - wind gust bft
18 - wind direction number
19 - wind direction text (N, NE etc, converted to a bearing in figures)
20 - rain ticks
21 - rain total
22 - rain since last reading
23 - rain in last hour (used as rain rate)
24 - rain last 24 hours
25 - rain last 7 days
26 - rain last 30 days
27 - rain last year (used as rain 'counter' to determine other totals)

Cumulus just keeps re-reading the last line of the file.

Note that I haven't changed this code for a long time, and I haven't considered it at all when doing other enhancements and bug fixes. I don't really want to start changing it too much just at the moment.

Edit: This is to document the fact that Cumulus now reads the date and time fields, and checks that they have changed before using the data from the file.

Re: Other uses for easyweather.dat file

Posted: Tue 11 Jan 2011 9:44 am
by DigbyDave
Thanks Steve,

Worked a treat. Now have a EW dat file of <80 bytes, shouldn't have too many read/write timeouts with that size.
Cumulus 1.9.1 seems happy with it. Once we get close to real time, wotz a missed reading or 2.

If anyone would like the WUHU action template just let me know.

Regards

Re: Other uses for easyweather.dat file

Posted: Wed 19 Jan 2011 2:36 pm
by TgT
DigbyDave, copy&paste wuhu template ;)

Re: Other uses for easyweather.dat file

Posted: Wed 19 Jan 2011 2:49 pm
by DigbyDave
WUHU to easyweather.dat template and example Action file. Obviously the action file will have to be modified to reflect your directory paths.
WUHU_Cumulus Action Template.zip
Regards

Re: Other uses for easyweather.dat file

Posted: Mon 31 Jan 2011 10:10 am
by DigbyDave
Steve,

Just noticed a problem with wind direction with my export from WUHU to Easyweather format. I noticed that whenever the wind direction was WSW that Cumulus would show N. Further investigation on the Easyweather format I found that for some reason they use NEE for ENE and SEE for ESE. I summise that they also do the same for the westerly coords ie SWW for WSW and NWW for WNW. These I cannot configure in WUHU to export in these forms. :bash:

No biggie, but just wondered if can think of a simple solution, if not I'll wait for native support of the WMR100.

Re: Other uses for easyweather.dat file

Posted: Mon 31 Jan 2011 10:22 am
by steve
DigbyDave wrote:they use NEE for ENE and SEE for ESE. I summise that they also do the same for the westerly coords ie SWW for WSW and NWW for WNW.
Yes, they do, strange as it is. I'd have to put in a option to use the normal format instead.

Re: Other uses for easyweather.dat file

Posted: Mon 31 Jan 2011 11:51 am
by DigbyDave
In the meantime I have created a little hack basic app that re-parses, not that I'm much of a programmer, the file to convert to these newly invented compass points (yet another task to keep an eye on). Is interesting that WUHU also uses these new compass points on their wind rose, but the export is as I would call normal. Wonder where the idea started? A translation from another language and coordinate system perhaps?

Re: Other uses for easyweather.dat file

Posted: Mon 31 Jan 2011 12:07 pm
by beteljuice
Wonder where the idea started?
Old English !

Sailors used to say North East by East, whereas us modern thickos say East (of) North East.

Re: Other uses for easyweather.dat file

Posted: Mon 31 Jan 2011 12:15 pm
by DigbyDave
North East by East is a point in between NE and ENE on a 32 point compass. According to wikipedia. http://en.wikipedia.org/wiki/Compass_points

Re: Other uses for easyweather.dat file

Posted: Mon 31 Jan 2011 12:58 pm
by beteljuice
Hmm ... thanks for that !

I can't find where I originally sourced the information, I'll go away quietly :oops:

Re: Other uses for easyweather.dat file

Posted: Mon 31 Jan 2011 1:01 pm
by DigbyDave
Was news to me too... was trying to find where they sourced the NEE etc convention.... ;)

Re: Other uses for easyweather.dat file

Posted: Mon 31 Jan 2011 1:10 pm
by steve
I think they just 'got it wrong'. Probably lost in translation; perhaps it's done that way in Chinese?

Re: Other uses for easyweather.dat file

Posted: Sat 05 Feb 2011 5:24 pm
by steve
I've changed the code so that it now accepts 'standard' compass points as well as 'Fine Offset' inventions.