omni-pca-docs/astro.config.mjs
Ryan Malloy f45e9fd014 docs: reference/program-format — wire layout + Mon/Day quirk + worked example
New reference page documenting the Omni Pro II's 14-byte program record
format. Mirrors file-format.mdx's structure: byte-offset table, enum
tables (ProgramType, ProgramCond, Days), worked example decoding a
real slot from the live fixture, callouts for the EVENT-only Mon/Day
swap on disk, and an explicit "what we don't yet know" section that
lists the gaps a future editor pass would have to close (cond bit
split, multi-record clausal encoding, RemarkID -> RemarkText lookup,
DPC capability flag, sunrise/sunset offset flag).

Sidebar adds the entry between File format and Hardware specs.
2026-05-11 19:48:07 -06:00

104 lines
2.9 KiB
JavaScript

// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import icon from 'astro-icon';
// https://astro.build/config
export default defineConfig({
site: 'https://hai-omni-pro-ii.l.warehack.ing',
telemetry: false,
devToolbar: { enabled: false },
integrations: [
icon({
include: {
lucide: ['*'],
},
}),
starlight({
title: 'HAI Omni Pro II — omni-pca docs',
description:
'Reverse-engineered Python library and Home Assistant integration for HAI/Leviton Omni Pro II home automation panels.',
logo: {
src: './src/assets/logo.svg',
replacesTitle: false,
},
favicon: '/favicon.svg',
customCss: ['./src/styles/theme.css'],
social: [
{
icon: 'github',
label: 'GitHub',
href: 'https://git.supported.systems/warehack.ing/omni-pca',
},
],
editLink: {
// Placeholder — update once the docs repo lives somewhere on GitHub.
baseUrl: 'https://git.supported.systems/warehack.ing/omni-pca-docs/edit/main/',
},
lastUpdated: true,
pagination: true,
sidebar: [
{
label: 'Start here',
collapsed: false,
items: [
{ label: 'Overview', slug: '' },
{ label: 'Quick start', slug: 'start/quickstart' },
],
},
{
label: 'Tutorials',
collapsed: true,
items: [{ autogenerate: { directory: 'tutorials' } }],
},
{
label: 'How-to guides',
collapsed: true,
items: [{ autogenerate: { directory: 'how-to' } }],
},
{
label: 'Reference',
collapsed: false,
items: [
{ label: 'Protocol', slug: 'reference/protocol' },
{ label: 'File format', slug: 'reference/file-format' },
{ label: 'Program record format', slug: 'reference/program-format' },
{ label: 'Hardware specs', slug: 'reference/hardware-specs' },
{ label: 'Library API', slug: 'reference/library-api' },
{ label: 'HA entities', slug: 'reference/ha-entities' },
{ label: 'HA services', slug: 'reference/ha-services' },
],
},
{
label: 'Explanation',
collapsed: false,
items: [
{ label: 'Two non-public quirks', slug: 'explanation/quirks' },
{ label: 'Zone & unit numbering', slug: 'explanation/zone-unit-numbering' },
{ label: 'Architecture', slug: 'explanation/architecture' },
{ label: 'The PC Access bug', slug: 'explanation/pc-access-bug' },
],
},
{ label: 'Journey', slug: 'journey' },
{ label: 'Changelog', slug: 'changelog' },
],
}),
],
vite: {
server: {
host: '0.0.0.0',
// HMR behind Caddy reverse proxy: explicit hostname + wss + 443
// (per CLAUDE.md "HMR Behind Reverse Proxy" section). Falls
// back to defaults when no VITE_HMR_HOST env var is set so
// `npm run dev` outside Docker still works.
hmr: process.env.VITE_HMR_HOST
? {
host: process.env.VITE_HMR_HOST,
protocol: 'wss',
clientPort: 443,
}
: undefined,
},
},
});