Listen all midi devices without opening them?

Hello to all.

I would like to know if it’s possible to listen all midi devices availables without the open function? Like in the Renoise midi remote.

Infos are availables in Renoise but when i use lua i must open the device i want to listen and then the device become unavailable for something else (which is really annoying for my project).

Just need to receive the data to trigger some functions, don’t need to send anything to the device.

Is there a workaround for this?

Thanks for any help.