Seven Segments OCR
The seven_segments
image processing integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] allows you to read physical seven segments displays through Home Assistant. ssocr
Notes for Home Assistant Core Installations
ssocr
needs to be available on your system. Check the installation instruction below:
Configuration
To enable the OCR of a seven segment display in your installation, add the following to your configuration.yaml
The configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] file.
After changing the configuration.yaml
The configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] file, restart Home Assistant to apply the changes.
Configuration Variables
The command line tool ssocr
. Set it if you use a different name for the executable.
X coordinate of the upper left corner of the area to crop.
Y coordinate of the upper left corner of the area to crop.
Threshold for the difference between the digits and the background.
Other arguments to use. Like -D
, dilation
, erosion
, greyscale
, make_mono
, etc.
Setup process
It’s suggested that the first attempt to determine the needed parameters is using ssocr
directly. This may require a couple of iterations to get the result
This would lead to the following entry for the configuration.yaml
The configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] file:
With the help of a template sensor, the value can be shown as badge.