Home Assistant
Every agent in view. You call the shots. A rest command posts tiles from Home Assistant. You see the house on the same board as your agents.
Setup
- Put the ingest token in secrets.yaml as botopticon_ingest. Do not commit the secret.
- Add the rest commands, then reload REST commands.
- Call the status command when the house state changes. The power reading posts every 6 hours with a 12-hour TTL, so one missed run doesn't leave the board stale. A tile that goes stale leaves the board 15 minutes later and comes back on the next post.
- Change sensor.house_power to a sensor you actually have. The value must be a number.
YAML
# Home Assistant posts to a Botopticon board.
# Put the ingest token in secrets.yaml:
# botopticon_ingest: "Bearer <INGEST_TOKEN>"
# Then reload REST commands.
# Call botopticon_status when the house state changes. Do not run it on a timer.
# Its TTL is 24 hours: if the house stays quiet longer, the tile goes stale and
# leaves the board 15 minutes later. The next post brings it back.
# botopticon_power is a meter no agent touches. It posts every 6 hours with a
# 12-hour TTL, so one missed run doesn't leave the board stale.
rest_command:
botopticon_status:
url: "https://www.botopticon.com/api/ingest"
method: POST
headers:
authorization: !secret botopticon_ingest
content_type: "application/json"
payload: '{"bot":"Home","tile":"house","type":"status","title":"House","subtitle":"Home Assistant","props":{"state":"idle","task":"Lights and locks"},"needs_you":false,"ttl_seconds":86400}'
botopticon_power:
url: "https://www.botopticon.com/api/ingest"
method: POST
headers:
authorization: !secret botopticon_ingest
content_type: "application/json"
payload: >
{{ {"bot":"Home","tile":"power","type":"kpi","title":"Power","subtitle":"House meter · every 6h","props":{"value": states('sensor.house_power')|float(0), "unit":"W"}, "needs_you": false, "ttl_seconds": 43200} | tojson }}
automation:
- alias: Post house power to the Botopticon board
triggers:
- trigger: time_pattern
hours: "/6"
minutes: 0
actions:
- action: rest_command.botopticon_power