myhomeiot / esphome-components

A collection of my ESPHome components
Other
257 stars 25 forks source link

Delonghi Coffee Machine Example #22

Open bubez81 opened 1 year ago

bubez81 commented 1 year ago

Hi, I noticed your example for the delonghi. I compiled the code without problems adapting it to my machine and it seems to connect correctly. None of the switches seem to work though:

Screenshot 2023-02-16 alle 19 47 10

logs_cucina_logs.txt

Could it be a machine setting? Or did something change with a firmware update? Does it work without problems for you?

and thus is my configuration: `substitutions: name: "cucina" delonghi_mac: !secret delonghi_mac delonghi_name_prefix: Coffee Machine delonghi_id_prefix: coffee_machine delonghi_service_uuid: 00035b03-58e6-07dd-021a-08123a000300 delonghi_characteristic_uuid: 00035b03-58e6-07dd-021a-08123a000301 delonghi_update_interval: '5000'

packages: esphome.bluetooth-proxy: github://esphome/bluetooth-proxies/esp32-generic.yaml@main

globals:

wifi: ssid: !secret wifi_ssid password: !secret wifi_password

esphome: name: ${name} name_add_mac_suffix: false on_loop: then:

mqtt: topic_prefix: dinamica discovery: false broker: 192.168.1.2 port: 1883 username: michele password: hd0806681

ble_client:

binary_sensor:

sensor:

switch:

myhomeiot commented 1 year ago

Hello, it's doesn't work with latest versions of ESPHome, something was changed with ble_client text_sensor. Last working version of ESPHome was 2022.11.5. If you know how to compile it in ESPHome 2022.11.5, you can try.

You can check if it's communicate with machine if in the log you see >>> requests and <<< replies. Sometimes machine BT is stuck, you can try to fully power off machine (unplug the cable) and power on it again. BT module of machine working even it's powered off. If communication is OK, you should also see BT sign on the screen of machine sure if it's exists.

Update: After I back to 2022.11.5 it's start working, then I update again to 2023.2.2 it's keep working, so probably the problem was with machine itself and complete powering off/on helps.

[13:13:25][D][coffee_machine:048]: >>> 0D.05.75.0F.DA.25 (6)
[13:13:25][D][text_sensor:067]: 'text_sensor_coffee_machine': Sending state '\xd0'
[13:13:25][D][coffee_machine:162]: D0
[13:13:25][D][text_sensor:067]: 'text_sensor_coffee_machine': Sending state 'u'
[13:13:25][D][coffee_machine:162]: 12.75.0F
[13:13:25][D][text_sensor:067]: 'text_sensor_coffee_machine': Sending state ''
[13:13:25][D][coffee_machine:162]: 01.01.00.00.00.00 (6)
[13:13:25][D][text_sensor:067]: 'text_sensor_coffee_machine': Sending state ''
[13:13:25][D][coffee_machine:162]: 02.00.00.00.00.00 (6)
[13:13:25][D][text_sensor:067]: 'text_sensor_coffee_machine': Sending state ''
[13:13:25][D][coffee_machine:162]: 00.37.4E
[13:13:25][D][coffee_machine:171]: <<< D0.12.75.0F.01.01.00.00.00.00.02.00.00.00.00.00.00.37.4E (19)
bubez81 commented 1 year ago

Hello! Yes I can see the BT sign on the screen...let's try to downgrade and see

bubez81 commented 1 year ago

nothing, not even changing the version seems to work:

Screenshot 2023-02-17 alle 17 29 35

I also unplugged the power but nothing to do not even with the plugin in hacs for homeassistant it works even if it used to work

It's like something has changed lately....

myhomeiot commented 1 year ago

Which model of Delonghi do you have? Can you try to turn off machine and turn it on using switch?

bubez81 commented 1 year ago

The Dinamica Plus Sure..:

Screenshot 2023-02-17 alle 19 01 24

I used the hacs plugin for a while https://github.com/Arbuzov/home_assistant_delonghi_primadonna it worked for months then suddenly stopped working and that's why i tried this system

myhomeiot commented 1 year ago

This HACS plugin works same way, so probably something was changed in machine side :(

bubez81 commented 1 year ago

Yes, I think so too, I was hoping it was something common to all models but I'm starting to think it's only on my model

bubez81 commented 1 year ago

the very strange thing is that with this https://github.com/mmastrac/longshot the machine works...can't understand

bubez81 commented 1 year ago

ok i think i understand the problem. The machine doesn't accept more than one command simultaneously so if I monitor the status I can't launch the command to make a coffee so I can't connect to the machine continuously but only when I start the command