Git Product home page Git Product logo

swpi's Introduction

###########################################################################

Sint Wind PI

Copyright 2012 by Tonino Tarsi [email protected]

Please refer to the LICENSE file for conditions

##########################################################################

A Sint Wind is a wind condition ( and other meteo data ) telephone answering machine. This implementation uses a Raspberry PI with an Huawei 3G dongle. The Sint Wind is compatible with different kind of Meteo Sensors (WH1080, WH3080, Davis, TX32, BMP085...).

Complete documentation on www.vololiberomontecucco.it

Requirements :

sudo apt-get -y install python-dev

sudo apt-get -y install python-imaging

sudo apt-get -y install python-serial

sudo apt-get -y install uvccapture

sudo apt-get -y install wvdial

sudo apt-get -y install python-rpi.gpio

sudo apt-get -y install python-smbus

sudo apt-get -y install i2c-tools

sudo apt-get -y remove ntp

sudo apt-get -y install gphoto2 python-piggyphoto dcraw libgphoto2-port10

sudo apt-get -y install python-requests python-spidev python-pygame python-setuptools libusb-1.0-0-dev cmake

USB library:

  • hidapi
  • cython-hidapi
  • cython

RTL-SDR libraries (included):

  • cd rtl-sdr
  • mkdir build
  • cd build
  • cmake ../ -DDETACH_KERNEL_DRIVER=ON -DINSTALL_UDEV_RULES=ON
  • make
  • sudo make install

RTL_433 (included - just a little modified, see /rtl_433/README-SWPI.md):

  • cd rtl_433
  • mkdir build
  • cd build
  • cmake ../
  • make
  • sudo make install

Main program start: sudo python swpi.py

swpi's People

Contributors

alexit84 avatar ovrheat avatar roberto2011 avatar toninotarsi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swpi's Issues

ImportError: No module named Image

Hi Tonino,
thanks for making this huge program available.
i want to use this program with my La Crosse TX-23U device.

i am getting this error message after runnning:
sudo python swpi.py

File "/home/pi/swpi-master/TTLib.py", line 15, in
import Image
ImportError: No module named Image

where is Image.py located ???

Checksum calculation fails on overflow

Your checksumCalc variable can overflow. You need to mask it with 0x0f otherwise the checksum comparison will fail eventhough it matches.

unsigned int checksumCalc = 0;
checksumCalc += (winddir & 0x0f);
checksumCalc += ((windspeed >> 8) & 0x0f);
checksumCalc += ((windspeed >> 4) & 0x0f);
checksumCalc += (windspeed & 0x0f);

You need to add:

checksumCalc &= 0x0f;

invalid wind speed

Hello,

I connect a TX23 Wind Sensor to Raspberry (latest Rasbian) and use your code to get data.
Next to the Sensor I placed a small Fan to get stable wind speed and fixed the direction sensor to
have always the same value for testing.

When i try to use ./readTX23 -v i get data like followed (try differend times over a time of lets say 10 minutes?)

root@raspberrypi:/home/wetter/swpi/TX23# ./readTX23 -v

Bit Length: 1225 uSec
Start frame: 27
Wind Direction: W (12)
Wind Direction2: W (12)
Wind Speed: 7
Wind Speed2: 7
Checksum (received): 3
Checksum (calculated): 19

Data is NOT Valid!

root@raspberrypi:/home/wetter/swpi/TX23# ./readTX23 -v

Bit Length: 1225 uSec
Start frame: 27
Wind Direction: W (12)
Wind Direction2: W (12)
Wind Speed: 8
Wind Speed2: 8
Checksum (received): 4
Checksum (calculated): 20

Data is NOT Valid!

root@raspberrypi:/home/wetter/swpi/TX23# ./readTX23 -v

Bit Length: 1225 uSec
Start frame: 27
Wind Direction: W (12)
Wind Direction2: W (12)
Wind Speed: 9
Wind Speed2: 9
Checksum (received): 5
Checksum (calculated): 21

Data is NOT Valid!

root@raspberrypi:/home/wetter/swpi/TX23# ./readTX23 -v

Bit Length: 1225 uSec
Start frame: 27
Wind Direction: W (12)
Wind Direction2: W (12)
Wind Speed: 9
Wind Speed2: 9
Checksum (received): 5
Checksum (calculated): 21

Data is NOT Valid!

root@raspberrypi:/home/wetter/swpi/TX23# ./readTX23 -v

Bit Length: 1225 uSec
Start frame: 27
Wind Direction: W (12)
Wind Direction2: W (12)
Wind Speed: 9
Wind Speed2: 9
Checksum (received): 5
Checksum (calculated): 21

Data is NOT Valid!

First of all whats the messure of wind speed?
If it is m/s why it is an integer?
Why i get always the same discalculated checksum?
I overclock my raspberry I don't know if it is a problem for this code (e.g. the timer)?

I'am an bloody beginer @hardware codeing.
I also ask the author of source code but he didn't answer so I hope you can please help me.
Thanks a lot.

Sint wind in APRS

Correggere TTLib.py per un corretto aggiornamento dati "umidità" e pioggia in APRS; le correzioni da apportare sono:

humidity

if (globalvars.meteo_data.hum_out != None):
    rh = float(globalvars.meteo_data.hum_out / 100 )
    if rh >= 0.995:
        humid_str = "h00"
    else:

humid_str = "h" + "%02.0f" % (rh * 100.0)

        humid_str = "h" + "%02.0f" % (globalvars.meteo_data.hum_out)
    send += humid_str

rain last hour -- each count is 0.0204"

if (globalvars.meteo_data.rain_rate_1h != None):
    rain_hr_hundredth_inches = float(globalvars.meteo_data.rain_rate_1h * 3.9370078)
    rain_hr_str = "r" + "%03d" % rain_hr_hundredth_inches

rain_hr_str = "r" + int(globalvars.meteo_data.rain_rate_1h)

    send += rain_hr_str

# rain last 24 hours -- each count is 0.0204"
# so the math accidentally scales perfect -- report in hundreths of inches
if (globalvars.meteo_data.rain_rate_24h != None) :
    rain_24_hrs_hundredth_inches = float(globalvars.meteo_data.rain_rate_24h * 3.9370078)
    rain_24_hrs_str = "p" + "%03d" % rain_24_hrs_hundredth_inches

rain_24_hrs_str = "p" + int(globalvars.meteo_data.rain_rate_24h)

    send += rain_24_hrs_str

skip rain since midnight

if (globalvars.meteo_data.rain_rate != None ) :
    rain_today_hundredth_inches = float(globalvars.meteo_data.rain_rate  * 3.9370078)
    rain_midnight_str = "P" + "%03d" % rain_today_hundredth_inches
    send += rain_midnight_str

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.