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

Extended time lapse with Internet connection and power saving

  • 130 Replies
  • 40844 Views
Re: Extended time lapse with Internet connection and power saving
« Reply #70 on: 18 / November / 2017, 02:38:01 »
Advertisements
I never had this issue with gphoto. I am actually running a slightly older version of raspbian (the one that came out last summer):
cat /etc/os-release

PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

This confirms my theory that even very good systems reach a peak and they start to decay. I suggest you try some raspbian expert on how to properly disable this behavior, these things make me go crazy :(

Sdack, I realize I only pushed the changes to the git repository. Did you download the new script manually? It needs a new configuration file, you can also take multilapse-config.lua.sample, rename it multilapse-config.lua and change the values inside. It should support direct ftp upload.

*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #71 on: 18 / November / 2017, 02:44:42 »
Thanks Manoweb,

I downloaded a zip file then copied the files to my /root/multilapse-CHDK/ folder and did exactly as you describe to create my new multilapse.config.lua file.  I like your new options.  Just wish I wasn't crashing the camera.

What confuses me is why your version breaks and my older version works???

I'm tempted to nuke the whole gvfs-backends package and see what happens.  but I'd better make sure I have a backup to restore in case it contains some seriously important stuff.


*

Offline reyalp

  • ******
  • 14118
Re: Extended time lapse with Internet connection and power saving
« Reply #72 on: 18 / November / 2017, 02:49:56 »
I never had this issue with gphoto. I am actually running a slightly older version of raspbian
I believe the gvfs/gphoto stuff is only installed if you install a GUI desktop environment.

edit:
FWIW (mostly for anyone who finds this thread in the future) the last time I set up my pi I used the "lite" raspbian download, which did not include any of the GUI stuff and did not install the gphoto/gvfs stuff.
« Last Edit: 18 / November / 2017, 16:43:25 by reyalp »
Don't forget what the H stands for.

*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #73 on: 18 / November / 2017, 02:52:13 »
That sounds promising.. I'm running headless, over ssh in Putty from my windows box, so I'd be quite happy to lose the overhead of the GUI bits.

I'll remove the whole package tomorrow once I'm all backed up.

Thanks guys



Re: Extended time lapse with Internet connection and power saving
« Reply #74 on: 18 / November / 2017, 02:55:57 »
In case, please post the configuration file (deleting/masking your URL/user/password!) and the program output from the log.

*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #75 on: 18 / November / 2017, 17:15:07 »
In case, please post the configuration file (deleting/masking your URL/user/password!) and the program output from the log.

Code: [Select]
-- the values in config_base are mandatory
config_base={
        camera_ID='Experimental',
        interval=60,
}

config_storage={
        resize=true,
        resize_geometry='2048x1536',
        local_archive=true,
        archive_path='/root/archive/',
        upload=true,
        upload_type='ftp', -- Options: http, ftp
        upload_URL='ftp.XXX.com',
        upload_user='XXXX@XXX.com:@XXXXXX'
}

-- enable these options carefully - some cameras might not support some of
-- these properties and might crash. It's a good idea to change one at a time
config_option={
        zoom='0',
--      flash='2',
--      whitebalance='0',
--      resolution='1'
}

-- 'night' shutter speed for low light conditions should be generally safe.
config_night={
        enabled=true,
        threshold=-620,

and the last run attempt from multilapse.log:

Code: [Select]
Reloading config file!
Making sure camera is OFF
Waiting 5s...
Turning camera ON
Waiting 5s for boot...
Connecting
open_camera_dev_usb:usb_ptp_device_reset(): Device or resource busy
usb_ptp_get_device_status(): Device or resource busy
open_camera_dev_usb: ptp_opensession failed 0x2ff
connected: Canon IXUS 160, max packet size 512
Unpressing power button
Going into rec mode
ERROR: switch failed
Setting P mode
Setting zoom
Disabling display
sh: 1: cannot create /sys/class/leds/led1/brightness: Directory nonexistent
Temperature: sensor = 30 optics = 26
SSTT,20171118-154655,30,26
Checking brightness level
*** *** *** Pre-shooting error
Turning camera OFF
Waiting 5s...
Making sure camera is OFF
Waiting 5s...
Turning camera ON
Waiting 5s for boot...
Connecting
ERROR: no matching devices found
Unpressing power button

By the way, this morning used the command that Reyalp gave me: dpkg-query -S /usr/lib/gvfs/gvfsd-gphoto2 to check that the gvfs elements existed on both machines but they don't. 

Perhaps something has changed in the Raspbian install, in the couple of months since I installed the two machines.  Certainly gphoto2 was installed on my original RaspbPi B+ and I uninstalled it to get rid of the problem of my camera failing to connect to the camera when invoking chdkptp .  However I haven't uninstalled it from the PiZero yet it's not there.. only the gvfs-backend parts of it seem to be there.


Re: Extended time lapse with Internet connection and power saving
« Reply #76 on: 18 / November / 2017, 19:57:52 »
Out of curiosity, if you invoke chdk-ptp like you did with your own script you posted some time ago - is there any difference?

*

Offline reyalp

  • ******
  • 14118
Re: Extended time lapse with Internet connection and power saving
« Reply #77 on: 18 / November / 2017, 21:45:45 »
Code: [Select]
Reloading config file!
Connecting
open_camera_dev_usb:usb_ptp_device_reset(): Device or resource busy
usb_ptp_get_device_status(): Device or resource busy
open_camera_dev_usb: ptp_opensession failed 0x2ff
These errors tell you something (gphoto etc) was already accessing the camera. It doesn't make sense to worry about the rest of the script until you fix this.
Code: [Select]
connected: Canon IXUS 160, max packet size 512
Unpressing power button
Going into rec mode
ERROR: switch failed
Here we see chdkptp took it away from the other process, but switching to rec failed. This usually happens when some other software has accessed the camera.

Quote
By the way, this morning used the command that Reyalp gave me: dpkg-query -S /usr/lib/gvfs/gvfsd-gphoto2 to check that the gvfs elements existed on both machines but they don't.
I'm not sure which machines you mean? The output from the pi zero showed this was present.

If you are getting similar errors on other machines, you can use the fuser and ps commands to find out which program is involved. Once you know the program, you can use the dpkg-query -S to find out which package it belongs to (note this command is specific to distros that use dpkg, mostly debian and derivatives like raspbian, ubnutu etc)

For the pis, you might consider starting with a fresh SD card using the 'lite' raspbian.
Don't forget what the H stands for.


*

Offline Sdack

  • ***
  • 195
Re: Extended time lapse with Internet connection and power saving
« Reply #78 on: 19 / November / 2017, 18:41:42 »
Quote
I'm not sure which machines you mean? The output from the pi zero showed this was present.
I have two Raspberry Pi's:
  • the original RasbperryPi B+ version, which suffered a similar camera rec switch problem caused by the presence of and fixed by the uninstalling of gphoto2
and
  • A new, Pi ZeroW model, purchased for it's affordability and 50% less power consumption
The strange thing about the new model is that my, bash-script based version of chdkptp works just fine on it, whereas multilapse fails with the errors posted in this thread.

This makes me think there must be something about the implementation of multilapse which differs, unless it's simply permissions based errors -

Quote
For the pis, you might consider starting with a fresh SD card using the 'lite' raspbian.
I have a backup of my current PiZero SD card now and a nice, fast, new card on it's way - A Samsung EVO EVO+ Plus 64GB micro SD Card 95MB/s 100MB/s 4K FHD
I will try an install of Raspbian Lite as you suggest, or perhaps Arch Linux which I saw referenced as being able to boot in 7 seconds

https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=80421#p569616

Someone has kindly posted a script on GitHub to simplify the installation to a PiZero

https://gist.github.com/larsch/4a320f8ee5586fe6170af8051fcd9f85

It makes me wonder if a similar install script could be made for multilapse or other scripts to help less technically savvy folks like me get the right programs in the right places with correct permissions and dependencies etc.

Cheers


*

Offline reyalp

  • ******
  • 14118
Re: Extended time lapse with Internet connection and power saving
« Reply #79 on: 19 / November / 2017, 19:45:59 »
The strange thing about the new model is that my, bash-script based version of chdkptp works just fine on it, whereas multilapse fails with the errors posted in this thread.

This makes me think there must be something about the implementation of multilapse which differs, unless it's simply permissions based errors -
I'd bet a case of beer it is not caused by permissions or differences between multilapse and your bash script. The error stems from something else accessing the camera over USB. That will happen or not regardless of how chdkptp is invoked. If you got different results between your script and multilapse, it is due to something else changing between those tests.

Quote
I will try an install of Raspbian Lite as you suggest, or perhaps Arch Linux which I saw referenced as being able to boot in 7 seconds
I would not suggest switching to Arch. Lite is not a different distro, it just has less packages installed by default. The reason I suggested it is that it provides you an easy way to start without the desktop related packages, and the pi that I set up with it didn't have any problems with gphoto. Also, I build and test chdkptp on raspbian, so I'm much less likely to be able to help with other distros.

Without the desktop stuff, either distro should boot pretty quickly.
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal