Runnable = Runnable { //rawData 838 06 val dataOpenCloseSensor = receivedData?.getOpenCloseSensor() if (dataOpenCloseSensor != null) { // 05 raw (12 '912"4 #- val binary = String.format("%12s", Integer.toBinaryString(dataOpenCloseSensor!!)) .replace(" ".toRegex(), "0") val binaryState = binary.substring(0, 1) // '912 val binaryCount = binary.substring(1) // '9%, // .