Home Assistant Integration for the OpenEPaperLink project
Feature Request and code contributions are welcome!
Every sensor of the tags is exposed in Home Assistant. Every tag and the AP is exposed as a device.
Download an image from the provided url and if required, resized it for the esl it should be displayed on.
This requires that the esl has checked in once before fo Home Assistant knows the hardware type of it so if this service fail, wait 10 to 20 minutes.
As above, but with a file from your home assistant's media directory.
This requires that the esl has checked in once before fo Home Assistant knows the hardware type of it so if this service fail, wait 10 to 20 minutes.
This Service call draws a image local in home assistant, and will send it to the EPaper AP afterwards. Note that the rectangle is not transparent, so if it is drawn after other objects, it may overwrite them.
Example Call:
service: open_epaper_link.drawcustom
target:
entity_id:
- open_epaper_link.0000021EC9EC743A
data:
background: white
rotate: 270
payload:
- type: rectangle
outline: red
fill: white
width: 5
x_start: 10
y_start: 10
x_end: 185
y_end: 240
- type: line
fill: red
width: 3
x_start: 0
y_start: 237
x_end: 196
y_end: 240
- type: text
value: "Hello World!"
font: "ppb.ttf"
x: 0
"y": 0
size: 40
color: red
- type: icon
value: account-cowboy-hat
x: 60
y: 120
size: 120
color: red
Supported payload types, see drawcustom payload types
Displays 5 (or up to 10) lines of text on a small 1.54" esl. If a text line contains a newline (\n), it will be split in 2 lines.
Displays 4 (or up to 8) lines of text on a 2.9" esl. If a text line contains a newline, it will be split in 2 lines.
Go to Developer Tools, Services, select the OpenEPaperLink: 4 Line Display service and paste the below in to the YAML editor. Replace the sensor names in curly brackets with values from your own system. Note that floats work better when rounded and that all numbers work better when converted to strings.
service: open_epaper_link.lines4
data:
mac: 0000021EDE313B15
line1: " Time: {{ states('sensor.time') | string }} "
line2: " LR Temp: {{ state_attr('climate.living_room_2','current_temperature') | string }} C "
line3: " Yest. Elec {{ state_attr('sensor.electricity_yesterday_previous_accumulative_consumption','total') | round(2) | string }} kWh "
line4: "Car: {{ states('sensor.car_state_of_charge') | int | string }} % / {{ ((states('sensor.id_3_pro_performance_range')) | float / 1.609344) | int | string }} miles {{ states('sensor.bins') }} "
border: r
format1: mbbw
format2: mrbw
format3: lbrw
format4: mwrb <br>
If a template with a numeric sensor value still does not work, try appending a non-numeric string (can't be a blank string or just a space) e.g.
" {{ (states('sensor.car_range') | float / 1.609344 ) | int }} mi "
If you use HACS:
-
Click on HACS in the Home Assistant menu
-
Click on the 3 dots in the top right corner
-
Select "Custom repositories"
-
Add the URL to the repository
-
Select the Integration category
-
Click the "ADD" button
-
Click on HACS in the Home Assistant menu
-
Click on
Integrations
-
Click the
EXPLORE & DOWNLOAD REPOSITORIES
button -
Search for
OpenEPaperLink
-
Click the
DOWNLOAD
button -
Restart Home Assistant
- Copy
open_epaper_link
folder from latest release tocustom_components
folder in your config folder - Restart Home Assistant
Adding OpenEPaperLink to your Home Assistant instance can be done via the user interface, by using this My button:
If the above My button doesn’t work, you can also perform the following steps manually:
- Browse to your Home Assistant instance
- In the sidebar click on Settings
- From the configuration menu select: Devices & Services
- In the bottom right, click on the
Add Integration
button - From the list, search and select “OpenEPaperLink”
- Follow the instructions on screen to complete the setup