Nespresso Integration

Post you log. Without them we can’t help.

2020-07-23 11:33:57 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-07-23 11:34:01 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for nespresso which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-07-23 11:34:01 WARNING (MainThread) [homeassistant.components.tuya] The ‘tuya’ option is deprecated, please remove it from your configuration
2020-07-23 11:34:07 ERROR (MainThread) [tp_connected.tp_connected] Invalid encryption key request
2020-07-23 11:34:07 WARNING (MainThread) [homeassistant.components.tplink_lte] Could not connect to 192.168.1.1. Will keep trying.
2020-07-23 11:34:10 ERROR (MainThread) [homeassistant.components.ipp] Error fetching ipp data: Invalid response from API: Error occurred while communicating with IPP server.
2020-07-23 11:34:10 WARNING (MainThread) [homeassistant.config_entries] Config entry for ipp not ready yet. Retrying in 5 seconds.
2020-07-23 11:34:10 WARNING (SyncWorker_2) [androidtv.adb_manager] Couldn’t connect to 192.168.1.221:5555. OSError: Host is unreachable
2020-07-23 11:34:10 WARNING (SyncWorker_2) [homeassistant.components.androidtv.media_player] Could not connect to Android TV JVC at 192.168.1.221:5555 using Python ADB implementation with adbkey=’/config/.storage/androidtv_adbkey’
2020-07-23 11:34:10 WARNING (MainThread) [homeassistant.components.media_player] Platform androidtv not ready yet. Retrying in 30 seconds.
2020-07-23 11:34:11 ERROR (SyncWorker_0) [pygatt.backends.gatttool.gatttool] Timed out connecting to DD:A0:A5:A5:C8:82 after 5.0 seconds.
2020-07-23 11:34:11 ERROR (SyncWorker_0) [custom_components.nespresso.nespresso]
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py”, line 415, in connect
self.sendline(cmd)
File “/usr/local/lib/python3.7/contextlib.py”, line 119, in exit
next(self.gen)
File “/usr/local/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py”, line 191, in event
self.wait(event, timeout)
File “/usr/local/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 “/config/custom_components/nespresso/nespresso.py”, line 179, in get_info
dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random)
File “/usr/local/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py”, line 421, in connect
raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to DD:A0:A5:A5:C8:82 after 5.0 seconds.
2020-07-23 11:34:12 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up soundtouch platform for media_player
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 160, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File “/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py”, line 84, in create_connection
raise err
File “/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py”, line 74, in create_connection
sock.connect(sa)
OSError: [Errno 113] Host is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 677, in urlopen
chunked=chunked,
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 392, in _make_request
conn.request(method, url, **httplib_request_kw)
File “/usr/local/lib/python3.7/http/client.py”, line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/usr/local/lib/python3.7/http/client.py”, line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “/usr/local/lib/python3.7/http/client.py”, line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/usr/local/lib/python3.7/http/client.py”, line 1026, in _send_output
self.send(msg)
File “/usr/local/lib/python3.7/http/client.py”, line 966, in send
self.connect()
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 187, in connect
conn = self._new_conn()
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 172, in _new_conn
self, “Failed to establish a new connection: %s” % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f8ed6b70890>: Failed to establish a new connection: [Errno 113] Host is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/requests/adapters.py”, line 449, in send
timeout=timeout
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 725, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File “/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py”, line 439, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=‘192.168.1.103’, port=8090): Max retries exceeded with url: /info (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f8ed6b70890>: Failed to establish a new connection: [Errno 113] Host is unreachable’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 178, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/homeassistant/homeassistant/components/soundtouch/media_player.py”, line 121, in setup_platform
bose_soundtouch_entity = SoundTouchDevice(name, remote_config)
File “/usr/src/homeassistant/homeassistant/components/soundtouch/media_player.py”, line 196, in init
self._device = soundtouch_device(config[“host”], config[“port”])
File “/usr/local/lib/python3.7/site-packages/libsoundtouch/init.py”, line 23, in soundtouch_device
s_device = SoundTouchDevice(host, port)
File “/usr/local/lib/python3.7/site-packages/libsoundtouch/device.py”, line 122, in init
self.__init_config()
File “/usr/local/lib/python3.7/site-packages/libsoundtouch/device.py”, line 137, in __init_config
“http://” + self._host + “:” + str(self._port) + “/info”)
File “/usr/local/lib/python3.7/site-packages/requests/api.py”, line 76, in get
return request(‘get’, url, params=params, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/api.py”, line 61, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 530, in request
resp = self.send(prep, **send_kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 643, in send
r = adapter.send(request, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/adapters.py”, line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host=‘192.168.1.103’, port=8090): Max retries exceeded with url: /info (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f8ed6b70890>: Failed to establish a new connection: [Errno 113] Host is unreachable’))
2020-07-23 11:34:12 ERROR (MainThread) [homeassistant.components.bluetooth_tracker.device_tracker] Error looking up Bluetooth device
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/bluetooth/bluez.py”, line 31, in discover_devices
lookup_class=lookup_class, device_id=device_id)
_bluetooth.error: (9, ‘Bad file descriptor’)

This mean hass can’t connect to the Nespresso machine.

And the end of your log means hass ble tracker didn’t work neither.

1st disable one of them. I don’t think python and hass could use your adapter with two integration at the same time.

And the Bose also try to use Bluetooth device?

Bose is by wifi, do you use any of these settings in your config file?

device_tracker:

  • platform: bluetooth_tracker
    device_id: 4
    track_new_devices: true

switch:

  • platform: switchbot
    mac: ‘00:1a:7d:da:71:10’

Translation Error: The intl string context variable “Level” was not provided to the string “Detalhes do log ({Level})”

Logger: custom_components.nespresso.nespresso
Source: custom_components/nespresso/nespresso.py:179
Integration: nespresso (documentation)
First occurred: 14:07:03 (8 occurrences)
Last logged: 14:07:43

  • Failed to get_info, 3 times
  • Failed to get_info, more than 3 times

Traceback (most recent call last): File “/usr/local/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py”, line 415, in connect self.sendline(cmd) File “/usr/local/lib/python3.7/contextlib.py”, line 119, in exit next(self.gen) File “/usr/local/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py”, line 191, in event self.wait(event, timeout) File “/usr/local/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 “/config/custom_components/nespresso/nespresso.py”, line 179, in get_info dev = self.adapter.connect(mac, address_type=pygatt.BLEAddressType.random) File “/usr/local/lib/python3.7/site-packages/pygatt/backends/gatttool/gatttool.py”, line 421, in connect raise NotConnectedError(message) pygatt.exceptions.NotConnectedError: Timed out connecting to DD:A0:A5:A5:C8:82 after 5.0 seconds.

Home Assistant foi iniciado!

Remove anything that use the Bluetooth dongle except Nespresso and Reboot (as sometime ble is not correctly release)

It didn’t work, buddy, I’m using debian with a graphical interface, do you think this can get in the way?

Do not know.
Stop ha.
Run this script after adapting it to your value.

If it do not work you got to find why.
If it work hass integration should work.

It’s the same code and mechanism but in simple python to mqtt script

after creating the script what should I do?

image

Hello, I also wanted to integrate a Nespresso Prodigio and I have finally got the auth code. I have Home Assistant but Hassio on a Raspberry 3. How could I install Bluez, by ssh? Is there a way to install Bluez on custom components?
I’m new to programming and I don’t have much idea … although my house is full of home automation devices and I love it.

Thanks in advance

Seems a way to have ssh in hassio

Did you learn more about python and do a pi3 install paho-mqtt?

Hi Tikismoke

IOS user and only have a Windowspc. I having a real hard time getting the auth key. Is there any way possible that this is by chance?
image

As says in the brew button repo:
Look for Write Request to 0x0014 (Service 06aa3a41-f22a-11e3-9daa-0002a5d5c51b), the data part is the AUTH-key

Can’t help you very much sorry

Also Windows pc only doesn’t mean you have only windows :wink: you could virtualize a linux or even a macos (old try nearly 6 years ago…)

i think i got the auth key now. Found an old android phone and installed the nespresso app.
Now i just need to find out how to get the thing to work :slight_smile:

I keep running into walls it seems…! Could really use some guidance. I got the auth code and i also checked and it seems to be working.

I rebooted the pi and checked the terminal with sudo bluetoothctl, and and some point it changed it self from Bluetooth to Prodigo&Milk .

But i cant seem to get it to work and i dont what i am doing wrong…
I get all these, please let me know if you need the logs:

Does your pi is far away from the machine?
Could you try the python mqtt script at the root of the repo?

Your log start with failed to connect. Maybe conf issue?

Now…suddently I have this problem too…maybe a firmware machine upgrade? can’t connect anymore (with the mqtt script too) from any device other than my iPhone …