Hi there,
Great module!
I was able to recover the key with the provided script and I am trying to get this to work, unfortunately, it seems they have changed something in the new firmware (On the android app (v 1.5.6) I see model DDL06 and version 6.2.)
Is this python code still working for you?
it seems the problem is after unlock (see below). Any idea on how to fix this?
Thanks!
IOErrorTraceback (most recent call last)
in ()
3 b=bytearray(b'\x08\xd5e|')
4 switch = decora.decora("F0:C7:7F:09:15:41", key=b)
----> 5 switch.connect()
6 switch.on()
/usr/local/lib/python2.7/dist-packages/decora/init.pyc in connect(self)
53 self._connect()
54 self.unlock()
---> 55 self.update_state()
56 data = self.device.readCharacteristic(self.handles["config1"])
57 self.bulbtype = data[0]
/usr/local/lib/python2.7/dist-packages/decora/init.pyc in update_state(self)
72
73 def update_state(self):
---> 74 data = self.device.readCharacteristic(self.handles["state"])
75 self.power = data[0]
76 self.level = data[1]
/usr/local/lib/python2.7/dist-packages/bluepy/btle.pyc in readCharacteristic(self, handle)
528 def readCharacteristic(self, handle):
529 self._writeCmd("rd %X\n" % handle)
--> 530 resp = self._getResp('rd')
531 return resp['d'][0]
532
/usr/local/lib/python2.7/dist-packages/bluepy/btle.pyc in _getResp(self, wantType, timeout)
405
406 while True:
--> 407 resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
408 if resp is None:
409 return None
/usr/local/lib/python2.7/dist-packages/bluepy/btle.pyc in _waitResp(self, wantType, timeout)
359 elif respType == 'stat':
360 if 'state' in resp and len(resp['state']) > 0 and resp['state'][0] == 'disc':
--> 361 self._stopHelper()
362 raise BTLEDisconnectError("Device disconnected", resp)
363 elif respType == 'err':
/usr/local/lib/python2.7/dist-packages/bluepy/btle.pyc in _stopHelper(self)
290 DBG("Stopping ", helperExe)
291 self._poller.unregister(self._helper.stdout)
--> 292 self._helper.stdin.write("quit\n")
293 self._helper.stdin.flush()
294 self._helper.wait()
IOError: [Errno 32] Broken pipe
Hi there,
Great module!
I was able to recover the key with the provided script and I am trying to get this to work, unfortunately, it seems they have changed something in the new firmware (On the android app (v 1.5.6) I see model DDL06 and version 6.2.)
Is this python code still working for you?
it seems the problem is after unlock (see below). Any idea on how to fix this?
Thanks!
IOErrorTraceback (most recent call last)
in ()
3 b=bytearray(b'\x08\xd5e|')
4 switch = decora.decora("F0:C7:7F:09:15:41", key=b)
----> 5 switch.connect()
6 switch.on()
/usr/local/lib/python2.7/dist-packages/decora/init.pyc in connect(self)
53 self._connect()
54 self.unlock()
---> 55 self.update_state()
56 data = self.device.readCharacteristic(self.handles["config1"])
57 self.bulbtype = data[0]
/usr/local/lib/python2.7/dist-packages/decora/init.pyc in update_state(self)
72
73 def update_state(self):
---> 74 data = self.device.readCharacteristic(self.handles["state"])
75 self.power = data[0]
76 self.level = data[1]
/usr/local/lib/python2.7/dist-packages/bluepy/btle.pyc in readCharacteristic(self, handle)
528 def readCharacteristic(self, handle):
529 self._writeCmd("rd %X\n" % handle)
--> 530 resp = self._getResp('rd')
531 return resp['d'][0]
532
/usr/local/lib/python2.7/dist-packages/bluepy/btle.pyc in _getResp(self, wantType, timeout)
405
406 while True:
--> 407 resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
408 if resp is None:
409 return None
/usr/local/lib/python2.7/dist-packages/bluepy/btle.pyc in _waitResp(self, wantType, timeout)
359 elif respType == 'stat':
360 if 'state' in resp and len(resp['state']) > 0 and resp['state'][0] == 'disc':
--> 361 self._stopHelper()
362 raise BTLEDisconnectError("Device disconnected", resp)
363 elif respType == 'err':
/usr/local/lib/python2.7/dist-packages/bluepy/btle.pyc in _stopHelper(self)
290 DBG("Stopping ", helperExe)
291 self._poller.unregister(self._helper.stdout)
--> 292 self._helper.stdin.write("quit\n")
293 self._helper.stdin.flush()
294 self._helper.wait()
IOError: [Errno 32] Broken pipe