ESP smart сoffee machine Philips 5400 Series

Created and posted logs here

Used a parallel connection for reading data only

uart:
#UART connected to the display
- rx_pin: GPIO3
  baud_rate: 115200
  id: uart_display
  stop_bits: 1
  data_bits: 8
  parity: none
  rx_buffer_size: 256
  debug:
   dummy_receiver: true


#UART connected to the mainboard	     
- rx_pin: GPIO13
  baud_rate: 115200
  id: uart_mainboard
  stop_bits: 1
  data_bits: 8
  parity: none
  rx_buffer_size: 256
  debug:
   dummy_receiver: true
1 Like

When you looked at the two lines with the scope have you seen periods when no data was sent?

You should try to define a timeout for each line to manage to automatically define message ending.

Or by defining a buffer size what you expect how big the messages should be on one line or the other.

The best would be if the timeout could be figured out to define message ends, if there is any.

If you enable log output using UARTDebug::log_int(direction, bytes, ‘:’);

uart:
- rx_pin: GPIO3
  baud_rate: 115200
  id: uart_display
  stop_bits: 1
  data_bits: 8
  parity: none
  rx_buffer_size: 256
  debug:
   dummy_receiver: true
   sequence:
    - lambda: |-
        UARTDebug::log_int(direction, bytes, ':');
Then I will see the logs in this form and this is the log of turning on the coffee machine

[01:45:57][D][uart_debug:176]: <<< 170:170:170:254:0:0:200:135:27:64:85:170:170:170:255:1:1:1:13:178:159:144:85:170:170:170:176:0:7:5:0:0:192:0:0:0:247:43:204:67:85:170:170:170:181:1:6:0:0:0:0:0:0:216:164:128:75:85:170:170:170:186:2:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:0:0:0:0:0:168:32:154:211:85:170:170:170:176:3:7:5:0:0:192:0:0:0:50:23:65:122:85:170:170:170:181:4:6:0:0:0:0:0:0:188:170:96:3:85:170:170:170:186:5:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4
[01:45:57][D][uart_debug:176]: <<< 3:6:0:0:0:0:0:0:142:91:89:11:85:170:170:170:176:6:7:5:0:0:64:0:0:0:70:228:143:221:85:170:170:170:181:7:6:0:0:0:0:0:0:95:173:239:141:85:170:170:170:186:8:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:203:111:153:174:85:170:170:170:176:9:7:5:0:0:0:0:0:0:170:115:34:153:85:170:170:170:181:10:6:0:0:0:0:0:0:142:184:234:22:85:170:170:170:186:11:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:51:130
[01:45:57][D][uart_debug:176]: <<< 206:92:85:170:170:170:255:2:1:2:238:93:208:11:85:170:170:170:176:12:7:5:0:0:0:0:0:0:229:54:181:211:85:170:170:170:181:13:6:0:0:0:0:0:0:151:177:47:28:85:170:170:170:186:14:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:122:178:71:145:85:170:170:170:176:15:7:1:0:0:0:0:0:0:51:46:119:30:85:170:170:170:181:16:6:0:0:0:0:0:0:109:149:145:251:85:170:170:170:186:17:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0
[01:45:57][D][uart_debug:176]: <<< 152:191:255:182:85:170:170:170:176:18:7:2:0:0:0:0:0:0:136:145:16:114:85:170:170:170:181:19:6:0:0:0:0:0:0:142:146:30:117:85:170:170:170:186:20:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:209:143:118:123:85:170:170:170:176:21:7:2:0:0:0:0:0:0:65:252:113:22:85:170:170:170:186:20:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:209:143:118:123:85:170:170:170:181:22:6:0:0:0:0:0:0:234:156:254:61:85:170:170:170:176:21
[01:45:57][D][uart_debug:176]: <<< 7:2:0:0:0:0:0:0:65:252:113:22:85:170:170:170:186:20:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:209:143:118:123:85:170:170:170:186:23:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:41:98:33:137:85:170:170:170:181:22:6:0:0:0:0:0:0:234:156:254:61:85:170:170:170:176:21:7:2:0:0:0:0:0:0:65:252:113:22:85:170:170:170:176:24:7:2:0:0:0:0:0:0:22:27:62:231:85:170:170:170:186:23:24:48:99:1:0:155:129:2:0
[01:45:58][D][uart_debug:176]: <<< 3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:41:98:33:137:85:170:170:170:181:22:6:0:0:0:0:0:0:234:156:254:61:85:170:170:170:181:25:6:0:0:0:0:0:0:70:142:222:228:85:170:170:170:176:24:7:2:0:0:0:0:0:0:22:27:62:231:85:170:170:170:186:23:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:41:98:33:137:85:170:170:170:186:26:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:220:127:129:17:85:170:170:170:181:25:6:0
[01:45:58][D][uart_debug:176]: <<< 0:0:0:0:0:70:142:222:228:85:170:170:170:176:24:7:2:0:0:0:0:0:0:22:27:62:231:85:170:170:170:176:27:7:2:0:0:0:0:0:0:211:39:179:222:85:170:170:170:186:26:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:220:127:129:17:85:170:170:170:181:25:6:0:0:0:0:0:0:70:142:222:228:85:170:170:170:181:28:6:0:0:0:0:0:0:34:128:62:172:85:170:170:170:176:27:7:2:0:0:0:0:0:0:211:39:179:222:85:170:170:170:186:26:24:48:99:1:0:155:129:2:0:3:0:222
[01:45:58][D][uart_debug:176]: <<< 38:232:3:1:4:3:6:0:1:0:0:0:0:220:127:129:17:85:170:170:170:186:29:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:250:4:66:201:85:170:170:170:181:28:6:0:0:0:0:0:0:34:128:62:172:85:170:170:170:176:27:7:2:0:0:0:0:0:0:211:39:179:222:85:170:170:170:176:30:7:2:0:0:0:0:0:0:156:98:36:148:85:170:170:170:186:29:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:250:4:66:201:85:170:170:170:181:28:6:0:0:0
[01:45:58][D][uart_debug:176]: <<< 128:62:172:85:170:170:170:181:31:6:0:0:0:0:0:255:76:104:179:15:85:170:170:170:255:2:1:2:238:93:208:11:85:170:170:170:176:30:7:2:0:0:0:0:0:0:250:4:66:201:85:170:170:170:186:32:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:198:242:101:116:85:170:170:170:181:31:6:0:0:0:0:0:255:76:104:179:15:85:170:170:170:176:30:7:2:0:0:0:0:0:0:156:98:36:148:85:170:170:170:176:33:7:2:0:0:0:0:0:0:159:109:172:101:85:170:170:170:186:32:24:232:3:1:4:3
[01:45:58][D][uart_debug:176]: <<< 85:170:170:170:181:31:6:0:0:0:0:0:255:76:104:179:15:85:170:170:170:181:34:6:0:0:0:0:0:0:109:193:121:60:85:170:170:170:176:33:7:2:0:0:0:0:0:0:198:242:101:116:85:170:170:170:186:35:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:62:31:50:134:85:170:170:170:181:34:6:0:0:0:0:0:0:109:193:121:60:85:170:170:170:176:33:7:2:0:0:0:0:0:0:159:109:172:101:85:170:170:170:176:36:7:2:0:0:0:0:0:0:208:40:59:47:85:170:170:170:186:222:38:232:3:1
[01:45:58][D][uart_debug:176]: <<< 50:134:85:170:170:170:181:34:6:0:0:0:0:0:0:109:193:121:60:85:170:170:170:181:37:6:0:0:0:0:0:0:116:200:188:54:85:170:170:170:176:36:7:2:0:0:155:129:2:0:3:0:222:38:232:3:1:0:0:0:0:62:31:50:134:85:170:170:170:186:38:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:181:37:6:0:0:0:0:0:0:116:200:188:54:85:170:170:170:176:36:7:2:0:0:0:0:0:0:208:40:59:47:85:170:170:170:176:39:7:2:0:0:0:0:0:0:21:20:182:22:85:170:170:170:186:38
[01:45:58][D][uart_debug:176]: <<< 119:47:187:75:85:170:170:170:181:37:6:0:0:0:0:0:0:116:200:188:54:85:170:170:170:181:40:6:0:0:0:0:0:0:165:221:185:173:85:170:170:170:176:39:7:2:0:0:0:0:0:0:21:20:182:22:85:170:170:170:186:38:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:119:47:187:75:85:170:170:170:170:170:181:40:6:0:0:0:0:0:0:165:221:185:173:85:170:170:170:176:39:7:2:0:0:0:0:0:0:21:20:182:22:85:170:170:170:176:42:7:2:0:0:0:0:0:0:66:243:249:231:85:170:170:170
[01:45:58][D][uart_debug:176]: <<< 2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:237:121:81:198:85:170:170:170:181:40:6:0:0:0:0:0:0:165:221:185:173:85:170:170:170:181:43:6:0:0:0:0:0:0:70:218:54:35:85:170:170:170:176:42:7:2:0:0:0:0:0:0:66:243:249:231:85:170:170:170:186:41:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:170:186:44:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:164:73:216:11:85:170:170:170:181:43:6:0:0:0:0:0:0:70:218:54:35:85:170:170:170:176:42
[01:45:58][D][uart_debug:176]: <<< 155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:164:73:216:11:85:170:170:170:181:43:6:0:0:0:0:0:0:70:218:54:35:85:170:170:170:181:46:6:0:0:0:0:0:0:34:212:214:107:85:170:170:170:176:45:7:2:0:0:0:0:0:0:139:158:152:131:85:170:170:170:186:44:24:48:99:1:0:155:129:2:0:3:0:222:38:170:170:170:186:47:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:92:164:143:249:85:170:170:170:181:46:6:0:0:0:0:0:0:34:212:214:107:85:170:170:170
[01:45:58][D][uart_debug:176]: <<< 176:45:7:2:0:0:0:0:0:0:139:158:152:131:85:170:170:170:176:48:7:2:0:0:0:0:0:0:173:59:23:222:85:170:170:170:186:47:24:48:99:1:0:155:129:0:1:0:0:0:0:92:164:143:249:85:170:170:170:181:46:6:0:0:0:0:0:0:34:212:214:107:85:170:170:170:181:49:6:0:0:0:0:0:252:146:73:70:122:85:170:170:170:176:48:7:2:0:0:0:0:0:0:173:59:23:222:85:170:170:170:255:2:1:2:238:93:208:11:85:170:170:170:186:47:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:170:186:50:24:48
[01:45:58][D][uart_debug:176]: <<< 85:170:170:170:181:49:6:0:0:0:0:0:252:146:73:70:122:85:170:170:170:176:48:7:2:0:0:0:0:0:0:173:59:23:222:85:170:170:170:176:51:7:2:0:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:209:226:125:203:85:170:170:170:181:49:6:0:0:0:0:0:252:146:73:70:122:85:170:170:170:181:52:6:0:0:0:0:0:0:193:249:173:134:85:170:170:170:176:51:7:2:0:0:0:0:0:0:104:7:154:231:85:170:170:170:186:50:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:170:170:170:186:53
[01:45:58][D][uart_debug:176]: <<< 190:19:85:170:170:170:181:52:6:0:0:0:0:0:0:193:249:173:134:85:170:170:170:176:51:7:2:0:0:0:0:0:0:104:7:154:231:85:170:170:170:176:54:7:2:1:0:155:129:2:0:3:0:1:0:0:0:0:247:153:190:19:85:170:170:170:181:52:6:0:0:0:0:0:0:193:249:173:134:85:170:170:170:181:55:6:0:0:0:0:0:0:34:254:34:8:85:170:170:170:176:54:7:2:0:0:0:0:0:0:39:66:13:173:85:170:170:170:186:53:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:247:153:190:19:85
[01:45:58][D][uart_debug:176]: <<< 3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:2:132:30:139:85:170:170:170:181:55:6:0:0:0:0:0:0:34:254:34:8:85:170:170:170:176:54:7:2:0:0:0:0:0:0:39:66:13:173:85:170:170:170:176:57:7:2:0:0:0:0:0:0:246:141:180:114:85:170:170:170:186:56:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:3:6:0:1:0:0:0:0:2:132:30:139:85:170:170:170:181:55:6:0:0:0:0:0:0:34:254:34:8:85:170:170:170:181:58:6:0:0:0:0:0:0:243:235:39:147:85:170:170:170:176:57:7:2:0
[01:45:58][D][uart_debug:176]: <<< 132:30:139:85:170:170:170:186:59:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:250:105:73:121:85:170:170:170:181:58:6:0:0:0:0:0:0:243:235:39:147:85:170:170:170:176:57:7:2:0:0:0:0:0:0:246:141:180:114:85:170:170:170:176:60:7:2:0:0:0:0:0:0:185:200:35:56:85:170:170:170:1:4:3:6:0:1:0:0:0:0:250:105:73:121:85:170:170:170:181:58:6:0:0:0:0:0:0:243:235:39:147:85:170:170:170:181:61:6:0:0:0:0:0:0:234:226:226:153:85:170:170:170:176:60:7
[01:45:59][D][uart_debug:176]: <<< 0:250:105:73:121:85:170:170:170:186:62:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:179:89:192:180:85:170:170:170:181:0:0:0:0:0:234:226:226:153:85:170:170:170:176:60:7:2:0:0:0:0:0:0:185:200:35:56:85:170:170:170:176:63:7:2:0:0:0:0:0:0:124:244:174:1:85:170:170:170:186:62:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:179:89:192:180:85:170:170:170:181:61:6:0:0:0:0:0:0:234:226:226:153:85:170:170:170:181:64:6:0
[01:45:59][D][uart_debug:176]: <<< 0:0:0:179:89:192:180:85:170:170:170:186:65:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:195:131:119:216:85:170:170:170:176:66:7:2:0:0:0:0:0:0:254:208:66:0:85:170:170:170:186:65:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:195:131:119:216:85:170:170:170:181:64:6:0:0:0:0:0:0:171:102:183:174:85:170:170:170:181:67:6:0:0:0:0:0:0:72:97:56:32:85:170:170:170:176:66:7:2:0:0:0:0:0:0:254:208:66:0:85:170:170
[01:45:59][D][uart_debug:176]: <<< 170:255:3:1:3:79:7:21:125:85:170:170:170:255:4:1:4:105:132:62:230:85:170:170:170:255:5:1:5:200:222:251:144:85:170:170:170:255:6:1:6:43:49:180:11:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:138:179:254:21:85:170:170:170:181:67:6:0:0:0:0:0:0:72:97:56:32:85:170:170:170:176:66:7:2:0:0:0:0:0:0:254:208:66:0:85:170:170:170:176:69:7:2:0:0:0:0:0:0:55:189:35:100:85:170:170:170:186:68:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3
[01:45:59][D][uart_debug:176]: <<< 138:179:254:21:85:170:170:170:181:67:6:0:0:0:0:0:0:72:97:56:32:85:170:170:170:181:70:6:0:0:0:0:0:0:44:111:216:104:85:170:170:170:176:69:7:6:0:1:0:0:0:0:138:179:254:21:85:170:170:170:186:71:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:114:94:169:231:85:170:170:170:181:70:6:0:0:0:0:0:0:44:111:216:104:85:170:170:170:176:69:7:2:0:0:0:0:0:0:55:189:35:100:85:170:170:170:176:72:7:8:20:0:0:0:0:0:163:69:91:169:85:170:170:170:186:71
[01:45:59][D][uart_debug:176]: <<< 0:0:114:94:169:231:85:170:170:170:181:70:6:0:0:0:0:0:0:44:111:216:104:85:170:170:170:181:73:6:0:0:0:0:0:0:128:125:248:177:85:170:170:170:176:72:7:8:20:0:0:0:0:0:163:69:91:169:85:170:170:170:186:71:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:114:94:169:231:85:170:85:170:170:170:181:73:6:0:0:0:0:0:0:128:125:248:177:85:170:170:170:176:72:7:8:20:0:0:0:0:0:163:69:91:169:85:170:170:170:176:75:7:8:20:0:0:0:0:0:102:121:214:144:85:170
[01:45:59][D][uart_debug:176]: <<< 155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:135:67:9:127:85:170:170:170:181:73:6:0:0:0:0:0:0:128:125:248:177:85:170:170:170:181:76:6:0:0:0:0:0:0:228:115:24:249:85:170:170:170:176:75:7:8:20:0:0:0:0:0:102:121:214:144:85:170:170:170:186:74:24:48:99:1:0:155:129:2:0:3:0:222:38:170:170:170:186:77:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:161:56:202:167:85:170:170:170:181:76:6:0:0:0:0:0:0:228:115:24:249:85:170:170:170
[01:45:59][D][uart_debug:176]: <<< 1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:161:56:202:167:85:170:170:170:181:76:6:0:0:0:0:0:0:228:115:24:249:85:170:170:170:181:79:6:0:0:0:0:0:0:7:116:151:119:85:170:170:170:176:78:7:8:20:0:0:0:0:0:41:60:65:218:85:170:170:170:186:77:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:161:56:202:167:85:170:170:170:186:80:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:44:126:56:149:85:170
[01:45:59][D][uart_debug:176]: <<< 170:170:181:79:6:0:0:0:0:0:0:7:116:151:119:85:170:170:170:176:78:7:8:20:0:0:0:0:0:41:60:65:218:85:170:170:170:176:81:7:8:20:0:0:0:3:6:0:1:0:0:0:0:44:126:56:149:85:170:170:170:181:79:6:0:0:0:0:0:0:7:116:151:119:85:170:170:170:181:82:6:0:0:0:0:0:0:253:80:41:144:85:170:170:170:176:81:7:8:20:0:0:0:0:0:137:177:56:169:85:170:170:170:186:80:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:44:126:56:149:85:2:0:3:0:222
[01:45:59][D][uart_debug:176]: <<< 0:0:0:253:80:41:144:85:170:170:170:176:81:7:8:20:0:0:0:0:0:137:177:56:169:85:170:170:170:176:84:7:8:20:0:0:0:0:0:198:244:175:227:85:170:170:170:181:82:6:0:0:0:0:0:0:253:80:41:144:85:170:170:170:181:85:6:0:0:0:0:0:0:228:89:236:154:85:170:170:170:176:84:7:8:20:0:0:0:0:0:198:244:175:227:85:170:170:170:186:83:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:212:147:111:103:85:170:170:170:255:6:1:6:43:49:180:11:85:170:170:170:186:86:24:48
[01:45:59][D][uart_debug:176]: <<< 157:163:230:170:85:170:170:170:181:85:6:0:0:0:0:0:0:228:89:236:154:85:170:170:170:176:84:7:8:20:0:0:0:0:0:198:244:175:227:85:170:170:170:176:87:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:157:163:230:170:85:170:170:170:181:85:6:0:0:0:0:0:0:228:89:236:154:85:170:170:170:181:88:6:0:0:0:0:0:255:184:163:235:44:85:170:170:170:176:87:7:8:20:0:0:0:0:0:3:200:34:218:85:170:170:170:186:86:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6
[01:45:59][D][uart_debug:176]: <<< 2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:7:245:12:39:85:170:170:170:181:88:6:0:0:0:0:0:255:184:163:235:44:85:170:170:170:176:87:7:8:20:0:0:0:0:0:3:200:34:218:85:170:170:170:176:90:7:8:20:0:0:0:0:0:84:47:109:43:85:170:170:170:186:89:24:48:99:1:0:155:129:2:0:3:0:222:38:232:1:4:3:6:0:1:0:0:0:0:7:245:12:39:85:170:170:170:181:88:6:0:0:0:0:0:255:184:163:235:44:85:170:170:170:181:91:6:0:0:0:0:0:0:214:75:102:143:85:170:170:170:176:90:7
[01:45:59][D][uart_debug:176]: <<< 0:7:245:12:39:85:170:170:170:186:92:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:78:197:133:234:85:170:170:170:181:0:0:0:0:0:214:75:102:143:85:170:170:170:176:90:7:8:20:0:0:0:0:0:84:47:109:43:85:170:170:170:176:93:7:8:20:0:0:0:0:0:157:66:12:79:85:170:170:170:186:232:3:1:4:3:6:0:1:0:0:0:0:78:197:133:234:85:170:170:170:181:91:6:0:0:0:0:0:0:214:75:102:143:85:170:170:170:181:94:6:0:0:0:0:0:0:178:69:134:199:85:170:170:170:176
[01:45:59][D][uart_debug:176]: <<< 0:0:0:78:197:133:234:85:170:170:170:186:95:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:182:40:210:24:85:170:170:6:0:0:0:0:0:0:178:69:134:199:85:170:170:170:176:93:7:8:20:0:0:0:0:0:157:66:12:79:85:170:170:170:176:96:7:8:20:0:0:0:0:0:24:101:114:144:85:170:170:170:186:95:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:182:40:210:24:85:170:170:170:181:94:6:0:0:0:0:0:0:178:69:134:199:85:170:170:170:181:97
[01:45:59][D][uart_debug:176]: <<< 99:4:107:155:85:170:170:170:176:96:7:8:20:0:0:0:0:0:24:101:114:144:85:170:170:170:186:95:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:181:97:6:0:0:0:0:0:0:99:4:107:155:85:170:170:170:176:96:7:8:20:0:0:0:0:0:24:101:114:144:85:170:170:170:176:99:7:8:20:0:0:0:0:0:221:89:255:169:85:170:170:170:186:98:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:138:222:245:165:85:170:170:170:181:97:6:0:0:0:0:0:0:99:4:107:155:85:170:170:170
[01:45:59][D][uart_debug:176]: <<< 181:100:6:0:0:0:0:0:0:7:10:139:211:85:170:170:170:176:99:7:8:20:0:0:0:0:0:221:89:255:169:85:170:170:170:186:98:24:48:99:1:0:155:129:2:101:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:172:165:54:125:85:170:170:170:181:100:6:0:0:0:0:0:0:7:10:139:211:85:170:170:170:176:99:7:8:20:0:0:0:0:0:221:89:255:169:85:170:170:170:176:102:7:8:20:0:0:0:0:0:146:28:104:227:85:170:170:170:186:101:24:48:99:1:0:155:129:2:0:3:0:0:0:172:165:54
[01:46:00][D][uart_debug:176]: <<< 0:0:0:7:10:139:211:85:170:170:170:181:103:6:0:0:0:0:0:0:228:13:4:93:85:170:170:170:176:102:7:8:20:0:0:0:0:0:146:28:104:227:85:170:170:232:3:1:4:3:6:0:1:0:0:0:0:89:184:150:229:85:170:170:170:181:103:6:0:0:0:0:0:0:228:13:4:93:85:170:170:170:255:6:1:6:43:49:180:11:85:170:170:170:176:102:7:8:20:0:0:0:0:0:146:28:104:227:85:170:170:170:176:105:7:8:14:0:0:0:0:25:126:90:247:250:85:170:170:170:186:104:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3
[01:46:00][D][uart_debug:176]: <<< 89:184:150:229:85:170:170:170:181:103:6:0:0:0:0:0:0:228:13:4:93:85:170:170:170:181:106:6:0:0:0:0:0:0:53:24:1:198:85:170:170:170:176:105:7:8:14:0:0:0:0:25:126:90:247:250:85:170:170:170:186:104:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:89:184:150:229:85:170:170:170:1:4:3:6:0:1:0:0:0:0:161:85:193:23:85:170:170:170:181:106:6:0:0:0:0:0:0:53:24:1:198:85:170:170:170:176:105:7:8:14:0:0:0:0:25:126:90:247:250:85:170:170:170:176:108
[01:46:00][D][uart_debug:176]: <<< 31:96:176:85:170:170:170:186:107:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:161:85:193:23:85:170:170:170:181:106:6:0:0:0:0:0:0:53:24:1:198:85:170:170:170:181:109:6:0:0:0:0:0:0:44:17:196:204:85:170:170:170:176:108:7:8:14:0:0:0:0:25:49:31:96:176:85:170:170:170:186:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:161:85:193:23:85:170:170:170:186:110:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0
[01:46:00][D][uart_debug:176]: <<< 85:170:170:170:181:109:6:0:0:0:0:0:0:44:17:196:204:85:170:170:170:176:108:7:8:14:0:0:0:0:25:49:31:96:176:85:170:170:170:176:111:7:8:14:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:232:101:72:218:85:170:170:170:181:109:6:0:0:0:0:0:0:44:17:196:204:85:170:170:170:181:112:6:0:0:0:0:0:0:214:53:122:43:85:170:170:170:176:111:7:8:14:0:0:0:0:25:244:35:237:137:85:170:170:170:186:110:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0
[01:46:00][D][uart_debug:176]: <<< 170:170:170:176:113:7:8:14:0:0:0:0:25:23:186:239:237:85:170:170:170:181:112:6:0:0:0:0:0:0:214:53:122:43:85:170:170:170:176:111:7:8:14:0:0:0:171:50:95:105:85:170:170:170:176:113:7:8:14:0:0:0:0:25:23:186:239:237:85:170:170:170:181:112:6:0:0:0:0:0:0:214:53:122:43:85:170:170:170:186:115:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:101:35:186:232:85:170:170:170:181:114:6:0:0:0:0:0:0:171:50:95:105:85:170:170:170:176:113:7:8:14:0:0:0:0
[01:46:00][D][uart_debug:176]: <<< 0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:101:35:186:232:85:170:170:170:181:114:6:0:0:0:0:0:0:171:50:95:105:85:170:170:170:181:117:6:0:0:0:0:0:0:178:59:154:99:85:170:170:170:176:116:7:8:14:0:0:0:0:25:88:255:120:167:85:170:170:170:186:115:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:44:19:51:37:85:170:170:170:181:117:6:0:0:0:0:0:0:178:59:154:99:85:170:170:170:176:116:7:8:14
[01:46:00][D][uart_debug:176]: <<< 0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:44:19:51:37:85:170:170:170:181:117:6:0:0:0:0:0:0:178:59:154:99:85:170:170:170:181:120:6:0:0:0:0:0:0:99:46:159:248:85:170:170:170:176:119:7:8:14:0:0:0:0:25:157:195:245:158:85:170:170:170:186:118:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:44:19:51:37:85:170:170:170:186:121:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:182:69:217:168:85:170:170:170:181:120:6
[01:46:00][D][uart_debug:176]: <<< 245:158:85:170:170:170:176:122:7:8:14:0:0:0:0:25:202:36:186:111:85:170:170:170:255:6:1:6:43:49:180:11:85:170:170:170:186:121:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:182:69:217:168:85:170:170:170:181:120:6:0:0:0:0:0:0:99:46:159:248:85:170:170:170:176:123:7:8:14:0:0:0:25:137:48:193:120:85:170:170:170:176:122:7:8:14:0:0:0:0:25:202:36:186:111:85:170:170:170:186:121:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0
[01:46:00][D][uart_debug:176]: <<< 176:123:7:8:14:0:0:0:0:25:137:48:193:120:85:170:170:170:176:122:7:8:14:0:0:0:0:25:202:36:186:111:85:170:170:170:186:125:24:48:99:1:0:155:129:211:77:130:85:170:170:170:181:124:6:0:0:0:0:0:0:153:32:213:124:85:170:170:170:176:123:7:8:14:0:0:0:0:25:137:48:193:120:85:170:170:170:176:126:7:8:14:0:0:0:0:25:198:117:86:50:85:170:170:170:186:125:24:48:99:1:0:155:129:2:0:3:0:222:38:232:3:1:4:3:6:0:1:0:0:0:0:104:211:77:130:85:170:170:170:181:124:6:0:0:0:0:0:0:153
[01:46:00][D][uart_debug:176]:

Here is an example of how they use bits to control the Saeco Intelia Coffee Machine

So, I got the Saleae logic analyzer and got the data when I turned on the coffee machine. the control panel was completely disconnected from the motherboard and when you press the turn on button, the coffee machine will not turn on.

Connected the logic analyzer in this way

In the analyzer settings, I chose 100M 2MHz. I connected the analyzer to the tablet and this is in order not to disable the coffee machine and desktop computer. The coffee machine does not have a galvanic isolation, which is fraught with disabling the computer connected to the outlet and the coffee machine itself, therefore, either with a laptop from the battery or on a tablet

Screenshots







Thus it comes out

  1. AA:AA:AA:FE:00:00:C8:87:1B:40:55
  2. AA:AA:AA:FF:00:01:00:AC:E8:5A:E6:55
  3. AA:AA:AA:FF:00:01:00:AC:E8:5A:E6:55
  4. AA:AA:AA:FF:00:01:00:AC:E8:5A:E6:55
  5. AA:AA:AA:FF:00:01:00:AC:E8:5A:E6:55
  6. AA:AA:AA:FF:00:01:00:AC:E8:5A:E6:55
  7. AA:AA:AA:FF:00:01:00:AC:E8:5A:E6:55
  8. AA:AA:AA:FF:00:01:00:AC:E8:5A:E6:55
  9. 00

If you look at the logs of turning on the coffee machine, then there are these bytes. The logs themselves can be found in the folder 17-05-2023. Watch here

I tried to send commands to turn on, but the coffee machine does not turn on. How to correctly understand which command should be sent to enable?

button:
  - platform: template
    name: "Button 1"
    on_press:
      - uart.write:
          id: uart_mainboard
          data: [0xAA, 0xAA, 0xAA, 0xFE, 0x00, 0x00, 0xC8, 0x87, 0x1B, 0x40, 0x55] 


  - platform: template
    name: "Button 2"
    on_press:
      - uart.write:
          id: uart_mainboard
          data: [0xAA, 0xAA, 0xAA, 0xFF, 0x00, 0x01, 0x00, 0xAC, 0xE8, 0x5A, 0xE6, 0x55] 


  - platform: template
    name: "Button 3"
    on_press:
      - uart.write:
          id: uart_mainboard
          data: [0x00]


  - platform: template
    name: "Button 4"
    on_press:
      - uart.write:
          id: uart_display
          data: [0xAA, 0xAA, 0xAA, 0xFE, 0x00, 0x00, 0xC8, 0x87, 0x1B, 0x40, 0x55, 0xAA, 0xAA, 0xAA, 0xFF, 0x00, 0x01, 0x00, 0xAC, 0xE8, 0x5A, 0xE6, 0x55, 0xAA, 0xAA, 0xAA, 0xFF, 0x00, 0x01, 0x00, 0xAC, 0xE8, 0x5A, 0xE6, 0x55, 0xAA, 0xAA, 0xAA, 0xFF, 0x00, 0x01, 0x00, 0xAC, 0xE8, 0x5A, 0xE6, 0x55, 0xAA, 0xAA, 0xAA, 0xFF, 0x00, 0x01, 0x00, 0xAC, 0xE8, 0x5A, 0xE6, 0x55, 0xAA, 0xAA, 0xAA, 0xFF, 0x00, 0x01, 0x00, 0xAC, 0xE8, 0x5A, 0xE6, 0x55, 0xAA, 0xAA, 0xAA, 0xFF, 0x00, 0x01, 0x00, 0xAC, 0xE8, 0x5A, 0xE6, 0x55, 0xAA, 0xAA, 0xAA, 0xFF, 0x00, 0x01, 0x00, 0xAC, 0xE8, 0x5A, 0xE6, 0x55, 0x00] 

1 Like

You should connect the other line from mainboard to display as well. You should just listen both at the same time, then you would see how the messages are going back and forth.

That logic analyser has 8 channel, so you could connect the other line as well. But I haven’t seen how you wired it, but you should be able to tap in at the connectors.

Also you would get a clear view how is the timing as well for your project to split the messages correctly.

Is that a saved session in the Pulse View folder?

I connected two channels for reading from the motherboard and from the screen. A lot of garbage is pouring in and it is not clear which team is responsible for turning on this or that button. I see exactly the same data in text logs. I have uploaded more files to the Pulse View folder. You can open them through all files. So far, I have nothing to cling to, except for turning on the coffee machine and then it does not turn on when I send bytes.

For example, I pressed the Espresso button and darker areas went. I highlighted with a green line that it started when I pressed the “Espresso” button

These are the dark areas, it was I who pressed the Espresso button and until I exited the mode, the dark areas remained until I pressed exit and so I did 5 times. I pressed the “Espresso” button, then the “Exit” button, again the “Espresso” button and again the “Exit” button

There are two channels in the latest files for Pulse View, which are in the folder 18-05-2023. To see them, you need to turn on show two channels

Interestingly, if you break the connection between the screen and the motherboard, the screen does not turn on. The logic analyzer can only read the power button, and the other buttons do not transmit a signal. Apparently, a response signal should come from the motherboard to the control panel and only then the control panel turns on and the control works. It is quite possible that the control panel is the control center that sends recipes for making coffee, and the motherboard, as a performer, accepts the package and begins to prepare coffee according to the recipe.

By connecting the logic analyzer in parallel according to this scheme, I was able to see the data from the screen and from the motherboard

Example of turning on a coffee machine




Display, canonical.txt
Display, plain.txt
Display, with offset.txt
Motherboard, canonical.txt
Motherboard, plain.txt
Motherboard, with offset.txt

As I noticed later that when the uart_mitm component is running, the coffee machine turns off after 20-22 minutes, which forced me to abandon the uart_mitm component and given the knowledge that dummy_receiver: false should be turned off in the uart_mitm component, then I decided to try it in your component and it worked, the coffee machine now turns on and does not turn off during the entire waiting time. I specified 180 minutes. Here is my code using your component.

logger:
  level: DEBUG
  baud_rate: 0

external_components:
  - source: github://TillFleisch/ESPHome-Philips-Smart-Coffee@main


uart:
# UART connected to the display
 - 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: BOTH
     dummy_receiver: false

# UART connected to the mainboard
 - 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: BOTH
     dummy_receiver: false


philips_series_2200:
  display_uart: uart_display
  mainboard_uart: uart_mainboard
  power_pin: GPIO12
  id: philip

I also learned by experience that if we cut the ESP into the coffee machine, then any deviation in these parameters leads to the fact that the coffee machine does not turn on at all, not to mention the control. These parameters are standard and are used by default in the ESPHome settings and you can omit them

   baud_rate: 115200
   stop_bits: 1
   data_bits: 8
   parity: NONE

The data indicates that the activation is answered by the command either AA AA AA FE 00 00 C8 87 1B 40, or 55 AA AA AA FF 00 01 00 AC E8 5A E6, or AA AA AA FE 00 00 C8 87 1B 40 55 AA AA AA FF 00 01 00 AC E8 5A E6, but none of the commands work. I had doubts that the ESPHome does not send a signal, but after checking with a logical analyzer (connection diagram below), the question disappeared. ESPHome sends a signal and the logical analyzer caught the bytes and the bytes were transmitted correctly. I’m missing something and I can’t figure out what, and I don’t see any other options. I really need help. Thank you.

  1. The coffee machine with this command AA AA AA FE 00 00 C8 87 1B 40 does not turn on
button:
  - platform: template
    name: "Button 1"
    on_press:
      - uart.write:
          id: uart_mainboard
          data: [0xAA, 0xAA, 0xAA, 0xFE, 0x00, 0x00, 0xC8, 0x87, 0x1B, 0x40, 0x55]
  1. The coffee machine with this command 55 AA AA AA FF 00 01 00 AC E8 5A E6 does not turn on
button:
  - platform: template
    name: "Button 2"
    on_press:
      - uart.write:
          id: uart_mainboard
          data: [0xAA, 0xAA, 0xAA, 0x93, 0x00, 0x01, 0x01, 0x81, 0x90, 0xAD, 0xE0, 0x55]
  1. The coffee machine with this command AA AA AA FE 00 00 C8 87 1B 40 55 AA AA AA FF 00 01 00 AC E8 5A E6 does not turn on
button:
  - platform: template
    name: "Button 3"
    on_press:
      - uart.write:
          id: uart_mainboard
          data: [0xAA, 0xAA, 0xAA, 0xFE, 0x00, 0x00, 0xC8, 0x87, 0x1B, 0x40, 0x55, 0xAA, 0xAA, 0xAA, 0xFF, 0x00, 0x01, 0x00, 0xAC, 0xE8, 0x5A, 0xE6, 0x55]

I upload all the files here, schemas, logs from esphome, records from the logic analyzer, decoded files

I’m happy. Finally, I managed to find the first command :partying_face:, which turns off the coffee machine.

button:
  - platform: template
    name: "Turn off"
    on_press:
      - uart.write:
          id: uart_mainboard
          data: [0xAA, 0xAA, 0xAA, 0xFE, 0x00, 0x00, 0xC8, 0x87, 0x1B, 0x40, 0x55]
2 Likes

Hi, looks interesting… If you decode the commands, that would probably mean we can have any latte go series(2000, 3000) behave as the 5400…?

As I understand it, Philips 1000/2000/3000 and 5000 series coffee machines have the same motherboard. I learned this from various people, and there is also service documentation for 1200/2200/3200. I assume that the 4000 series is exactly the same as the 5000 series. The difference between the 1000/2000/3000 and 4000/5000 series is in the control panel and in the code. If the 1000/2000/3000 series coffee machines have bytes starting with D5 55, then the 5000 series has a different header, it starts with AA AA AA, and 55 is the stop bit. I was also able to start turning on the coffee machine, but the screen does not turn on and apparently I can’t do without a transistor. I will solder the BS170 transistor one of these days and see how it turns out. I would really like it to work. If after I solder the transistor and after that the screen turns on, then the logic of turning on the screen is exactly the same as for the 1000/2000/3000 series.

Looking at your Sigrok images, probably turning on requires some communication both direction.

First of all I would have the logic analyser connected to see all the communication when testing commands.

I would start with the first command, what the display sends. Wait to see what happens then. Probably the mainboard replies, and to that reply the display have to send something again to confirm that start up procedure. Then again I would look forward if the 3rd exchange is required or not.

It might be not that much simple as you assume, as the display seems to be doing far more than a normal button setup device.

Many cases when trying to add a second controller it is important to do a Men-In-The-Middle, because the communication requires confirmation as well. Or to understand what is the state when the machine operated locally.

Also, I would look at the other lines as well, maybe powering on uses one of the other ones also. (Quite unlikely but who knows, maybe it just goes high or low as trigger.)

Connected the BS170 transistor. About the scheme in a little more detail will be below.


The output voltage is +5V, so it should be

I added a switch to control the transistor, which, in theory, should interrupt the power supply to the screen and feed it again. When we do this, we see from the logs that the coffee machine is trying to start, but this does not happen. The coffee machine does not turn on and the screen does not turn on either.

switch:
  - platform: gpio
    pin: GPIO14
    name: Display
    internal: False #Скрыть - true \показать - false
    id: id_switch_display
    restore_mode: ALWAYS_ON
    on_turn_off:
    - delay: 500ms
    - switch.turn_on: id_switch_display

I created a button to turn on the coffee machine, through which commands are sent every 18.536000000ms, and then a command is sent to restart the display. The coffee machine does not turn on because there is no answer about the motherboard

I made a lot of different combinations for the test. Here is an example of two commands

Option 1

  - platform: template
    name: "Turn on 1"
    on_press:
      - uart.write:
          id: uart_mainboard
          data: [0xAA, 0xAA, 0xAA, 0xFE, 0x00, 0x00, 0xC8, 0x87, 0x1B, 0x40, 0x55, 0xAA, 0xAA, 0xAA, 0xFF, 0x00, 0x01, 0x00, 0xAC, 0xE8, 0x5A, 0xE6, 0x55]
      - delay: !lambda "18.536 ms;"
      - uart.write:
          id: uart_mainboard
          data: [0xAA, 0xAA, 0xAA, 0x93, 0x00, 0x01, 0x01, 0x81, 0x90, 0xAD, 0xE0, 0x55]
      - delay: !lambda "18.536;"
      - switch.turn_off: id_switch_display

Option 2

  - platform: template
    name: "Turn on 2"
    on_press:
      - uart.write:
          id: uart_mainboard
          data: [0xAA, 0xAA, 0xAA, 0xFE, 0x00, 0x00, 0xC8, 0x87, 0x1B, 0x40, 0x55]
      - delay: !lambda "return 18.536;"
      - switch.turn_off: id_switch_display

Where did I get the delay of 18.536 ms? When I was taking data through a logic analyzer and viewing data through the Pulse View program, I decided to measure the time between sending a command from the screen and receiving a response from the motherboard, and this time was 18.536000000 ms

When we press the touch button on the coffee machine, I see the following data

The command being sent is AA:AA:AA:FE:00:00:C8:87:1B:40:55:AA:AA:AA:FF:00:01:00:AC:E8:5A:E6:55

Answer AA:AA:AA:FE:00:00:C8:87:1B:40:55 from the motherboard after 18.536000000 ms and after that the coffee machine turns on

This is the data from the logs when the coffee machine is turned on from the touch button and I highlighted in red where the screen sends a command and receives a response from the motherboard, and in blue, after a successful greeting, the coffee machine turns on

I tried to repeat this case, but it turns out unsuccessfully, the coffee machine does not turn on, because it does not respond. When sending a command from ESPHome AA:AA:AA:FE:00:00:C8:87:1B:40:55:AA:AA:AA:FF:00:01:00:AC:E8:5A:E6:55, then there is no response from the motherboard

Now about the scheme itself. Where did this data come from?

In the header, I posted a link to the motherboard diagram and I decided to study it and based on this diagram, I redid the wiring pinout scheme.

I decided to check the 4 wire that WakeUP, assuming that he could somehow turn on the coffee machine and decided to measure the signals through an oscilloscope and a logic analyzer, and that’s what I saw.

Voltage up to 200mv is supplied only when the coffee machine is turned on, and when the coffee machine is turned off, there is no voltage

Measurement through an oscilloscope

I managed to fix a signal where the voltage is applied up to 200 mv
















Measurement of data through a logic analyzer

As you can see, there is no data, there are only 0, which means that only voltage up to 200mv is supplied via 4 wires



In general, I can’t figure out how to make the coffee machine turn on. I will be glad if you offer options on how to do this.

1 Like

According to my observations from all logs, when we turn on the coffee machine with the touch button, it looks like this

The control panel sends the command

»»» AA:AA:AA:FE:00:00:C8:87:1B:40:55:AA:AA:AA:FF:00:01:00:AC:E8:5A:E6:55

next, the motherboard should answer us as well

««« AA:AA:AA:FE:00:00:C8:87:1B:40:55:AA:AA:AA:FF:00:01:00:AC:E8:5A:E6:55

then there is an exchange

>>> 00:AA:AA:AA:FE:00:00:C8:87:1B:40:55
<<< 00:AA:AA:AA:FE:00:00:C8:87:1B:40:55

and the final stage, after that the coffee machine starts to turn on

>>> AA:AA:AA:93:00:01:01:81:90:AD:E0:55:AA:AA:AA:93:00:01:01:81:90:AD:E0:55
<<< AA:AA:AA:93:00:01:01:81:90:AD:E0:55:AA:AA:AA:93:00:01:01:81:90:AD:E0:55

When I was reverse engineering my pellet stove, i recently found out ChatGPT can be quite helpfull helping decoding logic, it is very good at it, provided you ask it the correct questions :grin:

I recently was able to figure out 6 (missing) status parameters , and also found the reset command (which i tried to find for a long time)

I often turned to ChatGPT, to which I received an answer that I needed to consult the documentation or contact Philips technical specialists. If he tries to answer something, he writes that AA:AA:AA is the header, and 55 is the stop bit, and between them is the checksum. I already know that. Therefore, at the moment, ChatGPT benefits 0

I disassembled the control panel and upload a photo of the control panel. I removed the sticker that was on the chip and it became known what kind of chip. STMicroelectronics STM32L4R5 VIT6

Model name of the control panel for Philips 5400
OMNIA UI STELLAR 1.9.30.341.00_V04
421945002741/03

Photo of the Philips 5400 control panel













I figured it out a bit and found the sensors of the drink counter. Created a table of what and how to parse bytes. It turns out that bytes of this type AA:AA:AA:FF are sensors

image


AA:AA:AA:FF:B0:01:B0:30:A5:65:E8:55 - Drinks counter (Cappuccino) - number 65
AA:AA:AA:FF:CB:01:CB:35:8A:16:77:55 - Drink counter (Latte ma.) - digit 16
AA:AA:AA:FF:2D:01:2D:6A:61:10:93:55 - Drinks counter (Hot) - digit 10
AA:AA:AA:FF:B4:01:B4:F5:C9:01:E8:55 - Drinks counter (Coffee with mo.) - digit 01
AA:AA:AA:FF:18:01:18:32:82:03:E7:55 - Drink counter (Espresso) - digit 03
AA:AA:AA:FF:36:01:36:17:E4:06:09:55 - Drinks counter (Dairy) - digit 6
AA:AA:AA:FF:23:01:23:67:61:36:7E:55 - The drinks counter (Coffee with m.) is the number 36
AA:AA:AA:FF:D1:01:D1:E9:55:C5:9B:55 - Drinks counter (Express) - digit 197
AA:AA:AA:FF:66:01:66:53:9B:D1:0E:55 - Beverage counter (America.) - digit 521
AA:AA:AA:FF:A5:01:A5:40:20:55:9F:55 - Drinks counter (Coffee) - number 55

I’m not good at ESPHome. How do I create sensors to extract bytes, because they have changing data. ChatGPT shows me some kind of game and I have already stopped believing it, because it often gives false answers. Below I made a config with the iron-specified bits. For example bytes[9]==0xC5 is the number 197 if translated from HEX to a number. So the data bytes[7]==XX && bytes[8]==XX && bytes[9]==XX && bytes[10]==XX change here, but it needs to be displayed in the sensor as numbers

uart:
 - 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: BOTH
#    dummy_receiver: false


 - 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: BOTH
     dummy_receiver: false
     sequence: 
      - lambda: |-
          UARTDebug::log_hex(direction, bytes, ':');
            if (bytes[0]==0xAA && bytes[3]==0xFF && bytes[4]==0xD1 && bytes[5]==0x01 && bytes[9]==0xC5 && bytes[11]==0x55) { id(idDrinkscountEspress).publish_state("197"); }
            else if (bytes[0]==0xAA && bytes[3]==0xFF && bytes[4]==0x18 && bytes[5]==0x01 && bytes[9]==0x03 && bytes[11]==0x55) { id(idDrinkscounterEspresso).publish_state("03"); }
            else if (bytes[0]==0xAA && bytes[3]==0xFF && bytes[4]==0x23 && bytes[5]==0x01 && bytes[9]==0x36 && bytes[11]==0x55) { id(idDrinkscounterCoffeeMilk).publish_state("36"); }
            else if (bytes[0]==0xAA && bytes[3]==0xFF && bytes[4]==0xA5 && bytes[5]==0x01 && bytes[9]==0x55 && bytes[11]==0x55) { id(idDrinkscounterCoffee).publish_state("55"); }
            else if (bytes[0]==0xAA && bytes[3]==0xFF && bytes[4]==0x66 && bytes[5]==0x01 && bytes[9]==0xD1 && bytes[11]==0x55) { id(idDrinkscounterAmerica).publish_state("521"); }


text_sensor:
##### Drinks counter
#Drink counter: Espresso 1
  - platform: template
    id: idDrinkscountEspress
    name: "Espress counter"
    update_interval: 30s

#Drink counter: Espresso 2
  - platform: template
    id: idDrinkscounterEspresso
    name: "Espresso counter"
    update_interval: 30s

#Beverage Counter: Coffee
  - platform: template
    id: idDrinkscounterCoffee
    name: "Coffee Counter"
    update_interval: 30s

#Beverage counter: Coffee with milk (Coffee with m.)
  - platform: template
    id: idDrinkscounterCoffeeMilk
    name: "Coffee Counter with Milk"
    update_interval: 30s

#Drinks counter: America.
  - platform: template
    id: idDrinkscounterAmerica
    name: "Counter Americano"
    update_interval: 30s

That's what GhatGPT offers me, utter nonsense. I will give examples to understand why I don't trust GhatGPT
text_sensor:
  - platform: template
    id: idDrinkscounterEspresso1
    name: "Drink counter: Espresso 1"
    update_interval: 60s
    lambda: |-
      if (id(uart_mainboard).state.length() >= 12 &&
          id(uart_mainboard).state[0] == 0xAA &&
          id(uart_mainboard).state[3] == 0xFF &&
          id(uart_mainboard).state[9] == 0xE0 &&
          id(uart_mainboard).state[11] == 0x55) {
        char byte4Str[3];
        snprintf(byte4Str, sizeof(byte4Str), "%02X", id(uart_mainboard).state[4]);
        return std::string(byte4Str);
      } else {
        return std::string("");
      }
text_sensor:
  - platform: template
    id: idDrinkscounterEspresso1
    name: "Drink counter: Espresso 1"
    update_interval: 60s
    lambda: |-
      if (bytes[0] == 0xAA && bytes[3] == 0xFF && bytes[9] == 0xE0 && bytes[11] == 0x55) {
        char byte4Str[3];
        snprintf(byte4Str, sizeof(byte4Str), "%02X", bytes[4]);
        return std::string(byte4Str);
      } else {
        return std::string("");
      }

and when you try to upload the firmware, I get this error

/config/esphome/esp32-smart-coffee-philips.yaml: In lambda function:
/config/esphome/esp32-smart-coffee-philips.yaml:135:11: error: 'bytes' was not declared in this scope
       if (bytes[0] == 0xAA && bytes[3] == 0xFF && bytes[9] == 0xE0 && bytes[11] == 0x55) {
           ^~~~~
/config/esphome/esp32-smart-coffee-philips.yaml:135:11: note: suggested alternative: 'byte'
       if (bytes[0] == 0xAA && bytes[3] == 0xFF && bytes[9] == 0xE0 && bytes[11] == 0x55) {
           ^~~~~
           byte
/config/esphome/esp32-smart-coffee-philips.yaml:142:3: warning: control reaches end of non-void function [-Wreturn-type]
 
   ^
*** [/data/esp32-smart-coffee-philips/.pioenvs/esp32-smart-coffee-philips/src/main.cpp.o] Error 1
========================== [FAILED] Took 7.20 seconds ==========================

Hi again,

I faced the same challenge, but for my stove i just used esp-link to set up the serial line, and build a custom integration (now on HAcs) from there using python.

Maybe it has some usefull info?