tikismoke / home-assistant-nespressoble

#deprecated see Readme to migrate to a better one. NESPRESSO ble Home Assistant custom componenets and also a 2MQTT script
GNU General Public License v3.0
38 stars 6 forks source link

Connection times out very often #4

Closed marcandre83 closed 4 years ago

marcandre83 commented 4 years ago

Hi and thank you for this great integration! Unfortunately my Raspberry Pi 4 has a lot of trouble connecting to my Nespresso Prodigio machine. On the Web Bluetooth Page of brewbutton everything works fine as well, only home assistant has problems connecting to the machine (it sometimes works after a lot of reboots). Also I disabled any other bluetooth integrations on home assistant and my Nespresso machine is not far away from the Raspberry Pi. I attached the logs.

2020-08-03 23:50:22 ERROR (SyncWorker_14) [custom_components.nespresso.nespresso] 
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.
2020-08-03 23:50:27 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform nespresso is taking over 10 seconds.
2020-08-03 23:50:27 ERROR (SyncWorker_14) [custom_components.nespresso.nespresso] Failed to get_info, 3 times
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.
2020-08-03 23:50:33 ERROR (SyncWorker_14) [pygatt.backends.gatttool.gatttool] Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.
2020-08-03 23:50:33 ERROR (SyncWorker_14) [custom_components.nespresso.nespresso] 
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.
2020-08-03 23:50:38 ERROR (SyncWorker_14) [custom_components.nespresso.nespresso] Failed to get_info, 3 times
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.
2020-08-03 23:50:43 ERROR (SyncWorker_14) [pygatt.backends.gatttool.gatttool] Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.
2020-08-03 23:50:43 ERROR (SyncWorker_14) [custom_components.nespresso.nespresso] 
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.
2020-08-03 23:50:48 ERROR (SyncWorker_14) [custom_components.nespresso.nespresso] Failed to get_info, 3 times
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.
2020-08-03 23:50:54 ERROR (SyncWorker_14) [pygatt.backends.gatttool.gatttool] Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.
2020-08-03 23:50:54 ERROR (SyncWorker_14) [custom_components.nespresso.nespresso] 
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.
2020-08-03 23:50:59 ERROR (SyncWorker_14) [custom_components.nespresso.nespresso] Failed to get_info, more than 3 times
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 179, in get_info
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.
2020-08-03 23:51:04 ERROR (SyncWorker_14) [pygatt.backends.gatttool.gatttool] Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.
2020-08-03 23:51:04 ERROR (SyncWorker_14) [custom_components.nespresso.nespresso] Failed to discover sensors
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 415, in connect
    self.sendline(cmd)
  File "/usr/lib/python3.7/contextlib.py", line 119, in __exit__
    next(self.gen)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 191, in event
    self.wait(event, timeout)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 157, in wait
    raise NotificationTimeout()
pygatt.exceptions.NotificationTimeout: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/nespresso/nespresso.py", line 205, in get_sensors
    dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
  File "/srv/homeassistant/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py", line 421, in connect
    raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to ec:d7:50:55:f6:a0 after 5.0 seconds.

if you know anything I can do, that would be great, thanks.

marcandre83 commented 4 years ago

It was indeed the distance, although my machine is only 3m away from my Pi, but somehow there seems to be some interference.

tikismoke commented 4 years ago

Indeed. I didn't find why but it seems clearly that either the pi or the Nespresso machine as not a good range in this case.

Tracking a device seems easy, talking and keep connection to it is not the case.

Nice to find a new user :) Do not hesitate I'm going to made my best on this one to add user need.