Page 5 of 6

Re: Raspberry Pi, and an Instromet logger - USB/ serial adap

Posted: Thu 28 Jul 2016 6:45 pm
by Hobbyist
Hello Steve and thanks for latest software and info.

Well I have received a new PCB from Instromet and have been having a try with some varying results.

I have run version 1.9.4 on an NUC PC running Windows 7 professional and that seemed to run successfully whether or not the logger had a stored log or it was 'empty'.

I then tried a Raspberry Pi 3 and MX version 3039.

I have found that if there are no stored records then the Pi will run quite happily without any hang ups during start up.

However if I close Cumulus, leave the logger collecting data and the restart Cumulus it seems to be 'talking' to the logger as the USB data light flashes away as normal but after a few minutes it stops and seems to hang. The website does not upload nor does the Dashboard on 8998 update. On the PI terminal it does not show a 'Reading live Data' line which it normally does on a good start up.

If I do a control C it says it has shut down CumulusMX.

A restart of the terminal and a new Sudo Mono CumulusMX.exe and all seems to work as it should.

As an aside I have also noticed that on the TODAY website page that the LAST RAIN data is not updating at all, even though the Annual Rain, today's rain are showing correctly.

I have attached a couple of MXdiag files which should cover the periods I have mentioned.

Thanks

Dave

Re: Raspberry Pi, and an Instromet logger - USB/ serial adap

Posted: Thu 28 Jul 2016 7:42 pm
by steve
The problem happened because there were logs to discard with timestamps earlier than the last time MX closed down. The bug is that it loses count of how many valid logs there are to download, and it ends up trying to read logs when the station doesn't have any more to give. When no data is returned, the read should time out, but having looked at the documentation for the .Net serial port code, I see that the default timeout is infinite.

I'll fix both of these bugs in the next build. I don't understand why I didn't hit this problem myself, as it will be the usual case that there are 'old' logs to read off when Cumulus starts up.

Regarding the 'last rain' time, I don't have a rain gauge so can't test this - how much rain is in one tip of the Instromet gauge?

Re: Raspberry Pi, and an Instromet logger - USB/ serial adap

Posted: Thu 28 Jul 2016 8:21 pm
by Hobbyist
Hi Steve so very very close :)

The Instromet rain gauge has a resolution of 0.01mm as it measures drops of water passing through a 'calibrated' aperture.

The Cumulus software is translating the 'drop count' correctly as the rain to date, rain today and annual rain all update correctly on the Website and on the dashboard.

I am not sure to be honest as to whether or not 1.9.4 was correct as we have not had rain down here for quite some time until today.

Hope that helps

Dave

Re: Raspberry Pi, and an Instromet logger - USB/ serial adap

Posted: Thu 28 Jul 2016 8:27 pm
by steve
Thanks - I thought that would be the problem, it requires a change from between two readings of >0.09mm for the 'last tip' time to change, I'll need to change that for Instromet gauges. Cumulus 1.9.4 does the same.

Re: Raspberry Pi, and an Instromet logger - USB/ serial adap

Posted: Thu 28 Jul 2016 8:31 pm
by Hobbyist
Steve I presume you still have an Instromet logger.

If you locate the rain sensor input terminals on the sensor PCB there are 3 coloured wire inputs, Red black & Yellow.

Connect a wire link to the Yellow terminal and tap that onto the Red terminal each connection should up the rainfall by 0.01mm. It is the standard test if a sensor or wiring is suspect.

Dave

Re: Raspberry Pi, and an Instromet logger - USB/ serial adap

Posted: Fri 29 Jul 2016 3:12 pm
by steve
I've uploaded build 3040 which will hopefully fix the archive download issue. I've also put in a fix for the 'last rain tip', but I'm not able to test this - I get an empty field for the rain figure, even using your suggested hack. I guess the station knows I don't have a rain gauge connected.

Re: Raspberry Pi, and an Instromet logger - USB/ serial adap

Posted: Fri 29 Jul 2016 10:20 pm
by Hobbyist
Thanks Steve and I have downloaded/installed MX version 3040 and it does seem to be working although possibly early days.

I did a software update and then restarted Cumulus and it ran almost perfectly.

I then stopped Cumulus for an hour or two and then restarted with a backlog of data. It ran through the data and eventually found the 'new' data required and ran again almost perfectly.

I will run a few test tomorrow to confirm those details but it is looking very promising.

I have also noticed that this modified version gets through old logs at a much faster rate than it did on earlier versions, that may be due to new logger PCB actually advancing as it should have done on the PRLG command.

The only reason for the almost perfect result was the Last Rain which still is showing all zeroes. I injected a test volume of water to get a 0.1mm of rain showing on the web today page in the Rainfall Today & Rainfall This Year but the Last Rainfall field is still sticking at zero.

I will post again when I recheck everything tomorrow.

Thanks very much

Dave

Re: Raspberry Pi, and an Instromet logger - USB/ serial adap

Posted: Sat 30 Jul 2016 6:49 am
by steve
I see what the problem is with the last rain, I'm doing the wrong check for an Instromet station. I'll fix it in the next build.

Re: Raspberry Pi, and an Instromet logger - USB/ serial adap

Posted: Sat 30 Jul 2016 10:17 am
by Hobbyist
Well Steve I think you have cracked the Instromet nut!

I have made another 2 runs this morning.

One with a very short pause between Cumulus running, Cumulus off and then Cumulus restarted and the logger ran totally as expected.

The second run I stopped Cumulus for approximately 45 minutes and then restarted and once again the PI3/ CumulusMX3034 and the Instromet logger all communicated as they should.

I have attached both the MXdiags files just in case you wanted to see how it all came together on a successful sortie.

A couple of small points...

At the end of the MXdiags file 093445 there is a message "System.ApplicationException: Mutex is not owned" just after the

Cumulus closing
Writing Cumulus.ini file
Station stopped

I have never seen this message before and a net search does not seem to me give much of a clue.

Also I notice that after stopping CumulusMX and a restart the trends graphs show breaks in some but not all data.
For instance the Trends Temperature graph shows all temperature, Windchill and heat Index OK but gaps in Dewpoint and Apparent temperatures. The Humidity also drops to zero.

I also run a CumulusMX/Maplin test machine and have never noticed this drop off if Cumulus is stopped but the logger is left recording.

Possibly just another Instromet logger 'funny'.

Many thanks for getting the logger running though a great achievement :)

Dave

Re: Raspberry Pi, and an Instromet logger - USB/ serial adap

Posted: Sat 30 Jul 2016 10:33 am
by steve
Hobbyist wrote:Also I notice that after stopping CumulusMX and a restart the trends graphs show breaks in some but not all data.
For instance the Trends Temperature graph shows all temperature, Windchill and heat Index OK but gaps in Dewpoint and Apparent temperatures. The Humidity also drops to zero.
Your humidity reading is intermittent. This affects the humidity, dewpoint, and apparent temperature figures. Here are some examples of your live data:

2016-07-30 09:43:23.804 rdlv,18.4,,70.4,1012.5,0.0,358,39.50,0.78,6

In that one, there's a humidity reading - that 70.4. But later, there is no humidity reading being supplied:

2016-07-30 09:43:25.808 rdlv,18.5,,,1012.5,0.0,357,39.50,0.78,207
2016-07-30 09:43:27.812 rdlv,18.5,,,1012.5,0.0,358,39.50,0.78,206
2016-07-30 09:43:29.816 rdlv,18.5,,,1012.5,0.0,358,39.50,0.78,206

Only very occasionally is a humidity reading being supplied. When this happens, Cumulus just keeps using the last figure. So at start up, until there is a valid humidity reading, humidity will be zero, and those items which depend on it will not be calculated.

Re: Raspberry Pi, and an Instromet logger - USB/ serial adap

Posted: Sat 30 Jul 2016 11:46 am
by Hobbyist
Well talk about not seeing the wood for the trees, I have never noticed that before Steve.

I invested in the Electronic sensor rather than the usual wet/dry bulb humidity system. http://www.instromet.co.uk/humitter.html

I am fairly sure all connections are correct/tight but will recheck.

If all well there I will discuss the sensor specification with Instromet to make sure it is working as it should.

Cheers

Dave

Re: Raspberry Pi, and an Instromet logger - USB/ serial adap

Posted: Thu 18 Aug 2016 7:52 am
by Hobbyist
steve wrote:I see what the problem is with the last rain, I'm doing the wrong check for an Instromet station. I'll fix it in the next build.
Hi Steve did you manage to sort this problem in CumulusMX version 3041?

Thank you

Dave

Re: Raspberry Pi, and an Instromet logger - USB/ serial adaptor

Posted: Thu 18 Aug 2016 10:10 am
by steve
It was fixed in 3040 (hopefully).

Re: Raspberry Pi, and an Instromet logger - USB/ serial adaptor

Posted: Thu 18 Aug 2016 11:59 am
by Hobbyist
Sorry Steve but your comment was in reply to my post After I had installed and run 3040.

Although it has rained a couple of times since then the last rainfall has not updated on the website although rain is being measured.

Cheers

Dave

Re: Raspberry Pi, and an Instromet logger - USB/ serial adaptor

Posted: Thu 18 Aug 2016 12:07 pm
by steve
Ah yes - sorry - build 3040 was my first attempt at fixing it. Build 3041 contains the hopefully corrected code.