A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows 7 » Windows 7 Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Scheduling Relative To Sunrise/Sunset?



 
 
Thread Tools Rate Thread Display Modes
  #1  
Old May 15th 12, 04:01 PM posted to alt.windows7.general
(PeteCresswell)
external usenet poster
 
Posts: 1,933
Default Scheduling Relative To Sunrise/Sunset?

I've got an IP camera hooked into a server at a remote location.

The server is FTP-ing a constant series to 20-second video clips
to another location. Each clip is about a meg in size.

So far, so good...

Problem is that the camera goes nuts after dark and the clips
come out to be 10-20 megs - basically of darkness with some
lights on a distant shore.

What I want to do is kill the server around sundown and start it
up after sunrise.

To that end, I'd need something to help scheduler out.

So far, all I can come up with is
http://www.risacher.org/sunwait/

Problem is that, although the developer has compiled it to a
..EXE, it has not been tested - and it seems to have problems
parsing the command line.

So, bottom line: Does anybody know of a way to schedule jobs
relative to sunrise/sunset?
--
Pete Cresswell
Ads
  #2  
Old May 15th 12, 05:20 PM posted to alt.windows7.general
Ed Cryer
external usenet poster
 
Posts: 2,621
Default Scheduling Relative To Sunrise/Sunset?

(PeteCresswell) wrote:
I've got an IP camera hooked into a server at a remote location.

The server is FTP-ing a constant series to 20-second video clips
to another location. Each clip is about a meg in size.

So far, so good...

Problem is that the camera goes nuts after dark and the clips
come out to be 10-20 megs - basically of darkness with some
lights on a distant shore.

What I want to do is kill the server around sundown and start it
up after sunrise.

To that end, I'd need something to help scheduler out.

So far, all I can come up with is
http://www.risacher.org/sunwait/

Problem is that, although the developer has compiled it to a
.EXE, it has not been tested - and it seems to have problems
parsing the command line.

So, bottom line: Does anybody know of a way to schedule jobs
relative to sunrise/sunset?


It looks as if that sunwait.exe has been abandoned for some time. But it
should be easy enough to test: download it, get your local
longitude/latitude co-ordinates, set it up and load, interface an event
with it, pick that up in task scheduler.

Until it's fully approved I'd set up my own weekly task manually from
the mid-week time obtained from this website;
http://www.timeanddate.com/astronomy/

Good luck,

Ed

  #3  
Old May 15th 12, 05:33 PM posted to alt.windows7.general
(PeteCresswell)
external usenet poster
 
Posts: 1,933
Default Scheduling Relative To Sunrise/Sunset?

Per Ed Cryer:
It looks as if that sunwait.exe has been abandoned for some time. But it
should be easy enough to test: download it, get your local
longitude/latitude co-ordinates, set it up and load, interface an event
with it, pick that up in task scheduler.


Been there, done that. THe Windows executable seems to have a
problem parsing the command line. Linux probably works bc
that's what the developer uses it on.

But it's such an obviously-useful function that I was hoping
somebody else had duplicated it under Windows.
--
Pete Cresswell
  #4  
Old May 15th 12, 05:39 PM posted to alt.windows7.general
Dave-UK
external usenet poster
 
Posts: 596
Default Scheduling Relative To Sunrise/Sunset?


"(PeteCresswell)" wrote in message ...
Per Ed Cryer:
It looks as if that sunwait.exe has been abandoned for some time. But it
should be easy enough to test: download it, get your local
longitude/latitude co-ordinates, set it up and load, interface an event
with it, pick that up in task scheduler.


Been there, done that. THe Windows executable seems to have a
problem parsing the command line. Linux probably works bc
that's what the developer uses it on.

But it's such an obviously-useful function that I was hoping
somebody else had duplicated it under Windows.
--
Pete Cresswell


Could you not switch the camera on/off with a light-sensitive switch ?


  #5  
Old May 15th 12, 06:26 PM posted to alt.windows7.general
(PeteCresswell)
external usenet poster
 
Posts: 1,933
Default Scheduling Relative To Sunrise/Sunset?

Per Dave-UK:

Could you not switch the camera on/off with a light-sensitive switch ?


Sounds like a good fallback position - assuming the server
handles the camera's going offline/online gracefully.

It's powered via POE, so it would just be a matter of turning the
POE switch off/on.

Thanks!
--
Pete Cresswell
  #6  
Old May 15th 12, 06:50 PM posted to alt.windows7.general
Nil[_2_]
external usenet poster
 
Posts: 2,170
Default Scheduling Relative To Sunrise/Sunset?

On 15 May 2012, Ed Cryer wrote in
alt.windows7.general:

Until it's fully approved I'd set up my own weekly task manually
from the mid-week time obtained from this website;
http://www.timeanddate.com/astronomy/


That's what I'd probably do, to. And if this was going to be a long-
term thing, I might try writing a batch file or script to create the
tasks via the command line. That might be easier than creating, say 104
separate tasks with the Task Scheduler GUI.

http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
  #7  
Old May 15th 12, 09:51 PM posted to alt.windows7.general
Gene E. Bloch[_2_]
external usenet poster
 
Posts: 7,485
Default Scheduling Relative To Sunrise/Sunset?

On Tue, 15 May 2012 13:26:00 -0400, (PeteCresswell) wrote:

Per Dave-UK:

Could you not switch the camera on/off with a light-sensitive switch ?


Sounds like a good fallback position - assuming the server
handles the camera's going offline/online gracefully.

It's powered via POE, so it would just be a matter of turning the
POE switch off/on.

Thanks!


An alternative to that might be to have software that senses the state
of the photocell and does a clean start and stop of the camera program.

Luckily, I don't have to say how to do it :-)

I *would* say it's possible. What comes to my mind is something like
this: connect the photocell to an input line on a microcontroller, and
have it communicate over USB to the computer to trigger the action.

Talk about overkill :-)

--
Gene E. Bloch (Stumbling Bloch)
  #8  
Old May 15th 12, 10:33 PM posted to alt.windows7.general
richard
external usenet poster
 
Posts: 177
Default Scheduling Relative To Sunrise/Sunset?

On Tue, 15 May 2012 11:01:00 -0400, (PeteCresswell) wrote:

I've got an IP camera hooked into a server at a remote location.

The server is FTP-ing a constant series to 20-second video clips
to another location. Each clip is about a meg in size.

So far, so good...

Problem is that the camera goes nuts after dark and the clips
come out to be 10-20 megs - basically of darkness with some
lights on a distant shore.

What I want to do is kill the server around sundown and start it
up after sunrise.

To that end, I'd need something to help scheduler out.

So far, all I can come up with is
http://www.risacher.org/sunwait/

Problem is that, although the developer has compiled it to a
.EXE, it has not been tested - and it seems to have problems
parsing the command line.

So, bottom line: Does anybody know of a way to schedule jobs
relative to sunrise/sunset?


Just thought of a solution.
Get one of those light controllers that turn the ligths on at dusk and off
at dawn.
Setup a relay so that the camera stops working at dusk and turns on at
dawn.
Light on = camera off.
Light off = camera on.
  #9  
Old May 15th 12, 10:55 PM posted to alt.windows7.general
Peter Jason
external usenet poster
 
Posts: 2,310
Default Scheduling Relative To Sunrise/Sunset?

On Tue, 15 May 2012 11:01:00 -0400,
"(PeteCresswell)" wrote:

I've got an IP camera hooked into a server at a remote location.

The server is FTP-ing a constant series to 20-second video clips
to another location. Each clip is about a meg in size.

So far, so good...

Problem is that the camera goes nuts after dark and the clips
come out to be 10-20 megs - basically of darkness with some
lights on a distant shore.

What I want to do is kill the server around sundown and start it
up after sunrise.

To that end, I'd need something to help scheduler out.

So far, all I can come up with is
http://www.risacher.org/sunwait/

Problem is that, although the developer has compiled it to a
.EXE, it has not been tested - and it seems to have problems
parsing the command line.

So, bottom line: Does anybody know of a way to schedule jobs
relative to sunrise/sunset?


Just schedule in the sunset/sunrise times on a
weekly basis for your latitude. There are only 52
of them.
  #10  
Old May 16th 12, 01:35 AM posted to alt.windows7.general
(PeteCresswell)
external usenet poster
 
Posts: 1,933
Default Scheduling Relative To Sunrise/Sunset?

Per Gene E. Bloch:

Talk about overkill :-)


For now, I'm arbitrarily killing the camera server at 20:30 and
re-starting it at 05:30.

The reason for killing it before dark is that the camera goes
nuts on the bits per frame and the size of the 20-second clips
that are being FTP'd to another computer jumps from 1-1.5 megs to
10-20 megs creating major gridlock over night.

So the exact time isn't all that big an issue - just a
nice-to-have from the perspective of not having to change
anything as the seasons pass.

SunWait is written in C. I think I'll get the source code and
see if there is any hope of my understanding it for a rewrite in
VB6.
--
Pete Cresswell
  #11  
Old May 16th 12, 02:16 AM posted to alt.windows7.general
Char Jackson
external usenet poster
 
Posts: 10,449
Default Scheduling Relative To Sunrise/Sunset?

On Tue, 15 May 2012 13:51:16 -0700, "Gene E. Bloch"
wrote:

On Tue, 15 May 2012 13:26:00 -0400, (PeteCresswell) wrote:

Per Dave-UK:

Could you not switch the camera on/off with a light-sensitive switch ?


Sounds like a good fallback position - assuming the server
handles the camera's going offline/online gracefully.

It's powered via POE, so it would just be a matter of turning the
POE switch off/on.

Thanks!


An alternative to that might be to have software that senses the state
of the photocell and does a clean start and stop of the camera program.

Luckily, I don't have to say how to do it :-)

I *would* say it's possible. What comes to my mind is something like
this: connect the photocell to an input line on a microcontroller, and
have it communicate over USB to the computer to trigger the action.

Talk about overkill :-)


Let's Rube Goldberg it! :-)


--

Char Jackson
  #12  
Old May 16th 12, 02:46 AM posted to alt.windows7.general
Gene E. Bloch[_2_]
external usenet poster
 
Posts: 7,485
Default Scheduling Relative To Sunrise/Sunset?

On Tue, 15 May 2012 20:35:22 -0400, (PeteCresswell) wrote:

Per Gene E. Bloch:

Talk about overkill :-)


For now, I'm arbitrarily killing the camera server at 20:30 and
re-starting it at 05:30.

The reason for killing it before dark is that the camera goes
nuts on the bits per frame and the size of the 20-second clips
that are being FTP'd to another computer jumps from 1-1.5 megs to
10-20 megs creating major gridlock over night.

So the exact time isn't all that big an issue - just a
nice-to-have from the perspective of not having to change
anything as the seasons pass.

SunWait is written in C. I think I'll get the source code and
see if there is any hope of my understanding it for a rewrite in
VB6.


I hope you realize that my overkill comment was about my own suggested
solution.

I did understand the problem - you described it clearly in your OP - and
so far I like the idea about just obtaining an ephemeris online and
setting up schedules on a weekly basis. Except a series of schedules
like that can't be very easy to accomplish :-(

If it's true that the sunwait program is not robust in Windows, maybe
it's possible to get the source and rejigger it in Java, if you don't
have a C compiler.

Or how about this: make a table of sunrise/sunset times on a weekly
basis, then run a scheduled program at midnight. Have it pick up the
current sunrise, then sleep until that time, then start the camera.

Do the same with a second program for sunset, except stop the camera.

Since sleep uses seconds or milliseconds, the table would have its times
expressed in those units.

Or, for sanity's sake, just ignore what I wrote above :-)

--
Gene E. Bloch (Stumbling Bloch)
  #13  
Old May 16th 12, 06:23 PM posted to alt.windows7.general
Ed Cryer
external usenet poster
 
Posts: 2,621
Default Scheduling Relative To Sunrise/Sunset?

(PeteCresswell) wrote:
I've got an IP camera hooked into a server at a remote location.

The server is FTP-ing a constant series to 20-second video clips
to another location. Each clip is about a meg in size.

So far, so good...

Problem is that the camera goes nuts after dark and the clips
come out to be 10-20 megs - basically of darkness with some
lights on a distant shore.

What I want to do is kill the server around sundown and start it
up after sunrise.

To that end, I'd need something to help scheduler out.

So far, all I can come up with is
http://www.risacher.org/sunwait/

Problem is that, although the developer has compiled it to a
.EXE, it has not been tested - and it seems to have problems
parsing the command line.

So, bottom line: Does anybody know of a way to schedule jobs
relative to sunrise/sunset?


I've been hit by a wise thought while pondering on this matter. It is
this. A problem has arisen, and we're all racking our brains for a
solution, but we're drifting from the actual cause of the problem into
its symptoms and offering solutions for those.

Now then, the cause is quote "the camera goes nuts after dark.......".
Solve that and the problem goes away.
Is that the norm for this make? Can it be cured? Why does it take more
space to deal with a dark world? Flash?
My own digital cameras use less space when I take a snap in the dark.

Ed


  #14  
Old May 16th 12, 08:01 PM posted to alt.windows7.general
(PeteCresswell)
external usenet poster
 
Posts: 1,933
Default Scheduling Relative To Sunrise/Sunset?

Per Ed Cryer:
Is that the norm for this make? Can it be cured? Why does it take more
space to deal with a dark world? Flash?
My own digital cameras use less space when I take a snap in the dark.


Can't speak to "norm", but another Sony reported a similar
experience. He called it "Pixel Noise", as in "I have a few
Sony cams that at night will generate a ton of pixel noise..."

viz: http://www.cam-it.org/index.php?topic=2702.0
--
Pete Cresswell
  #15  
Old May 16th 12, 08:31 PM posted to alt.windows7.general
Ed Cryer
external usenet poster
 
Posts: 2,621
Default Scheduling Relative To Sunrise/Sunset?

(PeteCresswell) wrote:
Per Ed Cryer:
Is that the norm for this make? Can it be cured? Why does it take more
space to deal with a dark world? Flash?
My own digital cameras use less space when I take a snap in the dark.


Can't speak to "norm", but another Sony reported a similar
experience. He called it "Pixel Noise", as in "I have a few
Sony cams that at night will generate a ton of pixel noise..."

viz: http://www.cam-it.org/index.php?topic=2702.0


Yes, and I see the test results you got from sunwait.exe.

You've got a camera that generates a ton of pixel noise; a possible
solution that requires a program to predict sunrise/set which doesn't
work; a workaround whereby you input your timings manually each week.

I can't help but return to the webcam. Get one that doesn't have that
fault; because it is a fault! Cams are pretty cheap these days.

Ed
 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 02:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.