supplierdeeply

Multicam: connect only to specific cameras

  • 4 Replies
  • 1373 Views
Multicam: connect only to specific cameras
« on: 02 / March / 2015, 11:18:49 »
Advertisements
Hi all,

I've got a multicam rig of a bunch of A2200. All working fine with the following code:

Code: [Select]
!mc=require'multicam'
!mc:connect()

Adding a Canon EOS 100D to the same USB hub (for other uses on the same PC) results in the multicam script trying to connect to is as well. I've tried to filter it out, but with no success:

Code: [Select]
!mc=require'multicam'
!mc:connect({plain == true, model="PowerShot A2200"}, match))

I'm a complete noob with lua, so I don't know if the above opts for the connect function are correct. The connect function entered as above still connects the EOS 100D with no other error messages.

What am I doing wrong?

Many thanks in advance.

*

Offline reyalp

  • ******
  • 11514
Re: Multicam: connect only to specific cameras
« Reply #1 on: 02 / March / 2015, 13:27:48 »
Code: [Select]
!mc:connect({plain == true, model="PowerShot A2200"}, match))I'm a complete noob with lua, so I don't know if the above opts for the connect function are correct. The connect function entered as above still connects the EOS 100D with no other error messages.
That doesn't look like quite the right syntax, try
Code: [Select]
!mc:connect({match={product_id=12842}})
12842 is the pid of A2200, from http://chdk.wikia.com/wiki/P-ID_%28Table%29

Connecting by pid is preferred, because chdkptp has to actually connect to the camera to get the model name.

edit:
syntax corrected, thx msl
« Last Edit: 05 / March / 2015, 15:43:36 by reyalp »
Don't forget what the H stands for.

Re: Multicam: connect only to specific cameras
« Reply #2 on: 05 / March / 2015, 06:40:55 »
Thanks, reyalp, but still no go:

Code: [Select]
___> list
-1:Canon PowerShot A2200 b=001 d=007 v=0x4a9 p=0x322a s=8655536FBF454F18AED4CA75BE87BEC2
-2:Canon PowerShot A2200 b=001 d=006 v=0x4a9 p=0x322a s=095FBB174E1D4CB4B0244C023F25EFE7
-3:Canon EOS 100D b=001 d=005 v=0x4a9 p=0x3270 s=72f24eda72ad4a7da8bf37c823a6c440
___> !mc=require'multicam'
___> !mc:connect({match=product_id=12842})
ERROR: compile failed:[string "mc:connect({match=product_id=12842})"]:1: '}' expected near '='

Syntaxes like:

Code: [Select]
!mc:connect({match='product_id=12842'})or
Code: [Select]
!mc:connect({match="product_id=12842"})
still connect the EOS as well, with no error messages.

Host 2.6 precompiled for raspbian, running on a Debian for BeagleBone Black.

Any other ideas? Thanks.
« Last Edit: 05 / March / 2015, 07:00:37 by plua_mea »

*

Offline msl

  • *****
  • 1237
  • A720 IS, SX220 HS 1.01a
    • CHDK inside
Re: Multicam: connect only to specific cameras
« Reply #3 on: 05 / March / 2015, 08:56:38 »
If I understand the description correctly, it should work as follows:
Code: [Select]
!mc:connect({match={product_id=12842}})See also => https://www.assembla.com/code/chdkptp/subversion/nodes/665/trunk/lua/multicam.lua#ln74

msl
German CHDK pages:  CHDK forum | CHDK inside | CHDK Twitter News by msl | Download CHDK-DE (Autobuild)
Note: SDM violates the GPL rules!


Re: Multicam: connect only to specific cameras
« Reply #4 on: 05 / March / 2015, 09:37:41 »
Many thanks, msl. It works now! :)

 

Related Topics