RoyOltmans / aqualin-mqtt-deamon

Lightweight aqualin BLE mqtt deamon controller
9 stars 4 forks source link

MQTT Error- ./aqualin-mqtt-deamon.py #3

Closed schmeckm closed 5 years ago

schmeckm commented 5 years ago

pi@octopi:~ $ cd /opt/aqualin-mqtt-deamon pi@octopi:/opt/aqualin-mqtt-deamon $ ./aqualin-mqtt-deamon.py MQTT: Connected with result code 0 ('on', 1, u'E7:E7:BB:18:F2:A3') BLE instruction: 7b03010001 Connecting E7:E7:BB:18:F2:A3... Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 754, in run self.target(*self.args, **self.kwargs) File "./aqualin-mqtt-deamon.py", line 105, in runworkerbledevicestate setblerequest(queuevalues[0], queuevalues[2], bleHandle, getblevalue(queuevalues[0], queuevalues[1])) File "./aqualin-mqtt-deamon.py", line 88, in setblerequest device = btle.Peripheral(str(devicemac)) File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 391, in init__ self._connect(deviceAddr, addrType, iface) File "/usr/local/lib/python2.7/dist-packages/bluepy/btle.py", line 439, in _connect raise BTLEDisconnectError("Failed to connect to peripheral %s, addr type: %s" % (addr, addrType), rsp) BTLEDisconnectError: Failed to connect to peripheral E7:E7:BB:18:F2:A3, addr type: public

RoyOltmans commented 5 years ago

Hi I see you activated error tracing (hope you won't mind if I close the previous call), it's giving back a connection issue. On a glance it's my first tought would be the mac address, as the four valve's I own the all start with a mac address of 01:02:03:04:[XX]:[XX].

Could you please rescan the with hcitool lescan. And look for a response like this: 01:02:03:04:07:C0 Spray-Mist 07C0 These are the solenoid valve's.

RoyOltmans commented 5 years ago

As recommended in the previous post, this fixed your issue.

Hope you enjoy the code (a update will folow in the coming weeks).

I will close this issue