Using USB remote to control chdkptp with Raspberry Pi - page 3 - Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes) - CHDK Forum supplierdeeply

Using USB remote to control chdkptp with Raspberry Pi

  • 68 Replies
  • 33991 Views
*

Offline reyalp

  • ******
  • 14118
Re: Remotely start/stop recording and Zoom control question!
« Reply #20 on: 29 / March / 2017, 17:29:47 »
Advertisements
What exactly does he mean by my own installation?
If you use the latest chdkptp packages from https://app.assembla.com/spaces/chdkptp/documents, you should not need to edit anything. The zip includes two files: chdkptp.sh and chdkptp_gui.sh. The first runs the CLI-only executable, the second runs the GUI executable.

edit:
If you are trying to use blackhole's solution in https://chdk.setepontos.com/index.php?topic=10664.msg107663#msg107663 then you would just need to put the lines referring to gvfs-gphoto2-volume-monitor before and after chdkptp is run.


edit2:
The "Change the ...blah... to match your own installation." just means the location of the chdkptp files, but again if you use the scripts included in the zip, you don't need to change any of that.
« Last Edit: 29 / March / 2017, 17:34:13 by reyalp »
Don't forget what the H stands for.

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Remotely start/stop recording and Zoom control question!
« Reply #21 on: 29 / March / 2017, 17:36:00 »
I also had some problems with the Raspberry Pi and gphoto. All described tips for the gphoto problem did not work for me. Only the kill process methode works.

I have inserted the following at the beginning of the chdkpptp bash file:
Code: [Select]
#!/bin/sh
# Kill gphoto mounter
killall  /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
...
If necessary, you can restart the process after using chdkptp.

msl
CHDK-DE:  CHDK-DE links

Re: Remotely start/stop recording and Zoom control question!
« Reply #22 on: 29 / March / 2017, 17:59:52 »
I also had some problems with the Raspberry Pi and gphoto. All described tips for the gphoto problem did not work for me. Only the kill process methode works.

I have inserted the following at the beginning of the chdkpptp bash file:
Code: [Select]
#!/bin/sh
# Kill gphoto mounter
killall  /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
...
If necessary, you can restart the process after using chdkptp.

msl

Yep. That worked! Thank you so much!

Re: Remotely start/stop recording and Zoom control question!
« Reply #23 on: 29 / March / 2017, 18:06:47 »
Thank you so much msl and reyalp. I was confused on what had to do, but adding the two lines of code to the bash file is all I needed... but unfortunately right as it started to work, my battery died and I can't find my charger :( Thank you for being patient with me.

Anyways... now that I have PTP working on my Raspberry Pi, what I am now concerned about is sending a signal from a remote (whether that be an infrared remote, or a Bluetooth remote, preferably not a phone if it can be avoided) to the Pi in order to execute the PTP commands so I can remotely trigger the buttons... This delves more into Pi programming than CHDK scripting, but does anyone have any ideas of how I should move on from here?


Re: Remotely start/stop recording and Zoom control question!
« Reply #24 on: 29 / March / 2017, 19:49:27 »
Anyways... now that I have PTP working on my Raspberry Pi, what I am now concerned about is sending a signal from a remote (whether that be an infrared remote, or a Bluetooth remote, preferably not a phone if it can be avoided) to the Pi in order to execute the PTP commands so I can remotely trigger the buttons... This delves more into Pi programming than CHDK scripting, but does anyone have any ideas of how I should move on from here?
You could probably use one of the many remote devices used for Power Point type presentations.  AFAIK, it just looks like a USB mouse to your system and they are dirt cheap from so many place on the internet.

Ported :   A1200    SD940   G10    Powershot N    G16

Re: Remotely start/stop recording and Zoom control question!
« Reply #25 on: 29 / March / 2017, 22:46:02 »
You could probably use one of the many remote devices used for Power Point type presentations.  AFAIK, it just looks like a USB mouse to your system and they are dirt cheap from so many place on the internet.

Ah, yeah that is perfect! I may have to search about this more on a different forum, more Pi related, but do you know how I could get each button press from a USB remote like this to execute a different command through chdkptp?

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Remotely start/stop recording and Zoom control question!
« Reply #26 on: 30 / March / 2017, 06:50:40 »
With the Raspberry Pi we have more possibilities. My preferred method is a remote desktop control of the Pi with a smartphone via wlan. Thereby you have full camera access inclusive live view.

On the Pi you need the GUI version of chdkptp, a running VNC server (Is included in the recent Raspbian version.) and a wlan access point. The smartphone need a VNC viewer app.

msl
CHDK-DE:  CHDK-DE links

*

Offline reyalp

  • ******
  • 14118
Re: Remotely start/stop recording and Zoom control question!
« Reply #27 on: 30 / March / 2017, 13:45:35 »
Ah, yeah that is perfect! I may have to search about this more on a different forum, more Pi related, but do you know how I could get each button press from a USB remote like this to execute a different command through chdkptp?
If you look on the raspberry pi forums, I expect you'll find a lot of projects using different kinds of remotes.

How you get the input depends on the remote: Does it act like a keyboard or mouse, or connect to the GPIO etc. If you can read that input from a shell script or other program, then you can send chdkptp either by invoking chdkptp for each command, like chdkptp.sh -c -e"click('zoom_in')" or by starting chdkptp once and piping commands to it's stdin.

You could also write Lua code that runs inside chdkptp to read commands from some other sources.

With the Raspberry Pi we have more possibilities. My preferred method is a remote desktop control of the Pi with a smartphone via wlan.
FWIW, the OP did say they preferred not to use a smartphone. If the goal is program control of chdkptp, the GUI is likely not the simplest choice.
Don't forget what the H stands for.


*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Remotely start/stop recording and Zoom control question!
« Reply #28 on: 30 / March / 2017, 14:40:16 »
FWIW, the OP did say they preferred not to use a smartphone. If the goal is program control of chdkptp, the GUI is likely not the simplest choice.
That's why I wrote "my preferred method". Maybe this variant is unknown for the OP. We should not rule out any possibility.  ;)

msl
CHDK-DE:  CHDK-DE links

Re: Remotely start/stop recording and Zoom control question!
« Reply #29 on: 30 / March / 2017, 14:58:22 »
If you look on the raspberry pi forums, I expect you'll find a lot of projects using different kinds of remotes.

Perfect, I am definitely expecting to go on specific Raspberry Pi forums, but I'm in kind of deep here and you guys are extremely helpful diving outside of the simple CHDK questions. So again, much appreciated.

How you get the input depends on the remote: Does it act like a keyboard or mouse, or connect to the GPIO etc. If you can read that input from a shell script or other program, then you can send chdkptp either by invoking chdkptp for each command, like chdkptp.sh -c -e"click('zoom_in')" or by starting chdkptp once and piping commands to it's stdin.

You could also write Lua code that runs inside chdkptp to read commands from some other sources.
Ultimately, I would like to power on the Raspberry Pi and, without needing a GUI or any visuals, have it be ready to accept an input from a remote and to tell chdkptp to do certain things depending on the button pressed.

I guess after realizing that a USB remote would be perfect for this project, my thought was having the Pi autostart the chdkptp's cli and to write a program (would I need to write a Lua script for this?..) that reads a specific USB button press and writes out a command to chdkptp. reyalp, you make it seem like this is a possibility... I'm just going to have to research how exactly to do this. Know of any good Raspberry Pi forums/websites that could help me out with this question?

With the Raspberry Pi we have more possibilities. My preferred method is a remote desktop control of the Pi with a smartphone via wlan. Thereby you have full camera access inclusive live view.

On the Pi you need the GUI version of chdkptp, a running VNC server (Is included in the recent Raspbian version.) and a wlan access point. The smartphone need a VNC viewer app.

msl

This is definitely a good idea, and yes I am trying to limit the amount of connections being made but you are right... can't rule everything out. Thank you for your input!

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal