Page 1 of 3

Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Sat 13 Jun 2015 12:30 am
by pete_c
Curious of anyone is doing the following?

I am currently using a Davis Vantage view with a simple serial cable connection connected to a Quatech Serial server talking to Cumulus 1 on a Wintel server.

I have been able to split the virtual Quatech serial port to two serial ports with one connected to Cumulus 1. I have a spare virtual serial port now on the Wintel server.

I set up CumulusMX on a RPi2 yesterday. Only hardware add was a PiFace RTC shim.

Is there a serial server that I could run in Wintel that I could connect to with the RPi2 such that I could use Cumulus 1 and test CumulusMX?

Re: Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Sat 13 Jun 2015 7:32 am
by mcrossley
You cannot just 'split' the serial connection, you need to use a piece of software that understands the protocol and controls both sessions, queueing commands and forwarding results. VirtualVP is designed to do this, but it no longer works reliably with the latest versions of Davis firmware.

Re: Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Sat 13 Jun 2015 5:26 pm
by pete_c
Thank you Mark.

Yes here using a miniature (call it that) serial server ($150 USD a few years back) for controlling my 12 zone Russound audio system from two sources; one being my Leviton OmniPro II serial control and the other just software connected to the second port on the serial server. Each talks to the Russound system and gets responses just fine. I still use it for the audio here so put it back in place yesterday.

It's been many years now here utilized a software serial splitter (note this is what I call it) software for testing GPS hardware talking to multiple pieces of software running on one Wintel box. Work stuff was just a terminal server connecting to a bunch of Cisco Routers for play many years ago. Testing now using an old serial GPS program which errors in the logs because it is not a GPS I am using (rather its the Davis console) but works fine with Cumulus on one of the virtual ports (well or any).

Historically been doing this all in the Wintel world. I always played in the Linux world and am just beginning with the interplay between Linux and Windows. IE: relating to automation I am running software with hardware talking to the mothership using IP. The hardware is GPIO connection on the RPi2.

Personally not sure what firmware level I am at on the Davis console. Never checked.

Just checked referring to my Vantage Vue manual page 41 pressing the done and plus button shows me I am at 3.0 firmware on my console.

I guess I am fine then with the firmware.

Its been though up and running a few years now. I am though using a serial 3 wire cable for Cumulus rather than a buffered cable. I did use Virtual VP yesterday and it takes a long time to start as it thinks its looking at a buffered connection. That said Cumulus1 in Wintel did work with one virtual port. I also tested the Eltima Software Serial to Ethernet connector yesterday and it sort of works with Wintel and I do have a base for maybe making it work with the RPi2.

Did you just migrate over the CumulusMX or are you still running Cumulus 1 or do you have two Davis consoles to play with ? (I was thinking of going in that direction).

Re: Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Sat 13 Jun 2015 6:45 pm
by mcrossley
GPS is a bit dfifferent, as for he most part it is just a transmit NEMA stream, and you can split it and have multiple listeners. The weather stations are using a command and resdponse.

I do have two consoles, but I just switched over in the end.

Re: Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Sat 13 Jun 2015 11:39 pm
by pete_c
Thank you Mark.

Yup; the hardware splitter does a command buffer thing waiting for the back and forth stuff before it does any particular of two serial ports. It does make it seem a touch slower.

I recall the old black box serial splitters which used specific command lines to direct the serial traffic to whatever port you wanted.

I also have found a software Davis console traffic generator which might work.

I am very impressed with CumulusMX running in Linux. I have been using old automation software now running in Linux with Mono and testing some new automation software running in Linux Mono.

It's been over a year and using older slower SD cards that I did trash one after about 4 months relating to an abundance of RW stuff. I have upgraded now to the newer quickier microSD cards and do put a lot of the RW stuff in ram temporarily.

On another tangent note I have been running my Irrigation using an older Seagate Dockstar (Pogo Plug) with two USB connected SSD drives and it had done well now for a few years running Linux/Mono.

Here too modded the old Chumby with a Linux build running partly on a microSD card and mostly on a CF card (slow but worked fine with the Arm CPU).

Still trying to get used to running an OS 24/7 on a microSD card.

Re: Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Sun 14 Jun 2015 7:43 pm
by pete_c
Went back to testing the hardware serial port server. Works great now. I was initially trying one of two ports at a time and for whatever reason that doesn't work. Connecting both serial ports works fine though.

Started initially testing today with two minicom sessions via two USB to serial cables on the RPi2 manually chatting to the Davis console.

Next plugged one serial port to the Quatech serial server and the other one to the RPi2.

Both Cumulus 1 and CumulusMX now working each chit chatting with the Davis Console.

Here is a picture of the serial server.

Image

The SR-2 allows two control systems to have access and control of a product with a single RS-232 port. Communications
through Port A or Port B will be sent to the Master Port. When the product responds through the Master Port the
communications will be sent to both Port A and Port B. Please note that the SR-2 only has RX, TX and Ground signals
and is capable of transmissions speeds up to 460800 baud.

Re: Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Sun 14 Jun 2015 7:53 pm
by steve
I don't really understand how your setup is arranged, but I'd be surprised if it works reliably for long. Some of the protocol exchanges are not just one command and one response, so what happens if Cumulus 1 sends the first half of a command, and the serial port server makes sure it gets its response correctly, but then Cumulus MX sends the first half of a different command?

Re: Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Sun 14 Jun 2015 8:07 pm
by pete_c
@Steve,

Not sure but it buffers the IO of the two serial ports such that only one works at a time.

The audio Zoned amp split has worked fine for years now using this device. There is a constant chatter between the software/firmware and the audio controller.

Only way to see though is to leave it connected and watch the logs.

Re: Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Mon 15 Jun 2015 2:31 am
by pete_c
Still running fine here. I do not see any errors or disconnects at this time. (~6 hours runtime)

Re: Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Mon 15 Jun 2015 7:21 am
by steve
Something else that baffles me is how the two programs are getting the LOOP data (and the archive data when necessary). Cumulus 1 gets one packet at a time (because that's the way the Davis DLL works) but MX asks for 50 packets, and the console just keeps sending them, every 2 to 3 seconds. If Cumulus 1 asks for a packet in the middle of that, the supply to MX will stop (the LOOP request will be cancelled). I just can't see any way that can actually be working properly. It might look as though it's working OK superficially, but I suspect that actually it's not getting all of the data.

Re: Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Mon 15 Jun 2015 7:31 am
by pete_c
I did lock it up once earlier tonight by rebooting the RPi2 a few times. Then the Davis went to sleep and I couldn't wake it up.

That said I have configured the mySQL DB stuff and it is looking OK right now.
mysql-cumulusmx.jpg
I am getting errors with the FTP upload right now.

EPSV
500 'EPSV': command not understood.
PASV
227 Entering Passive Mode (216,87,188,9,217,190)
STOR /weather3/trends.htmtmp
150 Opening BINARY mode data connection for /weather3/trends.htmtmp.
Disposing FtpSocketStream...
226 Transfer complete.
RNFR /weather3/trends.htmtmp
350 File exists, ready for destination name
RNTO /weather3/trends.htm
250 RNTO command successful.
2015-06-15 02:30:05.609 Uploading web/gauges.htm to /weather3/gauges.htm
TYPE I
200 Type set to I.
SIZE /weather3/gauges.htmtmp
550 /weather3/gauges.htmtmp: not a plain file.
EPSV
500 'EPSV': command not understood.
PASV


Forgot to install FTP.

Re: Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Mon 15 Jun 2015 7:36 am
by steve
Those just look like an effect of the way the MX ftp component works - are the files not actually being uploaded? It looks like it's working OK. The upload and the rename appear to be successful.

Re: Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Mon 15 Jun 2015 10:33 am
by pete_c
Thank-you Steve.

Looks like the files are being uploaded. This morning not seeing anything odd in the logs.

http://lockport5.golffan.us/

Also using the realtime.txt file for the automation mothership (well too running now in Ubuntu 14.04 64bit and does the LAMP stuff plus runs VMs and automation software in Mono).

Cumulus box though is an RPi2 with a PiFace RTC shim (in to time here).

15/06/15 06:20:30 70.7 98 70.1 1.0 2.0 183 0.00 0.14 29.905 S 1 mph F in in 4.2 +0.002 0.14 0.14 0.00 70.4 55 70.7 -0.3 71.7 03:01 0.0 02:08 1.9 05:47 5.0 02:34 29.917 02:08 0.000 02:08 3.0.0 3025 3.0 70.7 85.8 0.0 0.000 0 177 0.14 26 0 0 S 134 ft 77.8 0.0 320 0

The gauges do not work though and I think I missed something relating to the FTP. They work fine locally.

Just set the processing for the gauges ....thinking I did it right?
guagesnotworking.gif
guages.gif
Wanting to shift over to CumulusMX sooner (kind of rushing myself to do this).

I would be better off using a second console as I can get the signals (and have seen it) of a Davis Vantage Pro II nearby.

Re: Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Mon 15 Jun 2015 12:52 pm
by steve
The remote filename for the realtime gauges is normally realtimegauges.txt, and you would normally tick 'realtime'. Note that the remote filename needs the path as well, unless your ftp account puts you in the right place automatically.

Re: Cumulus 1 and Cumulus MX sharing a serial port?

Posted: Mon 15 Jun 2015 4:15 pm
by pete_c
Thank-you Steve.

I know I did this wrong as I am still seeing the gauges as pictured above.
guages-1.jpg
guages-2.jpg
Root directory of CumulusMX on the RPi2 shows that the realtimegaugesT.txttmp file is getting updated (?)
realtimeguages.jpg