Author Topic: Modify WeeWX rtldavis Driver for use with Davis Vantage Pro2 wired direct RS-422  (Read 937 times)

0 Members and 1 Guest are viewing this topic.

Offline ianm

  • Member
  • *
  • Posts: 4
Hi All,

I have a Davis Vantage Pro2 ISS (6322C) which is directly connected via the RJ-11 RS-422 connection to a PC running WeeWX.  I'm already receiving the expected data according to the work done by DeKay https://github.com/dekay/im-me/blob/master/pocketwx/src/protocol.txt.  My problem is I haven't been able to find a WeeWX driver that can take that data directly via serial (or I could convert it to a TCP/IP socket).  The closest I have found is the rtldavis driver https://github.com/nickr01/weewx-rtldavis which is intended for the wireless version of the ISS - I understand it uses the same protocol but has the extra complication of the wireless comms.

Can someone please, who is familiar with the WeeWX rtldavis driver, give some guidance to a novice programmer (me) on how I can modify the driver to bypass the wireless comms and work direct with the data directly via a serial connection or TCP/IP socket?

Kind Regards

Ian

Offline GHammer

  • Senior Contributor
  • ****
  • Posts: 210
    • Woodmar Weather
Why not look at the inbuilt driver first to see if you can adapt it to your serial feed? As it works with USB, it ought to be the easiest to work with. Who knows, it may even have serial too.
If not, take a look at other serial input drivers for inspiration.

https://github.com/weewx/weewx/wiki#drivers
Wireless Vantage Pro2 Plus with 24hr FARS, WLL

Offline ianm

  • Member
  • *
  • Posts: 4
It looked a bit daunting for a novice programmer to write a new driver for the Davis ISS from the examples but may be the best way.  I was hoping that I could use the rtldavis driver as a head start as it already has the message parsing of the Davis raw strings.  Simplistically I thought I could bypass the RF side of things and just pass the raw message to the parsing routine but will probably need some help from someone familiar with the driver to achieve this. Thanks all, any guidance welcomed.


Offline vreihen

  • El Niņo chaser
  • Forecaster
  • *****
  • Posts: 1216
  • K2BIG
This question would probably get better answers on the weewx-users Gmail group.....
WU Gold Stars for everyone! :lol:

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
In case it's still relevant, you could easily mod this driver for WeeWX. At the core it accepts and processes the same message format.

Offline ianm

  • Member
  • *
  • Posts: 4
Thanks kobuki, I ended up finding a solution by writing a driver to parse the Davis ISS strings in my Crestron control system and then making the information available to WeeWX via MQTT.  I'm not sure if there are others wanting parsing of the strings directly either via a serial port or via TCP/IP - if so then it may be a feature worth adding to your WeeWX driver.  I'm not sure that I have the skills to do it (would very likely mess it up) but would be happy to test if needed.

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
The driver I mentioned uses a serial port, but also processes some extra data besides the packets and initializes the specific device on the serial port. It also has the advantage of properly interpreting all the bytes and message types, so there's no need to use outdated docs and sample code for that. Publishing records is possible by using another WeeWX driver, whatever PWS driver you use.

Offline ianm

  • Member
  • *
  • Posts: 4
I should really try again using your module. I had previously tried modifying a similar module but without understanding enough about the code I had trouble removing the initial handshaking and the RF data sections (both of which I didn't need) and still having the module run through the string parsing.  Also I wanted to use TCP/IP as the connection to the WeeWX module as the device receiving the RS-422 from the Davis ISS transmits it via TCP/IP.

 

anything