Anyway to transfer LOOP data to a serial port?

41 views
Skip to first unread message

boke wu

unread,
Aug 14, 2019, 4:26:39 AM8/14/19
to weewx-user
Hello There :

I have a Davis VP2 running in Rp...@Weewx3.9.2 through a USB Datalogger

and I was wondering is there anyway to sent the LOOP data

to a USB TO RS232 Cable in my /dev/ttyUSB2

so I can receive serial data on my rs232 device

Thanks for helping

Andrew Milner

unread,
Aug 14, 2019, 4:57:50 AM8/14/19
to weewx-user
If you are running weewx with a VP2 then the LOOP data is already being received by weewx.  What exactly are you trying to do?

boke wu

unread,
Aug 14, 2019, 5:02:30 AM8/14/19
to weewx-user
yes I know LOOP data is already being received by weewx

I'm try to send serial data to my another device via a USB to RS232 Cable  (a RS-232 data logger)


Andrew Milner

unread,
Aug 14, 2019, 5:10:46 AM8/14/19
to weewx-user
can you be more specific please.  The VP2 can be connected to only one computer at a time.

boke wu

unread,
Aug 14, 2019, 5:11:19 AM8/14/19
to weewx-user
something like:

VP2 in ttyUSB1  (send data )  => Weewx ( save archive ,make web page....)

Weewx (After weewx done everything , open serial port in ttyUSB2 and write loop data)  => My other RS232  device (receive string loop data and logging)

Andrew Milner

unread,
Aug 14, 2019, 5:34:06 AM8/14/19
to weewx-user
all you can do really is write a service, which you bind to a LOOP packet, and do your serial output froom that service.  The danger is that the service may block weewx if there is an issue with the output serial connection.  weewx itself cannot do what you are trying to do.  the LOOP data for a record is not kept by weewx, so you cannot output LOOP data 'after creating record and web pages'.  Another approach might be for the service you write to create an output file of the LOOP data and have a non weewx program looking for this file, processing it and deleting it once processed.  There are several ways you could try - but all require development and definition and are not part of weewx.  Why are you wanting to output the LOOP data to another machine??

mwall

unread,
Aug 14, 2019, 7:24:45 AM8/14/19
to weewx-user
as andrew noted, you could write a weewx service to do this.

or you could create a serial port sniffer in hardware.  create a wiring harness with 3 serial ports - one port plugs into the vp2, the other two do a 'Y' from that.  one of those two plugs into the computer running weewx, the other plugs into the other listener.  you only have to connect 3 wires: TX, RX, and GND.  you can even eliminate the TX pin for the non-weewx device.

as long as weewx is the only software sending commands, the other device will be a passive listener.

this is a common approach for reverse engineering serial protocols, and it is an easy (and super inexpensive) way to get serial data to multiple devices.

but only ONE device can do the sending/commands.  others must be passive listeners.

then write your software to read and decode the traffic that passes over the serial line.

m
Reply all
Reply to author
Forward
0 new messages