Dobot Magician Alarm Python


Hi everybody,
Im programming my two Dobot Magician on Python 3.4.
Im using the api and the dType.GetAlarmsState(api,dobotID,maxlen) to get the type of alarm.
I’ve understood how to know which error it his with the print function when I get in output : b’\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00’
Now, I’m trying to create a thread in python which runs continously and test every second if they are alarm on the Dobot and if so, make an homing operation.
I’m also trying to know which error it is by transforming this list of Hexadecimals to binary in order to get the position of the bits and after this, transform this number to Decimals to get the actual reference of Alarm.
If somebody is blocking at this point, let’s help each other !