Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Is WD Software WeeWX compatible?
#11

First I must say that the handshaking issue is not related with the Davis emulation. The original Davis products have a real serial port, whereas the Arduino have a USB port.

Let's go on...
After some digging, I discovered the library which python uses to deal with the serial port. A little study about the commands, and I found how to change the WeeWX python vantage driver to open the port without hardware handshaking.
Now it starts, initialize the weather station, sets the clock, and stops at the Loop command. I think I know what is happening... more when I have the time.

I never looked at the source code of a python program before. So I'm diving in unknown waters.

Reply
#12

Well. I have finally set-up the Weather Station and have it up and running.

As far as Weewx is concerned, I supposed you don't have the modifications you did to the driver to skip the handshaking?

I could then ask for support in weewx forums as far as the "stops at loop command" issue is concerned (assuming you did no progress).
Reply
#13

I didn't any further progress on this matter. My focus now is on testing the new WeatherDuino Pro2 1.4 with the data logger functionality, and trying to finish the Solar/UV sensor kit.

Maybe you could help with the WeewX compatibility, my knowledge of python is zero.

Reply
#14

It would seem that performing a connection with
Code:
minicom --baudrate 19200 --device /dev/ttyUSB0
and typing some stuff such as TEST, LOOP etc...
somehow helps getting past the "unable to wake-up console" issue.

I can then get this (notice the "TypeError: format requires a mapping" in the end):

Code:
wee_config_device --info
Using configuration file /etc/weewx/weewx.conf
Using Vantage driver version 3.0 (weewx.drivers.vantage)
Querying...
Davis Vantage EEPROM settings:

    CONSOLE TYPE:                   VantagePro2

    CONSOLE FIRMWARE:
      Date:                         Sep 29 2009
      Version:                      1.90

    CONSOLE SETTINGS:
      Archive interval:             0 (seconds)
      Altitude:                     0 (foot)
      Wind cup type:                small
      Rain bucket type:             0.01 inches
      Rain year start:              0
      Onboard time:                 2015-04-29 22:54:39

    CONSOLE DISPLAY UNITS:
      Barometer:                    inHg
      Temperature:                  degree_F
      Rain:                         inch
      Wind:                         mile_per_hour

    CONSOLE STATION INFO:
      Latitude (onboard):           +0.0
      Longitude (onboard):          +0.0
      Use manual or auto DST?       AUTO
      DST setting:                  N/A
      Use GMT offset or zone code?  ZONE_CODE
      Time zone code:               0
      GMT offset:                   N/A

    TRANSMITTERS:
      Channel 1:                    iss
      Channel 2:                    iss
      Channel 3:                    iss
      Channel 4:                    iss
      Channel 5:                    iss
      Channel 6:                    iss
      Channel 7:                    iss
      Channel 8:                    iss

Traceback (most recent call last):
  File "/usr/bin/wee_config_device", line 43, in <module>
    main()
  File "/usr/bin/wee_config_device", line 40, in main
    device.configure(config_dict)
  File "/usr/share/weewx/weewx/drivers/__init__.py", line 65, in configure
    self.do_options(options, parser, config_dict, prompt)
  File "/usr/share/weewx/weewx/drivers/vantage.py", line 1747, in do_options
    self.show_info(station)
  File "/usr/share/weewx/weewx/drivers/vantage.py", line 1909, in show_info
    Outside Humidity:             %(outHumid)+.0f%%""" % calibration_dict
TypeError: format requires a mapping

Also from this it would seem that it's failing while starting to make sense of the loop data:

Code:
# tail -f /var/log/syslog                                           Apr 29 22:55:59 Cloud weewx[9492]:     ****    File "/usr/share/weewx/weewx/engine.py", line 631, in _catchup
Apr 29 22:55:59 Cloud weewx[9492]:     ****      for record in generator(lastgood_ts):
Apr 29 22:55:59 Cloud weewx[9492]:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py", line 543, in genArchiveRecords
Apr 29 22:55:59 Cloud weewx[9492]:     ****      _record = self._unpackArchivePacket(_record_string)
Apr 29 22:55:59 Cloud weewx[9492]:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py", line 1295, in _unpackArchivePacket
Apr 29 22:55:59 Cloud weewx[9492]:     ****      self.iss_id, raw_archive_packet['number_of_wind_samples'])
Apr 29 22:55:59 Cloud weewx[9492]:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py", line 1384, in _rxcheck
Apr 29 22:55:59 Cloud weewx[9492]:     ****      _frac = number_of_wind_samples * 100.0 / _expected_packets
Apr 29 22:55:59 Cloud weewx[9492]:     ****  ZeroDivisionError: float division by zero
Apr 29 22:55:59 Cloud weewx[9492]:     ****  Exiting.

I know zero about Python myself I am afraid.
Reply
#15

I don't know why, but if I have the RX unit connected when I start Ubuntu, the WeewX automatically starts, and connects to the WeatherDuino, it even downloads data from the logger.
Unfortunately if I stop the WeewX, I can't connect it again, unless I restart Ubuntu again.


Attached Files Image(s)
           

Reply
#16

There is anything in WeewX like the Cumulus multipliers? If not, I'm afraid we can't use WeewX with the WeatherDuino Pro2 system.

Reply
#17

(01-05-2015, 04:32)Werk_AG Wrote:  There is anything in WeewX like the Cumulus multipliers? If not, I'm afraid we can't use WeewX with the WeatherDuino Pro2 system.
StdCalibrate should take whatever arithmetic.
Reply
#18

Continuing the tests... There is no need to do any modification in the vantage.py driver, WeatherDuino Pro2 works with it, as it is.

Reply
#19

More on this...

It seems that the CH340 linux driver have some issues already reported in other foruns (thanks for the hint hvalentim).
So I tested WeewX with an arduino with the FTDI chipset, and voilá, it works out of the box.

Code:
sudo wee_config_device --info
Using configuration file /etc/weewx/weewx.conf
Using Vantage version 3.0 (weewx.drivers.vantage)
Querying...
Davis Vantage EEPROM settings:
    
    CONSOLE TYPE:                   VantagePro2
    
    CONSOLE FIRMWARE:
      Date:                         Sep 29 2009
      Version:                      1.90
    
    CONSOLE SETTINGS:
      Archive interval:             300 (seconds)
      Altitude:                     406 (meter)
      Wind cup type:                small
      Rain bucket type:             0.2 MM
      Rain year start:              1
      Onboard time:                 2015-05-02 02:25:15
      
    CONSOLE DISPLAY UNITS:
      Barometer:                    hPa
      Temperature:                  degree_10F
      Rain:                         mm
      Wind:                         mile_per_hour
      
    CONSOLE STATION INFO:
      Latitude (onboard):           +39.2
      Longitude (onboard):          -8.9
      Use manual or auto DST?       MANUAL
      DST setting:                  OFF
      Use GMT offset or zone code?  ZONE_CODE
      Time zone code:               0
      GMT offset:                   N/A
        
    TRANSMITTERS:
      Channel 1:                    iss
      Channel 2:                    iss
      Channel 3:                    iss
      Channel 4:                    iss
      Channel 5:                    iss
      Channel 6:                    iss
      Channel 7:                    iss
      Channel 8:                    iss

Reply
#20

Yes. I have tried a bunch of patches around and none works, not even with Ubuntu 14.02 running Kernel 3.18 (see here for a good How To and an explanation of one of the issues - did not work for me).

Definitely not supported in Raspberry as well:

"Problem USB to Serial Adapters
HL-340

CH340 Chipset - Currently not supported by RPi but there is a patch of kernel code here, but it is for a 2.X kernel. If you find you have bought one of these, then it may work under Windows, but as of writing there is no support for RPi. Otherwise you can have a go at getting the patch to work."

It does work with Cumulus, running on Mono. So it may have something to do with the way PySerial communicates with the driver as well.

So, it would seem Linux users would be better off by picking a Nano with an original FTDI chip.

Question: If I am to replace the CH340 Nano with an FTDI Nano will it work without modification (I mean with a C3 instead of an R3)?
Reply




Users browsing this thread: 1 Guest(s)