Magnetic camera holder for monitoring BOSCH WNA13441 wash dryers with Home Assistant
We calculate the final price from your selected file. You review and accept it before payment.
Saved on this device.
Allows monitoring washing machine progress without requiring the washing machine itself to be "smart"
- Rating
- 0 / 5
- Likes
- 16
- Downloads
- 13
- Makes
- 0
- Views
- 563
- Reviews
- 0
Updated at source:
Model information
- Source
- Printables
- Category
- Other House Equipment
- License
- Creative Commons — Attribution
Smart household appliances tend to be short-lived due to the added complexity creating more points of failure. If you must have some smartness in your appliances, it's sometimes a good idea to add it on as a separate system.
This solution uses a camera and OCR to read a washing machine's ETA to make it available in Home Assistant. Besides this being useful for notifications, it also allows studying the mysterious non-linear passage of time that washing machines tend to exhibit.
Note: This model is designed to be a perfect fit for a very specific model of wash dryer and likely doesn't fit any others without modification. If you have a different model, you still might find some use in the information below to build or customize your own. Getting the OCR parameters right actually took the longest in the whole development process.
Additional parts
- ESPCAM module (a.k.a. ESP32 Cam, AI Thinker) like this one (no affiliate link).
- TTL programmer for flashing the firmware.
- 5V DC power supply and some jumper cables to hook it up.
Assembly
- Super-glue two small magnets into the designated holes.
- Insert the ESPCAM module into the designated slot.
- Run a power cable to the VIN and GND pins.
Firmware
- Flash this excellent firmware by rzeldent on GitHub, which features web-based camera settings and RTSP video streaming. Follow the project documentation for details.
- Connect it to your wireless network and manually lower the exposure so the digit segments on the washing machine display are clearly visible without any glowing whatsoever.
- Note the IP address for configuring Home Assistant.
Home Assistant Configuration
You need to be able to edit the Home Assistant configuration file, as some of the required settings can't be made over the web UI. Depending on you setup, this might require addons.
First, use the web UI and MJPEG integration to make Home Assistant aware of the camera using the IP address that was previously written down.
Next, enable optical character recognition for the camera using the built-in seven segments OCR solution:
image_processing:
- platform: seven_segments
source:
- entity_id: camera.wash_cam # replace with your entity ID
rotate: 4
digits: 4
x_position: 72
y_position: 227
width: 800
height: 800
extra_arguments: --min-segment=9 --charset=0123456789 --iter-threshold --omit-decimal-point --foreground=white --background=blackGetting the parameters right is a bit of an art. The OCR algorithm is very sensitive to rotation, so if detection fails (you can use the Home Assistant log to get information about that), adjusting the rotation angle (degrees) slightly can make a huge difference. If that doesn't work, check the exposure value again. Blurry images are the other thing this algorithm is very picky about.
You can also download the OCR software and run it locally to test out command line parameters and generate debug output images that show you how it tried to interpret the image.
Finally, parse the OCR output into a time value that can be used as an ETA sensor entity:
sensor:
- platform: template
sensors:
wash_dryer_eta:
value_template: >-
{% set value = states('image_processing.sevensegment_ocr_wash_cam') %}
{% if value is not none and value | length == 4 %}
{% set hours = value[0:1] | int %}
{% set minutes = value[2:4] | int %}
{{ hours * 60 + minutes }}
{% else %}
none
{% endif %}
unit_of_measurement: "minutes"
friendly_name: "Wash-Dryer ETA"You can use this sensor entity as part of a widget and for arbitrary automations. I use it to send a push notification to my phone when the washing machine is done.