I'm not at all familiar with Photon, but having just had a quick look at the website and forums, are you sure it can actually send MIDI information?
My very quick read through seems to indicate that it can receive MIDI (i.e. be triggered by external MIDI sources as per https://docs.photon-ios.com/en/dashboard-widget-midi-trigger) but I see no mention anywhere that it can send MIDI, which would be required for the MIDI learn feature of ST to function.
If I understand correctly what you are trying to do (and I may well be wrong), you are hoping that triggering lights from within Photon is generating a MIDI command that midimttr is going to allow ST to 'hear' and learn from? My take is that won't work as Photon isn't generating MIDI commands, but happy to stand corrected if there is anyone out there that knows Photon.