you need to scan the system
see the scanner object in github.com/.../myOpenLayer2.py
the first packet sent by a device after the select_device call contains the device type.
for example I get :
*#1001*01*1*129*5*0*0##
this is an F411/2 (device code 129)
*#1001*11*1*130*6*0*0##
this is an F411/4 (device code 130)
*#1001*0*1*2*6*0*0##
this is a basic dual button (code 2)
and so on. the rest I have not analized yet as I don't have all types of devices...