bsh-home-appliances
bsh-home-appliances copied to clipboard
Test with Model Bosch WAQ24468/09ES
Hello, first, thanks for your work.
This weekend I decided to connect my washing machine with an esp01 and use your code.
My washing machine is another model WAQ24468/09ES so I had to make several changes to the code for my model as it differs in functions and features as well as set up all the programs on my washing machine.
I also think I've discovered the function of: 14.10-08 00 ? In my washing machine 14.10-08 00 Spin enabled 14.10-08 01 Spin disabled
This parameter is always sent when the spin rpm is changed, I currently have the problem that when I disable the spin of my washing machine for 0 rpm it sends the same code as for 1200 rpm with the difference of change of 14.10-08 01, for this reason for the calculation of rpm they should take into account the value of this bit and if it is 1 the rpm should be 0 rpm.
For those who know how to program in ESPHOME it should be very simple to create another variable that checks this bit and if it is one the rpm should be 0 because the spin is disabled. It would be necessary to modify the calculation of rpm with rpm * (1 - Bit of 1008)
I am a newbie in ESPHOME if I can do it I will attach the code if not I suppose it will be simple for you to do it.
I am attaching my code in case you want to use it as an example for my model and if it helps someone else.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!CUSTOM MODEL WAQ24468/09ES
substitutions: devicename: lavadora upper_devicename: Lavadora Bosch
esphome: name: $devicename friendly_name: $upper_devicename
external_components:
- source: github://hn/bsh-home-appliances@master
esp8266: board: esp01_1m
logger:
api: encryption: key: !secret api_key ota:
- platform: esphome password: !secret ota_pass
wifi: ssid: !secret wifi_ssid password: !secret wifi_password output_power: 10.5dB manual_ip: static_ip: !secret wifi_Lavadora gateway: !secret wifi_gateway subnet: !secret wifi_subnet
Enable fallback hotspot (captive portal) in case wifi connection fails
ap: ssid: "Lavadora AP" password: !secret wifi_password
captive_portal:
uart: id: dbus_uart rx_pin: GPIO14 baud_rate: 9600
bshdbus: uart_id: dbus_uart
binary_sensor:
- platform: bshdbus
dest: 0x14
command: 0x1007
binary_sensors:
- id: bsh_wm_feat_waterplus name: Extra icon: mdi:water-plus lambda: return (x[0] >> 1) & 0x01;
- id: bsh_wm_feat_eco name: Eco Perfect icon: mdi:sprout-outline lambda: return (x[0] >> 5) & 0x01;
- id: bsh_wm_feat_prewash name: Rápido icon: mdi:clock-fast lambda: |- int sensor_value = x[0]; int mask = 0b01100000; // Máscara para los bits en las posiciones 6 y 7 if ((sensor_value & mask) == 0) { // Los bits en las posiciones 6 y 7 están a cero return 1; // O cualquier valor que indiques para el caso positivo } else { // Al menos uno de los bits está en 1 return 0; // O cualquier valor que indiques para el caso negativo }
- id: bsh_wm_feat_anticrease name: Fácil Plancha icon: mdi:iron lambda: return (x[1] >> 7) & 0x01;
- platform: bshdbus
dest: 0x15
command: 0x1100
binary_sensors:
- id: bsh_wm_start_button
name: Start
icon: mdi:button-pointer
lambda: return 1;
on_press:
- delay: 200ms
- lambda: id(bsh_wm_start_button).publish_state(NAN);
- id: bsh_wm_start_button
name: Start
icon: mdi:button-pointer
lambda: return 1;
on_press:
- platform: bshdbus
dest: 0x26
command: 0x1701
binary_sensors:
- id: bsh_wm_program_started
name: Lavando
entity_category: diagnostic
icon: mdi:ray-start-arrow
lambda: return 1;
on_press:
- delay: 1s
- lambda: id(bsh_wm_program_started).publish_state(NAN);
- id: bsh_wm_program_started
name: Lavando
entity_category: diagnostic
icon: mdi:ray-start-arrow
lambda: return 1;
on_press:
sensor:
- platform: bshdbus
dest: 0x14
command: 0x1004
sensors:
- id: bsh_wm_temperature
name: Temperatura
device_class: temperature
state_class: measurement
unit_of_measurement: °C
accuracy_decimals: 0
lambda: return x[0];
filters:
- calibrate_linear:
method: exact
datapoints:
- 0 -> 0.0
- 1 -> 20.0
- 2 -> 30.0
- 3 -> 40.0
- 4 -> 60.0
- 5 -> 70.0
- 6 -> 80.0
- 7 -> 90.0
- calibrate_linear:
method: exact
datapoints:
- id: bsh_wm_temperature
name: Temperatura
device_class: temperature
state_class: measurement
unit_of_measurement: °C
accuracy_decimals: 0
lambda: return x[0];
filters:
- platform: bshdbus
dest: 0x14
command: 0x1006
sensors:
- id: bsh_wm_rpm
name: Centrifugado
device_class: speed
state_class: measurement
unit_of_measurement: rpm
accuracy_decimals: 0
lambda: return x[0];
filters:
- multiply: 10
- id: bsh_wm_rpm
name: Centrifugado
device_class: speed
state_class: measurement
unit_of_measurement: rpm
accuracy_decimals: 0
lambda: return x[0];
filters:
- platform: bshdbus
dest: 0x17
command: 0x4010
sensors:
- id: bsh_wm_unbalance_x
name: Desequilibrio X
entity_category: diagnostic
icon: mdi:axis-x-rotate-clockwise
state_class: measurement
unit_of_measurement: m/s²
accuracy_decimals: 0
lambda: return (int16_t) ((x[1] << 8) | x[2]);
filters:
- throttle: 3s
- timeout: 90s
- id: bsh_wm_unbalance_z
name: Desequilibrio Z
entity_category: diagnostic
icon: mdi:axis-z-rotate-clockwise
state_class: measurement
unit_of_measurement: m/s²
accuracy_decimals: 0
lambda: return (int16_t) ((x[3] << 8) | x[4]);
filters:
- throttle: 3s
- timeout: 90s
- id: bsh_wm_unbalance_y
name: Desequilibrio Y
entity_category: diagnostic
icon: mdi:axis-y-rotate-clockwise
state_class: measurement
unit_of_measurement: m/s²
accuracy_decimals: 0
lambda: return (int16_t) ((x[5] << 8) | x[6]);
filters:
- throttle: 3s
- timeout: 90s
- id: bsh_wm_unbalance_x
name: Desequilibrio X
entity_category: diagnostic
icon: mdi:axis-x-rotate-clockwise
state_class: measurement
unit_of_measurement: m/s²
accuracy_decimals: 0
lambda: return (int16_t) ((x[1] << 8) | x[2]);
filters:
- platform: bshdbus
dest: 0x26
command: 0x1020
sensors:
- id: bsh_wm_washmodule name: Ciclo Lavado entity_category: diagnostic icon: mdi:map-marker-path accuracy_decimals: 0 unit_of_measurement: ciclo lambda: return x[0];
- platform: bshdbus
dest: 0x2a
command: 0x1600
sensors:
- id: bsh_wm_remain name: Restante device_class: duration state_class: measurement unit_of_measurement: min accuracy_decimals: 0 lambda: return x[0];
text_sensor:
- platform: bshdbus
dest: 0x14
command: 0x1005
text_sensors:
- id: bsh_wm_program
name: Programa
icon: mdi:numeric
lambda: return std::to_string(x[2]);
filters:
- map:
- 0 -> Apagado
- 1 -> Algodón
- 2 -> Algodón +
- 3 -> Sintéticos
- 4 -> Sintéticos +
- 5 -> Mix
- 6 -> Delicado
- 7 -> Lana
- 8 -> Centrifugado
- 9 -> Desagüe
- 10 -> Rapido 15
- 11 -> Ropa Oscura
- 12 -> Camisas/Blusas
- 13 -> Plumas
- 14 -> Sport
- 15 -> Antialergias
- map:
- id: bsh_wm_program
name: Programa
icon: mdi:numeric
lambda: return std::to_string(x[2]);
filters:
- platform: bshdbus
dest: 0x26
command: 0x1200
text_sensors:
- id: bsh_wm_door
name: Puerta
icon: mdi:door
lambda: return std::to_string(x[0]);
filters:
- map:
- 0 -> Cerrada
- 1 -> Bloqueada
- 2 -> Abierta
- map:
- id: bsh_wm_door
name: Puerta
icon: mdi:door
lambda: return std::to_string(x[0]);
filters: