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

Extended time lapse with Internet connection and power saving

  • 108 Replies
  • 12179 Views
Re: Extended time lapse with Internet connection and power saving
« Reply #20 on: 21 / October / 2017, 04:28:29 »
Advertisements
reyalp knows cameras so much better than I do, so he's the authoritative source. However, unless you guys have discussed this on another channel, I have not seen where he suggested our cameras might differ or my script be incompatible. This said, the script might very well misbehave on a completely different camera, in that case please check the file ~/multilapse.log and paste it somewhere.

Nigel, would you disclose in what time zone are you operating, simply so I can better synchronize, when to read the forum etc? Mine is Pacific Time Zone.

*

Online reyalp

  • ******
  • 12690
Re: Extended time lapse with Internet connection and power saving
« Reply #21 on: 21 / October / 2017, 15:05:14 »
Mine is an Ixus / Elph160, which is Digic IV+.  I just ran this command in chdkptp  =return get_propset() and it said propset(6)
Different propsets generally shouldn't be an issue, the multilapse script uses the propcase module, which which provides platform independent names for known propcases.

There can still be cases where the meaning of values are different, or a equivalent propcases don't exist in all propsets, but off hand I don't expect any of the ones used would be a problem.
Don't forget what the H stands for.

*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #22 on: 22 / October / 2017, 03:13:05 »
Nigel, would you disclose in what time zone are you operating, simply so I can better synchronize, when to read the forum etc? Mine is Pacific Time Zone.
Hi I live in Byron Bay which is the Eastern most point in Australia. 
We're the same as Sydney time which is GMT (UTC) +11 at the moment because New South Wales, our state, just switched to Summer time.
Cheers
Nigel

*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #23 on: 28 / October / 2017, 02:51:32 »
Hi Manoweb,

Well, it took a whole week longer than I'd hoped but today I managed to find some time.

At first it seemed I was missing a little something because the make command produced this error:

Quote
~# /root/multilapse-CHDK/multilapse: 6: /root/multilapse-CHDK/multilapse: /usr/bin/lan951x-led-ctl: not found

So I did my best to fix this by downloading this GitHub package - dradermacher/lan951x-led-ctl

https://github.com/dradermacher/lan951x-led-ctl

which in turn prompted me to install this package:

sudo apt-get install libusb-dev

which still wouldn't allow a compile but then, after a little more Googling, I added this package:

sudo apt-get install libusb-1.0

which did work - After I'd copied the resulting lan951x-led-ctl file from the /root/multilapse-CHDK folder to the /usr/bin/ folder

Then I could run the command (as root) /root/multilapse-CHDK/multilapse which seemed to start with the message

setting LNK LED to status 0

And now I note that the red power light on my Raspberry Pi board has switched off, which I guess is part of your signalling that your script is working, either that or simple power saving and light pollution avoiding?

The attached camera (Ixus/Elph160) seemed to respond.  The lens moved out and it beeped twice and clunked quietly but didn't take a picture.  I wonder if the config settings didn't suit my darkened office?

config={
        interval=600,
        threshold=-620,
        night_shutter='15',
        zoom='0',
        archive_path='/root/archive/',
        camera_ID='A',
        upload_URL='EDIT URL HERE',
        user='user:password'
}


I edited the zoom setting in the multilapse-config.lua file to 100 and the lens responded the next time I ran the command, so there is connection with the camera.. I also lowered the 'threshold' setting to 62 - down from 620 but still no joy.
Could my camera require a different 'shoot' command?
Best wishes
Nigel


*

Online reyalp

  • ******
  • 12690
Re: Extended time lapse with Internet connection and power saving
« Reply #24 on: 28 / October / 2017, 15:44:31 »
And now I note that the red power light on my Raspberry Pi board has switched off, which I guess is part of your signalling that your script is working, either that or simple power saving and light pollution avoiding?
It's to avoid internal reflections in the enclosure. Probably not needed if you aren't shooting at night.

Quote
The attached camera (Ixus/Elph160) seemed to respond.  The lens moved out and it beeped twice and clunked quietly but didn't take a picture.  I wonder if the config settings didn't suit my darkened office?
Darkness should not prevent it from shooting, check the log (/root/multilapse.log in the shell script)

Don't forget what the H stands for.

*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #25 on: 28 / October / 2017, 21:37:48 »
.. check the log (/root/multilapse.log in the shell script)

Log file attached.  The culprit seems to be:

Turning camera ON
Waiting 5s for boot...
Connecting
ERROR: no matching devices found


when I look at the turnon script, which is obviously being called by the script, I find this :

#!/usr/bin/python

import RPi.GPIO as GPIO
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)
GPIO.output(18, 0)


Which get's me excited because, even though I haven't yet figured out how to control the supply power to the camera, the Raspberry Pi GPIO's could work nicely and it's high on my list of must haves.

I guess this script would work just as well with a constantly-held-power-button, rather than a soldered-power-button-contacts method because I'm more likely to make a reliable soldering job joining wires between the end of the dummy battery that I've got, and the wires out of the GPIO pins on the Raspberry, than I am of the button contacts.

Look forward to some suggestions on how to proceed
Cheers and thanks again for your support.


*

Online reyalp

  • ******
  • 12690
Re: Extended time lapse with Internet connection and power saving
« Reply #26 on: 28 / October / 2017, 23:52:52 »
ERROR: no matching devices found
This means that the script didn't find any cameras to connect to.

However, later in the log it appears the script was eventually able to connect:

Code: [Select]
Waiting 5s...
Connecting
connected: Canon IXUS 160, max packet size 512
After that it tries to take one shot but fails with an IO error:
Code: [Select]
Unpressing power button
Going into rec mode
Setting P mode
Disabling flash
White balance
Disabling display
Setting zoom
sh: 1: /root/turnoff: not found
Setting resolution
Temperature: sensor = 28 optics = 27
SSTT,20171029-120148,28,27
Checking brightness level
Making sure camera is OFF
sh: 1: /root/turnoff: not found
Waiting 5s...
BV = 259 try_focus = 0 i = 50
Remote shoot!
WARNING: capture_get_data error I/O error
WARNING: error waiting for shot script nil
ERROR: I/O error uninit I/O error
I/O error uninit I/O error
*** *** *** Shooting error
Turning camera OFF
ERROR: I/O error
attempted to close non-present device 001:007

This is pretty confusing. Did you try to run the script before the camera was on or plugged in?

It might be good to start fresh and watch what happens:

delete the multilapse.log
plug the camera in and turn it on
run the script

You can watch what is happening using tail -f /root/multilapse.log in another terminal.

If it fails again in a similar way, check whether the camera has crashed (powered off by itself)
Don't forget what the H stands for.

Re: Extended time lapse with Internet connection and power saving
« Reply #27 on: 29 / October / 2017, 00:02:45 »
Sdack, I apologize for the undisclosed list of dependencies - those are in fact optional and it should not matter if you have installed them or not. However, installing them would get rid of the error message.

I am checking with reyalp why the script does not work. In fact, it would be quite convenient if you can join the CHDK chat channel for easier troubleshooting. It should be just enough to click on the following link http://webchat.freenode.net/?channels=%23chdk (unless you already have a IRC client, in that case it's #chdk on freenode)

EDIT: you are not running your own bash script in the background at the same time, right?
« Last Edit: 29 / October / 2017, 00:51:23 by manoweb »


*

Offline Sdack

  • ***
  • 194
Re: Extended time lapse with Internet connection and power saving
« Reply #28 on: 29 / October / 2017, 04:11:51 »
Hi guys,
Back at keyboard briefly with a fresh multilapse.log having followed the correct proceedure.
I was a bit confused the first time, because I half expected the script to turn the camera on automagically, via the USB.
Anyhoo.
I will fire up chat in the morning but that will be Monday for me and still Sunday for you so I don't expect a reply.
Spk soon

Re: Extended time lapse with Internet connection and power saving
« Reply #29 on: 29 / October / 2017, 12:28:49 »
Like I mentioned to reyalp last night, I am guilty I have not yet written the document on how to connect/modify the camera to allow host-controlled powercycle.
Without any modification of the camera, the script won't be able to turn it on or off, so for now you'll have to turn it on by hand.

The script starts well, it sets all the parameters, it reads temperature of the lens (28C, are you having a nice spring over there?) and sensor (30C), it reads a "preview" of the brightness of the scene, but then it fails to perform the actual remote capture. I'll see if reyalp is online later today and I hope we can all meet in the chat later and make it work :)
« Last Edit: 29 / October / 2017, 12:34:35 by manoweb »

 

Related Topics