Open tbm opened 1 year ago
I am also getting this error often:
danvac@9700k ~/repos/tp357 $ ./teplota.sh
++ echo 'Muj pokoj'
Muj pokoj
++ ./tp357tool.py B8:59:CE:D1:FD:49 now
Waiting for device... 1/12
temp,humid
28.4,42
++ echo 'Obyvaci pokoj'
Obyvaci pokoj
++ ./tp357tool.py B8:59:CE:D0:A3:1D now
temp,humid
26.9,50
++ echo 'Zimni zahrada'
Zimni zahrada
++ ./tp357tool.py B8:59:CE:D1:39:5B now
Waiting for device... 1/12
Traceback (most recent call last):
File "/home/danvac/repos/tp357/./tp357tool.py", line 139, in <module>
device, read, write = bt_setup(sys.argv[1])
^^^^^^^^^^^^^^^^^^^^^
File "/home/danvac/repos/tp357/./tp357tool.py", line 62, in bt_setup
write = bus.get("org.bluez", get_characteristic(uuid_write)[0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/danvac/repos/tp357/./tp357tool.py", line 59, in get_characteristic
return [desc for desc in object_manager.GetManagedObjects().items()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range
++ echo Buba
Buba
++ ./tp357tool.py 10:76:36:19:7A:E2 now
Waiting for device... 1/12
Waiting for device... 2/12
Waiting for device... 3/12
Connecting to device... 1/3
g-io-error-quark: GDBus.Error:org.bluez.Error.Failed: le-connection-abort-by-local (36)
temp,humid
27.2,51
++ echo Jackal
Jackal
++ ./tp357tool.py 10:76:36:19:D8:69 now
temp,humid
27.5,54
++ echo Bathroom
Bathroom
++ ./tp357tool.py 10:76:36:19:DA:10 now
Traceback (most recent call last):
File "/home/danvac/repos/tp357/./tp357tool.py", line 139, in <module>
device, read, write = bt_setup(sys.argv[1])
^^^^^^^^^^^^^^^^^^^^^
File "/home/danvac/repos/tp357/./tp357tool.py", line 62, in bt_setup
write = bus.get("org.bluez", get_characteristic(uuid_write)[0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/danvac/repos/tp357/./tp357tool.py", line 59, in get_characteristic
return [desc for desc in object_manager.GetManagedObjects().items()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range
I got the following:
I ran it again and it worked.