28.10.2008 19:36

Weatherstation TOPCOM 265 NE - Linux software

This weather station has no included sotware for Linux. At pages pendec.dk I found a wwsr utility able to read back some data from weatherstation. This program had however several problems, which I am trying to fix. According to this page this should work for

this I can not guaratee. I tested my modification only at

As pendec.dk forum is not sending registrations, I have to public my modification here.

In pendec.dk forum I found a wwsr2 - modified version of this utility that works also at USB 1.0 devices. It can be compiled also for other than i386 platforms. This wwsr2 utility is not able to interpret the rain data correctly and is also incorrectly handling the temperature data - actually when temperature is bellow zero. In addition to original wwsr utility it is not only able to display values that are stored in station every interval, but also actual values.

Rain

For the better interpretation of rain data I would like to thank to kubajz. By a simple experiment he found that rain is a counter of flip flops of rain sensor. One flip according to station display is 0.3mm of rain. The rain is only holding the counter from the beginning of the station run. Other values are calculated. My total rain value at station display is not absolutely the same as what I calculate with this approach. it has some offset, to the calculated value. This is not yet clear to me why. 1h rain value I calculated from previous value (the one stored in station memory) and actual value. This is not the best method but seems to produce at least some data showing 1h rain.

Temperature below zero

Fo readout of temperature there was used only simple unsigned char. This is not correct as It can not read out data of temperature below zero. When tempareture drops below zero, I got values above 32768, however this is not a binary complement. It seems it is just last bit is a sign. It seems the station can have + and - 0. This is also what I implemented.

Statistic

As original utility has very unsystematical output, I added option -y that prints out the output in a way that it can be easily parsed. Sure, this utility can directly print and store the data in database, but this is a common practice to have separate part that needs to be run as root to access the USB device and part that is handling the statistic and web pages. At the moment I also have a perl script, that is reading the weather data and storing them in rrd round robin database. It also creates basic html pages with images representing those values. I saw there are several other more advanced programs to capture and display meteo data, however I did not found any that is GNU GPL - free to use.

Source

Software for USB communication with station wwsr.c.

How to compile

On my Linux system I have to compile this source with:

gcc /usr/lib/libusb.so wwsr.c -o wwsr

libusb.so is for me in package libusb-devel.

Project page

As more people seems to be interested, I created a project page at meteolinger.lowlevel.cz.

Comunication with Topcom

It's already several month I wrote to Topcom asking them for a documentation of the communication protocol for Topcom 265 NE. Here is my email thru support form:

Message sent on Fri 12th Sep, 2008 05:08 - EST                                          
                                                                                        
*       Name: Adam Pribyl                                                               
*       Company:                                                                        
*       Email: x@lowlevel.cz                                                       
*       Telephone: +42066666666                                                        
*       Country: Czech Republic                                                         
*       Language: English                                                               
*       Message:                                                                        
        I bought your National Geographic Weather station 265 NE. The                   
provided software is not compatible with my Linux operating system. I                   
was looking for a software or driver at your pages, but there is none                   
for Linux just for Microsoft Windows which I am not going to buy. Please                
could you provide a software with at least limited capability, to read                  
out the data from this Weather station for Linux family of OSs? If not,                 
could you publish or provide us at least the comunication protocol that                 
is used to comunicate with the device, so we can write the software on                  
our own? Thanks in advace.                                                              
*       Serial Nr: 7864990848688 ()                                                     
*       Producttree:                                                                    
                                                                                        
        *       National geographic                                                     
        *                                                                               
        *                                                                               
        *                                                                               
                                                                                        
*       Product name: TOPCOM 265 NE                                                     
*       Problem: Drivers 

And here is the answer from Topcom:

Date: Thu, 4 Dec 2008 10:10:45 +0100                                                    
From: Topcom Voice Support                                
To: xl@lowlevel.cz                                                                  
Subject: RE: Topcom.net contactform                                                     
                                                                                        
Dear Mr. Pribyl,                                                                        
                                                                                        
Thank you of contacting us.                                                             
                                                                                        
I'm very sorry for this late reaction.                                                  
                                                                                        
Unfortunately it's not possible to get access to this communication                     
protocol that you asked.                                                                
                                                                                        
The article is only useable with Windows and we must disappoint those                   
customers who're working with another system.                                           
                                                                                        
We hope to have been of assistance with the above information. Should                   
you require further help, please do not hesitate to contact us via our                  
website at http://www.topcom.net                                
                                                                                        
Best Regards,                                                                           
                                                       
Topcom Helpdesk                                                                         

Great software. I´m running wwsr on ubuntu 8.10 with NE265. Works perfect. Great! I’m using it on Voyage linux 0.6 on Alix (AMD Geode) HW and it works like charm.

Libor (URL) - 11.06.2009 16:54

Thanks for making this available to us *nix users!

One question: how can I change wind speed units from the
default m/s to knots? I’ve modified the perl code slightly:
$scale = “knots”;
$value *= 1.943846; # convert to knots
just before pushing to the wind hash, seems to work but might have unwanted repercussions ;’)

A small configuration (preferences)file would be a nice addition. Or querying the serial output for the user’s custom units and scaling appropriately.

Thanks again for a fine piece of software! I think this modification is OK. I am not sure how to detect user preferred units from station data.

covex - 09.10.2009 15:49

Works on my WH-1080 model also! Great job. However I do not see so much activity here. Maybe you should try to open up this project to the community a little bit more, with a forum for example? And please translate this form to english…

Anyway, thanks for this software.

Bengt (URL) - 27.12.2009 19:14

The reason is there is quite a lot of other projects, also there was another branch of wwsr rewrited in more proffessional way. However I use this for more than a year and I am pretty happy with it. The main problem with any change is backward compatibility, what is something some people do not want to respect.

covex - 09.01.2010 11:28

Has anyone else checked the raingauge scaling.
I poured 110gm of water (used weight as digital scales were most accurate way to measure) and counted 38 counts (both visually and as reported by panel) and this gave me a figure of 0.5263mm or 0.02072inch
I would be interested in any data others have on this

oldgadgetboy - 14.11.2010 23:07

Well, this is not that easy to count. 110g of water cca 110ml ~ 110cm3. To count the rain you need to know the area of rain sensor and this I do not know. We are using empirical equation found by observation of the meteo station display – 0.3mm per count. Total rain than corresponds roughtly to what our meteo institute is reporting too.

covex - 18.11.2010 17:38

Some info regarding to rain senzor.
The manual for WH1090 (same as topcom 265 NE, wh1080, etc.) states that:
1. precision of sensor is +- 10%.
2. accuracy is 0,3 mm (for amount < 1000mm of rain)
3. accuracy is 1mm (for amount > 1000mm of rain)

I think, taht this is explanation why is not your total same as computed total… This info is interesting, however I am not sure how to apply it. I’ve checked the NE 265 display today – Total rain shows 1768mm, while my readings calculate 1791mm. To me it seems there is constant offset.

I tried to reset the total rain on the station, and it seems the returned counter bytes are still showing total amount 1791mm, just display shows 0. Therefore my explanation is pretty simple – this offset is probably due to production testing of the device, then they “reset” the counter so the display shows 0 but internal bytes are still counting, just there is somewhere inside the station stored “virtual zero”. I do not understand why it’s made this way, but it is looks very probable to me.

covex - 07.01.2011 09:49

Hi there

Has anyone tried to rewrite this code for c#? I’d really like to write som code to handle the communication with my 265 NE cause the Easy Weather-applicatin really sucks.

Cheers

Martin

martin - 25.05.2011 11:10

Email comment