From 80c0c5dd4b641352f249342254b3fe0381e1125e Mon Sep 17 00:00:00 2001 From: sqozz Date: Mon, 20 Jan 2020 21:11:28 +0100 Subject: [PATCH] Add getSN function --- sem6000.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sem6000.py b/sem6000.py index 29414fe..c37d788 100644 --- a/sem6000.py +++ b/sem6000.py @@ -45,6 +45,13 @@ class SEMSocket(): msg = self.BTLEMessage(self, cmd, payload) msg.send() + def getSN(self): + # 15, 5, 17, 0, 0, 0, 18, -1, -1 + cmd = bytearray([0x11]) + payload = bytearray([0x00, 0x00, 0x00]) + msg = self.BTLEMessage(self, cmd, payload) + msg.send() + def setStatus(self, status): # 0f 06 03 00 01 00 00 05 ff ff -> on # 0f 06 03 00 00 00 00 04 ff ff -> off