Author Topic: Wirelessly Control Magic Lantern States  (Read 842 times)

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Wirelessly Control Magic Lantern States
« on: November 06, 2018, 03:40:29 PM »
I thought I would share an experiment I’ve just successfully completed, whereby I can now wirelessly control ML states, for example image capture, Dual ISO, Advanced Bracketing and Auto ETTR, ie without touching the camera.

To achieve this I’m making use of the Foolography Unleashed dongle for my 5D3: https://www.foolography.com/products/unleashed/

The dongle is permanently plugged into my 5D3 and requires no batteries. The dongle’s functionality allows it to control various, but not exhaustive, camera functions, via an app (I have mine running on my iPhone, iPad or  iPod).

The App’s screen looks like this:





As a proof of principle, I decided to make use of the metering mode and the white balance. The WB has 9 different settings, so in theory I could set 9 different ML states. For now I’ve coded four, namely:
  State 1 (WB AWB): Dual ISO OFF, Auto ETTR OFF, (Auto) Advanced Bracketing OFF
  State 2 (WB Sunshine): Dual ISO ON
  State 3 (WB Shady): Get/set ETTR exposure
  State 4 (WB cloudy): Take an (auto) Advanced Bracket set

Once you have selected a state, by choosing the WB value that corresponds to that state, you then use the app to simply toggle, using the metering mode app button, between the two metering option extremes, top to bottom. The Lua script then does the rest.

For now I simply switch between the various states to achieve what I want. For instance, I might use the app like this:
  1.   Set state 1 to ensure everything off
  2.   Go to Sunshine WB and set my Dual ISO (100/800)
  3.   Go to Shady WB and set my exposure via ETTR
  4.   Press the shutter, via the app, and review the (low quality) image in the app

Alternatively, I could:
  1.   Set state 1 to ensure everything off
  2.   Go to Shady WB and set my base exposure via ETTR
  3.   Go to Cloudy WB and set Advanced Bracketing
  4.   Press the shutter, via the app, and let ML take the brackets, and review the (low quality) image in the app

Obviously, this is a simply demo or proof of principle of how to interact with ML without touching the camera. If I progress the idea I will tidy things up.

Also, there are limitations: the biggest being you need a look up table (or remember) to convert WBs into ML states.

For those interested, here is the (crude) script.

Code: [Select]
wb_value = -1
change = false
previous_meter_value = 0

function property.WB_MODE_LV:handler(value)
     wb_value = value
end

function property.METERING_MODE:handler(value)
     if (previous_meter_value == 3 and value == 5) then -- if previous metering value was 3 and the current one is 5
        change = true
        previous_meter_value = 0 -- clear variable
    else
        change = false
        previous_meter_value = value -- remember current metering value
    end
end

function watch(arg)
    if change == true then
        change = false
        if wb_value == 0 then -- set all states to off
            menu.set("Expo","Dual ISO",0)
            menu.set("Expo","Auto ETTR",0)
            menu.set("Shoot","Advanced Bracket",0)
        elseif wb_value == 1 then -- switch Dual ISO on
            menu.set("Expo","Dual ISO",1)
        elseif wb_value == 8 then -- set ETTR exposure (make sure you set ETTR for your needs)
            menu.set("Expo","Dual ISO",0)
            menu.set("Expo","Auto ETTR",1)
            menu.set("Shoot","Advanced Bracket",0)
            key.press(KEY.SET) -- ETTR must be configured for SET trigger
        elseif wb_value == 2 then -- Do Auto bracketing
            menu.set("Expo","Dual ISO",0)
            menu.set("Expo","Auto ETTR",0)
            menu.set("Shoot","Advanced Bracket",1)
        end
        wb_value = -1 -- clear variable
    end
    return true
end
 
event.shoot_task = watch


Bottom line: a bit of fun for me, but an insight into using ML, especially for those use cases where you don't wish to touch the camera and/or can't touch it.

ItsMeLenny

  • Hero Member
  • *****
  • Posts: 923
  • 550D
Re: Wirelessly Control Magic Lantern States
« Reply #1 on: November 29, 2018, 07:04:28 AM »
How long has that dongle existed? I've had sketches of a similar idea since I bought my 550D :P though that was quite a few years ago and my sketches were of a much bulkier attachment :P

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1744
Re: Wirelessly Control Magic Lantern States
« Reply #2 on: November 29, 2018, 08:00:54 AM »
@ItsMeLenny

A bit of a story.

It was a Kickstarter I bought into a long time ago that ran late by nearly two years.

Anyway, they started delivering a few months ago and I have one running on my 5D3.

Cheers

Garry

lizard™

  • New to the forum
  • *
  • Posts: 28
Re: Wirelessly Control Magic Lantern States
« Reply #3 on: August 11, 2019, 06:15:00 PM »
This is amazing and should have more appreciation. Great idea behind this, this should also work using a Wi-Fi enabled camera like the 70D and Canon's Camera Connect app., I assume?

Will give it a try, thank you!