Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Davis VP2 Relay Device

For discussion of DIY weather equipment - sensors, accessories, improvements to existing kit etc
iandrews
Posts: 139
Joined: Sun 03 Jan 2010 10:57 am
Weather Station: Davis Pro2
Operating System: Windows 2012R2
Location: London

Re: Davis VP2 Relay Device

Post by iandrews »

Powered up the relay, and set the console to:

tx1 - wind
tx3 - iss

When looking at the stats page for tx3 the timer value field was jumping up about 195 each time (so close to an expected 192). When the wife has finished work and is out of the study later I will try changing the timer value on the relay and see what changes (if any) are shown on the console. I wonder if the 195 value (i.e 3 above what it should be) is what's causing the console to loose sync with the relay quickly.
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Davis VP2 Relay Device

Post by mcrossley »

OK, the values I put in the readme are just calculated "the other way round". So subtracting the prior from the later value. You have subtracted the other way around, the difference being mod 256. I'll amend the readme to use ascending values, and how to calculate them.

I just tried using 64ms as the transmit interval increment - didn't work at all, so it looks like the documented 1/16 second (62.5ms) is correct. I think that means that the timer value shown on the diags screen cannot be in milliseconds though.
iandrews
Posts: 139
Joined: Sun 03 Jan 2010 10:57 am
Weather Station: Davis Pro2
Operating System: Windows 2012R2
Location: London

Re: Davis VP2 Relay Device

Post by iandrews »

So, had time this evening for a bit of a play, set the timer value to t0.999 (just a guess, but as my jumps were 195 I thought I would reduce it), and bingo, now the jumps are (mostly) 192.

62
254 = 192
190 = 192
126 = 192
62 = 192
255 = 193
191 = 192
127 = 192
63 = 192

Console set for tx1 - wind, tx3 - ISS and has now been running about 30 mins without loosing sync. Stats showing maybe 1 or 2 bad packets in that time.....

......oh no, as I am writing this I get a run of 20 bad (missed) packets, and the console goes into re-sync mode..... :o

......however, just released, the wife was by the downstairs computer which the relay is plugged into / powered from, and she has just switched it off for the night...... :?

So, amending the timer value looks like it's helped. I will power back on tomorrow, and leave it running for (hopefully) a little while longer to see what happens.
iandrews
Posts: 139
Joined: Sun 03 Jan 2010 10:57 am
Weather Station: Davis Pro2
Operating System: Windows 2012R2
Location: London

Re: Davis VP2 Relay Device

Post by iandrews »

So, been running the relay all day (last 12 hours), and as far as I can see all has been ok with it. Looking at the solar graph (which isn't that high today, but has many ups and downs) I can't see that there was any flatlining.

The stats page shows 98% reception, but it does show 8 re-syncs (the tx1 - wind shows 99% with no re-syncs), but not sure if that's maybe a quick re-sync, or one where R appears in the bottom right after 20 consecutive bad packets as field 8 - "Maximum number of bad data packets in a row without resynchronization" only shows a value of 1.

Not sure what kind of stats others are getting, and if these are ok, or whether the timer needs tweaking slightly more.
Herbaldew
Posts: 113
Joined: Sun 12 Mar 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspberry Pi OS (64-bit)
Location: US Mid-Atlantic

Re: Davis VP2 Relay Device

Post by Herbaldew »

8 re-syncs is a lot more than I have seen - here are some numbers for the last 48 hours from mine.

I didn't know that I could see the stats for each transmitter until I read the above post, so these figures from yesterday are only for the ISS/Moteino:

Console 1: rx1 ISS - rx2 Wind - rx3 Extra Temp

Console 2: rx1 unused - rx2 Wind - rx3 Extra Temp - rx4 Moteino


Yesterday:

Console 1: 98% with 0 re-syncs

Console 2: 98% with 2 re-syncs


Today: All three transmitters on both consoles: 98-100% with 0 re-syncs


Yesterday was with current github files - today is using 2017 files.
iandrews
Posts: 139
Joined: Sun 03 Jan 2010 10:57 am
Weather Station: Davis Pro2
Operating System: Windows 2012R2
Location: London

Re: Davis VP2 Relay Device

Post by iandrews »

Thanks, I have changed my timer value slightly. First I put it to 0.99800 (so dropped 0.001 again), and as per dropping the same amount last time, the timer field went down 3 from 192 down to 189. I then set it to 0.99905 (so a rise of 0.00005 on the 0.999 I had yesterday), and the timer field showed the required change of 192, but it seem to be more consistent in that I didn't see as many jumps of 193 as I had noticed yesterday when looking at the stats.

I will look at the stats at the end of the day, but so far (in about 3 hours) I have had 1 re-sync.
iandrews
Posts: 139
Joined: Sun 03 Jan 2010 10:57 am
Weather Station: Davis Pro2
Operating System: Windows 2012R2
Location: London

Re: Davis VP2 Relay Device

Post by iandrews »

So, I have 3 re-syncs between about 8am and 11pm, and then another 1 between midnight and 8am this morning.

I have set for t0.99906 now, and will check again tonight.

Because the wind is coming direct from the transmitter it's quite hard to see if these re-syncs are quick or if am getting any flat lining when the re-syncs happen (assume as the wind data changes rapidly it would be easy(er) to see). I see that there are specific webtags for the Davis stats data, so wondering if I can either write these out to a file so I can see when re-syncs take place, or even into the MySQL database.
User avatar
laulau
Posts: 678
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: Davis VP2 Relay Device

Post by laulau »

Hi,
Could someone that have it working share his actual code ?
Thanks
Laurent

Image
iandrews
Posts: 139
Joined: Sun 03 Jan 2010 10:57 am
Weather Station: Davis Pro2
Operating System: Windows 2012R2
Location: London

Re: Davis VP2 Relay Device

Post by iandrews »

laulau wrote: Sat 11 Jul 2020 11:47 am Hi,
Could someone that have it working share his actual code ?
Thanks
I'm using the code from here: https://github.com/mcrossley/VPTools

I copied the the files from VPTools/Examples/RelayRxTx/ into a folder on my PC, and loaded the RelayRxTx.ino file from that RelayRxTx folder into the IDE, and compiled, it complained about missing files, so I copied PacketFifo.cpp & PacketFifo.h and RFM69registers.h from the top level VPTools folder to the RelayRxTx folder. It then seemed to compile, but I did get some warnings about "'typedef' was ignored in this declaration:", but it didn't seem to cause any issues.

I then had to change the following code (and then compile and upload to the board after):

Code: Select all

// station id associated with each payload
// Zero relative = Davis ID -1
static PayloadStation payloadStations = {
  1, 1, 1, 0, 1, 1   // wind, uv, rain, solar, temp, hum
};
to

Code: Select all

// station id associated with each payload
// Zero relative = Davis ID -1
static PayloadStation payloadStations = {
  1, 0, 0, 0, 0, 0   // wind, uv, rain, solar, temp, hum
};
To match my setup at the time (wind on channel 2 and rest on ISS on channel 1).

I then applied a frequency offset, I tried 100 first, and that turned out to be a good setting for me, so I haven't tried anything else since.

I am now trying to come up with a good timer offset, at the moment I'm at 0.99906, but would have thought this setting may very much very from one person to the next.
iandrews
Posts: 139
Joined: Sun 03 Jan 2010 10:57 am
Weather Station: Davis Pro2
Operating System: Windows 2012R2
Location: London

Re: Davis VP2 Relay Device

Post by iandrews »

I was already up to 7 re-syncs by 10pm today, so I am now trying 0.99904.

To try and help monitor the stats I have created a "davis" table in my MySQL weather database, it has 6 columns, with the first being datetime and the other 5 INT(6).

I have then put the below SQL into the "Custom upload - minutes interval" in the Cumulus MySQL settings, and set it to update every 1 min.

INSERT INTO davis (LogDateTime,TotalPacketsReceived,NumCRCerrors,TotalPacketsMissed,NumberOfResynchs,MaxInARow) VALUES ('<#metdate format="yyyy-MM-dd"> <#timehhmmss>','<#DavisTotalPacketsReceived>','<#DavisNumCRCerrors>','<#DavisTotalPacketsMissed>','<#DavisNumberOfResynchs>','<#DavisMaxInARow>')

It's working, but I notice the stats only "update" every 15 mins, but that time interval seems something Steve put in ages ago as to not "miss" other readings. Not sure if there is a setting anywhere (.ini file?) to temporary change it to say 5, while testing.
Herbaldew
Posts: 113
Joined: Sun 12 Mar 2017 8:33 pm
Weather Station: VP2+
Operating System: Raspberry Pi OS (64-bit)
Location: US Mid-Atlantic

Re: Davis VP2 Relay Device

Post by Herbaldew »

mcrossley wrote: Mon 06 Jul 2020 2:47 pm
Herbaldew wrote: Sat 04 Jul 2020 12:15 am If I were to fire up my Moteino again and connect it as tx3 like before and set the anemometer transmitter as tx4, would this solve my phantom gust problem and still get the solar and UV data from the anemometer transmitter?
Yes.
It's been almost three weeks now and not phantom gusts - looks like this solved the problem :) Sensors back on the anemometer mast :)

Thanks
iandrews
Posts: 139
Joined: Sun 03 Jan 2010 10:57 am
Weather Station: Davis Pro2
Operating System: Windows 2012R2
Location: London

Re: Davis VP2 Relay Device

Post by iandrews »

That's good to hear.

I have been trying different timer (t) values. Tried many between 0.99895 and 0.99906, and got a verity of re-syncs with all. The best (only about 1 re-sync in 20 odd hours) ones were 0.99895, 0.99896 & 0.99897. I then tried 0.99895 & 0.99896 for longer, and some days I only got 1 re-sync, but others I got 3, 4 or even 6. I moved the relay closer to the console and for the day after I only got 1, but yesterday I got 4.

May try t0.99897, but not sure I am really going to get these re-syncs down. Not sure if adjusting the frequency offset more will help any, as that does seem ok with both the serial output and the console only showing 1 or 2 out.

Also, on another matter, there is a little red led by the aerial, and that does seem to flash on and off, but there are also 2 more (red and green I think) on the board labelled TX and RX. Now, I'm sure when I first started (maybe the 2nd time I complied and uploaded the code to the board) these LED's flashed, however since I have not seen them flash. I know there is code to flash the LED, but not sure if it's just the one by the aerial, or if the 2 others should also flash, and if so, then not sure why mine don't.

Ian.
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Davis VP2 Relay Device

Post by mcrossley »

It only flashes the single red LED (short for receives, a bit longer for transmits). I have no other LEDs on my board - are yours for the data connection?
Post Reply