Nespresso Integration

I have a different mqtt broker but it doesn’t matter if ha has access to it.

In sensors.yaml:
‘’’

  • platform: mqtt
    state_topic: “/nespresso/caps_count”
    name: nespresso_caps_count
    unit_of_measurement: “caps”

  • platform: mqtt
    state_topic: “/nespresso/descaling_counter”
    name: nespresso_descaling_counter

  • platform: mqtt
    state_topic: “/nespresso/water_hardness”
    name: nespresso_water_hardness
    ‘’’

And in binary sensor

‘’’

  • platform: mqtt
    state_topic: “/nespresso/state/water_empty”
    name: nespresso_water_empty
    payload_on: “1”
    payload_off: “0”

  • platform: mqtt
    state_topic: “/nespresso/state/descaled_needed”
    name: nespresso_descaled_needed
    payload_on: “1”
    payload_off: “0”

  • platform: mqtt
    state_topic: “/nespresso/state/capsule_mechanism_jammed”
    name: nespresso_capsule_mechanism_jammed
    payload_on: “1”
    payload_off: “0”
    device_class: lock

  • platform: mqtt
    state_topic: “/nespresso/state/water_temp_low”
    name: nespresso_water_temp_low
    payload_on: “1”
    payload_off: “0”

  • platform: mqtt
    state_topic: “/nespresso/state/awake”
    name: nespresso_awake
    payload_on: “1”
    payload_off: “0”

  • platform: mqtt
    state_topic: “/nespresso/state/water_engadged”
    name: nespresso_water_engadged
    payload_on: “1”
    payload_off: “0”
    device_class: lock

  • platform: mqtt
    state_topic: “/nespresso/state/sleeping”
    name: nespresso_sleeping
    payload_on: “1”
    payload_off: “0”

  • platform: mqtt
    state_topic: “/nespresso/state/tray_sensor_during_brewing”
    name: nespresso_tray_sensor_during_brewing
    payload_on: “1”
    payload_off: “0”
    device_class: lock

  • platform: mqtt
    state_topic: “/nespresso/state/tray_open_tray_sensor_full”
    name: nespresso_tray_open_tray_sensor_full
    payload_on: “1”
    payload_off: “0”

  • platform: mqtt
    state_topic: “/nespresso/state/capsule_engaged”
    name: nespresso_capsule_engaged
    payload_on: “1”
    payload_off: “0”
    device_class: lock

  • platform: mqtt
    state_topic: “/nespresso/slider”
    name: nespresso_slider
    payload_on: “Open”
    payload_off: “Closed”
    device_class: lock

‘’’

No I own a prodigio and milk and the d80 seems to use same function. Do not now others device with nespresso ble

I discover also NESPRESSO vertuo next premium c black is WIFI/Bluetooth able…we can work also on this model!

If someone as one it need to best tested and reverse engine first.
Wifi setup will certainly work differently.

Which problem there is today to control PRODIGIO?

None, but for the new models with wifi I don’t how it works at all.

Hello. I have tried to get this installed and running today on HAOS and I think it’s mostly ready but I’ve run into a different issue that I expect others will also encounter. It’s with the latest version of HA (2021.6) that I installed just yesterday. Its requiring a version key to be included in custom integrations, otherwise they will not work. This is preventing the nespresso sensor from working for me. See below in my error logs

ERROR (SyncWorker_1) [homeassistant.loader] The custom integration ‘nespresso’ does not have a valid version key (None) 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

ERROR (MainThread) [homeassistant.config] Platform error: sensor - Integration ‘nespresso’ not found.

And you’ll see under that link on the HA website it says:

The version key is required from Home Assistant version 2021.6

So I think a little update is needed for this nespresso integration in order for it to now work with the latest HA version.

Indeed I need to update all my integration to add those version and get not time for this right now.

I’ll do my best asp :neutral_face:

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