TillFleisch / ESPHome-Philips-Smart-Coffee

ESPHome components which implement a Philips Series 2200/3200 Coffee Machine into HomeAssistant. Capable of brewing automatic coffee.
Other
167 stars 27 forks source link

Idle state not detected on some machines #41

Closed davidepanato closed 7 months ago

davidepanato commented 8 months ago

Ciao Till, thanks for your good job, after latest changes I was also able to power on my coffe machine (previously this was not working but it has been fixed by message repetition). I'm now moving forward with integrating all functionalities and I think that my machine 2220 has some difference in the protocol from yours since coffee beans and coffee size are not detected. Also when powering on I see the state moving from off to cleaning but never to ready. Is there an easy way to print the messages shared between motherboard and display to try to debug the protocol? I have tried uart debugging but it prints tons of messages.

Another strange behavior is also happening sometimes, when powering on I hear ad duplicated "BIP" and display remains stuck with aqua clean icon blinking.

Thanks for your support Davide

TillFleisch commented 8 months ago

Is there an easy way to print the messages shared between motherboard and display to try to debug the protocol? I have tried uart debugging but it prints tons of messages.

Aside from the UART debug functionality, you may use this extended uart debug configuration. Note that the last 3 bytes are added (2 00 bytes as padding and the last one indicating how often a message has been seen). Furthermore, this may remove some important messages due to heavy filtering.

Another strange behavior is also happening sometimes, when powering on I hear ad duplicated "BIP" and display remains stuck with aqua clean icon blinking.

This sounds strange, I have not experienced this yet. It may be a side effect from using different/invalid commands.

since coffee beans and coffee size are not detected

How does this show during usage? Are the number components unavailable? Does a button with bean/size action work?

I go my machine during summer 2022. The label on the inside shows the following: DAP NL9206AD - 4a Drachten Type: EP2220 230V/50Hz/1500W S/Nr: TWxxxxxxxxxxxx [redacted] EP2220/10 882871110010

How does this differ from your machine, so that we can figure out when the change in protocol occured (if this is the case)?

davidepanato commented 8 months ago

Hello Tiil, I still need to setup everything to collect the uart logs, as soon as I'll do I'll share the result. I checked in the meantime my machine label (bought on summer 2023) and all values are aligned with yours.

Davide

mikulik86 commented 7 months ago

Just FYI, I had to change the 7th byte in the Status sensor for Idle state to be recognized on my EP2224/40.

From: https://github.com/TillFleisch/ESPHome-Philips-Smart-Coffee/blob/866fb171cdeea1e0dfbdf0aad2cdfc57f3bc1bf7/components/philips_coffee_machine/text_sensor/status_sensor.cpp#L46

To: if (data[3] == led_on && data[4] == led_on && data[5] == led_on && data[6] == led_third)


Btw @TillFleisch could you explain what exactly do you mean by led_second and led_third?

https://github.com/TillFleisch/ESPHome-Philips-Smart-Coffee/blob/866fb171cdeea1e0dfbdf0aad2cdfc57f3bc1bf7/components/philips_coffee_machine/commands.h#L17-L18

TillFleisch commented 7 months ago

Those values were recovered by observing the bus, they represent different states which the leds can take. You can find more information here: protocol.md

mikulik86 commented 7 months ago

OK, so you mean second/third STATE of a led. Got it.

isocron commented 7 months ago

Hi there.

I have an EP2220, DAP NL9206AB-4a Drachten, EP2220/10 882871110010. MAIN 421945017972 UI 421945055571 from Spring 2023. I have the same error that the status gets stuck at cleaning and brewing. That is, it does not detect Idle. Tried the fix from mikulik86 and now the status changes to Idle, as intended.

TillFleisch commented 7 months ago

Sounds like a difference in display units (i.e. different version). I will try data[6] != led_off when I get home, which should work on both machines/versions, to see if this change has any unwanted side-effects.