WS2801 console Cync problems

645 views
Skip to first unread message

Alrik van Dusseldorp

unread,
Oct 22, 2014, 3:49:25 PM10/22/14
to weewx...@googlegroups.com
Hi,

i am struggeling with weewx to keep a connection with the console.
Running weewx on a pi as root becourse of permission problems USB

Pairing with te console only work when in put te transciever on windows machine and do a pairing action in Heavyweather. then remove the transreciever in the Py and check: wee_config_ws28xx --debug

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Oct 22 21:10:16 2014 from 192.168.0.110
root@raspberrypi:~# wee_config_ws28xx --debug
Using configuration file /etc/weewx/weewx.conf
Driver version 0.32
Querying the station for the configuration...
alarm_flags_other: 0
alarm_flags_wind_dir: 0
checksum_in: 1229
checksum_out: 1229
format_clock: 0
format_pressure: 1
format_rain: 0
format_temperature: 1
format_windspeed: 3
history_interval: 1
indoor_humidity_max: 70
indoor_humidity_max_time: None
indoor_humidity_min: 45
indoor_humidity_min_time: None
indoor_temp_max: 40.0
indoor_temp_max_time: None
indoor_temp_min: 0.0
indoor_temp_min_time: None
lcd_contrast: 4
low_battery_flags: 0
outdoor_humidity_max: 70
outdoor_humidity_max_time: None
outdoor_humidity_min: 45
outdoor_humidity_min_time: None
outdoor_temp_max: 40.0
outdoor_temp_max_time: None
outdoor_temp_min: 0.0
outdoor_temp_min_time: None
pressure_max: 1040.0
pressure_max_time: None
pressure_min: 960.0
pressure_min_time: None
rain_24h_max: 50.0
rain_24h_max_time: None
threshold_storm: 5
threshold_weather: 3
wind_gust_max: 100.0
wind_gust_max_time: None
root@raspberrypi:~# wee_config_ws28xx --check-transceiver
Using configuration file /etc/weewx/weewx.conf
Driver version 0.32
Checking for transceiver...
Transceiver is present
serial: 010123121002195
id: 707 (0x02c3)
root@raspberrypi:~# wee_config_ws28xx --check-transceiver
Using configuration file /etc/weewx/weewx.conf
Driver version 0.32
Checking for transceiver...
Transceiver is present
serial: 010123121002195
id: 707 (0x02c3)
root@raspberrypi:~# wee_config_ws28xx --debug
Using configuration file /etc/weewx/weewx.conf
Driver version 0.32
Querying the station for the configuration...
No data after 30 seconds (press SET to sync)
No data after 60 seconds (press SET to sync)
root@raspberrypi:~# wee_config_ws28xx --debug
Using configuration file /etc/weewx/weewx.conf
Driver version 0.32
Querying the station for the configuration...
No data after 30 seconds (press SET to sync)
No data after 60 seconds (press SET to sync)
root@raspberrypi:~#

root@raspberrypi:~# wee_config_ws28xx --config=FILE
Unable to open configuration file FILE
Press and hold the [v] key until "PC" appears (attempt 2 of 3)
Press and hold the [v] key until "PC" appears (attempt 3 of 3)
Transceiver not paired to console.
root@raspberrypi:~#
root@raspberrypi:~# root@raspberrypi:~# wee_config_ws28xx --config=FILE
-bash: root@raspberrypi:~#: command not found
root@raspberrypi:~# Unable to open configuration file FILE
-bash: Unable: command not found
root@raspberrypi:~# tail -f /var/log/syslog
Oct 22 19:34:28 raspberrypi weewx[3297]: ws28xx: MainThread: Scanned 0 records:                           current=None latest=None remaining=None
Oct 22 19:34:41 raspberrypi wee_config_ws28xx[3483]: ws28xx: MainThread: stopRFT                          hread: waiting for RF thread to terminate
Oct 22 19:34:41 raspberrypi wee_config_ws28xx[3483]: ws28xx: RFComm: stopping rf                           communication
Oct 22 19:34:41 raspberrypi wee_config_ws28xx[3483]: ws28xx: MainThread: releasi                          ng USB interface
Oct 22 19:35:29 raspberrypi weewx[3297]: ws28xx: MainThread: No data after 3903                           seconds (press SET to sync)
Oct 22 19:35:29 raspberrypi weewx[3297]: ws28xx: MainThread: Scanned 0 records:                           current=None latest=None remaining=None
Oct 22 19:35:29 raspberrypi weewx[3297]: ws28xx: MainThread: No historical data                           after 65 tries
Oct 22 19:35:29 raspberrypi weewx[3297]: wxengine: Starting main packet loop.
Oct 22 19:35:29 raspberrypi weewx[3297]: ws28xx: MainThread: no new weather data
Oct 22 19:35:29 raspberrypi weewx[3297]: ws28xx: MainThread: no contact with con                          sole: press [SET] to sync
Oct 22 19:40:29 raspberrypi weewx[3297]: archive: added record 2014-10-22 21:40:00 CEST (1414006800) to database 'weewx.sdb'; table 'archive'
Oct 22 19:40:29 raspberrypi weewx[3297]: reportengine: Running reports for latest time in the database.
Oct 22 19:40:29 raspberrypi weewx[3297]: reportengine: Running report StandardReport
Oct 22 19:40:29 raspberrypi weewx[3297]: reportengine: Found configuration file /etc/weewx/skins/Standard/skin.conf for report StandardReport
Oct 22 19:40:30 raspberrypi weewx[3297]: cheetahgenerator: Running report StandardReport for time period SummaryByMonth
Oct 22 19:40:30 raspberrypi weewx[3297]: stats: Schema exists with 16 elements
Oct 22 19:40:32 raspberrypi weewx[3297]: cheetahgenerator: generated 1 'SummaryByMonth' files for StandardReport in 1.29 seconds
Oct 22 19:40:32 raspberrypi weewx[3297]: cheetahgenerator: Running report StandardReport for time period SummaryByYear
Oct 22 19:40:35 raspberrypi weewx[3297]: cheetahgenerator: generated 1 'SummaryByYear' files for StandardReport in 3.56 seconds
Oct 22 19:40:35 raspberrypi weewx[3297]: cheetahgenerator: Running report StandardReport for time period ToDate
Oct 22 19:40:50 raspberrypi weewx[3297]: cheetahgenerator: generated 12 'ToDate' files for StandardReport in 15.13 seconds
Oct 22 19:41:02 raspberrypi weewx[3297]: genimages: Generated 24 images for StandardReport in 11.50 seconds
Oct 22 19:41:02 raspberrypi weewx[3297]: reportengine: copied 9 files to /var/www/weewx
Oct 22 19:41:02 raspberrypi weewx[3297]: reportengine: Running report FTP
Oct 22 19:41:02 raspberrypi weewx[3297]: reportengine: Found configuration file /etc/weewx/skins/Ftp/skin.conf for report FTP
Oct 22 19:41:02 raspberrypi weewx[3297]: reportengine: FTP upload not requested. Skipped.
Oct 22 19:41:02 raspberrypi weewx[3297]: reportengine: Running report RSYNC
Oct 22 19:41:02 raspberrypi weewx[3297]: reportengine: Found configuration file /etc/weewx/skins/Rsync/skin.conf for report RSYNC
Oct 22 19:41:02 raspberrypi weewx[3297]: reportengine: rsync upload not requested. Skipped.
Oct 22 19:45:29 raspberrypi weewx[3297]: ws28xx: MainThread: no new weather data
Oct 22 19:45:29 raspberrypi weewx[3297]: ws28xx: MainThread: no contact with console: press [SET] to sync
Oct 22 19:45:29 raspberrypi weewx[3297]: archive: added record 2014-10-22 21:45:00 CEST (1414007100) to database 'weewx.sdb'; table 'archive'
Oct 22 19:45:30 raspberrypi weewx[3297]: reportengine: Running reports for latest time in the database.
Oct 22 19:45:30 raspberrypi weewx[3297]: reportengine: Running report StandardReport
Oct 22 19:45:30 raspberrypi weewx[3297]: reportengine: Found configuration file /etc/weewx/skins/Standard/skin.conf for report StandardReport
Oct 22 19:45:30 raspberrypi weewx[3297]: cheetahgenerator: Running report StandardReport for time period SummaryByMonth
Oct 22 19:45:30 raspberrypi weewx[3297]: stats: Schema exists with 16 elements
Oct 22 19:45:30 raspberrypi weewx[3297]: cheetahgenerator: generated 1 'SummaryByMonth' files for StandardReport in 0.41 seconds
Oct 22 19:45:30 raspberrypi weewx[3297]: cheetahgenerator: Running report StandardReport for time period SummaryByYear
Oct 22 19:45:32 raspberrypi weewx[3297]: cheetahgenerator: generated 1 'SummaryByYear' files for StandardReport in 2.07 seconds
Oct 22 19:45:32 raspberrypi weewx[3297]: cheetahgenerator: Running report StandardReport for time period ToDate
Oct 22 19:45:35 raspberrypi weewx[3297]: cheetahgenerator: generated 12 'ToDate' files for StandardReport in 2.29 seconds
Oct 22 19:45:38 raspberrypi weewx[3297]: genimages: Generated 12 images for StandardReport in 3.00 seconds
Oct 22 19:45:38 raspberrypi weewx[3297]: reportengine: copied 0 files to /var/www/weewx
Oct 22 19:45:38 raspberrypi weewx[3297]: reportengine: Running report FTP
Oct 22 19:45:38 raspberrypi weewx[3297]: reportengine: Found configuration file /etc/weewx/skins/Ftp/skin.conf for report FTP
Oct 22 19:45:38 raspberrypi weewx[3297]: reportengine: FTP upload not requested. Skipped.
Oct 22 19:45:38 raspberrypi weewx[3297]: reportengine: Running report RSYNC
Oct 22 19:45:38 raspberrypi weewx[3297]: reportengine: Found configuration file /etc/weewx/skins/Rsync/skin.conf for report RSYNC
Oct 22 19:45:38 raspberrypi weewx[3297]: reportengine: rsync upload not requested. Skipped.


and then it lost connection.

What is going wrong?

also i cannot open the station web page?

thanks for your time.. :-)


Alrik van Dusseldorp

unread,
Oct 22, 2014, 3:54:37 PM10/22/14
to weewx...@googlegroups.com
Sorry forget to mention the weather station model.. WS2801 -IT 11/2010 V00 868.3Mhz European model

Op woensdag 22 oktober 2014 21:49:25 UTC+2 schreef Alrik van Dusseldorp:
Message has been deleted

mwall

unread,
Oct 22, 2014, 4:58:45 PM10/22/14
to weewx...@googlegroups.com
alrik,

did you try pressing the [SET] button?

sync and pair are two different operations.  details are in the user guide:

http://weewx.com/docs/usersguide.htm#wee_config_ws28xx

the console and transceiver sync only when you press [SET] or at the top of the hour.

fwiw, you should not have to use windows to pair - weewx should do that automatically now.

m

Alrik van Dusseldorp

unread,
Oct 23, 2014, 5:46:25 AM10/23/14
to weewx...@googlegroups.com
Hello M,

Yes i did, and unfortunately it did not make any difference. But I have the idea that my power supply produce a lot of noise at the output. I will change the PS this afternoon and check if it does any good.

I keep you posted

Alrik

Luc Heijst

unread,
Oct 23, 2014, 8:27:55 AM10/23/14
to weewx...@googlegroups.com
On Wednesday, 22 October 2014 16:54:37 UTC-3, Alrik van Dusseldorp wrote:
Sorry forget to mention the weather station model.. WS2801 -IT 11/2010 V00 868.3Mhz European model


Alrik,

Did you set transceiver_frequency = EU in the [WS28xx] section of weewx.conf?

Luc 

Alrik van Dusseldorp

unread,
Oct 24, 2014, 3:59:57 PM10/24/14
to weewx...@googlegroups.com
hallo again,

i have start all over whit a fresh installed RPI image, replaced the batterys of the console, power supply and put the transceiver 2 meters away from the RPI or other noise sources. without any luck :(

i try the frequency setting on both EU and US, no luck, my unit is 868Mhz but you never know..

Pairing does not work with wee_config_ws28xx --pair only trouch heavy weather and swap the reciever to the RPI.
But then it losses contact within a 1 minute or so.
Pressing the set button does not help unfortunately, also the console does not sync after one hour. (left it for 10 hours or so)

when i try wee_config_ws28xx --config=FILE in return i get: Unable to open configuration file FILE

when i try wee_config_ws28xx --check-transceiver give:

 Using configuration file /etc/weewx/weewx.conf
 Driver version 0.32
 Checking for transceiver...
 Transceiver is present
 serial: 010123121002195
 id: 707 (0x02c3)

So the transceiver is is detected and is working like it should be i guess?

Is my WS2801 not compatible whit the WS28XX driver?

i am running out of options only the lack of experience of linux..

the syslog looks like this:

Oct 24 21:52:29 raspberrypi weewx[2413]: ws28xx: MainThread: No data after 1321          seconds (press SET to sync)
Oct 24 21:52:29 raspberrypi weewx[2413]: ws28xx: MainThread: Scanned 0 records:          current=None latest=None remaining=None
Oct 24 21:53:29 raspberrypi weewx[2413]: ws28xx: MainThread: No data after 1381          seconds (press SET to sync)
Oct 24 21:53:29 raspberrypi weewx[2413]: ws28xx: MainThread: Scanned 0 records:          current=None latest=None remaining=None
Oct 24 21:54:29 raspberrypi weewx[2413]: ws28xx: MainThread: No data after 1441          seconds (press SET to sync)
more info there is not in the log..


does any one have an idea? help!?




L.J.M. Heijst

unread,
Oct 24, 2014, 4:17:04 PM10/24/14
to weewx...@googlegroups.com
Op 24 okt. 2014 om 16:59 heeft Alrik van Dusseldorp <alri...@gmail.com> het volgende geschreven:
when i try wee_config_ws28xx --config=FILE in return i get: Unable to open configuration file FILE

when i try wee_config_ws28xx --check-transceiver give:
 Using configuration file /etc/weewx/weewx.conf
 Driver version 0.32
 Checking for transceiver...
 Transceiver is present
 serial: 010123121002195
 id: 707 (0x02c3)
Hello Alrik,
First of all you should type -- config=weewx.conf instead of FILE  (weewx.conf is the name of your configuration file).
I think the driver should work for your station because already it read the configuration parameters into wee_ config_ ws28xx.
Please set debug=1 in weewx.conf to get more debug logging.
What happens when you go to /etc/weewx and then start weewx as follows?
./bin/weewxd weewx.conf
You should see the loop data on the console.
Luc

Alrik van Dusseldorp

unread,
Oct 24, 2014, 4:53:46 PM10/24/14
to weewx...@googlegroups.com

hello Luc,

Thanks for your answer,

-- config=weewx.conf does also not work, but as it read the weewx.conf file it is not that important i guess?

Debug=1 already done that :)

Under /etc/weewx an start with ./bin/weewxd weewx.conf give me the error: No such file or directory.

i must say that i run the RPI as root becourse i had USB dependency problems.










L.J.M. Heijst

unread,
Oct 24, 2014, 5:27:59 PM10/24/14
to weewx...@googlegroups.com
Hello Alrik,
I also run my programs as root, both on my Synology NAS and  (formerly) my RPI. Not sure why file weewxd could not been found on your system. Did you search yourself where the file weewxd is?
I'm also not very good in linux or python. Maybe others have an idea what to do next.
Luc

Verstuurd vanaf mijn iPad
--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/Jrf58FlrbbI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mwall

unread,
Oct 24, 2014, 5:34:00 PM10/24/14
to weewx...@googlegroups.com
on a debian system with weewx installed from .deb package, wee_config_ws28xx is located in /usr/bin, so you can simply type this from any directory:

wee_config_ws28xx

the --config option is only necessary if your configuration file is in a non-standard location, or if you want to explicitly test with a non-default configuration file.  sudo is necessary unless (1) you are logged in as root or (2) you have modified the permissions of the transceiver usb device so that non-root users can read/write to it (e.g., using a udev rule).

this is how to diagnose a ws28xx station.  type the following commands in one shell while you monitor the log file in another e.g., with 'tail -f /var/log/syslog'. 

first make sure weewx can talk to the transceiver:

sudo wee_config_ws28xx --check-transceiver

next try to pair the transceiver to the console:

sudo wee_config_ws28xx --pair

alternatively, you can pair using the windows software.

get the weather station settings:

sudo wee_config_ws28xx --info

get the current weather observations from the station:

sudo wee_config_ws28xx --current

if any one of these steps fails, then the subsequent steps will not work.  so take it step by step.

m

Alrik van Dusseldorp

unread,
Oct 25, 2014, 9:56:27 AM10/25/14
to weewx...@googlegroups.com

Hello Luc and M,

Well i did what you told me to de M and here is the outcome in the  file.
I find the outcome rather strange, it look like the console and weewx are communicating only not at the right way.


a little part of log file:
RFComm: ToDateTime: bogus date for LastRainReset: error status in buffer
RFComm: handleCurrentData: inBufCS of station does not match

this one i do not know wy it happens when i try to pair:
Pairing transceiver with console...
Press and hold the [v] key until "PC" appears (attempt 1 of 3)

Press and hold the [v] key until "PC" appears (attempt 2 of 3)
Press and hold the [v] key until "PC" appears (attempt 3 of 3)
Transceiver not paired to console.

Oke clear not paired, but then:
i try: info wee_config_ws28xx --info and in the logfile appears:
RFComm: console is paired to device with ID 02c3 ?
yet on my console i never see (PC)

also i get no wind direction or wind speed information. but there can be a catch: i know that wen there is no change in wind speed or direction.
the wind meter does not sent other new data.

i hope this will help to debug or understand what is wrong.

 

Debug.txt

mwall

unread,
Oct 25, 2014, 10:31:21 AM10/25/14
to weewx...@googlegroups.com
alrik,

it looks like your system is working.  weewx is trying to download data from the station - this could take as long as an hour.  however, the results you posted are confounded because you have multiple weewx processes running at the same time.

before you do any of the steps you must ensure that weewx is not running.

to see if weewx is running:

ps aux | grep wee

to stop weewx gracefully:

sudo /etc/init.d/weewx stop

or to forcefully stop weewx (should not be necessary):

sudo kill -9 pid-of-the-weewx-process

m

Ξ

unread,
Oct 25, 2014, 10:38:13 AM10/25/14
to weewx...@googlegroups.com
Hi Alrik,

Do you ever wait til the top of hour? I have the same hardware and my station is at a property where I don't spend most of my time meaning I'm not there to press the [SET] button, normally at the top of the hour the issue is solved.

Alrik van Dusseldorp

unread,
Oct 25, 2014, 2:35:00 PM10/25/14
to weewx...@googlegroups.com

Hello M,

Well i have found the problem!

It has to do with my WS2801 station.
what i found out is that pairing with the down key by a long press on the console work with the heavy weather.
But not for the WS28XX driver, and my WS2801, what i did to solve the problem is not pressing the down key when the WS28XX drivers promt you to do.
But i pressed the SET key.. and within a couple of seconds i get the message from WS28xx driver Transceiver is paired to console
And on my console i got the [PC] message, and it stay in sync for more than a hour.
Maby it is an idee to put this in the weewx documentation?

Is it correct that in the pairing procedure the id from the dongle is some where stored inside the WS28xx driver?
just a wild guess, i am more a hardware guy that writhe sometimes some firmware for micro processors.

Now the next 2 lines:
ws28xx: RFComm: ToDateTime: bogus date for LastRainReset: error status in buffer
ws28xx[2926]: ws28xx: RFComm: handleCurrentData: inBufCS of station does not match

i have no idea how to fix them..

Alrik




mwall

unread,
Oct 25, 2014, 4:14:25 PM10/25/14
to weewx...@googlegroups.com


On Saturday, October 25, 2014 2:35:00 PM UTC-4, Alrik van Dusseldorp wrote:

Hello M,

Well i have found the problem!

congratulations!  it is all very easy in hindsight, no? :)

 
It has to do with my WS2801 station.
what i found out is that pairing with the down key by a long press on the console work with the heavy weather.
But not for the WS28XX driver, and my WS2801, what i did to solve the problem is not pressing the down key when the WS28XX drivers promt you to do.
But i pressed the SET key.. and within a couple of seconds i get the message from WS28xx driver Transceiver is paired to console
And on my console i got the [PC] message, and it stay in sync for more than a hour.
Maby it is an idee to put this in the weewx documentation?

to my understanding, only a long press will cause the station to attempt pairing.  a short press of [SET] will initiate a sync.

perhaps your station was already paired, and simply required a sync?  perhaps if the station fails to find a transceiver after a long press, it reverts back to the last transceiver id it knew?

in my experience, a pairing is only necessary after removing batteries from the station.  otherwise, only sync is necessary.

 
Is it correct that in the pairing procedure the id from the dongle is some where stored inside the WS28xx driver?
just a wild guess, i am more a hardware guy that writhe sometimes some firmware for micro processors.

the pairing process is to make the console remember the id of the transceiver.

from the transceiver point of view, the heavyweather software seems to be more strict about pairing, as was eddi de pieri's initial python implementation.  the ws28xx driver in weewx is now much more forgiving - instead of failing when the transceiver and console are not paired, we continue operating with the expectation that the console will figure out the transceiver id.  if it sees that the station is paired to a different transceiver, then it will ignore the data but keeps listening.

 
Now the next 2 lines:
ws28xx: RFComm: ToDateTime: bogus date for LastRainReset: error status in buffer

this is a known bug in the lacrosse firmware (known to us, but perhaps not to lacrosse ;)
 
if you use the console buttons to reset the last rain (see the weather station user manual) then this should go away.

ws28xx[2926]: ws28xx: RFComm: handleCurrentData: inBufCS of station does not match

this is a debug message that helps us to reverse engineer the communication with the console.  it is not a problem.

m

L.J.M. Heijst

unread,
Oct 25, 2014, 4:24:46 PM10/25/14
to weewx...@googlegroups.com


Verstuurd vanaf mijn iPad

Op 25 okt. 2014 om 15:35 heeft Alrik van Dusseldorp <alri...@gmail.com> het volgende geschreven:
Hello M,

Now the next 2 lines:
ws28xx: RFComm: ToDateTime: bogus date for LastRainReset: error status in buffer
ws28xx[2926]: ws28xx: RFComm: handleCurrentData: inBufCS of station does not match

i have no idea how to fix them..
Alrik
Hello Alrik,
I tested for M(atthew) some messages between the weather station and the driver. LastRainReset initially doesn't contain a useful date/time. The message will be gone after you reset the date/ time of overall rain counter. See the weather station manual how to do this.
The configuration parameters  of your weather station have a checksum which is sent with some messages. Weewx keeps a copy of this parameters. When the checksum of an initial (empty)  parameter record does't match with that received from the weather station, the ws28xx driver tries to read the current configuration parameters. The message should disappear as soon as the parameters are read succesfully.
Luc

Ξ

unread,
Oct 26, 2014, 2:11:19 AM10/26/14
to weewx...@googlegroups.com
to my understanding, only a long press will cause the station to attempt pairing.  a short press of [SET] will initiate a sync.

perhaps your station was already paired, and simply required a sync?  perhaps if the station fails to find a transceiver after a long press, it reverts back to the last transceiver id it knew?

in my experience, a pairing is only necessary after removing batteries from the station.  otherwise, only sync is necessary.


That's right, only a long press of about 3-4 secs of the [V] key initiates the pairing, in Alrik's case the problem was the sync — I get exactly the same messages after e.g. a reboot:
ws28xx: MainThread: No data after 2582 seconds. Normally I just wait for the top of the hour when weewx syncs automatically. 

Luc Heijst

unread,
Oct 26, 2014, 7:55:01 AM10/26/14
to weewx...@googlegroups.com
NB. Initially the clock of the weather station starts at 1-1-2009 and history data is saved each second hour. The ws28xx driver reads at startup all this 'old' data; not sure if it is stored in the weewx data base. The driver will set the clock of the weather station to that of the computer (RPI) each whole hour unless the difference of the two clocks is too small. Also when you press the SET button twice short next to each other, the clocks will be synchronised.
The driver will set the history interval to 5 minutes (can be changed via ws28xx section of weewx.conf).
Luc

Alrik van Dusseldorp

unread,
Oct 26, 2014, 4:53:29 PM10/26/14
to weewx...@googlegroups.com

Hi guys,

Yes it had to do with that the console did not stay in sync with the RPI even when i did a manual with the SET button.
after the SET button weewx start reading the console only then. i left the set up like it was.
And wait for a day, but there was no sync or data received.


Well i will do some test off coarse and do the following:
removed all battery`s, shutdown RPI, removed USB dongle, and wait for 10 minutes.
i hope to do this this week and verify the results.




Luc Heijst

unread,
Oct 26, 2014, 6:12:27 PM10/26/14
to weewx...@googlegroups.com
On Sunday, 26 October 2014 17:53:29 UTC-3, Alrik van Dusseldorp wrote:
Well i will do some test off coarse and do the following:
removed all battery`s, shutdown RPI, removed USB dongle, and wait for 10 minutes.
i hope to do this this week and verify the results.

Hi Alrik,

To get more debug logging from the ws28xx driver you can add some debug options to the ws28xx section of weewx.conf.
After you changed weewx.conf you have to stop and start weewx to get the changes active.

The following options can be used:

    debug_comm = 2
    debug_config_data = 2
    debug_weather_data = 2
    debug_history_data = 2

debug_comm show messages about the communication
debug_config_data show messages regarding reading and writing the weather stations configuration parameters
debug_weather_data show the weather data which comes each polling_interval+1 seconds
debug_history_data show the history data which comes each history interval (currently set to 5 minutes, which is good for 6 days of historical weather data)

Each of the 4 parameters can have 4 values:
0 = no logging
1 = minimum logging
2 = detailed logging
3 = all logging (use this option with care: the driver can write thousands of debugs lines a minute)

debug_dump_format = auto (auto is the recommended setting)
    # three formats, long, short, auto.  short shows only the first 16 bytes.
    # long shows the full length of the buffer.  auto shows the message length
    # as indicated by the length in the message itself for setFrame and
    # getFrame, or the first 16 bytes for any other message. 

Below an example of my ws28xx section of weewx.conf:

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

[WS28xx]
    # This section is for the La Crosse WS-2800 series of weather stations.
    
    # Radio frequency to use between USB transceiver and console: US or EU
    # US uses 915 MHz, EU uses 868.3 MHz.  Default is US.
    transceiver_frequency = EU
    
    # The station model, e.g., 'LaCrosse C86234' or 'TFA Primus'
    model = TFA Dostmann - Opus (LaCrosse - WS2800)
    
    # The pressure calibration offset, in hPa (millibars)
    pressure_offset = 0
    
    # The driver to use:
    driver = weewx.drivers.ws28xx
    polling_interval = 10
    comm_interval = 6
    debug_comm = 1
    debug_config_data = 2
    debug_weather_data = 1
    debug_history_data = 2
    debug_dump_format = auto

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

Luc  

Luc Heijst

unread,
Oct 26, 2014, 7:23:15 PM10/26/14
to weewx...@googlegroups.com
Attached file "ws28xx_messages.txt" show the detailed logging of a "normal" restart of weewx with a ws28xx driver.
Synchronisation was not lost during the restart.

File "ws28xx_sync.txt" show the minimum logging of the sync proces during startup.
Synchronisation is lost when the driver has been stopped for more than (about) 3 minutes.
See the explanation in the file.

When the weather station is synchronised with the computer the display show "PC".

Note: "PC" is only shown on the console when time-only format is selected (with the up-arrow you can switch between time-only format and date-time format)
date-time format: 20:07 26.10.14
time-only format: 20:07 10    PC

Luc
ws28xx_messages.txt
ws28xx_sync.txt

Ξ

unread,
Oct 27, 2014, 3:39:56 AM10/27/14
to weewx...@googlegroups.com
Wow, Luc, I had no idea I can get such detailed debugging. Great! I'll try it out now on my station.

Cheers, Luc!

Ξ

unread,
Oct 29, 2014, 6:26:50 AM10/29/14
to weewx...@googlegroups.com
Hi M,
I've tried them out, but none of these work for me:


[root@alarmpi ~]# /home/weewx/bin/wee_config_ws28xx
Using configuration file /home/weewx/weewx.conf
Driver version 0.32
Traceback (most recent call last):
  File "/home/weewx/bin/wee_config_ws28xx", line 245, in <module>
    main()
  File "/home/weewx/bin/wee_config_ws28xx", line 79, in main
    **config_dict['WS28xx'])
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 1123, in __init__
    self.startUp()
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 1239, in startUp
    self.serial, comm_interval=self.comm_interval)
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 3854, in setup
    self.shid.open(vendor_id, product_id, device_id, serial)
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 2914, in open
    self._open_device(device)
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 2971, in _open_device
    raise weewx.WeeWxIOError(e)
weewx.WeeWxIOError: Device or resource busy
[root@alarmpi ~]# /home/weewx/bin/wee_config_ws28xx  --debug
Using configuration file /home/weewx/weewx.conf
Driver version 0.32
Traceback (most recent call last):
  File "/home/weewx/bin/wee_config_ws28xx", line 245, in <module>
    main()
  File "/home/weewx/bin/wee_config_ws28xx", line 79, in main
    **config_dict['WS28xx'])
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 1123, in __init__
    self.startUp()
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 1239, in startUp
    self.serial, comm_interval=self.comm_interval)
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 3854, in setup
    self.shid.open(vendor_id, product_id, device_id, serial)
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 2914, in open
    self._open_device(device)
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 2971, in _open_device
    raise weewx.WeeWxIOError(e)
weewx.WeeWxIOError: Device or resource busy
[root@alarmpi ~]# /home/weewx/bin/wee_config_ws28xx  --info
Using configuration file /home/weewx/weewx.conf
Driver version 0.32
Traceback (most recent call last):
  File "/home/weewx/bin/wee_config_ws28xx", line 245, in <module>
    main()
  File "/home/weewx/bin/wee_config_ws28xx", line 79, in main
    **config_dict['WS28xx'])
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 1123, in __init__
    self.startUp()
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 1239, in startUp
    self.serial, comm_interval=self.comm_interval)
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 3854, in setup
    self.shid.open(vendor_id, product_id, device_id, serial)
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 2914, in open
    self._open_device(device)
  File "/home/weewx/bin/weewx/drivers/ws28xx.py", line 2971, in _open_device
    raise weewx.WeeWxIOError(e)
weewx.WeeWxIOError: Device or resource busy
[root@alarmpi ~]#
[root@alarmpi ~]# /home/weewx/bin/wee_config_ws28xx --config=weewx.conf
Unable to open configuration file weewx.conf
[root@alarmpi ~]#

And synchronisation only happens at the top of the hour:
[.......]
Oct 29 12:21:26 alarmpi wee_config_ws28xx[3646]: ws28xx: MainThread: interface: 0
Oct 29 12:21:26 alarmpi wee_config_ws28xx[3646]: ws28xx: MainThread: claiming USB interface 0
Oct 29 12:21:26 alarmpi wee_config_ws28xx[3646]: ws28xx: MainThread: releasing USB interface
Oct 29 12:21:26 alarmpi wee_config_ws28xx[3646]: ws28xx: MainThread: Unable to claim USB interface 0: Device or resource busy
Oct 29 12:21:33 alarmpi weewx[25985]: ws28xx: MainThread: No data after 541 seconds (press SET to sync)
Oct 29 12:21:33 alarmpi weewx[25985]: ws28xx: MainThread: Scanned 0 records: current=None latest=None remaining=None
Oct 29 12:22:33 alarmpi weewx[25985]: ws28xx: MainThread: No data after 601 seconds (press SET to sync)
Oct 29 12:22:33 alarmpi weewx[25985]: ws28xx: MainThread: Scanned 0 records: current=None latest=None remaining=None

[.......]

mwall

unread,
Oct 29, 2014, 7:43:11 AM10/29/14
to weewx...@googlegroups.com
On Wednesday, October 29, 2014 6:26:50 AM UTC-4, Ξ wrote:
Hi M,
I've tried them out, but none of these work for me:


[root@alarmpi ~]# /home/weewx/bin/wee_config_ws28xx

weewx.WeeWxIOError: Device or resource busy

something else has control of the usb transceiver.  be sure weewxd is not running before you run wee_config_ws28xx

 
And synchronisation only happens at the top of the hour:
[.......]
Oct 29 12:21:26 alarmpi wee_config_ws28xx[3646]: ws28xx: MainThread: interface: 0
Oct 29 12:21:26 alarmpi wee_config_ws28xx[3646]: ws28xx: MainThread: claiming USB interface 0
Oct 29 12:21:26 alarmpi wee_config_ws28xx[3646]: ws28xx: MainThread: releasing USB interface
Oct 29 12:21:26 alarmpi wee_config_ws28xx[3646]: ws28xx: MainThread: Unable to claim USB interface 0: Device or resource busy
Oct 29 12:21:33 alarmpi weewx[25985]: ws28xx: MainThread: No data after 541 seconds (press SET to sync)
Oct 29 12:21:33 alarmpi weewx[25985]: ws28xx: MainThread: Scanned 0 records: current=None latest=None remaining=None
Oct 29 12:22:33 alarmpi weewx[25985]: ws28xx: MainThread: No data after 601 seconds (press SET to sync)
Oct 29 12:22:33 alarmpi weewx[25985]: ws28xx: MainThread: Scanned 0 records: current=None latest=None remaining=None

[.......]


there it is.  weewxd is running (pid 25985), and it is waiting for a sync so that it can do a catch up.

m
 

Ξ

unread,
Oct 29, 2014, 7:59:49 AM10/29/14
to weewx...@googlegroups.com
got it, weewxd shouldn't be running. thanks.

Alrik van Dusseldorp

unread,
Nov 16, 2014, 4:00:58 PM11/16/14
to weewx...@googlegroups.com
Hi guys,

sorry for the late response, very busy be course i had the bay room to finsch.
Weewx did run for almost a mount now until i got reception errors.

did a whole reset, console and RPI and now i get the same problems as above.
Looking in the log i get the message: inBufCS of station does not match

What does this mean?

Best regards, Alrik

Op woensdag 22 oktober 2014 21:49:25 UTC+2 schreef Alrik van Dusseldorp:
Hi,

i am struggeling with weewx to keep a connection with the console.
Running weewx on a pi as root becourse of permission problems USB

Pairing with te console only work when in put te transciever on windows machine and do a pairing action in Heavyweather. then remove the transreciever in the Py and check: wee_config_ws28xx --debug

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Oct 22 21:10:16 2014 from 192.168.0.110
root@raspberrypi:~# wee_config_ws28xx --debug
Using configuration file /etc/weewx/weewx.conf
Driver version 0.32
Using configuration file /etc/weewx/weewx.conf
Driver version 0.32
Checking for transceiver...
Transceiver is present
serial: 010123121002195
id: 707 (0x02c3)
root@raspberrypi:~# wee_config_ws28xx --check-transceiver

Using configuration file /etc/weewx/weewx.conf
Driver version 0.32
Checking for transceiver...
Transceiver is present
serial: 010123121002195
id: 707 (0x02c3)
root@raspberrypi:~# wee_config_ws28xx --debug

Using configuration file /etc/weewx/weewx.conf
Driver version 0.32
Querying the station for the configuration...
No data after 30 seconds (press SET to sync)
No data after 60 seconds (press SET to sync)
root@raspberrypi:~# wee_config_ws28xx --debug

Using configuration file /etc/weewx/weewx.conf
Driver version 0.32
Querying the station for the configuration...
No data after 30 seconds (press SET to sync)
No data after 60 seconds (press SET to sync)
root@raspberrypi:~#

root@raspberrypi:~# wee_config_ws28xx --config=FILE
Unable to open configuration file FILE

Press and hold the [v] key until "PC" appears (attempt 2 of 3)
Press and hold the [v] key until "PC" appears (attempt 3 of 3)
Transceiver not paired to console.

L.J.M. Heijst

unread,
Nov 16, 2014, 6:42:28 PM11/16/14
to weewx...@googlegroups.com
Hi Alrik,

Weewx keeps a copy of the weather station configuration settings in memory. Initially weewx has an empty buffer and the checksum of this buffer does not match with the checksum of the buffer in the weather station. After weewx has read the configuration parameters from the station both checksums will match. So each start of weewx you should get this message once. It is no error.

Luc

Verstuurd vanaf mijn iPad

L.J.M. Heijst

unread,
Nov 16, 2014, 7:00:57 PM11/16/14
to weewx...@googlegroups.com
Hi Alrik,

To pair the weather station with weewx you have to push the down arrow on the weather station until a beep sounds. Then start weewx immediately. When the pairing is succesfull you hear another beep and you should see "PC" on the weather station (only visible when the time without the date is shown). 

Pairing won't work if weewx is already running, because the "pairing" code only runs at startup of the ws28xx driver.

Luc

Verstuurd vanaf mijn iPad

Op 16 nov. 2014 om 18:00 heeft Alrik van Dusseldorp <alri...@gmail.com> het volgende geschreven:

Alrik van Dusseldorp

unread,
Nov 17, 2014, 2:05:23 PM11/17/14
to weewx...@googlegroups.com
Hello Luc,

Well your last answer did make me slap me to the forehead.. thinking stupid me! of course i had to stop Weewx.
All is working again like a charm!
by the way the pairing process is a little different for my station. i do not know why but this is working for me:

Pair procedure (console -> weewx)

Stop Weewx:  /etc/init.d/weewx stop
open WS28xx driver utility: wee_config_ws28xx --pair
WS28xx driver promt this:

    Using configuration file /etc/weewx/weewx.conf
    Driver version 0.32
    Pairing transceiver with console...
    Press and hold the [v] key until "PC" appears (attempt 1 of 3)
Now do not hold the [V] key instead press the [set] key
After this the WS28xx driver promt:
    Transceiver is paired to console
Start Weewx Again:  /etc/init.d/weewx start

regards, Alrik

Smart way to keep track of the last message from the console in a loop by linking it with a CC!





L.J.M. Heijst

unread,
Nov 17, 2014, 3:10:40 PM11/17/14
to weewx...@googlegroups.com
Hello Alrik,

I understand from your last message that the pairing was already succesful on an earlier occasion. It has to be done once since a factory restart of your weather station.
The SET button initiates the synchronising. This can be done with the wee_config_ws28xx utility, but also after weewx is started via /etc/init.d/weewx start. Version .33 of the ws28xx driver gives you during 65 minutes chance to start the synchronisation via the SET button or automatically after the full hour time request message of the weather station.

After weewx is stopped the synchronisation times out after two minutes. So, if you restart weewx within these two minutes (PC is still shown on the console) the communication with the weather station synchronises and restarts automatically without the need for pressing the SET button. 

Anyhow, I'm glad your station is up and running again.

Luc

PS I don't understand your PS message about linking a message with a CC.

Verstuurd vanaf mijn iPad

Ξ

unread,
Nov 19, 2014, 7:13:42 AM11/19/14
to weewx...@googlegroups.com
On Monday, November 17, 2014 10:10:40 PM UTC+2, Luc Heijst wrote:
The SET button initiates the synchronising. This can be done with the wee_config_ws28xx utility,

How is the sync initiated with it? I don't see it in the options: http://weewx.com/docs/usersguide.htm#wee_config_ws28xx

L.J.M. Heijst

unread,
Nov 19, 2014, 1:10:06 PM11/19/14
to weewx...@googlegroups.com
Any option of the wee_config_ws28xx utility (except the - help) need the weather station to synchronise first before it can perform its dedicated task. So when the weather station and weewx are not synchronised yet you will need to press the SET button ( or wait for the next full hour ). The program will wait in a loop until the synchronization is done.
Luc

Verstuurd vanaf mijn iPad
--

Ξ

unread,
Nov 20, 2014, 8:06:36 AM11/20/14
to weewx...@googlegroups.com
Thanks Luc,

What I was wondering was whether there is a way to synchronise them from the command line, for example when I do something remotely I cannot press the SET, meaning I have to wait for the top of the hour for the automatic sync.

Luc Heijst

unread,
Nov 20, 2014, 8:24:04 AM11/20/14
to weewx...@googlegroups.com
On Thursday, 20 November 2014 10:06:36 UTC-3, Ξ wrote:
What I was wondering was whether there is a way to synchronise them from the command line, for example when I do something remotely I cannot press the SET, meaning I have to wait for the top of the hour for the automatic sync.

I'm afraid not. The sync is initiated by a "request set time" message from the weather station. This message comes each whole hour and after a press of the SET button.

Luc 
Reply all
Reply to author
Forward
0 new messages