Page 1 of 1
Duff values uploaded when CMX knows there is a console prob
Posted: Thu 19 Nov 2015 12:58 pm
by jpsc
Every now and then my cheapo console becomes unresponsive and Cumulus MX 3032 starts writing "Error reading data from station - it may need resetting". I have to remove the USB cable and the batteries to reset. The station is OK and still shows current conditions, it's just the interface is locked up. I think you have seen this quite often with the Maplin Fine Offset stations.
I am happy to reset the hardware, but the problem is that Cumulus still updates the log file and all the sites it is uploading to. Some of them can be edited but others have the bad values forever.
Could Cumulus suppress the logging if the console needs resetting?
Re: Duff values uploaded when CMX knows there is a console p
Posted: Thu 19 Nov 2015 1:32 pm
by steve
MX behaves this way because Cumulus 1 does - the operation of the code is basically the same. It should keep re-using the last known good values that it read. There is a long-outstanding enhancement request that Cumulus stops logging under certain circumstances such as the one you describe. At some point hopefully I'll get around to looking at this, along with all of the other enhancement requests.
Cumulus 1 has the advantage that it has the 'restart if data stops' setting, which means it should either recover or stop logging on the restart if the problem persists. This is something else that I will add to MX, when I work out how to do it reliably across all platforms.
Is the 'synchronise Fine Offset reads' setting not helping to mitigate the lockup problem for you?
Re: Duff values uploaded when CMX knows there is a console p
Posted: Fri 20 Nov 2015 9:44 am
by jpsc
steve wrote:Is the 'synchronise Fine Offset reads' setting not helping to mitigate the lockup problem for you?
Well I thought I had it set, but when I look in the ini file I see
So it looks like finger trouble.
I'll see what it is like with it set. It wasn't a constant problem anyway.
Re: Duff values uploaded when CMX knows there is a console p
Posted: Fri 20 Nov 2015 11:26 am
by jank
jpsc wrote:Every now and then my cheapo console becomes unresponsive and Cumulus MX 3032 starts writing "Error reading data from station - it may need resetting".
John,
whats about a small bash script which is checking the logs in the background for this error and in case this error is being in the logs, would a reboot of the system help or do you need to turn off/on the weatherstation?
Re: Duff values uploaded when CMX knows there is a console p
Posted: Fri 20 Nov 2015 1:02 pm
by jpsc
Yes, the problem is that the only way to reset is to remove the USB power and take the batteries out, AKA turn it off and on again.
Re: Duff values uploaded when CMX knows there is a console p
Posted: Fri 20 Nov 2015 2:29 pm
by jank
jpsc wrote:Yes, the problem is that the only way to reset is to remove the USB power and take the batteries out, AKA turn it off and on again.
okay, I had a project with a WiFi Plug Socket (SILVERCREST Wi-Fi SWS A1) where I was able to turn it on and off via bash script and php by sending cryptical commands like
(echo -n "0142ACCF2334536610F7B4E74B970D96F3CA2BB5D3CD1C19D0" | perl -pe 's/([0-9a-f]{2})/chr hex $1/gie' | nc -4u -w1 192.168.0.7 8530) by direct addressing the MAC address via netcat. This can be used in a simple bash script to turn something on and off....but this is too complicated and you need additional hardware.
But you complain about the fact that cumulus is still updating websites with never changing values in case the interface is crashing. How's about checking the logfiles for such kind of entries and in case of a problem, shutting down CumulusMX (to avoid these entries) and sending a warn e-mail to you?
Re: Duff values uploaded when CMX knows there is a console p
Posted: Sat 21 Nov 2015 12:02 am
by jpsc
That's a good idea, I'll take a look at your scripts, thanks.
Re: Duff values uploaded when CMX knows there is a console p
Posted: Sat 21 Nov 2015 5:44 pm
by jank
jpsc wrote:That's a good idea, I'll take a look at your scripts, thanks.
This is nothing I already have available.
I have a bash script which can turn on and off these WIFI Plugs, but you need to have exactly these plugs.
But in case the connection to your Logger is lost and you want get a warnmail of cumulus being stopped, , this is something you can do with a simple script
for example:
#!/bin/bash
Code: Select all
curlog=$(ls -tp //home/pi/CumulusMX/MXdiags | grep -v /$ | head -1)
error=$(grep -i "Error reading data from station" $curlog)
if [ "$error" -ne "" ]
then
screen -X -S CumulusMX stuff "^C"
fi