I’m not a programmer and I don’t know esphome well, I use mostly ready-made options. But since I really want to integrate my coffee machine into the Home Assistant, I put all my efforts to what I can. Now I decided to switch to byte search and found the following. I checked and it works. But I can’t find the commands to control. Later I will describe how I found these bytes. If someone undertakes to write code, I will be only glad
And also took aim at these bytes. I think it reflects what kind of drink we are preparing. In order for me to understand this, I will prepare different drinks and compare
Here is my code for ESPHome
substitutions:
board_name: ESP32 Smart Coffee Philips
node_name: esp32-smart-coffee-philips
esphome:
name: ${node_name}
friendly_name: esp32-smart-coffee-philips
comment: ESP32 Smart Coffee Philips
esp32:
board: esp32dev
framework:
type: arduino
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
fast_connect: on
reboot_timeout: 10min
ap:
ssid: ESP SmartCoffeePhilips
password: !secret ap_esp_password
captive_portal:
web_server:
port: 80
logger:
level: DEBUG
baud_rate: 0
ota:
password: "esphome"
api:
encryption:
key: !secret api_key
external_components:
- source: github://TillFleisch/ESPHome-Philips-Smart-Coffee@main
uart:
- id: uart_mainboard
rx_pin: GPIO3
tx_pin: GPIO1
baud_rate: 115200
stop_bits: 1
data_bits: 8
parity: NONE
rx_buffer_size: 256
debug:
direction: TX
dummy_receiver: false
- id: uart_display
rx_pin: GPIO16
tx_pin: GPIO17
baud_rate: 115200
stop_bits: 1
data_bits: 8
parity: NONE
rx_buffer_size: 256
debug:
direction: TX
dummy_receiver: false
sequence:
- lambda: |-
UARTDebug::log_hex(direction, bytes, ':');
//AA:AA:AA:B0
if (bytes[0]==0xAA && bytes[3]==0xB0 && bytes[6]==0x06 && bytes[9]==0x00) {
id(idWater).publish_state("There is water");
id(idCoffeeGroundsContainer).publish_state("Inserted");
id(idMakingCoffee).publish_state("Choose a drink");
}
//AA:AA:AA:B0 "Took out the container with water"
else if (bytes[0]==0xAA && bytes[3]==0xB0 && bytes[6]==0x0E && bytes[9]==0x40) { id(idWater).publish_state("There is no water"); }
//AA:AA:AA:B0 "Removed the pallet"
else if (bytes[0]==0xAA && bytes[3]==0xB0 && bytes[6]==0x0E && bytes[9]==0x80) { id(idCoffeeGroundsContainer).publish_state("Retrieved"); }
//AA:AA:AA:B0 "The pallet and the container with water were taken out"
else if (bytes[0]==0xAA && bytes[3]==0xB0 && bytes[6]==0x0E && bytes[9]==0xC0) {
id(idWater).publish_state("There is no water");
id(idCoffeeGroundsContainer).publish_state("Retrieved");
}
//AA:AA:AA:B0 "Making coffee"
else if (bytes[0]==0xAA && bytes[3]==0xB0 && bytes[5]==0x07 && bytes[6]==0x0C && bytes[7]==0x01) { id(idMakingCoffee).publish_state("Enjoy (01)"); }
else if (bytes[0]==0xAA && bytes[3]==0xB0 && bytes[5]==0x07 && bytes[6]==0x07 && bytes[7]==0x0E) { id(idMakingCoffee).publish_state("Pause (0E)"); }
else if (bytes[0]==0xAA && bytes[3]==0xB0 && bytes[5]==0x07 && bytes[6]==0x07 && bytes[7]==0x0D) { id(idMakingCoffee).publish_state("Grinding grains (0D)"); }
else if (bytes[0]==0xAA && bytes[3]==0xB0 && bytes[5]==0x07 && bytes[6]==0x07 && bytes[7]==0x10) { id(idMakingCoffee).publish_state("Pour milk (10)"); }
else if (bytes[0]==0xAA && bytes[3]==0xB0 && bytes[5]==0x07 && bytes[6]==0x07 && bytes[7]==0x11) { id(idMakingCoffee).publish_state("Pour coffee (11)"); }
else if (bytes[0]==0xAA && bytes[3]==0xB0 && bytes[5]==0x07 && bytes[6]==0x07 && bytes[7]==0x12) { id(idMakingCoffee).publish_state("12"); }
else if (bytes[0]==0xAA && bytes[3]==0xB0 && bytes[5]==0x07 && bytes[6]==0x07 && bytes[7]==0x13) { id(idMakingCoffee).publish_state("Creating pressure for milk (13)"); }
else if (bytes[0]==0xAA && bytes[3]==0xB0 && bytes[5]==0x07 && bytes[6]==0x07 && bytes[7]==0x14) { id(idMakingCoffee).publish_state("14"); }
else if (bytes[0]==0xAA && bytes[3]==0xB0 && bytes[5]==0x07 && bytes[6]==0x07 && bytes[7]==0x15) { id(idMakingCoffee).publish_state("15"); }
//AA:AA:AA:B5 "Status 1"
if (bytes[0]==0xAA && bytes[3]==0xB5 && bytes[5]==0x06 && bytes[10]==0x00 && bytes[11]==0x00) { id(idStatusUnknown1).publish_state("00"); }
else if (bytes[0]==0xAA && bytes[3]==0xB5 && bytes[5]==0x06 && bytes[10]==0x00 && bytes[11]==0x0B) { id(idStatusUnknown1).publish_state("0B"); }
else if (bytes[0]==0xAA && bytes[3]==0xB5 && bytes[5]==0x06 && bytes[10]==0x00 && bytes[11]==0xE6) { id(idStatusUnknown1).publish_state("E6"); }
else if (bytes[0]==0xAA && bytes[3]==0xB5 && bytes[5]==0x06 && bytes[10]==0x00 && bytes[11]==0x80) { id(idStatusUnknown1).publish_state("80"); }
else if (bytes[0]==0xAA && bytes[3]==0xB5 && bytes[5]==0x06 && bytes[10]==0x00 && bytes[11]==0xCB) { id(idStatusUnknown1).publish_state("CB"); }
else if (bytes[0]==0xAA && bytes[3]==0xB5 && bytes[5]==0x06 &&& bytes[10]==0x00 & bytes[11]==0xFF) { id(idStatusUnknown1).publish_state("FF"); }
else if (bytes[0]==0xAA && bytes[3]==0xB5 && bytes[5]==0x06 && bytes[10]==0x00 && bytes[11]==0xA0) { id(idStatusUnknown1).publish_state("A0"); }
//AA:AA:AA:B5 "Status 2"
else if (bytes[0]==0xAA && bytes[3]==0xB5 && bytes[5]==0x06 && bytes[10]==0x00) { id(idStatusUnknown2).publish_state("00"); }
else if (bytes[0]==0xAA && bytes[3]==0xB5 && bytes[5]==0x06 && bytes[10]==0x01) { id(idStatusUnknown2).publish_state("01"); }
philips_series_2200:
display_uart: uart_display
mainboard_uart: uart_mainboard
power_pin: GPIO12
id: philip
text_sensor:
- platform: template
id: idWater
name: "Water"
update_interval: 10s
- platform: template
id: idCoffeeGroundsContainer
name: "Coffee Grounds Container"
update_interval: 10s
- platform: template
id: idUnknown
name: "Unknown"
update_interval: 10s
- platform: template
id: idStatusCoffee
name: "Status Coffee"
update_interval: 10s
- platform: template
id: idMakingCoffee
name: "Stages of coffee preparation"
update_interval: 10s
button:
- platform: restart
name: Restart
icon: mdi:restart
- platform: template
name: "Turn off"
on_press:
- uart.write:
id: uart_mainboard
data: [0xAA, 0xAA, 0xAA, 0xFE, 0x00, 0x00, 0xC8, 0x87, 0x1B, 0x40, 0x55] #AA:AA:AA:FE:00:00:C8:87:1B:40:55