WeeWX et WS-2300

124 views
Skip to first unread message

Olivier Garnier

unread,
Dec 6, 2019, 9:24:07 AM12/6/19
to weewx-user
Hi,


I used to use WS2300 with wview (RIP).
Now i try to configure weewx with ws2300 on Raspberry and it does not work ...
i installed it with apt-get.

dmesg :
[    1.623394] usb 1-1.4: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 4.00
[    1.623410] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    1.623423] usb 1-1.4: Product: USB <-> Serial
[    1.623434] usb 1-1.4: Manufacturer: FTDI

#modprobe ftdi_sio
#ls /dev/ttyUSB*
/dev/ttyUSB0


weewx.conf :
...

[Station]

   
# Description of the station location
    location
= ""

   
# Latitude and longitude in decimal degrees
    latitude
= 50.000
    longitude
= 1.000

   
# Altitude of the station, with unit it is in. This is downloaded from
   
# from the station if the hardware supports it.
    altitude
= 100, meter

   
# Set to type of station hardware. There must be a corresponding stanza
   
# in this file with a 'driver' parameter indicating the driver to be used.
    station_type
= WS23xx

   
# If you have a website, you may specify an URL
   
#station_url = http://www.example.com

   
# The start of the rain year (1=January; 10=October, etc.). This is
   
# downloaded from the station if the hardware supports it.
    rain_year_start
= 1

   
# Start of week (0=Monday, 6=Sunday)
    week_start
= 0

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

[WS23xx]
   
# This section is for the La Crosse WS-2300 series of weather stations.

   
# Serial port such as /dev/ttyS0, /dev/ttyUSB0, or /dev/cuaU0
    port
= /dev/ttyUSB0

   
# The station model, e.g., 'LaCrosse WS2317' or 'TFA Primus'
    model
= LaCrosse WS-2300

   
# The driver to use:
    driver
= weewx.drivers.ws23xx

##############################################################################
...



and when i ask wee_device --current
Using configuration file /etc/weewx/weewx.conf
Using WS23xx driver version 0.27 (weewx.drivers.ws23xx)
Querying the station for current weather data...
Traceback (most recent call last):
 
File "/usr/bin/wee_device", line 66, in <module>
    main
()
 
File "/usr/bin/wee_device", line 62, in main
    device
.configure(config_dict)
 
File "/usr/share/weewx/weewx/drivers/__init__.py", line 69, in configure
   
self.do_options(options, parser, config_dict, prompt)
 
File "/usr/share/weewx/weewx/drivers/ws23xx.py", line 313, in do_options
   
self.show_current()
 
File "/usr/share/weewx/weewx/drivers/ws23xx.py", line 339, in show_current
   
for packet in self.station.genLoopPackets():
 
File "/usr/share/weewx/weewx/drivers/ws23xx.py", line 502, in genLoopPackets
   
raise weewx.RetriesExceeded(msg)
weewx
.RetriesExceeded: Max retries (5) exceeded for LOOP data

Does anyone has an idéa ?


mwall

unread,
Dec 6, 2019, 9:42:07 AM12/6/19
to weewx-user


On Friday, December 6, 2019 at 9:24:07 AM UTC-5, Olivier Garnier wrote:

Does anyone has an idéa ?

did you have root permissions when you invoked wee_device?

you can try connecting directly with the driver:

sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/weewx/drivers/ws23xx.py --readings

to see all the options:

sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/weewx/drivers/ws23xx.py --help

typical problems with this weather station include:

* permissions - be sure to use sudo when connecting to the port, or create a udev rule that grants permissions to non-root users

* poor signal strength (only when using wireless mode)

* buggy libusb/serial in the operating system (typically in older rpi systems)

m

Olivier Garnier

unread,
Dec 6, 2019, 12:58:29 PM12/6/19
to weewx-user


Le vendredi 6 décembre 2019 15:42:07 UTC+1, mwall a écrit :
did you have root permissions when you invoked wee_device?

you can try connecting directly with the driver:

sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/weewx/drivers/ws23xx.py --readings

to see all the options:

sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/weewx/drivers/ws23xx.py --help

typical problems with this weather station include:

* permissions - be sure to use sudo when connecting to the port, or create a udev rule that grants permissions to non-root users

* poor signal strength (only when using wireless mode)

* buggy libusb/serial in the operating system (typically in older rpi systems)

m

To be sur i did it again :
#sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/weewx/drivers/ws23xx.py --readings

Traceback (most recent call last):

 
File "/usr/share/weewx/weewx/drivers/ws23xx.py", line 2120, in <module>
    data
= s.get_raw_data(SENSOR_IDS)
 
File "/usr/share/weewx/weewx/drivers/ws23xx.py", line 797, in get_raw_data
    raw_data
= read_measurements(self.ws, measures)
 
File "/usr/share/weewx/weewx/drivers/ws23xx.py", line 2037, in read_measurements
    nybbles
= ws2300.read_batch(batches)
 
File "/usr/share/weewx/weewx/drivers/ws23xx.py", line 1201, in read_batch
   
self.reset_06()
 
File "/usr/share/weewx/weewx/drivers/ws23xx.py", line 1070, in reset_06
   
raise self.Ws2300Exception(msg)
__main__
.Ws2300Exception: Reset failed, 100 retries, no response


The station is wired connected.


Solution : buggy libusb/serial in the operating system (typically in older rpi systems) ???
#uname -a
Linux raspberrypi 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux


Olivier Garnier

unread,
Dec 7, 2019, 3:55:57 PM12/7/19
to weewx-user
Anybody can help me ?
Who can i ask ?

mwall

unread,
Dec 12, 2019, 9:14:30 AM12/12/19
to weewx-user

On Saturday, December 7, 2019 at 3:55:57 PM UTC-5, Olivier Garnier wrote:
Anybody can help me ?
Who can i ask ?

this is the place to ask. maybe there is someone else running a ws23xx on an rpi?

i am running a ws23xx but it is on an x86_64 system (with an ancient version on debian), i'm afraid i am not much help

Linux saga 3.2.0-4-amd64 #1 SMP Debian 3.2.81-2 x86_64 GNU/Linux


can you try running weewx on an x86/x86_64 system?

you might have to hunt around the rpi forums for information about serial and usb-serial settings.  i seem to recall the rpi default configuration of the modem/tty causing problems for some serial communications.

you could also look at some of the resources listed in the comments in the ws23xx.py driver file.  the driver is based mostly on Russell Stuart's implementation, with some bug fixes.  if you can get his original implementation to work, that might provide a clue about what is different about the serial setup on arm/rpi.  or perhaps try the Kenneth Lavrsen Open2300 implementation.

i'm happy to incorporate whatever you find so that the weewx ws23xx driver will work reliably on any platform, but i'm afraid i do not have time right now to set up an rpi or other arm platform to do the exploratory work.

m
Message has been deleted

Olivier Garnier

unread,
Jan 10, 2020, 7:27:56 AM1/10/20
to weewx-user
It Works !!!

The ws 2350 was the problem.
After clean inside it ... all is ok.

all ... except ... rsync over ssh ... ;)
ssh is ok (can connect without password) ...
rsync log : imagegenerator: Generated 12 images for RSYNC in 0.36 seconds
but nothing on the server ...

on command line, it works weel :
'rsync' '--archive' '--stats' '-e ssh' '/var/www/html/weewx/' 'user@server:/home/meteo/www/'

Where can i put verbose mode for rsync in weewx to understand what s going wrong way ?
Reply all
Reply to author
Forward
0 new messages