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

Extended time lapse with Internet connection and power saving

  • 130 Replies
  • 41595 Views
*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #10 on: 19 / October / 2017, 19:00:23 »
Advertisements
Are you going to do it soon so user "Sdack" can get an official version, or can I just provide the binaries I already use for now? I ask this to avoid the proliferation of non-official builds unless it's necessary.
I hope to do it "soon" but in the meantime the chdkptp build and signal.so is available at https://app.box.com/s/z02em32wedyqlmf29pidmwpxtrsuj16b

Thank you indeed gentlemen!!
Quote
edit:
If you find the time, a description of the hardware side (power supply, power control from pi etc) might be of interest to the forum.
Yes please, this part of the puzzle is very confusing, so many variables to consider and I keep seeing videos of exploding lipo batteries https://www.youtube.com/watch?v=EseOhC8n7ro which make me very nervous.  It's so counter intuitive that an exhausted battery could act this way.. a full one maybe but an empty one!!??
Have a great weekend.

Re: Extended time lapse with Internet connection and power saving
« Reply #11 on: 19 / October / 2017, 19:14:53 »
If you find the time, a description of the hardware side (power supply, power control from pi etc) might be of interest to the forum.

Good idea I'll just add a document to the github repository, as it is coupled to the script. I will also need to add a section with the "web" stuff, that is the sample page that receives the HTTP POST from the Raspberry Pi

*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #12 on: 19 / October / 2017, 19:34:15 »
I will also need to add a section with the "web" stuff, that is the sample page that receives the HTTP POST from the Raspberry Pi
For your information I have a simple wordpress site to which I added a free plugin called Folder Gallery https://wordpress.org/plugins/folder-gallery/, which displays, in a simple grid, the contents of a folder on my web host.  As new pictures are uploaded, a refresh on the page shows them added to the gallery.  It's not as clever as some of the paid galleries, which can make new category tabs for each day etc. but it's free.
Cheers
Nigel

Re: Extended time lapse with Internet connection and power saving
« Reply #13 on: 20 / October / 2017, 09:30:01 »
For your information I have a simple wordpress site to which I added a free plugin called Folder Gallery https://wordpress.org/plugins/folder-gallery/, which displays, in a simple grid, the contents of a folder on my web host.  As new pictures are uploaded

Yeah but how do you upload pictures to the web folder? There are many methods, what I have found to be very reliable is to use a HTTP POST; the PHP page I've written also takes care to process the image a little but that is optional. In your case, how is it done?


*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #14 on: 20 / October / 2017, 16:22:10 »
Below is the part of my script that uploads the images
....................................
#!/bin/bash
HOSTftp=[myftphost]
USERftp=[myftpusername]
PASSftp=[mypassword]

echo "FTP Upload"

ftp -inpv $HOSTftp<< EOF
user $USERftp $PASSftp
binary

lcd /media/pi/PiStore/tmp/resized
cd timelapse/

put resized-still-$currdate.jpg
bye
EOF

exit 0
.........................

A more complete example, including my chdkptp command can be found in the link below (not the latest version I'm afraid)

https://chdk.setepontos.com/index.php?topic=12648.0

I am still figuring out the rest of the commands I need to control camera shooting  mode etc.

Yesterday I got a second camera, same type, Ixus 160, and when I shoot with that one using the same script, the flash goes off every time - I'm testing in my rather gloomy office.  So I'm still trying to work out, either what settings I need in the Canon, or how to take complete control over everything.

Can't wait to see your method but I half expect it to be too complex for me to decipher, like all the other Lua scripts I've cracked open.

I'm also trying to figure out a mobile data upload solution because I might not always have access to wifi.  Have you any suggestions for a Raspberry Pi HAT, or USB module for this?

Cheers
Nigel

*

Offline reyalp

  • ******
  • 14121
Re: Extended time lapse with Internet connection and power saving
« Reply #15 on: 20 / October / 2017, 18:20:30 »
Yesterday I got a second camera, same type, Ixus 160, and when I shoot with that one using the same script, the flash goes off every time - I'm testing in my rather gloomy office.  So I'm still trying to work out, either what settings I need in the Canon, or how to take complete control over everything.
The Canon manual will tell you how to turn it off in the Canon UI. Note that "auto" shooting mode might not let you control it manually, but "P" probably will.

In manoweb's script this is done by set_prop(require"propcase".FLASH_MODE,2)  on line 17
https://github.com/alesanmanoweb/multilapse-CHDK/blob/master/multilapse.lua#L17
Don't forget what the H stands for.

Re: Extended time lapse with Internet connection and power saving
« Reply #16 on: 21 / October / 2017, 01:50:01 »
ftp -inpv $HOSTftp<< EOF

OK so you use FTP. That method has the drawback that generally won't execute actions on the server side at upload time. It might be enough for you to do now but I feel like you will soon have more sophisticated needs. Also, if I may make a friendly, hopefully constructive comment, the way you interact with the ftp command line is... very open to side effects in case anything is not nominal during the FTP transaction

PS Sorry guys I'm attending a conference right now so I've been a little slow to respond.

*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #17 on: 21 / October / 2017, 02:36:21 »
Thanks for your consideration.. and what seem to me very quick responses.. I greatly appreciate your help in this.  So nice to have company on a learning journey, especially from those who have trodden the path before and know the way ahead.

I am sure you are right about my insecure methods and look forward to learning from your experience.

To be honest I was overjoyed that it I got it working at all.. to have freshly shot images magically appear on my web page was so encouraging, after several hours of frustrating syntax wrangling.  It was like Christmas!

Hope you're having a good weekend.
Nigel



Re: Extended time lapse with Internet connection and power saving
« Reply #18 on: 21 / October / 2017, 02:44:18 »
http://www.manoweb.com/alesan/temp/multilapse-dist-20171020.tar.gz

this archive contains three directories:
- archive [empty]
- chdk-ptp - contains the modified version of chdk-ptp
- multilapse-CHDK - contains the timelapse script

copy it to your Raspberry pi and extract it in the root home directory (/root) (PS I am not sure if you are using the default "pi" user or "root")
~# tar xvf multilapse-dist-20171020.tar.gz
The script can be started with "/root/multilapse-CHDK/multilapse&" (I have that in my /etc/rc.local - but I suggest you run it by hand now)

the file ~/multilapse-CHDK/multilapse-config.lua contains the configuration but for now it will not work for FTP uploads; the change is trivial but, if you like, try to run it "as is" and see if it goes well with your camera and it takes a picture every 600 seconds (see config file) and stores it in ~/archive. Also try the night shot in a dark environment if you like, or change the interval or zoom setting etc (all in the config file)

*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #19 on: 21 / October / 2017, 03:17:02 »
Thank you so much,

I have to go out just now and am working both this evening and tomorrow morning but I can't wait to try it tomorrow afternoon.

Best wishes

Nigel
PS. ReyAlp has been helping me get my head around lua to the point where I'm wondering if your camera shares the same set as mine?

I guess I could get mixed results if yours and mine differ.

Mine is an Ixus / Elph160, which is Digic IV+.  I just ran this command in chdkptp  =return get_propset() and it said propset(6)

Cheers
Nigel


 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal