Independent directory, made by the developer of Vulpo. Not affiliated with Home Assistant or the Open Home Foundation.

About

Scribe records Home Assistant states and events into a TimescaleDB database through asyncpg. It runs alongside the built-in recorder and keeps long history in TimescaleDB, with old chunks compressed automatically and entity, device, area, user and integration context stored with the values. Recording can be filtered by domain, entity, name pattern, attribute and event type, and writes are batched, with an optional memory buffer that retries when the database is down. Optional sensors report write activity, chunk counts and table sizes, and hourly and daily summary views can be maintained for long-range charts. Retention policies for states and events, a custom schema and SSL with client certificates are available in the advanced options. Problems such as an unreachable database or a full buffer appear as repair notices, and diagnostics and system health are included. It is added through the Home Assistant interface with a database URL and connects locally.

Automatic summary of the README and code of jonathan-gtd/scribe. Something wrong, or are you the maintainer and want your own text here? Get in touch

Supports

  • Works locally Talks to your devices on your own network. No vendor cloud in between.

  • From the Marketplace Installed through the Marketplace, formerly HACS.

  • Actively maintained Its author released or pushed a change in the last six months.

Provides

  • Sensors

Setting it up

Install it from the Marketplace and restart Home Assistant, then add it under Settings, Devices and services.

Connect to TimescaleDB

  • Database URLFull PostgreSQL connection URL, e.g. postgresql://scribe:secret@192.168.1.10:5432/scribe

After setup

  • Record state changesWrite every state change to TimescaleDB
  • Record eventsWrite Home Assistant events (automations, scripts…) to TimescaleDB
  • Include domainsOnly record entities from these domains. Leave empty to include all.
  • Exclude domainsNever record entities from these domains
  • Include entitiesOnly record these specific entities. Leave empty to include all.
  • Exclude entitiesNever record these specific entities
  • Include entity globsOnly record entities matching these patterns (e.g. sensor.temp_*)
  • Exclude entity globsNever record entities matching these patterns
  • Exclude attributesDrop these attribute keys before writing (saves space)
  • Include event typesOnly record these specific event types. Leave empty to record all events.
  • Exclude event typesNever record these event types (applied after include_events).
  • Batch sizeNumber of rows accumulated before a flush is triggered (default 500)
  • Flush interval (seconds)Maximum seconds between automatic flushes (default 30). Each flush is one transaction, so a short interval writes a handful of rows at a time instead of batching them. What a long one risks is the last interval of history, and only if Home Assistant is killed — a normal shutdown writes everything out.
  • Max queue sizeMaximum pending writes before oldest are dropped (default 10000)
  • Buffer on database failureKeep events in memory and retry when the database becomes available again
  • Enable I/O statistics sensorsExpose real-time write counters, buffer size and write duration as sensors
  • Enable chunk statistics sensorsExpose per-table chunk counts (total / compressed / uncompressed) as sensors
  • Chunk stats refresh intervalHow often (in minutes) chunk stats are refreshed from the database
  • Enable size statistics sensorsExpose per-table sizes and compression ratios as sensors
  • Size stats refresh intervalHow often (in minutes) size stats are refreshed from the database
  • How often the I/O sensors publishSeconds between two values of the I/O sensors. Every change is a row Scribe records about itself, so a short interval fills your history with Scribe's own counters. 60 seconds by default.
  • Sync areas tableKeep a mirror of Home Assistant areas in TimescaleDB
  • Sync devices tableKeep a mirror of Home Assistant devices in TimescaleDB
  • Sync integrations tableKeep a mirror of config entries (integrations) in TimescaleDB
  • Sync users tableKeep a mirror of Home Assistant users in TimescaleDB
  • Hourly and daily summariesKeep pre-computed hourly and daily averages of your states, maintained by TimescaleDB. Charts over months or years then read thousands of rows instead of millions. Adds the states_hourly and states_daily views.
  • Database schemaLeave empty to use whatever the connection already points at (normally public). Set a name and Scribe creates that schema and records into it — its tables, its hypertables, its policies. Only new data goes there: history already written elsewhere is not moved, and Scribe records nothing at all if the schema cannot be reached.
  • Chunk time intervalTimescaleDB chunk interval (e.g. '7 days'). Affects new chunks only.
  • Compress afterCompress chunks older than this interval (e.g. '7 days'). Requires TimescaleDB compression.
  • Delete states older thanLeave empty to keep every state forever (default). Set an interval (e.g. '365 days', '6 months') to have TimescaleDB DELETE state history older than it — permanently, with no undo. Scribe owns this policy: emptying the field removes it.
  • Delete events older thanLeave empty to keep every event forever (default). Set an interval (e.g. '30 days') to have TimescaleDB DELETE event history older than it — permanently, with no undo. Scribe owns this policy: emptying the field removes it.
  • Enable SSLRequire an SSL/TLS connection to PostgreSQL
  • SSL root certificate pathPath to the CA certificate file (e.g. /ssl/ca.crt)
  • SSL client certificate pathPath to the client certificate file for mTLS
  • SSL client key pathPath to the client private key file for mTLS
  • Query timeoutSeconds a scribe.query call may run before the database stops it. 60 by default.
  • Maximum rows per queryRows a scribe.query call may return before it is refused. They travel into Home Assistant's memory, so this is what keeps a careless query from taking it down. 20000 by default.

Texts from the code of jonathan-gtd/scribe.

Troubleshooting

  • DiagnosticsDownloads a diagnostics file to attach to a bug report.
  • System healthAdds its status to Home Assistant's system information.
  • Repair noticesNotices it can show in Settings, Repairs:Scribe cannot reach its database, Scribe cannot write to its database, Scribe's buffer is full — history is being lost, Scribe is discarding records, TimescaleDB is not installed on Scribe's database, Scribe's TLS configuration is not fully in force, Scribe could not create its tables, Scribe's database predates version 3.0, Scribe cannot reach the schema it was given, Scribe could not build its summaries

Shows in Vulpo

Chart card, Apple Watch.

Information

Installs
81 sharing analytics
GitHub stars
67
Connection
Works locally
Upkeep
Updated in the last 6 months
Version
v4.5.0,
Kind
Marketplace integration
Needs
Needs the Marketplace (HACS on 2026.10 and older)
Domain
scribe

You might also like

Independent directory, made by the developer of Vulpo. Not affiliated with Home Assistant or the Open Home Foundation. About these numbers