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

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

  • 651 Replies
  • 263542 Views
Advertisements
Does that mean this option doesn't exist for this camera and it's not able to put the camera to sleep (as mentioned in the wiki)?
Correct.

I knew it was too good to be true ;)

Thank you again

Hi waterwingz,

Couple thoughts about the Ultimate script that I have since I've "modified" my camera to have the power button always depressed. This will help for my long-term remote timelapse project and conserve power.

In another thread I saw this quote, and had a question:

While it won't fix the button,  there are a couple of CHDK script options that might help - shut_down() or post_levent_to_ui('PressPowerButton').  You could run a script at startup that watches one of the camera buttons and shuts things down  ( e.g. playback button pressed for more than 2 seconds).

A more permanent hack in the CHDK C code itself might be more satisfactory using the same approach.

Since I've modified my camera to have the power button depressed, I'm looking for a clean way to shut the camera down so the lens isn't extended. If I am visiting the construction site, I like the idea of pressing a button to do a clean shutdown.

I have Ultimate running at startup. Would you be able to provide an example of code that I could insert into Ultimate that would watch for a button depressing for 2+ seconds to shut the camera down?


Also, in a different thread I came across this code which modifies Ultimate to perform a clean shutdown at night. I like this approach as well so the camera does a clean shutdown at night. Is this code still relevant if I were to add it to the Ultimate script?


Hi waterwingz, When I modified your script for my daily shutdown trial, this is what I changed.

Added parameter:
   @param    z Single Day?
   @default z 1
   @values  z 0 1

Set value in  "-- translate user parameter"
   day_end = z

Added my shutdown within your 15sec procedure                 
-- process things that happen once every 15 seconds
   if ( ticmin <= now ) then
        ticmin = now+15       
    -- manage display / backlight
        set_display(0)
        collectgarbage()
   -- check if end of Single Day (j mod)
   if (( shooting_mode == NIGHT ) and (shot_counter > 0) and (day_end == 1)) then -- close down for the day
      printf("prepare for clean shutdown")
      sleep(2000)
      printf("end of day shut down")
      post_levent_to_ui('PressPowerButton')
      end -- j mod end            
     -- check battery voltage


 Maybe you can improve on this?

Thanks!

I have Ultimate running at startup. Would you be able to provide an example of code that I could insert into Ultimate that would watch for a button depressing for 2+ seconds to shut the camera down?
Probably the easiest way to do this is use the fact that the script stops when the MENU key is pressed.  Just add the line

Code: [Select]
post_levent_to_ui('PressPowerButton')right after the where it says print("menu key exit") at the bottom of the script.

Quote
Also, in a different thread I came across this code which modifies Ultimate to perform a clean shutdown at night. I like this approach as well so the camera does a clean shutdown at night. Is this code still relevant if I were to add it to the Ultimate script?
You could use the code jules provided.  Or just change the line in the camera_reboot() function that says
 
Code: [Select]
   reboot()to

Code: [Select]
post_levent_to_ui('PressPowerButton')
You might also want to delete the line in that function that says set_autostart(2).

Obviously, this could be made fancier. For example, to shut the camera down as soon as it goes into night mode. Just add
Code: [Select]
post_levent_to_ui('PressPowerButton')right after the lines that say :
Code: [Select]
   printf("switching to night mode")
   shooting_mode = NIGHT
although you will have to change the default value of shooting_mode to NIGHT at the top of the script for this to work.


Ported :   A1200    SD940   G10    Powershot N    G16

I must be missing something here  ..........
How can any of the above suggestions work if the power button is permanently depressed anyway and the camera still has power applied ?


How can any of the above suggestions work if the power button is permanently depressed anyway and the camera still has power applied ?
As jules pointed out somewhat earlier today, it's apparently not going to work for his camera.

http://chdk.setepontos.com/index.php?topic=11434.msg112326#msg112326

Not being familiar with the power switch design internals of all 100+ CHDK supported cameras, it was worth a shot in the hopes that the electronics that implements power down requires the actual power to cycle before it will restart (either by the removal of DC power or the power switch opening and closing).

Perhaps the earlier advice about warning people of the risk of holding down the power switch for extended periods was a good idea.




Ported :   A1200    SD940   G10    Powershot N    G16

it was worth a shot in the hopes that the electronics that implements power down requires the actual power to cycle before it will restart (either by the removal of DC power or the power switch opening and closing).

Well, all my timelapse cameras are A620's.
With power switch permanently down and power switched off overnight, all the cameras in woodlands  restart fine.

However, I have just had to restart one in my garden by slightly reducing the pressure on the power switch.
Don't know if it will restart tomorrow.

As jules pointed out somewhat earlier today, it's apparently not going to work for his camera.

Interesting! I'm still going to tinker with these changes to see how it handles with my Elph 130. At least if it powers down, but doesn't stay powered down, I'll know why!

Not being familiar with the power switch design internals of all 100+ CHDK supported cameras [...]

Suppose you're right. Mileage may vary camera to camera. On my Elph 130, best I can tell it's working. When Ultimate powers down the camera, it stays powered down until power is removed and reapplied. Button pressing does not turn the camera back on.  I need to do more testing, but 30 minutes into it, it seems consistent.

Here's the code I used. While Ultimate is running and you press Left, it'll power down.

I tried it after
Code: [Select]
print("menu key exit") but it didn't work well.

So instead I placed it around line 548, after wait_click(100).

Code: [Select]
  -- drsprite mod: shutdown button
  if (is_key("left")) then
print("left pressed. powering down")
sleep(1000)
post_levent_to_ui('PressPowerButton')
end
« Last Edit: 22 / April / 2014, 13:55:52 by drsprite »

When Ultimate powers down the camera, it stays powered down until power is removed and reapplied.
Is that with the camera power button held down?

If not, this sounds more like it's crashing than actually shutting down.
Ported :   A1200    SD940   G10    Powershot N    G16

Is that with the camera power button held down?

If not, this sounds more like it's crashing than actually shutting down.

Yeah, my camera power button is held down. When I press Left button while Ultimate is running, on screen it prints "left pressed. powering down". Then 1 second later the LCD turns off, and the lens assembly pulls in. Just as if I were to press the power button.

It then remains off, until I remove the battery or AC power plug and reinsert it. It then powers up as normal when power is restored to the camera (because the power button is being held down).

You may be right, but it doesn't have that crash feel to it.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal