Ultimate Intervalometer - a script for shooting over a long duration - v4.9 - page 7 - Completed and Working Scripts - CHDK Forum

Ultimate Intervalometer - a script for shooting over a long duration - v4.9

  • 651 Replies
  • 249710 Views
*

Offline reyalp

  • ******
  • 14128
Re: Ultimate Intervalometer - a script for shooting over a long duration - v1.7
« Reply #60 on: 01 / September / 2013, 18:31:25 »
Advertisements
I tried the script with USB pause function but when I connect the camera, it goes into Play mode and the window which normally projects the script's status turns white (see attachment).
I don't see an attachment  :-[

When you connect a USB cable and the camera is in record mode, the behavior of the canon firmware is camera dependent. On cameras with a physical play/rec mode switch it may be ignored. On cameras with a play button, it will generally switch to a playback / PTP mode. This can interact in unpredictably with CHDK mode switching. In general I'd suggest doing all your mode switching with CHDK commands (play and rec in chdkptp) if you are going to have the camera plugged into PTP. Of course, if you find something else that works reliably, feel free to ignore that advice.

This is all getting very off topic from the waterwingz script. It would probably be better to just make a thread for your project, where we can discuss different scripts, chdkptp, ptpcamgui etc and not be off topic. I'd be happy to move some of existing posts, though it will be confusing either way.
Don't forget what the H stands for.

*

Offline JvdP

  • ***
  • 174
Re: Ultimate Intervalometer - a script for shooting over a long duration - v1.7
« Reply #61 on: 02 / September / 2013, 06:22:13 »
What do you mean by 'connect the camera'?   When I tested the mods,  simply plugging in the USB cable did not do that.  Neither did running CHDKPTP in command line mode.    However, running the CHDKPTP GUI did what you describe - probably because its issuing some sort of connect commands automagically?
When I plug in my camera, it automatically switched (instantly) to play mode.

The code change is trivial.  Would you like me to do it or were you planning to make the change on your own?

I have tried the following:
Code: [Select]
         -- check for a USB message telling us to swith to quit the script remotely
            usbmsg = read_usb_msg()
    if ( usbmsg ~= nil ) then
               if ( usbmsg == "quitscript" ) then
                    printf("usb script quit requested")
                    switch_mode(0)
sleep(1000)
quit = true
               end
            end

With the following end line:

Code: [Select]
    until is_key("menu") or quit == true
The script logs "usb script quit requested" but it doesn't quit. Is there something wrong with my end line?

Re: Ultimate Intervalometer - a script for shooting over a long duration - v1.7
« Reply #62 on: 02 / September / 2013, 09:50:14 »
When I plug in my camera, it automatically switched (instantly) to play mode.
reyalp pointed out that this is apparently camera dependent.  So it means you don't really need to do it with a  set_play(0) in my script but it won't hurt to do so.

Quote
With the following end line:
Code: [Select]
    until is_key("menu") or quit == trueThe script logs "usb script quit requested" but it doesn't quit. Is there something wrong with my end line?

There are two checks for a key press at the bottom of the main script loop.  The inner check looks for any key  ( i.e. not( is_key("no_key") ),  re-enabling the display when a press is detected.  The outer check looks for the menu key specifically to terminate the script.  So you need something like this :

Code: [Select]
      -- check for user input from the keypad
            wait_click(100)
           
        until (not( is_key("no_key")) or quit == true )
       
        print("key pressed")
        set_display(30)
       
    until (is_key("menu") or quit == true )
    print("menu key exit")

Also,  don't forget to set quit=false before the start of the two repeat loops - somewhere around line 400 or so.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline JvdP

  • ***
  • 174
Re: Ultimate Intervalometer - a script for shooting over a long duration - v1.7
« Reply #63 on: 02 / September / 2013, 10:34:30 »
Thank you very much. I have tested it and it works flawlessly. I have attached the script as I will use it.


One minor issue. I have tried several screen blanking methods and so far only the "PlayKey" method works. When I use the DispKey method I get the following error: "unable to change display". Any idea why?
« Last Edit: 02 / September / 2013, 15:51:05 by JvdP »

*

Offline JvdP

  • ***
  • 174
Re: Ultimate Intervalometer - a script for shooting over a long duration - v1.7
« Reply #64 on: 05 / September / 2013, 05:10:55 »
I found another strange "bug". I'm not sure if it's related to my port or to the script, but when I set the "Day of Week" to "Mon-Fri" I get the following error:

Code: [Select]
:330: attempt to compare number with string
*** TERMINATED ***

Is there something wrong with reading the date from my camera perhaps?

I found out that his is related to the "Day of Week" setting. When I have this set to "Mon-Fri" I get the error. Is there something wrong with the date reading on my camera or with the script? I tried to change the date format in the settings but this doesn't affect it.
« Last Edit: 05 / September / 2013, 05:39:37 by JvdP »

Re: Ultimate Intervalometer - a script for shooting over a long duration - v1.7
« Reply #65 on: 05 / September / 2013, 07:27:01 »
I found another strange "bug". I'm not sure if it's related to my port or to the script, but when I set the "Day of Week" to "Mon-Fri" I get the following error:

Code: [Select]
:330: attempt to compare number with string
*** TERMINATED ***

Is there something wrong with reading the date from my camera perhaps?

I found out that his is related to the "Day of Week" setting. When I have this set to "Mon-Fri" I get the error. Is there something wrong with the date reading on my camera or with the script? I tried to change the date format in the settings but this doesn't affect it.
Thanks for reporting this. Your camera is fine - there is a typo in the script.   

Line 333 of the current version should be :

Code: [Select]
    elseif (dow_mode == 2) then

I've updated the downloadable file.
« Last Edit: 05 / September / 2013, 07:34:11 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline JvdP

  • ***
  • 174
Re: Ultimate Intervalometer - a script for shooting over a long duration - v1.7
« Reply #66 on: 05 / September / 2013, 08:09:48 »
I do see the typo, but changing it did not solve the problem on my camera...

Re: Ultimate Intervalometer - a script for shooting over a long duration - v1.7
« Reply #67 on: 05 / September / 2013, 08:54:20 »
I do see the typo, but changing it did not solve the problem on my camera...

Hmmm ... looks like 328 needs to be '

Code: [Select]
   local dow = tonumber(os.date("%w"))
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline JvdP

  • ***
  • 174
Re: Ultimate Intervalometer - a script for shooting over a long duration - v1.7
« Reply #68 on: 05 / September / 2013, 11:03:31 »
This fixes the bug!

Unfortunately, I came across another potential bug.

Sometimes when I run the script with Tv set to "Off", the script doesn't stick to the Start and End times. So I have set the following settings:

Start: 14:53
End: 14:43
Day of Week: All
Tv: Off

I have the following log:
Code: [Select]
Thu Sep  5 14:41:31 2013: === Started: 14:41 ===
Thu Sep  5 14:41:31 2013: CHDK 1.3.0 ixus240_elph320hs 102a Sep  4 2013
Thu Sep  5 14:41:31 2013: CHDK version 130 okay
Thu Sep  5 14:41:34 2013: starting a new day
Thu Sep  5 14:41:34 2013: start time : 14:53 stop time : 14:43
Thu Sep  5 14:42:00 2013: switching to night mode
Thu Sep  5 14:42:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4359!T33]
Thu Sep  5 14:43:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4349!T33]
Thu Sep  5 14:44:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4330!T33]
Thu Sep  5 14:45:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4344!T33]
Thu Sep  5 14:46:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4335!T33]
Thu Sep  5 14:47:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4349!T33]
Thu Sep  5 14:48:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4325!T34]
Thu Sep  5 14:49:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4359!T34]
Thu Sep  5 14:50:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4339!T34]
Thu Sep  5 14:51:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4344!T34]
Thu Sep  5 14:52:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4344!T34]
Thu Sep  5 14:53:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4363!T34]
Thu Sep  5 14:54:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4363!T34]
Thu Sep  5 14:55:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4349!T34]
Thu Sep  5 14:56:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4373!T35]
Thu Sep  5 14:57:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4354!T35]
Thu Sep  5 14:58:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4368!T35]
Thu Sep  5 14:59:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4359!T35]
Thu Sep  5 15:00:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4373!T35]
Thu Sep  5 15:01:00 2013: --no shot: tv:1/30  [t480|a303|s430|b383|V4378!T35]
...
...
...

You will notice that the camera doesn't start at all, even though it should be like:

14:41 script starts
...
take photos until 14:43
...
14:43 Stop
14:53 Start again

Re: Ultimate Intervalometer - a script for shooting over a long duration - v1.7
« Reply #69 on: 05 / September / 2013, 11:13:25 »
Sometimes when I run the script with Tv set to "Off", the script doesn't stick to the Start and End times.
When you say "sometimes",  do you mean just when the start and stop times are setup like you described below?

Quote
So I have set the following settings:
Start: 14:53
End: 14:43
Day of Week: All
Tv: Off
As I was writing the script,  it was really intended for "day time" shooting.   Your time window as written is essentially for a "night time" shoot  (i.e. start time after stop time).   

Fixing the logic to handle that will take some work (and testing).  I'm busy right now so this could take a few days to get to.
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal