WS6in1 driver 0.3

249 views
Skip to first unread message

Bob Atchley

unread,
May 16, 2020, 7:40:32 AM5/16/20
to weewx-user
I have released version 0.3 of the WS6in1 driver for the weather stations:
Youshiko YC9388
Bresser PC 6 in 1
Garni 935PC
Ventus W835
(+ others ?)

This release adds restoring missed records on weewx startup.

Confession: I have only tested this with weewx 4.0.0 running python 3, but it should work with older versions and python 2 (but I recommend the upgrade as this will provide long term support).

Please note: to enable restoration of data from the console, within the weewx.conf file in the section "[StdArchive]" set
record_generation = hardware

Otherwise no other configuration changes are needed.  See the readme.txt and changelog for details.

Cheers

Bob

Remy Lavabre

unread,
May 16, 2020, 8:54:10 AM5/16/20
to weewx-user
Hello Bob,

Indeed you have done a very good job !!!
I have a Bresser 6-1 station and everything works perfectly with my Raspberry Pi Zero W !!!
That's great ! I can only thank you!

Without wanting to abuse, I would however have three small things to ask you:

A/ My weather station is equipped with 3 additional sensors (thermometers and hygrometers).
The three temperature information (with history) appears on the html page xxx.xxx.xxx.xxx/weewx/
in the form of three curves in a single table (Temperature1Temperature2Tempreature3)
The humidity 1,2 and 3 of the three additional probes does not appear anywhere, however...
Is this information retrieved by your pilot and if so, how to display it as for the temperature?

B/ I use the SteelSeries-Weather-Gauges which correspond exactly to what I want (https://github.com/mcrossley/SteelSeries-Weather-Gauges).
Everything is displayed correctly and perfectly except ... the temperatures 1,2,3 and the humidity 1,2 and 3 of my three additional probes!
Could you tell me what to add (and where) to bring up an additional temperature gauge (with 3 pushbuttons 1,2 and 3) as well as an additional
humidity gauge (with if possible again 3 push buttons) to display this additional data on the html page?

C/ My Bresser weather station records the data every 30 minutes. Is it possible with Weewx and
your driver to recover this data in a file in "CSV" format as does Windows software which
connects via the USB port? And if yes, how ?

Here bob, know that you have done a lot for me with your pilot and that the solution to the
three questions that remain would fulfill all my hopes !!!!!

And thank you again for this great pilot !!!!
Signed a great admirer of your work!  ;-)))))

Jarda Uher

unread,
May 16, 2020, 10:45:43 AM5/16/20
to weewx-user
Hi Bob
Great job, your driver 0.3 works with Garni 935PC and Weewx 4.0.0. Python 3.8.2. and Ubuntu 20.04 LTS. 
The console scan must be really set to 5 minutes, otherwise the program will stop. 
(here is the message:
May 16 16:02:48 jardaCQ58 weewx[5664] ERROR user.ws6in1: ValueError error: invalid literal for int() with base 10: '---'
May 16 16:02:48 jardaCQ58 weewx[5664] ERROR user.ws6in1: other unknown error
May 16 16:02:48 jardaCQ58 weewx[5664] INFO weewx.engine: Main loop exiting. Shutting engine down.)

I have setting konzole 30 min. and after setting the console for 5 min. and restart weewx is running.
thank you once again. super job.
cheers
Jarda

Dne sobota 16. května 2020 13:40:32 UTC+2 Bob Atchley napsal(a):

Jarda Uher

unread,
May 16, 2020, 11:36:15 AM5/16/20
to weewx-user
Hi Bob.
I tested retrieving data from a disconnected console, but the data does not appear on the graphs.
 (see message:
May 16 17:18:02 jardaCQ58 weewx[8033] DEBUG user.ws6in1: got time: 1589649000
May 16 17:18:02 jardaCQ58 weewx[8033] DEBUG user.ws6in1: genStartupRecords: yielding
May 16 17:18:02 jardaCQ58 weewx[8033] WARNING weewx.engine: ignore historical record: {'usUnits': 16, 'dateTime': 1589649000.0, 'inTemp': 23.6, 'inHumidity': 35, 'outTemp': 18.8, 'outHumidity': 37, 'dayRain': 0.0, 'hourRain': 0.0, 'rain': 0.0, 'windSpeed': 0.0, 'windGust': 0.0, 'windDir': 143, 'pressure': 1002, 'barometer': 1003, 'UV': 0, 'dewpoint': 3.7, 'extraHumid1': 60, 'extraHumid2': None, 'extraHumid3': None, 'extraHumid4': None, 'extraHumid5': None, 'extraHumid6': None, 'extraHumid7': None, 'extraTemp1': 15.7, 'extraTemp2': None, 'extraTemp3': None, 'extraTemp4': None, 'extraTemp5': None, 'extraTemp6': None, 'extraTemp7': None, 'interval': 300.0}
May 16 17:18:02 jardaCQ58 weewx[8033] DEBUG user.ws6in1: gettint time)
 Weewx but otherwise works normally and sends the current data in order.
Thanks
Jarda

Dne sobota 16. května 2020 16:45:43 UTC+2 Jarda Uher napsal(a):

Bob Atchley

unread,
May 16, 2020, 12:43:58 PM5/16/20
to weewx-user
Hi Jarda,

I've been able to repeat the error - apologies I missed a test case.  If the console buffer is empty (because its just been manually reset) then it still provides 1 set of data but fills it with zeroes but ws6in1 was still trying to process it in the normal way.
The workaround until I have put in a fix is that if you reset the buffer on the console do not start weewx until one data logging period has passed (i.e. so that the console has some data to retrieve).

I'll add a note to the readme.txt for the moment, 0.4 will probably follow tomorrow

Bob

Bob Atchley

unread,
May 16, 2020, 1:09:12 PM5/16/20
to weewx-user
Hi Remy,

I am intending to write a utility to pull the data off the console into csv format.  In fact I had a test utility that did just this while working out the usb protocol, so it should not be difficult.

I don't have any extra sensors so its difficult for me to answer your other 2 questions.  I'm new to weewx as well, I know the the drivers and part of the engine quite well, but the skins and graphing remain a mystery at the moment.  Others have tested the ws6in1 driver with extra sensors, so I know the driver is doing the right thing and the temperature and humidity values from the extra sensors are being properly added to the database.  Hopefully someone else can help you with this.

Really pleased that the ws6in1 driver is working for you

cheers

Bob

Bob Atchley

unread,
May 16, 2020, 1:30:19 PM5/16/20
to weewx-user
Hi Jarda,

I'm not sure whats happening here.  time: 1589649000 is 2020/05/16 17:10:00.
That looks like the current time ?  What the weewx engine does is look in the database for the time of the latest record and then calls genStartupRecords in the driver to retrieve any missing records from that time.
The "genStartupRecords: yielding" says its found one.  I don't know why the weewx engine would reject that (possibly as its the same time)

Are you writing to the same database that you used for your normal console ?  That might explain it.

Hope this helps

Bob


On Saturday, 16 May 2020 16:36:15 UTC+1, Jarda Uher wrote:

Remy Lavabre

unread,
May 16, 2020, 1:46:58 PM5/16/20
to weewx-user

378/5000
dear Bob,

Thank you for your reply.
However, would you be able to tell me the names of the variables used for the temperatures and humidity levels of the outdoor sensors?
Thanking you and congratulating you again for your work!

PS: If you have your utility to recover data in CSV format on the weather station, I am interested! :-)

Bob Atchley

unread,
May 16, 2020, 3:30:53 PM5/16/20
to weewx-user
Hi Remy,

As stated I don't have an extra sensor (I must get one just to do some testing).  Looking at the database these fields exist:
extraTemp1 | extraTemp2 | extraTemp3 extraHumid1 | extraHumid2 

but also fields like
soilTemp1 | soilTemp2 | soilTemp3 | soilTemp4 | leafTemp1 | leafTemp2
soilMoist1 | soilMoist2 | soilMoist3 | soilMoist4 | leafWet1 | leafWet2

In my database these are obviously all null values in yours 3 of the temperature and 3 of the humidity fields should have values

Hope this helps

Bob

Jarda Uher

unread,
May 16, 2020, 4:20:26 PM5/16/20
to weewx-user
Hi Bob
Before I tried to retrieve data from the console, it was disconnected from the pc for a few minutes (about 15 min.). I also rebuilt the database, but it didn't help. But it's weird that the data is sent to the weathercloud and today's graphs look fine (I don't know if weathercloud calculates data).
Thanks and sorry for my english
Jarda

Dne sobota 16. května 2020 18:43:58 UTC+2 Bob Atchley napsal(a):

Bob Atchley

unread,
May 17, 2020, 10:42:45 AM5/17/20
to weewx-user
I have released 0.4 of WS6in1 driver that clears up the defect spotted by Remy, and a number of changes I had to make following that (a cascade of issues).
Details are in the readme.txt and changelog with more notes added

Bob

Remy Lavabre

unread,
Jun 3, 2020, 1:53:44 PM6/3/20
to weewx-user
Hi Bob,
 
Did you notice that there was an incompatibility between your driver (last version) and the last update of Weewx (4.1.1)?
Weewx can no longer get my data from my Bresser 6-1 station at home.
The problem occurred as of the update ...
Have you also noticed the problem?
thanks bob

Bob Atchley

unread,
Jun 3, 2020, 2:25:49 PM6/3/20
to weewx-user
Hi Remy,

Sorry I'm still on 4.0.0, I should have time this weekend to update to the latest weewx  and investigate what's going on.
Are there any clues in the log files ? 

Bob

Jarda Uher

unread,
Jun 3, 2020, 3:16:04 PM6/3/20
to weewx-user
Hi Bob and Remy
I have now tested WeeWX  4.1.1  and driver v. 0.4  and there is the same problem with reading data from the station. However, log reports that everything is fine and the weewx database was written to, but not send data to web

Thanks
Jarda

Dne středa 3. června 2020 20:25:49 UTC+2 Bob Atchley napsal(a):

Bob Atchley

unread,
Jun 3, 2020, 3:49:23 PM6/3/20
to weewx-user
Hi Jarda,

different problems I think - Remy's problem was usb cable related and the WS6in1 driver is working again ...

your problem is not related to the WS6in1 driver if the data is getting to the database but something that has been introduced by the new weewx version.
if you follow Tom Keffers post on "Version 4.1.1" he has posted a solution to a particular problem that may or may not be related

Let me know how you get on.  I will try the upgrade this coming weekend and see if I can repeat any of the issues

Bob

Jarda Uher

unread,
Jun 3, 2020, 4:30:18 PM6/3/20
to weewx-user
Hi Bob
Thank You.
I watched Tom's post about porting the new hw. I'll try to look at the configuration and let you know.
Thanks for the help
Jarda

Dne středa 3. června 2020 21:49:23 UTC+2 Bob Atchley napsal(a):

Jarda Uher

unread,
Jun 5, 2020, 2:14:50 AM6/5/20
to weewx-user
Hi Bob
I found out an interesting thing. After restarting the pc and a test pause when the station was disconnected (approx. 2 hours), I started weewx and all values from the station were stored in the database and sent to the web. So everything looks fine, only the data from June 2 16:05 - 21:05 were not sent to the web, but they are in the database.
Otherwise, everything works fine even with an external sensor.
Thank You
Jarda

Dne středa 3. června 2020 21:49:23 UTC+2 Bob Atchley napsal(a):
Hi Jarda,

Bob Atchley

unread,
Jun 7, 2020, 11:38:25 AM6/7/20
to weewx-user
I have updated weewx to version 4.1.1 (from 4.0.0) and it all went very well without any problems.

However offline Remy shared a log file that showed that my assumption that if the checksum from our weather station is good the data in the message is good is not absolutely 100% guaranteed (though I personally have yet to see any errors).
Because of my assumption, the bad data wasn't handled very well, causing weewx to exit.  I have updated the error handling so that hopefully the bad data will be suppressed and weewx will carry on running.
I haven't seen this problem so testing is a bit limited ...

However I have released WS6in1 driver version 0.5.  The only change is, hopefully, improved error handling

Bob

Bob Atchley

unread,
Jun 8, 2020, 5:28:43 AM6/8/20
to weewx-user
Whoops ... now WS6in1 prevents weewx from cleanly closing down
I have removed the unnecessary catchall exception handling

I have released WS6in1 driver version 0.6.

Bob

Jarda Uher

unread,
Jun 8, 2020, 8:36:14 AM6/8/20
to weewx-user
Hi Bob
The new driver 0.6  works without problems, the data is read from the database and sent to the site. 

But please info is still writing me version 0.2
General Weewx info 
 Weewx version 4.1.1 detected.

Station info
 Station type: WS6in1
 Driver:       user.ws6in1

Driver info
[WS6in1]
   driver = user.ws6in1

Currently installed extensions
Extension Name    Version   Description
WS6in1            0.2       Collect data from WS6in1 PC connected console
wcloud            0.12      Upload weather data to WeatherCloud.
Belchertown       1.2b3     A clean modern skin with real time streaming updates and interactive charts. Modeled after BelchertownWeather.com

Thank You to super work
Jarda

Dne pondělí 8. června 2020 11:28:43 UTC+2 Bob Atchley napsal(a):

Bob Atchley

unread,
Jun 8, 2020, 9:06:35 AM6/8/20
to weewx-user
I had to hunt around for that ... There is a field in the driver that I had correctly updated, but I had forgotten the the installer has a field which was still set at 0.2.
I'll remember to correct it for the next releases, but its cosmetic only

Bob

Jarda Uher

unread,
Jun 8, 2020, 10:51:31 AM6/8/20
to weewx-user
Oh, I did not know that. I don't think it matters. The driver is working properly.
Thank you Bob, great job.

Jarda

Dne pondělí 8. června 2020 15:06:35 UTC+2 Bob Atchley napsal(a):

Bob Atchley

unread,
Jun 15, 2020, 3:53:56 PM6/15/20
to weewx-user
I have released 0.7 of the WS6in1 driver

The main change is to cope with bad data when reading the data buffer when weewx starts.  This is fairly rare but has been an issue for Remy.  Release 0.6 tried to replace bad data with nulls, but unfortunately missing data meant data was being associated with the wrong parameters.  Instead 0.7 discards the complete data entry for that time if any bad data is detected.

Discovery of pyflakes and pylint has hopefully further tidied the code, sorted a few issues, and hopefully not broken anything.

Also I have written a standalone python3 program csv_ws6in1 which dumps the content of the weather station buffer into a csv file for spreadsheet analysis.  See the readme.txt

Have fun

Bob
Reply all
Reply to author
Forward
0 new messages