Nespresso Integration

Just update this. Let me know if it didn’t work

Hi. Thanks for the update. I replaced the manifest file with the new one but upon reboot HA is still reporting an error. It is reading the new version attribute now, but still says it’s invalid so the integration is still being blocked:

ERROR (SyncWorker_1) [homeassistant.loader] The custom integration ‘nespresso’ does not have a valid version key ([‘1.0.1’]) in the manifest file and was blocked from loading. See https://developers.home-assistant.io/blog/2021/01/29/custom-integration-changes#versions for more details

Thanks.

I removed the bracket on the version key.
Could you have a look?

Hi, yes I discovered myself the bracket was the issue so I removed it. So that’s now OK. But I have run into another problem and it might be similar to some of the other peoples problems. I don’t seem to be able to connect to the nespresso and it keeps timing out. Using bluetoothctl I can see the nespresso MAC from HA with a pretty good signal strength. But the connection keeps timing out in the HA logs:

2021-06-04 15:52:43 ERROR (SyncWorker_6) [pygatt.backends.gatttool.gatttool] Timed out connecting to 10:98:c3:f5:8c:6f after 5.0 seconds.
2021-06-04 15:52:43 ERROR (SyncWorker_6) [custom_components.nespresso.nespresso]
Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/pygatt/backends/gatttool/gatttool.py”, line 415, in connect
self.sendline(cmd)
File “/usr/local/lib/python3.8/contextlib.py”, line 120, in exit
next(self.gen)
File “/usr/local/lib/python3.8/site-packages/pygatt/backends/gatttool/gatttool.py”, line 191, in event
self.wait(event, timeout)
File “/usr/local/lib/python3.8/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.8/site-packages/pygatt/backends/gatttool/gatttool.py”, line 421, in connect
raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to 10:98:c3:f5:8c:6f after 5.0 seconds.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/pygatt/backends/gatttool/gatttool.py”, line 415, in connect
self.sendline(cmd)
File “/usr/local/lib/python3.8/contextlib.py”, line 120, in exit
next(self.gen)
File “/usr/local/lib/python3.8/site-packages/pygatt/backends/gatttool/gatttool.py”, line 191, in event
self.wait(event, timeout)
File “/usr/local/lib/python3.8/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.8/site-packages/pygatt/backends/gatttool/gatttool.py”, line 421, in connect
raise NotConnectedError(message)
pygatt.exceptions.NotConnectedError: Timed out connecting to 10:98:c3:f5:8c:6f after 5.0 seconds.

I have the MAC and auth code correct, and from my phone I can connect to it using the brew button page, and I get the following:

brewbutton

So that looks good. I am using a different model of nespresso (the essenza plus). But I expect it should probably also work, and should definitely be able to connect at least.

Thanks.

Really it’s always the same issue.
All apps or test method works and when using pygatt it gets connection issue due to distance.

I did not get the knowledge to made this integration Works Ithout

As other people here, i faced the connection time out error with the pygatt integration.

As a more reliable alternative, i found out a homebridge plug-in called homebridge-brewer. So far i have not faced any connection issues.

Homebridge-brewer

It looks like it’s using a different bluetooth library to do the job.

In order to use it, you also need homebridge installed.

For hassio, i followed this guide :

https://community.home-assistant.io/t/tutorial-add-homebridge-to-hass-io-using-portainer/140423

I’ll have a look to see Bluetooth lib diff and if possible will try to solve pygatt range issue.

Thanks for the tips

Any news on this? For the time being, I gave up using your component because I could never connect, as many people have mentioned in this post.

Thanks in advance.

You can use homebridge-brewer as suggest by MomoB just up.

Or you could check the original post and help instead of just say I can’t connect.

Time is something no one can buy, help is something you can share, knowledge also.
So don’t hesitate open the file and find what’s wrong in the code.

Sorry if it meant like putting pressure, but it was just a basic question that you could’ve simply answered ‘No, not yet’ or something similar. I think the work you have put into this component is valuable, it just doesn’t work for me. My bad anyway.

Honestly speaking, I think it’s not worth the hassle, for instance to install Homebridge for this. I think my Prodigio machine will "die’ before that…

Thanks again.

Sorry also for that bad reaction, it’s difficult period for me.

Once I find time I’ll have a look closer

1 Like

No worries, I understand the reaction, there may be cases where being the author of some component may make other people think you are responsible for it, while you may just be sharing with the community your awesome work, no strings attached.

All the best, man.

1 Like

Looks like with the latest homesssistant changes this has become possible

As I do no more have a Nespresso machine I won’t be able to test anything. If someone want to make test and PR on the GitHub you’re all welcome.

Just be sure to make test :+1:

Has anyone tried this with the ESP32 BLE proxy active connection that has just been lauched?

Hey, I have tried this method but seems that nothing has been grepped.
This is the packet been catched from the packet logger that (looking at value of the second one 0305 0704 for the short coffee) seems to be related to the communication between the iPhone and the machine.

Did something changed in this years? I have uploaded the pklg file here:

Hi bubez i can TRy to lunch:
hexdump -v -e ‘/1 "%02X "’ ilmiofile.pklg | grep -o ‘0B 00 04 00 12 14 00 <… … … … … … … …>’
but terminal say:
hexdump: “‘/1”: bad format

Hi, I’ve installed this integration through HACS. My HA version is 2023.5.3 and HACS version is 1.32.1, nespresso-ble version is 0.0.1. After I install and restart HA, I still can’t get HA to recognize Nespresso integration.

Hello Everyone, it seems on the newer espresso with wifi the command is slightly different.

I went into wireshark, looked for a length of 20. I found that you need to replace the 14 with a 30.

try " hexdump -v -e ‘/1 "%02X "’ /mnt/user/media/btsnoop_hci.log | grep -o '0B 00 04 00 12 30 00 <… … … … … … .

. …>’

1 Like

Seems like since this PR Detect attempt to setup config entry integration via YAML by emontnemery · Pull Request #93589 · home-assistant/core · GitHub was merged it is no longer allowed to add configuration through a YAML and it should use a config flow.

It is also documented here: Integration Configuration via YAML | Home Assistant Developer Docs

So, now the integration shows this error message and does no longuer work:

The nespresso integration does not support YAML configuration
The nespresso integration does not support configuration via YAML file. You may not notice any obvious issues with the integration, but any configuration settings defined in YAML are not actually applied.

Or probably I have not understood the documentation, but then I do not understand why I am getting that error.