Files
Home-Assistant/print_log_context.md
root 1d6dce7b42 Correct the Gitea host in docs: cubecraftcreations -> cubecraftlabs
Both CLAUDE.md and print_log_context.md named the mirror as
code.cubecraftcreations.com. The actual `origin` is
https://code.cubecraftlabs.com/overseer/Home-Assistant.git, and the
documented host returns 404 for that repo path, so anyone following the
docs to find or clone the mirror was sent to the wrong server.

Record the full origin URL in CLAUDE.md rather than just the hostname, so
the next reader does not have to infer the path.

Note this is only about the git host. cubecraftcreations.com is used
elsewhere in this setup and is left alone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 13:19:58 -04:00

61 lines
2.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Print Log Project — Context for Claude Code
## What we're building
A Home Assistant automation system that logs 3D printer activity to a Notion database in real time — creating a row when a print starts and updating it when it finishes, fails, or is cancelled.
## Notion Database
- Name: 🖨️ Print Log
- URL: <https://www.notion.so/c7bab550efd740909f656f101697832d>
- Database ID: c7bab550efd740909f656f101697832d
- Location: CubeCraft Creations page
## Printers
| Friendly Name | Entity Prefix | Type | Notes |
|-----------------------|----------------------------------|-------------|--------------------------------|
| PrintsCharming | p1s_01p09c470102673 | Bambu P1S | Full data |
| Ds-Turd-Flinger | a1_03919d540806387 | Bambu A1 | Full data |
| Polly-Pocket | a1mini_0309ca580403653 | Bambu A1Mini| Full data |
| Constipation-Orion | constipation_orion | Bambu | Full data |
| Jordyns-Layer-Slayer | jordyns_layer_slayer | Bambu | Full data |
| Centauri Carbon | centauri_carbon | Elegoo FDM | file_name + print_status only |
| Saturn | saturn | Elegoo Resin| file_name + print_status only |
Bambu sensors follow pattern: sensor.{prefix}_print_status, _gcode_filename,
_print_weight, _print_length, _active_tray (attrs: type, color)
Elegoo sensors: sensor.{prefix}_file_name, sensor.{prefix}_print_status
(status values for Elegoo need verification — may differ from Bambu)
## HA Config Files Produced
Three files were generated (in the HA config repo):
- print_log_configuration.yaml — input_text helpers + rest_commands
- print_log_automations.yaml — 14 automations (start+finish × 7 printers)
- print_log_secrets_addition.yaml — Notion bearer token line for secrets.yaml
## Correct Template for Storing Notion Page ID
`rest_command` responses are already parsed as dicts — do NOT use `| from_json`:
CORRECT: value: "{{ notion_response.content.id | default('') }}"
WRONG: value: "{{ (notion_response.content | from_json).id | default('') }}"
The finish automation condition checks `| length == 36` on the stored ID.
## Notion rest_command structure
- notion_create_print: POST to /v1/pages, returns page ID in response body
- notion_update_print: PATCH to /v1/pages/{page_id}
- Auth header uses !secret notion_token_bearer (full "Bearer ntn_..." string)
- Token stored in secrets.yaml as notion_token_bearer
## HA Setup
- HAOS on x86 server
- Gitea repo at code.cubecraftlabs.com (username: overseer)
- IoT VLAN: 192.168.69.x, Main: 192.168.1.x
- ~150 devices, UniFi networking