Receiving Lacrosse weather station on Windows

Show off any of your RTL-SDR or cheap SDR related projects.
Post Reply
Posts: 2
Joined: Tue Dec 13, 2016 9:19 am

Receiving Lacrosse weather station on Windows

Post by JayMoer » Tue Dec 13, 2016 9:51 am

Hello All.

I bought a Nooelec RTL SDR NESDR mini 2 (~22€ on Amazon), and I want to share with you my attempts to decode weather signal from my LaCrosse "compatible" weather station.
The weather station is sold by Conrad, but is very similar a common Lacrosse product. The sensor are TX29-IT+, who are very commons. The station do not support hygromethry, only temperature.
I have the station (including a built in and an external sensor) and I bought an other external sensor. So I have 2 external sensors.

Now, I want to receive weather data on my computer, and later make a Rasperry autonomous sensor collector computer. To begin wy experiences, I use my own PC, running Windows Seven, but because I have in mind to use the RPI as the final computer, I have to keep in mind to make things compatibles, or use technologies available on both platforms.

Also, I'm "fluent" in PHP, and the final stage of my project will be a dedicated weather website (collecting my outdoors sensors), made in PHP. So I would prefere to have a complete solution in PHP, working on my Windows PC, but being to run on the RPI.

So basically, here is what I did to made somehting works under Windows.

Having RTL-SDR working on Windows in easy, and I successfully used SDR# to tune on my two weather sensor. I can hear the "clicks" every 4 seconds of each sensor. The TX29 protocol has been leaked several times, and a good analysis has been made by ... -hygro-TFA (in french). A Python library, Pydemod , already did all the jobs.
So i started by installing Python for my Windows box, and started playing with Pydemod. Not so easy as I expected, because the Pydemod code depend on math Python extensions, and use Python 2.7 . So I have to install the correct Python extension, and convert some Pydemod code from Py2.7 to Python 3.0, but it finally works.
The Pydemod (converted to Python 3.0) works fine, but is not able to decode the farest sensor, even by playing with the gain or other settings.

I tried to implement my own decoder, in PHP, but it was more a waste of time (but a great fun), for an unreliable result.

So i look for an other tool, and find RTL_433, but do not work for decoding this sensor, even the Windows version tuned on 868,2Mhz. But on a discussion thread, I found the project "rtl_868" : a Lacrosse TX29 decoder dedicated project, by GitHub user Sum-sum. This tool is a command line tool, writtend in C. It takes asinput the demodulated stream from RTL-SDR tools, or a raw data file.

Unfortunaly,it seems there is no EXE of this tools available somewhere.

So, I decided to create a virtual Linux Box, runinng in ... virtual Box ... and start the cross compiler chain tools. I use Ubuntu 14.4 server and the MingW CC/CPP compiler.
And after som minor modification of the original C code of RTL_868, I did succeed on compiling the tool, on my Linux Box, but with Win32 as the target system.

Now, I use my own mande "rtl_868.exe" binary on my Windows Seven computer, and it decode the weather signal. All my sensors are decoded, and I also decode the sensor of my neighbour. I think it is because RTL_868 use the FM modulator, more sensible than the AM used by Pydemod.

I reverted the C modification on the original project (Pull request is still pending...) : [] . The most courageous of you can build your own exe from this branch (maybe with MSVC or other Windows C compiler).

My own rtl_868.exe executable (build on Linux with MingW cross compiler) can be downloaded from my blog.

Now I'm working on the next parts of the projects : the PHP website and all the hardware infrastructure (connect the dongle on the RPI) and the software layer (weather daemon etc).

Posts: 2
Joined: Tue Dec 13, 2016 9:19 am

Re: Receiving Lacrosse weather station on Windows

Post by JayMoer » Thu Aug 20, 2020 9:35 am

Digging up a 4 years old post is funny !
On this previous post, I told you I create an .exe demodulator for Lacross weather station. But since this experiment I find a more smart solution.
The rtl_433 program is a very nice tool, and it can be easily extended to support new devices. Well, "easily" if you are fluent in C. But I finally added a Lacrosse decoder, for TX29 and TX35 sensor. Thanks to the active community of this project, my pull request was accepted. And now you can see on the Readme [] the support for Lacrosse sensor (numbered 75 and 76 in the device list).

Now my project is moving to this new software suite :
- a Raspberry with a SDR dongle. I added a ram disk of 50MB in the Pi for temporary storage and prevent heavy r/w access on the SD card
- a crontab trggering a script shell every 10mn
- this script shell did the following tasks :
- run rtl_433 for 30s to collect data from the sensor. Data are appended to a CSV file in the ram disk.
- after the 30s, a PHP process read the CSV file, do some formatting, and send data to WeatherUnderground webservice and my own weather webservice, hosted somewhere on the cloud.
- this PHP process also create a file for each sensor with the last measured value. This set of files is used by rpimonitor [] to add a graph of my sensor in the rpimonitor tool.

I'm now working on the front-end of the server side of this project. The webservice to collect data is done (store in a MySQL database - I keep the last value of each sensor for every 10 minutes). Now i'm dealing with a nice interface to display this weather data.

Unfortunately , my SD card of the RPI is broken : filesystem is corrupted and it is unable to boot. I think I should not do heavy compilation in C++ directly on the RPI.
palmeteo.png (187.17 KiB) Viewed 1305 times

Post Reply