Sandaysoft

Support forum for Cumulus weather station software
It is currently Wed May 22, 2013 9:17 pm
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Detecting when data isn't received from sensor
PostPosted: Sun Mar 25, 2012 4:31 pm 
Offline

Joined: Tue Mar 20, 2012 5:42 pm
Posts: 23
Location: Lunenburg, MA
Weather Station: homebrew
Operating System: Win 7
I have problems with my hardware, and I want to be able to detect this from handwritten software. Here's the deal:

I have an Ambient Weather (Fine Offset) sensor and receiver. The hardware apparently has issues, because even over short range, the display/receiver occasionally loses the sensor signal, and doesn't get it back until I power cycle it. I'd like to know when this is happening. The receiver knows, because it puts dashes on the display to indicate No Data. I'm guessing Cumulus knows as well. But what weather underground is reporting back, is periods of time with data that doesn't change (except for pressure, because that's measured by the receiver, not the sensor array, so receive problems don't affect it.)

Right now, I can detect the problem in a sloppy way, by checking what weather underground reports, and noticing if the temperature and wind data have not changed at all for, say, half an hour. But that's a poor technique - that could happen naturally, leading to false alarms.

Is there a better way? Ideally I'd like to be able to open a socket connection to cumulus, and be able to ask it if it's gotten fresh data in the last n seconds (and if so, what it was). Since I don't think that's available, I'm looking for alternatives. (Parsing the files cumulus writes is a technique I'd rather avoid - I could end up reading them just as it's writing them, leading to bad data.)

Suggestions welcome (other than sending Ambient the weather station back, which will happen if they can't clear up the problem with piecemeal replacements.)


Top
 Profile  
 
 Post subject: Re: Detecting when data isn't received from sensor
PostPosted: Sun Mar 25, 2012 5:16 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
You could perhaps use the web tag <#SensorContactLost>.

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Detecting when data isn't received from sensor
PostPosted: Sun Mar 25, 2012 7:34 pm 
Offline

Joined: Tue Mar 20, 2012 5:42 pm
Posts: 23
Location: Lunenburg, MA
Weather Station: homebrew
Operating System: Win 7
Ok. It's a little bit of a bulldozer solution, using a web server when I want one byte of info, but it's there and I'll take it.

One issue I've run into: The directory I specify to put the processed file into, isn't set until AFTER the file is moved.

Logging in to calliope
Uploading D:\WeatherForms\w.htmltmp
Remote file: w.html
Changing directory to htdocs/weather <----- too late!
Logging out

So while I can see the file got properly processed and FTP'd up just fine, it didn't land in the directory I hoped for. It's at the top level of my apache install, where I definitely do not want it. What did I miss?


Top
 Profile  
 
 Post subject: Re: Detecting when data isn't received from sensor
PostPosted: Sun Mar 25, 2012 7:39 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
It uploads 'extra' files without changing directory, so you have to supply a full path. But you don't need to use a web server at all; use a 'local' file name and don't tick the ftp box.

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Detecting when data isn't received from sensor
PostPosted: Mon Mar 26, 2012 2:29 pm 
Offline

Joined: Tue Mar 20, 2012 5:42 pm
Posts: 23
Location: Lunenburg, MA
Weather Station: homebrew
Operating System: Win 7
Thanks. I have a working solution now.

I still wish Cumulus offered a TCP-based port, to query things from. The code that wants to know about the sensor state is on a different machine, so for now I'm stuck with flinging files using FTP once a minute to ship the data. This means neither machine ever gets to spin down the disk... not ideal.

But for now I'm good. Thanks.


Top
 Profile  
 
 Post subject: Re: Detecting when data isn't received from sensor
PostPosted: Tue Mar 27, 2012 10:28 pm 
Offline

Joined: Tue Mar 20, 2012 5:42 pm
Posts: 23
Location: Lunenburg, MA
Weather Station: homebrew
Operating System: Win 7
Ok, I *almost* have a solution.

Recently I discovered Cumulus reporting that "the unit didn't appear to be sending any data". The unit itself was displaying current data, so I have no idea if the problem was the unit or Cumulus, but power cycling everything cleared it up.

My difficulty now is that there's no webtag I can use to detect this state. <#SensorContactLost> doesn't cover this case. I dont' want <#errorlight> because that seems to contain errors that arent' sensor related. I think I need a <#SensorDataMissing>, which is a superset of lost contact and anything else that means I'm not getting good data.

I can do my own analysis on the data to figure this out - if absolutely nothing in the data changes for, say, 4 hours, I can declare an error and take action. But since Cumulus appears to be doing something like this already, I'd like to be able to ask it.


Top
 Profile  
 
 Post subject: Re: Detecting when data isn't received from sensor
PostPosted: Wed Mar 28, 2012 7:34 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
'Data stopped' indicates that the station is not talking to the PC. There's an option to make Cumulus restart when this occurs; it's unlikely to fix the problem, it usually requires a reset of the station, but it means that Cumulus doesn't repeatedly write the same data to the logs.

When this does occur, the <#LastError> tag will contain the message "Data input appears to have stopped - check your station and connections", so you could check for that. I'll add <#DataStopped> to 1.9.3.

But none of this is a solution; these are just examples of the many attempts in Cumulus to work around the various problems that some people have with Fine Offset stations, and there's a limit to what I can do in software when the hardware is broken.

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Detecting when data isn't received from sensor
PostPosted: Wed Mar 28, 2012 4:04 pm 
Offline

Joined: Tue Mar 20, 2012 5:42 pm
Posts: 23
Location: Lunenburg, MA
Weather Station: homebrew
Operating System: Win 7
steve wrote:
But none of this is a solution; these are just examples of the many attempts in Cumulus to work around the various problems that some people have with Fine Offset stations, and there's a limit to what I can do in software when the hardware is broken.


I know. Believe me, I know. I also write software for a living.

Ambient is shipping me a replacement for the receiver/display, and I'm hoping all of this will become moot. In the meantime, it's nice that Cumulus has ways to reveal this stuff.

Something to consider adding - an option to reboot the whole system, on selected errors. In my case that would help, because the receiver is powered by USB, and shutting down and rebooting would effectively power cycle the receiver. (Or, more generally, the option to spawn a process on selected errors, and then I could write a separate shutdown app.)


Top
 Profile  
 
 Post subject: Re: Detecting when data isn't received from sensor
PostPosted: Wed Mar 28, 2012 6:33 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2512
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
A reboot doesn't normally remove power from the USB ports does it - only a shutdown.

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Detecting when data isn't received from sensor
PostPosted: Wed Mar 28, 2012 6:42 pm 
Offline

Joined: Mon Apr 04, 2011 11:35 pm
Posts: 70
Location: Wellington, NZ
Weather Station: 1-wire Windblown solution
Operating System: Win XP
Scott,

Take a look at this thread viewtopic.php?f=13&t=7150

I've so far had great success using the ferritte beads on the usb lead. I'm well past the point where I normally lose contact with the base station unit. Still with fingers crossed of course ;)

Cheers
Colin

_________________
Image


Top
 Profile  
 
 Post subject: Re: Detecting when data isn't received from sensor
PostPosted: Wed Mar 28, 2012 8:09 pm 
Offline
User avatar

Joined: Mon Jul 19, 2010 11:15 am
Posts: 206
Location: Auckland NZ
Weather Station: WH1091
Operating System: Win7
Even a shutdown may not remove power from USB, something I noticed on my new PC, which I power off every night. Then only by physically unplugging/plugging the USB cable do I hear the console relay operate.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Detecting when data isn't received from sensor
PostPosted: Wed Mar 28, 2012 8:15 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2512
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
True, my laptop is the same - if there is something plugged into the port it maintains power to that port, handy when I am charging my 'phone :)

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group