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

Extended time lapse with Internet connection and power saving

  • 108 Replies
  • 12332 Views
*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #90 on: 19 / November / 2017, 22:11:20 »
Advertisements
A fresh battery, with a DMM reading of 4.07 returns a vbatt reading of 4069, so I'm happy to use that as a guide for battery monitoring.  Assuming I can find a way to upload it to a spreadsheet or visual chart.. Any suggestions welcome.
Thanks guys
Feels good to have some forward movement again.

*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #91 on: 19 / December / 2017, 20:51:40 »
Hi Guys,

I'm having a little trouble on a fresh install of Multilapse (the newest version with the extended config file).

I've a fresh, Raspbian Lite, set up on my Raspberry Pi Zero, controlling my IXUS160 and it's verified working with manual chdkptp control.

I've also implemented the Raspberry Pi GPIO output to control a relay to supply the camera with power (button held down method).

However, although it's correctly supplying power and connecting to the camera I'm getting this error:

Code: [Select]
Reloading config file!
Making sure camera is OFF
Waiting 5s...
Turning camera ON
Waiting 5s for boot...
Connecting
connected: Canon IXUS 160, max packet size 512
Unpressing power button
Going into rec mode
Setting P mode
Setting zoom: 0
Disabling display
sh: 1: cannot create /sys/class/leds/led1/brightness: Directory nonexistent
Temperature: sensor = 43 optics = 34
SSTT,20171220-124020,43,34
ERROR: call failed:/root/multilapse-CHDK/multilapse.lua:39: attempt to index global 'config_night' (a nil value)
stack traceback:
        /root/multilapse-CHDK/multilapse.lua:168: in main chunk
        [C]: in function 'dofile'
        [string "dofile("/root/multilapse-CHDK/multilapse.lua"..."]:1: in main chunk
        [C]: in function 'xpcall'
        /root/chdkptp/lua/cli.lua:726: in function </root/chdkptp/lua/cli.lua:717>
        (...tail calls...)
        [C]: in function 'xpcall'
        /root/chdkptp/lua/cli.lua:285: in function 'execute'
        /root/chdkptp/lua/main.lua:210: in function 'do_execute_option'
        /root/chdkptp/lua/main.lua:247: in function 'do_no_gui_startup'
        /root/chdkptp/lua/main.lua:282: in main chunk
        [C]: in function 'require'
        [string "require('main')"]:1: in main chunk
Seems related to the night shutter function which I see, differs in it's implementation in the config file.

Bye the way I tried both the new chdkptp-r785 AND the 'special' chdkptp that you supplied along with multilapse the first time.

Any suggestions?

I'd also appreciate any pointers on how to bash script a schedule for weekdays between 7:30 am and 4:30 pm, as the camera is in place now and I'm doing testing prior to the construction of the new school rooms to commence.

PS. I'm SSHing in to the machine via an online proxy system called Remot3.IT, which is working nicely.

Thanks in advance for your consideration

Seasons Greetings too
Sdack

*

Offline reyalp

  • ******
  • 12728
Re: Extended time lapse with Internet connection and power saving
« Reply #92 on: 19 / December / 2017, 21:24:02 »
Code: [Select]
ERROR: call failed:/root/multilapse-CHDK/multilapse.lua:39: attempt to index global 'config_night' (a nil value)
This means the config_night section of the config file is missing. See https://github.com/alesanmanoweb/multilapse-CHDK/blob/master/multilapse-config.lua.sample
Don't forget what the H stands for.

*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #93 on: 19 / December / 2017, 22:48:22 »
Thanks Reyalp,

That fixed it right up. 

I copied and pasted from an existing working version of the config and think I must not have quite copied all the way to the bottom.
I will see if the r785 version of chdkptp works too.
A healthy, peaceful and enjoyable Christmas!
Sdack


*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #94 on: 19 / December / 2017, 23:15:39 »
turns out that Multilapse doesn't work with chdk-ptpr785. I get this:

Code: [Select]
/root/chdkptp/chdkptp.sh: 9: /root/chdkptp/chdkptp.sh: ./chdkptp: Permission denied

Despite having run chmod -R 777 on the entire folder and contents

The only difference that I can see is that there are a couple of other chdkptp versions in the original 'special' version see below

list contents of chdkptp-r785

-rwxrwxrwx 1 root root 223504 Nov 27 16:51 chdkptp
-rwxrwxrwx 1 root root 225268 Nov 27 16:51 chdkptp_gui
-rwxrwxrwx 1 root root    432 Nov 27 16:51 chdkptp_gui.sh
-rwxrwxrwx 1 root root    319 Nov 27 16:51 chdkptp.sh
-rwxrwxrwx 1 root root  15127 Nov 27 16:51 COPYING
drwxrwxrwx 2 root root   4096 Nov 27 16:51 lib
drwxrwxrwx 3 root root   4096 Nov 27 16:51 lua
-rwxrwxrwx 1 root root   2640 Nov 27 16:51 README-LINUX-BINARIES.TXT
-rwxrwxrwx 1 root root   1321 Nov 27 16:51 README-OSX.TXT
-rwxrwxrwx 1 root root   4415 Nov 27 16:51 README-RASPI-LIBS.TXT
-rwxrwxrwx 1 root root   7677 Nov 27 16:51 README.TXT
-rwxrwxrwx 1 root root   7172 Nov 27 16:51 signal.so
-rwxrwxrwx 1 root root   1868 Nov 27 16:51 THANKS.TXT
-rwxrwxrwx 1 root root  37031 Nov 27 16:51 USAGE.TXT

List contents of special version of chdkptp:
lrwxrwxrwx 1 root root     12 Dec 20 12:39 chdkptp -> chdkptp.r745
-rwxr-xr-x 1 root root 216388 Dec 20 12:39 chdkptp_gui
-rwxr-xr-x 1 root root    364 Dec 20 12:39 chdkptp_gui.sh
-rwxr-xr-x 1 root root 212128 Dec 20 12:39 chdkptp.r735
-rwxr-xr-x 1 root root 400332 Dec 20 12:39 chdkptp.r745
-rwxr-xr-x 1 root root    270 Dec 20 12:39 chdkptp.sh
-rw-r--r-- 1 root root  15127 Dec 20 12:39 COPYING
drwxr-xr-x 2 root root   4096 Dec 20 12:39 lib
drwxr-xr-x 3 root root   4096 Dec 20 12:39 lua
-rw-r--r-- 1 root root   2642 Dec 20 12:39 README-LINUX-BINARIES.TXT
-rw-r--r-- 1 root root   1321 Dec 20 12:39 README-OSX.TXT
-rw-r--r-- 1 root root   4415 Dec 20 12:39 README-RASPI-LIBS.TXT
-rw-r--r-- 1 root root   7423 Dec 20 12:39 README.TXT
-rwxr-xr-x 1 root root  11140 Dec 20 12:39 signal.so
-rw-r--r-- 1 root root   1641 Dec 20 12:39 THANKS.TXT
-rw-r--r-- 1 root root  32557 Dec 20 12:39 USAGE.TXT

I notice there's a symlink in there too, which I think gave me a little trouble before.

If I understand correctly, the symlink tells anything wishing to use chdkptp, that it should go ahead and use chdkptp.r745 in it's place

Please correct me if I'm wrong
Sdack


*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #95 on: 19 / December / 2017, 23:24:39 »
OK, I had a hunch based on the symlink..

I just tested the new install of chdkptp-r785 but replacing the chdkptp.r745 file that is symlinked within the special version and it works, so there's something different about that chdkptp file.

I hope this is useful.  I was working on the understanding that the r785 version was fully compatible with multilapse but perhaps it isn't.
Cheers
Sdack

*

Offline reyalp

  • ******
  • 12728
Re: Extended time lapse with Internet connection and power saving
« Reply #96 on: 19 / December / 2017, 23:58:08 »
I hope this is useful.  I was working on the understanding that the r785 version was fully compatible with multilapse but perhaps it isn't.
I don't know what the problem is here, but I'm very sure it isn't due to r785 being somehow inherently incompatible with multilapse, because it doesn't get to actually starting chdkptp. It's a permission issue or a symlink pointing at the wrong thing.

To figure it out you need to trace through the different layers of shell scripts and figure out exactly where it is going wrong.
Don't forget what the H stands for.

*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #97 on: 20 / December / 2017, 00:06:48 »
Thanks for confirming that Multilapse should indeed be working with chdkptp-r785.

I am sure you are right and please understand that I wasn't complaining or raising an issue.  My linux skills are very limited.  I thought I'd eliminated it being a permissions issue by chmodding 777 on the directory but perhaps not.
Cheers
Sdack


*

Offline reyalp

  • ******
  • 12728
Re: Extended time lapse with Internet connection and power saving
« Reply #98 on: 20 / December / 2017, 01:18:08 »
Thanks for confirming that Multilapse should indeed be working with chdkptp-r785
To be clear, I only said that the error you posted indicates it isn't getting far enough to for compatibility issues to matter.

I see now there is a problem with the chdkptp.sh included with the zip, so thanks for reporting it.

For it to work correctly, it needs to be invoked either from the directory where it's installed, or with a full path like /root/chdkptp/chdkptp.sh

You can avoid editing the script so the
CHDKPTP_DIR=
line uses the full path to where it is installed, like
CHDKPTP_DIR=/root/chdkptp
instead of the expression with $.

Not sure how I missed this problem, but apologies for the confusion. I'll try to post an updated zip soon.

edit:
changing
Code: [Select]
CHDKPTP_DIR="$(dirname "$(readlink "$0")")"
to
Code: [Select]
CHDKPTP_DIR="$(dirname "$(readlink -f "$0")")"
should work too, and has the advantage of not depending on where you put the files.
« Last Edit: 20 / December / 2017, 01:30:55 by reyalp »
Don't forget what the H stands for.

*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #99 on: 20 / December / 2017, 01:44:34 »
Thanks for the update..
I tweaked that line in the chdkptp.sh file and it's working perfectly with r785 now
Just want to let you know I'm in complete awe of your programming skills..
Thanks again
Sdack

 

Related Topics