Extended time lapse with Internet connection and power saving - page 13 - General Help and Assistance on using CHDK stable releases - CHDK Forum

Extended time lapse with Internet connection and power saving

  • 130 Replies
  • 42084 Views
Re: Extended time lapse with Internet connection and power saving
« Reply #120 on: 09 / June / 2023, 02:44:48 »
Advertisements
Hi,

so my camera is up and running since yesterday.

Reyalp (and others), thank you a thousand times for all the help! I am really grateful!

I did have some problems regarding I/O error, still don't know exactly what is the cause for this error, since I installed arch linux on raspberry pi (no desktop).

One thing I noticed, if camera is doing something, for example, if I try to remoteshoot while physically zooming (with fingers of zoom button, yes, I've accidentaly done this), I/O error occurs.

Also, if I try to remoteshoot right after I connect to camera it also reports I/O error. Then I added some delay (3s), because I suspected the error occured because the camera was still reporting temerature readings. And voila, it worked.

Will report how the system behaves.
Out of topic question: Does Eos M series (M3 for example) supports chdk ptp? Because the next step would be adding new, upgraded camera  :D


*

Offline reyalp

  • ******
  • 14125
Re: Extended time lapse with Internet connection and power saving
« Reply #121 on: 09 / June / 2023, 03:57:04 »
I did have some problems regarding I/O error, still don't know exactly what is the cause for this error, since I installed arch linux on raspberry pi (no desktop).
IO error generally just means the connection went away (from the host's POV) so could have many different causes. The camera crashing is a common one. In the case, the camera will power off, and the ROMLOG https://chdk.fandom.com/wiki/Debugging#Camera_crash_logs_(romlog) may have some clues about the cause.

Quote
One thing I noticed, if camera is doing something, for example, if I try to remoteshoot while physically zooming (with fingers of zoom button, yes, I've accidentaly done this), I/O error occurs.
I'd suggest not doing that ;)

Quote
Also, if I try to remoteshoot right after I connect to camera it also reports I/O error. Then I added some delay (3s), because I suspected the error occured because the camera was still reporting temerature readings. And voila, it worked.
Seems odd to me that getting temperatures would cause this, but I'd need to see the actual code of sequence of commands involved to provide any insight.

Quote
Out of topic question: Does Eos M series (M3 for example) supports chdk ptp? Because the next step would be adding new, upgraded camera  :D
M3 should have full support. M10 has PTP support, but does not currently support remoteshoot, so files would have to be saved to SD and downloaded (or remoteshoot implemented)
Don't forget what the H stands for.

Re: Extended time lapse with Internet connection and power saving
« Reply #122 on: 20 / June / 2023, 12:45:07 »
So, the sistem was stable this week, I am super happy with the results!  :D

Quote
I'd suggest not doing that

Yeah, it was by accident  :-[

Quote
M3 should have full support. M10 has PTP support, but does not currently support remoteshoot, so files would have to be saved to SD and downloaded (or remoteshoot implemented)

I am seriously considering buying second camera for this, and I am torn between G1 x, G7 x II and Eos M3. G1X would be perfect, but it lacks megapixels. For this project, I was in a hurry, so my G11 camera (11MP) was ok to do this job. But he main reason I am doing this DIY timelapse, is to have raw pictures (freedom in post), ability to crop and have finished 4k resolution.
G7x has "small" sensor and is actually not that cheap on ebay. M3 is fine, but I also have to consider lens options (and price).

I don't mean this in a bad way, I know you guys dedicate your own free time for this, so thank you again for all the work, but are there any other high end cameras that support chdk ptp with remoteshoot? I doesn't need to have full chdk support ... Just want to be sure, before I buy something from ebay.

Thanks again!

*

Offline reyalp

  • ******
  • 14125
Re: Extended time lapse with Internet connection and power saving
« Reply #123 on: 20 / June / 2023, 14:05:22 »
I am seriously considering buying second camera for this, and I am torn between G1 x, G7 x II and Eos M3. G1X would be perfect, but it lacks megapixels. For this project, I was in a hurry, so my G11 camera (11MP) was ok to do this job. But he main reason I am doing this DIY timelapse, is to have raw pictures (freedom in post), ability to crop and have finished 4k resolution.
G7x has "small" sensor and is actually not that cheap on ebay. M3 is fine, but I also have to consider lens options (and price).

I don't mean this in a bad way, I know you guys dedicate your own free time for this, so thank you again for all the work, but are there any other high end cameras that support chdk ptp with remoteshoot? I doesn't need to have full chdk support ... Just want to be sure, before I buy something from ebay.
See https://chdk.fandom.com/wiki/Template:Supported_Cameras for a full list of supported models

Others you could consider are G5 X and the original G7 X. While this sensor is smaller than the EOS cams, 1" / 20MP should still be a pretty big improvement over your G11. From an image quality perspective, the original G7 X should be quite similar to the mk2, so it might be an option if you find one cheap and aren't worried about shooting speed.

There is also a partial port for M100, but AFAIK it doesn't have remote shoot support and had some unresolved stability issues.

If you are a software developer with a bunch of time on your hands, G1 X mk2, EOS M5 and EOS M6 are other > 1" sensor cams which are potentially supportable. G1 X mk2 should be pretty easy since it's digic 6, M5 and M6 are both digic 7 cameras which would be significantly more challenging.

You might also look at magic lantern https://www.magiclantern.fm/ - It doesn't support chdkptp or CHDK scripts, and I don't know how difficult it would be (if possible at all) to do the same sort of tethered timelapse, but older EOS DSLRs would potentially give an affordable option with good image quality.
Don't forget what the H stands for.

Re: Extended time lapse with Internet connection and power saving
« Reply #124 on: 16 / September / 2024, 11:56:28 »
Hi all,

so, I bought Canon m3 with which I also want to implement long term timelapse. Everything is working as it should, except powering on the camera. Camera is constantly wired to power supply (dummy battery). If I press the power button it starts up. Because camera is in a remote place, I use raspberry pi and 3v relay, to power up the camera, as it is not shooting 24/7. So, I have power on button constantly pressed and I deliver power thru relay. Every time i switch relay, camera boots up. It worked fine on my canon g11. But on m3, no matter what I do, I have to press power button on camera AFTER the power is delivered. It doesnt work if power button is pressed all the time. It has to be depressed and then pressed again. I really dont want to dissasemble the camera and wire relay in series with power on button. Is there any other way? I can leave camera powered on for a couple of days, but I am afraid it will crash for some unexpected software bug (some timer inside canon firmware, ...), as it is not designed to run for such a long time. Can I reboot camera without switching it off and on again? Would that help?
« Last Edit: 16 / September / 2024, 12:23:56 by Zeci »

*

Offline reyalp

  • ******
  • 14125
Re: Extended time lapse with Internet connection and power saving
« Reply #125 on: 16 / September / 2024, 13:31:14 »
Hi all,

so, I bought Canon m3 with which I also want to implement long term timelapse. Everything is working as it should, except powering on the camera. Camera is constantly wired to power supply (dummy battery). If I press the power button it starts up. Because camera is in a remote place, I use raspberry pi and 3v relay, to power up the camera, as it is not shooting 24/7. So, I have power on button constantly pressed and I deliver power thru relay. Every time i switch relay, camera boots up. It worked fine on my canon g11. But on m3, no matter what I do, I have to press power button on camera AFTER the power is delivered. It doesnt work if power button is pressed all the time. It has to be depressed and then pressed again.
The M cameras have somewhat different key and power-on handling from most other cameras: They have a separate MCU (called SubCPU in the firmware) which is involved, so this behavior could be hardware difference. A few, mostly very old powershots also have SubCPU but I'm not sure how similar the implementation is.

It's also possible something about the CHDK port prevents it from booting. If the holding power trick works without CHDK installed, we can probably come up with a fix.

You could also try the other buttons that power on the camera (playback and possibly a wifi/wireless connect button). If either of those work but have side effects from the button being held, we may be able to work around them.

The SubCPU can be used to schedule boot, which may provide alternative approaches, see discussion around: https://chdk.setepontos.com/index.php?topic=12542.msg137099#msg137099

Note also in srca_4c's post
Quote
Warning: the reboot event survives shorter power cuts (battery out for a few seconds). When the battery is removed for longer (and a reboot is scheduled), the cam switches quickly on/off after the battery is re-plugged.

Quote
I really dont want to dissasemble the camera and wire relay in series with power on button. Is there any other way? I can leave camera powered on for a couple of days, but I am afraid it will crash for some unexpected software bug (some timer inside canon firmware, ...), as it is not designed to run for such a long time. Can I reboot camera without switching it off and on again? Would that help?
You can reboot from CHDK script, but for a remote installation, having full external control would definitely be better. If the camera crashes or hangs, software reboot won't help you. The SubCPU boot might be better option, you could leave the power connected, schedule the next start time
and then shut down using the levent call post_levent_for_npt("PressPowerButton"), like srca_4c's script in the link.
Don't forget what the H stands for.

Re: Extended time lapse with Internet connection and power saving
« Reply #126 on: 16 / September / 2024, 14:40:44 »
Wow, thank you reyalp, for quick response.

Quote
You could also try the other buttons that power on the camera (playback and possibly a wifi/wireless connect button). If either of those work but have side effects from the button being held, we may be able to work around them.

YES, that worked! I tried playback button and it works. It boots up. Then I have to half press shutter button, and it goes to shooting mode, but this can be done with chdk-ptp? Also, can something go wrong if playback button is pressed all the time during 12hour shooting? Can it be software "depressed" just in case?

*

Offline reyalp

  • ******
  • 14125
Re: Extended time lapse with Internet connection and power saving
« Reply #127 on: 16 / September / 2024, 16:30:08 »
YES, that worked! I tried playback button and it works. It boots up. Then I have to half press shutter button, and it goes to shooting mode, but this can be done with chdk-ptp?
Yes, the 'rec' command in chdkptp switches to shooting mode.

Also, if playback works, I'd guess the reason power doesn't work is either related to the startup key handling in CHDK code, or is something that happens late enough that we could work around it. So if play has other issues, there's a decent chance we can get power working.

Quote
Also, can something go wrong if playback button is pressed all the time during 12hour shooting?
Well, that's for you to find out and let us know ;)

I would generally expect if it works enough to get into rec mode and shoot, it's probably fine.

One side effect known from holding the power button (on at least some cams) is that it interferes with Canon power saving setting that turns the screen off after a certain time. It wouldn't be surprising if holding play had similar or different side effects.

(Screen-off power save is useful for an intervalometer because the sensor is also turned of since it no longer needs to drive the live view. If the interval is much longer than the camera continuous shooting rate, this significantly reduces temperature and power consumption)
Quote
Can it be software "depressed" just in case?
Yes. The issue above can be worked around by using post_levent_to_ui"UnpressPowerButton" in CHDK Lua.  The levent for the playback button should be "UnpressPBButton", so if you run into issues, calling that at startup would be the first thing to check.

CHDK also masks most physical button state in alt mode (except the power button) so running a script at startup should make Canon firmware stop seeing the button as pressed. If your script isn't running continuously (for example, if your controlling from chdkptp using individual lua/luar/rs calls) you may want to use call enter_alt at startup. Also, if the alt button is set to play (default for most cams), you may want to change that since CHDK seeing the alt button continuously held might cause other problems.

If none of that helps, we can make CHDK always mask the play button state, but that would require a custom build.

Finally, note that physically holding buttons for a long time has been associated with hardware damage in some cases https://chdk.setepontos.com/index.php?topic=11434.0
The D10 mentioned is in that thread is an underwater cam, so the buttons may be different from most, but generally Canon's designers probably don't expect users to hold a button down for months on end.

Some other long term, tethered timelapse projects you might find useful
http://escursionisticivatesi.it/webcam/ - code is at https://github.com/alesanmanoweb/multilapse-CHDK/tree/master (it looks like it stopped updating this year, but it ran for something over 7 years). The project was mostly discussed in IRC but you can search user manoweb to find some information (edit: including this thread, which I didn't notice at first :haha).

https://www.youtube.com/channel/UCEJHg--ujxLkjMrevJXh-Gw - long discussion https://chdk.setepontos.com/index.php?topic=14302.0

User mlapse has also done very long term (years), not tethered timelapses. For example https://chdk.setepontos.com/index.php?topic=13856.msg150298#msg150298
« Last Edit: 16 / September / 2024, 19:47:49 by reyalp »
Don't forget what the H stands for.

Re: Extended time lapse with Internet connection and power saving
« Reply #128 on: 17 / September / 2024, 01:22:16 »
Also, if playback works, I'd guess the reason power doesn't work is either related to the startup key handling in CHDK code, or is something that happens late enough that we could work around it. So if play has other issues, there's a decent chance we can get power working.

Power button doesn't work even if I don't use CHDK. So it must be "blocked" before chdk loads.
I run chdk-ptp on raspberry pi5, and I use Multilapse script as a base. Of course I twiked it for my purpose.

So inside camera_init() I should replace
Code: [Select]
print('Unpressing power button')
cli_cmd('=post_levent_to_ui"UnpressPowerButton"')
with
Code: [Select]
print('Unpressing play button')
cli_cmd('=post_levent_to_ui"UnpressPBButton"')

Is the last line correct? Shouldn't be "UnpressPlayButton"? I am not currently at home, so I can't check. But where can I find syntax for this? Or appropriate library?
Thank you reyalp for all the help!

*

Offline c_joerg

  • *****
  • 1251
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

 

Related Topics


SimplePortal © 2008-2014, SimplePortal