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

Extended time lapse with Internet connection and power saving

  • 108 Replies
  • 11752 Views
*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #50 on: 16 / November / 2017, 03:00:33 »
Advertisements
Darn!

Googled up how to create soft links.

I was sure that would work.  But it didn't!

back to head scratching
S

*

Offline reyalp

  • ******
  • 12635
Re: Extended time lapse with Internet connection and power saving
« Reply #51 on: 16 / November / 2017, 03:24:38 »
OK, I just checked both machines..

Raspberry Pi B+ = multilapse is working fine (also returns the process number on running the script)
Raspberry Pi Zero = multilapse not working - claims it can't find /root/chdkptp/chdkptp.sh

The scripts are identical in both (except for the commented out led lines as per Reyalp's directions)

Pi Zero's multilapse.log reports

/root/chdkptp/chdkptp.sh: 9: /root/chdkptp/chdkptp.sh: /root/chdkptp/chdkptp: not found

for each time I invoke the multilapse script.  Could it be a dependency?
I'm not clear how you installed all the files on each pi, but it seem like the one on the pi zero didn't get all the required files.

You could try to figure out the difference, or you could just copy the working one. You can use tar to make complete copy of the chdkptp directory.
On the working pi

Code: [Select]
cd /root
tar -czf chdkptp.tgz chdkptp
copy the file to the other one, remove or rename the existing chdkptp directory and then
Code: [Select]
cd /root
tar -xzf chdkptp.tgz
Don't forget what the H stands for.

Re: Extended time lapse with Internet connection and power saving
« Reply #52 on: 16 / November / 2017, 12:51:22 »
I just found what might be a symbolic link in the B+ chdkptp directory

chdkptp -> chdkptp.r745

which I guess is telling multilapse to use chdkptp.r745 in place of the standard version?

I will Google how to make such links



Hello
I confiurm the different LED on the pi zero might give some errors but should NOT prevent the script to run.

I also confirm in my setup I have some symlinks for different versions of CHDK-PTP but I am very sorry, those should NOT have made out in the tarball I provided earlier.

Any chance you can come to the IRC channel chat like we did some time ago? This is probably very easy to fix but it's a bit difficult to do it on the forum. I will also check the tarball I provided and see where the issue is.

*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #53 on: 16 / November / 2017, 15:43:57 »
Hi Alesan,
Early morning here.. coffee time but I will look in to the chat channel later in the hope we might meet.
I suspect my issue is simple user error and first thing I will try Reyalp's suggestion and duplicate the folders from the working box to the new one.
N


*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #54 on: 16 / November / 2017, 19:23:28 »
Ok I made some progress debugging this... I think...

the error that I saw in multilapse.log was :

/root/chdkptp/chdkptp.sh: 9: /root/chdkptp/chdkptp.sh: /root/chdkptp/chdkptp: not found

and, in my working PiB+ version, there is a soft link like this:

chdkptp -> chdkptp.r745

which seems to indicate that when looking for chdkptp, one should use chdkptp.r745

So on the new machine (PiZero), I duplicated chdkptp.r745 to the name chdkptp

At which point, the live tail -f on multilapse.log shows activity indicating it's trying to connect to the camera ie. it's found the chdkptp file and is using it.. just not-quite-right

I hope this is useful in providing an insight into why my simpler version of chdkptp works on the Zero, while the 'special' multilapse version of chdkptp (ie. chdkptp.r745) doesn't.

Cheers
Sdack

Re: Extended time lapse with Internet connection and power saving
« Reply #55 on: 17 / November / 2017, 03:00:22 »
Hey I'm online in the chat if you want.
I had a look and I, in fact, left a symlink to refer to two possible versions of chdk-ptp. However, once you extract the tarball, it should be a non-issue, it should just take care of everything. How come it worked on your first installation and not the second.

I understand you have made some changes to the scripts to make it work on your system (FTP related etc) so you probably wanted to save those, and used a way to copy over the files that messed up the symlink?

Re: Extended time lapse with Internet connection and power saving
« Reply #56 on: 17 / November / 2017, 03:07:50 »
However please go into the chdkptp directory and type:
# ls -al

and paste the output here... this will show all the details.

For all practical purposes, if there *isn't* a chdkptp file (or symlink), you can just:
cp chdkptp.745 chdkptp
and restart the whole thing.

*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #57 on: 17 / November / 2017, 03:22:41 »
However please go into the chdkptp directory and type:
# ls -al

Code: [Select]
root@raspberrypi_Zero-01:~/chdkptp# ls -al
total 1316
drwxrwxrwx 4 root root   4096 Nov 17 11:24 .
drwx------ 8 root root   4096 Nov 17 16:25 ..
-rwxr-xr-x 1 root root 400332 Nov 17 11:24 chdkptp
-rwxrwxrwx 1 root root 216388 Mar  6  2017 chdkptp_gui
-rwxrwxrwx 1 root root    364 Mar  6  2017 chdkptp_gui.sh
-rwxrwxrwx 1 root root 212128 Aug 16 15:02 chdkptp.r735
-rwxr-xr-x 1 root root 400332 Nov 17 11:09 chdkptp.r745
-rwxrwxrwx 1 root root    270 Aug 16 15:17 chdkptp.sh
-rwxrwxrwx 1 root root  15127 Mar  6  2017 COPYING
drwxrwxrwx 2 root root   4096 Mar  6  2017 lib
drwxrwxrwx 3 root root   4096 Mar  6  2017 lua
-rwxrwxrwx 1 root root   2642 Mar  6  2017 README-LINUX-BINARIES.TXT
-rwxrwxrwx 1 root root   1321 Mar  6  2017 README-OSX.TXT
-rwxrwxrwx 1 root root   4415 Mar  6  2017 README-RASPI-LIBS.TXT
-rwxrwxrwx 1 root root   7423 Mar  6  2017 README.TXT
-rwxrwxrwx 1 root root  11140 Aug 16 15:03 signal.so
-rwxrwxrwx 1 root root   1641 Mar  6  2017 THANKS.TXT
-rwxrwxrwx 1 root root  32557 Mar  6  2017 USAGE.TXT
root@raspberrypi_Zero-01:~/chdkptp#

Bear in mind that the chdkptp in there is a duplicated copy of chdkptp.r745

Thanks for your assistance again.


*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #58 on: 17 / November / 2017, 03:25:02 »
Oops.. this was written before my dump of chdkptp ls -al but somehow didn't get sent

Hi Alesan,

I have relatives visiting from the UK and we just had dinner, so I can't do a live chat right now.  Thanks for the offer though.

I suspect that the symlink may be a part of my problem.  For some reason, it didn't copy across from the first machine to the second and didn't work when I re created it (chdkptp -> chdkptp.r745).  However, as I mention in my latest post, when I simply go ahead and duplicate chdkptp.r745 and to the changed name chdkptp, that resolves the first problem of multilapse not being able to find /root/chdkptp/chdkptp

However, why the chdkptp.r745 version of would crash the camera, while the current standard issue used with my earlier installation (chdkptp.r735) seems quite happy to connect and operate the camera, I do not know.  Then again, I have no real idea of how the versions are different, other than the LED controls which, since I commented them out according to Reyalp's suggestion, don't seem to be complaining.

I would like to get your smarter version working at some point but I'm happy that I can still operate my version on the PiZero.

I've made good progress on the battery power issues and will share that here soon.

I do have one question for you.. is it possible to extract a battery charge status from the camera, with a similar command that you used to monitor the temperature?  I want to be able to monitor the battery state remotely by uploading either the .log, or extracting the  data from the log and uploading that to plot the discharge.  I can probably do that with the Raspberry Pi Zero too but, considering there's power information already being monitored in the camera (at least the low threshold is monitored), it might be easier to use that.

Cheers and have a great weekend
S

Re: Extended time lapse with Internet connection and power saving
« Reply #59 on: 17 / November / 2017, 03:46:52 »
OK
Very strange issue, I am working on a version of the script that should be much more compatible and easy to configure, based on the experience you had with your camera.

I believe one can in fact extract battery level, but I'd need to defer that to reyalp, I am sure he will give you the exact command "soon". Reyalp, if you could release the new version of chdk-ptp with signal support integrated, that would help in various ways ;)

 

Related Topics