I’ve created a custom Vestaboard integration that allows you to post custom content to your Vestaboard from within Home Assistant. It uses the local API and also provides sensors for showing the current state of the board.
What is Vestaboard?
Vestaboard is a 6x22 characters connected split flap display for your home or office space. It comes with an app to post curated or custom messages to and an optional subscription called Vestaboard+ that allows for integration with custom services to push real-time messaging to it. But most importantly, it also comes with a local API (as well as a cloud-based one).
How do I use Vestaboard with Home Assistant?
There are two ways to use Vestaboard through Home Assistant. The easiest way is to install my custom integration and request local API access to your Vestaboard. The latter may take a couple of days, but is really the way to go.
The other option is to use the cloud API and some custom rest_commands. See the instructions below on how to set that up.
Cloud API
Go to the Vestaboard website, login with your account and create API credentials. You will get an API Key, API Secret and a Subscription ID from there. You will need them in a bit. Vestaboard provides more details on this process in it’s API documentation, which you can access by registering as a developer here. Or you just google for it if you don’t want to register.
Copy and paste the following rest_command into your configuration.yaml:
rest_command:
vestaboard_message:
url: "https://platform.vestaboard.com/subscriptions/{{ vestaboard_subscription_id}}/message"
method: POST
content_type: application/json
headers:
X-Vestaboard-Api-Secret: "{{vestaboard_api_secret}}"
X-Vestaboard-Api-Key: "{{vestaboard_api_key}}"
verify_ssl: true
payload: >
{% if text is defined %}
{{ { "text": text }|to_json }}
{% else %}
{% set map = {
' ': 0,
'A': 1,
'B': 2,
'C': 3,
'D': 4,
'E': 5,
'F': 6,
'G': 7,
'H': 8,
'I': 9,
'J': 10,
'K': 11,
'L': 12,
'M': 13,
'N': 14,
'O': 15,
'P': 16,
'Q': 17,
'R': 18,
'S': 19,
'T': 20,
'U': 21,
'V': 22,
'W': 23,
'X': 24,
'Y': 25,
'Z': 26,
'1': 27,
'2': 28,
'3': 29,
'4': 30,
'5': 31,
'6': 32,
'7': 33,
'8': 34,
'9': 35,
'0': 36,
'!': 37,
'@': 38,
'#': 39,
'$': 40,
'(': 41,
')': 42,
'-': 44,
'+': 46,
'&': 47,
'=': 48,
';': 49,
':': 50,
"'": 52,
'"': 53,
'%': 54,
',': 55,
'.': 56,
'/': 59,
'?': 60,
'°': 62,
'\xc1': 63,
'\xc2': 64,
'\xc3': 65,
'\xc4': 66,
'\xc5': 67,
'\xc6': 68,
'\xc7': 69,
'~': 0
} %}
{% set l = lines %}
{% set ns = namespace(l = [], m = []) %}
{% for i in range(6) %}
{% set s = "" if i >= l|length else l[i] %}
{% set a = '{:<22}'.format(s)|upper|list %}
{% set ns.l = [] %}
{% for c in a %}
{% set ns.l = ns.l + ([map[c if c in map else '?']]) %}
{% endfor %}
{% set ns.m = ns.m + [ns.l] %}
{% endfor %}
{{ {'characters': ns.m }|to_json }}
{% endif %}
This rest command implements the Vestaboard message API in both it’s text and characters variant. You will need to provide the Vestaboard API key, Vestaboard API secret and Vestaboard subscription ID you’ve obtained earlier to the rest_command call. I recommend storing them each in the secrets.yaml file. In addition you also need to provide either a “text” argument or a “lines” argument.
The text argument is a simple string and Vestaboard will take care of laying it out and positioning it on the board for you.
The lines argument is expected to be a list of 6 strings. One for each row of the Vestaboard. Each string should not be longer than 22 characters. The rest_command implementation will truncate strings that are longer than that.
Examples:
service: rest_command.vestaboard_message
data:
vestaboard_api_key: !secret vestaboard_api_key
vestaboard_api_secret: !secret vestaboard_api_secret
vestaboard_subscription_id: !secret vestaboard_subscription_id
text: "The quick brown fox jumps over the lazy dog"
service: rest_command.vestaboard_message
data:
vestaboard_api_key: !secret vestaboard_api_key
vestaboard_api_secret: !secret vestaboard_api_secret
vestaboard_subscription_id: !secret vestaboard_subscription_id
lines:
- ""
- "\xc1 The quick brown fox"
- "\xc1 jumps over the lazy"
- "\xc1 dog."
- "~- The Boston Journal."
- ""
Since the Vestaboard characters API doesn’t work with ASCII character codes, the rest_command implementation will map each of the characters in the strings to their respective Vestaboard character codes. There’s also a set of special character mappings for the color characters, as you can see used above (\xc1). To use them in your string simply type out the special character codes \xc1 to \xc7. And since I was struggling with working around yaml string trimming I also mapped the “~” character to the Vestaboard whitespace character. If you need leading whitespace anywhere on your board, you can simply use the otherwise unused “~” character. For your convenience, I’ll list all the special character mappings here:
- \xc1: red
- \xc2: orange
- \xc3: yellow
- \xc4: green
- \xc5: blue
- \xc6: purple
- \xc7: white
- ~: (whitespace)
What can I do with this?
I have created an automation, that among date, time and an uplifting message will display various data from my smart home, like temperature, air quality, the state of the HVAC units in my home as well as the upcoming appointment on the family calendar. But your imagination really is the limit here!
Checkout my Vestaboard in action here: https://youtu.be/b-KxvMScREw
Where can I get one?
You can buy your own Vestaboard on their website. It’s a small Silicon Valley startup and the board itself is really well made and it looks stunning in any space. If you use the following referral link, you can safe $200 off the purchasing price and I will get a $200 referral bonus:
But feel free to skip the referral link if you don’t feel comfortable using it.