Philips EP3221 Support #57
Replies: 14 comments
-
You can use the ESPHome UART debug functionality to sniff what is happening on the bus. Based on that information you can infer codes for button presses and display messages. I guess the If the commands are the same, it's probably a just a matter of re-naming things. I would recommend waiting until #35 is merged (or #7 is closed through a different PR) and using the |
Beta Was this translation helpful? Give feedback.
-
Ok, thanks, I'll check the UART debugging when I'll have receive and installed the hardware. |
Beta Was this translation helpful? Give feedback.
-
Can you generate a log only containing uart logging for the display side? id: uart_display
debug:
direction: BOTH
sequence:
- lambda: UARTDebug::log_hex(direction, bytes, ' '); From the logs it is not clear where messages are originating from.
It looks like the display has sent at least one |
Beta Was this translation helpful? Give feedback.
-
Hi, Thanks for your support! And weird, when I wanted to check this, the ESP was offline, even if coffee machine was still powered (I have been able to turn it on with the display). If the ESP crashed, is there any other way than letting the wireless debug activated to know why? For the display logs only:
But now the machine doesn't turn on again. edit : but if i click several times on the Power button, after a while it finally turns on. |
Beta Was this translation helpful? Give feedback.
-
You could enable logging via the uart ports. It would interfere with communication on the bus. Using a different set of pins (for one uart) would be required. This may be possible using software-serial (depending on your board), which I have not played around with on the EP2220. Be also aware of power related things. Power/GND supplied by the coffee machine may do wierd things to your computer. I've heard from someone breaking their USB port/pc this way. I am no expert when it comes to electronics/power-related things.
Enabling uart logging slows the ESP down a little, as there is more to do. Therefore timings may be different depending on the configuration. Disabling uart logging may improve/change things. The custom component should try to perfom the power-trip multiple times (should be visible in the logs) which is similar to turning on the power-switch multiple times. Based on your logs it looks like the display starts sending messages, indicating it's on (therefore only a single power trip was performed in this case). What's also interesting is that the mainboard is always sending Maybe the commands used for turning on the machine (EP3221) are different / the ones you're using have a different meaning. Sidenote: |
Beta Was this translation helpful? Give feedback.
-
My issue there will be the location of the coffee machine, which is 10m away from my computer 🤣
Yes i have the feeling that it induces some delay which change the behaviour. But here when I disable logging it doens't improve, it get worse 😁 (with full logging the mainboard turns on, only the display is off, while now nothing turns on)
No, no reaction at all.
Yes, I already forked it, and tried to change some configuration values (such as MAX_POWER_TRIP_COUNT) |
Beta Was this translation helpful? Give feedback.
-
In fact with only logging on the mainboard (and not on display), I have again the behaviour with mainboard turning on, and display not the first time, then turning on if I click again on the power button (and in a few cases, everything works on the first click) Logs from mainboard only, after the first click on power button, ending with mainboard on, display off (buttons not reacting):
And logs when I click again on the power button, which end by everything on and working:
|
Beta Was this translation helpful? Give feedback.
-
I'm also a little confused by this. Can use this debug configuration to retreive messages from the display when turning on the machine manually? Thus we can double check, if the messagses used in the EP3221 are the same as in the EP3243 (especially the ones used for turning on the machine). |
Beta Was this translation helpful? Give feedback.
-
Sure, here is the output (on then off, from the machine directly):
(as the machine has been turned on a short time ago, there was no cleaning cycle during startup) But I can't find neither of theses messages on the protocol.md file |
Beta Was this translation helpful? Give feedback.
-
Note that when using this way of debugging, the three bytes at the end are added. Two of them ( It looks like these messages are different from both the With these newly acquired messages you may be able to turn on the machine by using them in the component. |
Beta Was this translation helpful? Give feedback.
-
Not sure the other ones are different, as during my first test I've been able to select different kind of coffees, size, etc... And if basing on EP220 and EP3243 configuration, that third byte is the real message (0A for pre power, 02 for power with cleaning and 01 without cleaning), I guess the message was a power without cleaning. So I tried to update the commands.h file in my fork, to update these 3 messages : https://github.com/machintrucbidule/ESPHome-Philips-Smart-Coffee/blob/series-3200/components/philips_coffee_machine/commands.h
But nothing turns on
Here I don't understand what's triggering the last line "'Power': Sending state OFF" ? And if it's a matter of different messages, I don't understand neither how mainboard turns on with EP3243 default configuration when I have logging activated, or clicking several times on the button (which is no more working with updated commands of my fork) |
Beta Was this translation helpful? Give feedback.
-
I forgot to update the 2 last bits, just did it (at least for pre power on and power on without cleaning), still not starting, but now I see the command "D5 55 00 01 04 02 04 00 00 00 2F 0D" which is "power off" sent just before (or after, it depends) the pre power. It could explain the "Sending state OFF", but any idea why?
EDIT : in fact not sure "D5 55 00 01 04 02 04 00 00 00 2F 0D" if for power off.
And same message is also sent when manually turning off:
|
Beta Was this translation helpful? Give feedback.
-
This state is published, once the display stops sending updates. This is the case on the EP2220 when the display is turned off.
Maybe, the mainboard doesn't like being turned on the way this component currently handles power on (or the messages are invalid). On the EP3221 the power-on sequence could be different. You can replace this component with ssiebs MITM component to observe the communication on the bus without any interference from this component. (When using the machine manually, this component should'nt mess with any messages on the bus, so it should make no difference if you use this or the MITM component for logging) |
Beta Was this translation helpful? Give feedback.
-
Thanks, I'll check that when I'll have some time.
Is there a way to configure the delay between 2 updates sent by the display, and assuming it's off? And yesterday I tried to replace the ESP32 S2 Mini by an ESP8266 D1 mini, I still have the same behaviour, but now the device seems to stay online (it was due to a wifi/network issue I guess) |
Beta Was this translation helpful? Give feedback.
-
Hi,
As discussed in the EP3243 thread, I open a new one for 3221 support.
Indeed if both are part of the 3200 series, they have different options and code shouldn't be fully compatible.
EP3221 dashboard looks like this:
On left coffee part I have: Expresso, Expresso lungo, Coffee, Americano, Hot Water, Steam.
And on the right part: Bean, Size, Temperature, and then Aqua Clean and Clean.
I ordered hardware to build this (still waiting for it), but would you be able to tell me how to adapt the code for my machine? How to identify which command is sent when pressing a button, and what should I update in the code in order to add compatibility with my 3221 while not breaking 3243 one?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions