Martin, on Blue Iris versions 4.0.3.1 the Alert(output) to serial , set in bits 1,2,3,4,5,6,7,8 produce a ASCII output of S01,S11,S21,S31,S41,S51,S61,S71 for ON and for OFF the corresponding, S00, S10, S20,S30,S40,S50, S60,S70
so your serial read "if" loop should read in the first three bytes...