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

Extended time lapse with Internet connection and power saving

  • 123 Replies
  • 35883 Views
*

Offline reyalp

  • ******
  • 14080
Re: Extended time lapse with Internet connection and power saving
« Reply #40 on: 01 / November / 2017, 16:18:50 »
Advertisements
reyalp, is there a way for me to check if a setting to the camera is not supported, so that I can validate the configuration?
Unfortunately, no.

This is an outstanding problem: CHDK can handle different propsets (where the IDs vary between camera generations), but over time some of the meanings and valid ranges of values have also changed, and we don't have a good way to handle that. We ran into the same problem with IS propcase values https://chdk.setepontos.com/index.php?topic=12918.msg132221#msg132221

The "obvious" solution would be to define platform independent layer from scripts (say, based on an array in shooting.c that maps generic values to available values), but retroactively implementing that for >100 camera models is difficult unless someone finds a way to automatically determine it from ROM.
Don't forget what the H stands for.

Re: Extended time lapse with Internet connection and power saving
« Reply #41 on: 01 / November / 2017, 18:53:00 »
OK. Advice for that? Just make it an *optional* setting and, *if* the user sets a value, it's his responsibility to make sure its correct for that cam?

Re: Extended time lapse with Internet connection and power saving
« Reply #42 on: 01 / November / 2017, 18:58:56 »
OK. Advice for that? Just make it an *optional* setting and, *if* the user sets a value, it's his responsibility to make sure its correct for that cam?
That's pretty much how it works with most non-trivial scripts.  Unfortunately, that's the best we can do.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #43 on: 16 / November / 2017, 00:41:43 »
Dear Manoweb,
In my search for the most low power version of this set up I have purchased a Raspberry Pi Zero (W), which draws roughly half the current of it's bigger brothers in the Raspberry Pi family.  I duplicated the installation of your awesome multilapse to the corresponding folders but find that the LED control causes the scripts to fail with the following error:


root@raspberrypi_Zero-01:~/multilapse-CHDK# ./multilapse
./multilapse: 4: ./multilapse: cannot create /sys/class/leds/led1/trigger: Directory nonexistent
./multilapse: 5: ./multilapse: cannot create /sys/class/leds/led1/brightness: Directory nonexistent
setting SPD LED to status 0
setting LNK LED to status 0
No LAN951x found on USB
can not open usb device. are you root?


It turns out that the Zero only has one LED and no ethernet port (the W in the name of my device stands for 'wireless')

I've looked at the code in the multilapse file

Code: [Select]
!/bin/sh
echo none >/sys/class/leds/led0/trigger
echo 0 >/sys/class/leds/led0/brightness
echo none >/sys/class/leds/led1/trigger
echo 0 >/sys/class/leds/led1/brightness
/usr/bin/lan951x-led-ctl --spd=0 --lnk=0
while [ true ]
do
        /root/chdkptp/chdkptp.sh -e'exec dofile("/root/multilapse-CHDK/multilapse.lua")' >>/$
        sleep 10
done


and am wondering if it's safe to remove the while loop that contains the led controls, in the vain hope that it might allow the rest of the script to go ahead and take pictures.

Am I right?

Cheers

Sdack


*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #44 on: 16 / November / 2017, 01:27:48 »
and am wondering if it's safe to remove the while loop that contains the led controls, in the vain hope that it might allow the rest of the script to go ahead and take pictures.

Am I right?

I've answered my own question and it's a NO

Hoping you will be able to advise

Sdack

*

Offline reyalp

  • ******
  • 14080
Re: Extended time lapse with Internet connection and power saving
« Reply #45 on: 16 / November / 2017, 01:46:47 »
and am wondering if it's safe to remove the while loop that contains the led controls, in the vain hope that it might allow the rest of the script to go ahead and take pictures.
The LED stuff is before the while loop, you should be able to just comment those out, e.g.

Code: [Select]
!/bin/sh
echo none >/sys/class/leds/led0/trigger
echo 0 >/sys/class/leds/led0/brightness
#echo none >/sys/class/leds/led1/trigger
#echo 0 >/sys/class/leds/led1/brightness
#/usr/bin/lan951x-led-ctl --spd=0 --lnk=0
while [ true ]
do
        /root/chdkptp/chdkptp.sh -e'exec dofile("/root/multilapse-CHDK/multilapse.lua")' >>/$
        sleep 10
done
That said, I don't think any errors from those would prevent the rest of the script from running.

Don't forget what the H stands for.

*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #46 on: 16 / November / 2017, 02:07:04 »
Thanks Reyalp,

I followed your direction and commented out those lines but, when I run the /root/multilapse-CHDK-multilapse% command, all I get is a process ID returned and this in the multilapse.log (which I checked has been freshly updated to the current time)

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


I don't know why it can't seem to find the chdkptp file.. I checked and it seems to be there.

Cheers
S

*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #47 on: 16 / November / 2017, 02:11:17 »
I just looked in the chdkptp.sh and see it set's a PATH or two.  I'm wondering if this is the issue?


*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #48 on: 16 / November / 2017, 02:47:21 »
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 a bit lost
Thanks in advance for any pearls of linux wisdom
Sdack

*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #49 on: 16 / November / 2017, 02:50:10 »
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

 

Related Topics