mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2026-04-27 02:32:22 +00:00
Add .codex_tmp/ to .gitignore, update Dashy service references in SKILL.md, and include new BearClaw and Telegram bot YAML files in README.md
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -78,3 +78,4 @@ tts
|
||||
panel-notes
|
||||
docker_14
|
||||
docker_69
|
||||
.codex_tmp/
|
||||
|
||||
@@ -23,7 +23,7 @@ Keep infrastructure documentation aligned after operational changes.
|
||||
- `codex_skills/README.md` (if adding/updating skills)
|
||||
3. Dashy shortcuts (if any service URL/host changed):
|
||||
- `h:\hass\docker_files\dashy/conf.yml`
|
||||
- Reload Dashy on docker_10 after edits: `ssh hass@192.168.10.10 "cd ~/docker_files && docker compose up -d dashy"`
|
||||
- Reload Dashy on docker_17 after edits: `ssh hass@192.168.10.17 "cd ~/docker_files && docker compose up -d dashy"`
|
||||
4. Infra Info snapshot JSON:
|
||||
- `docker_69:/home/hass/docker_files/infra_info/data/overview.json`
|
||||
|
||||
@@ -51,7 +51,7 @@ Keep infrastructure documentation aligned after operational changes.
|
||||
- Prefer stable hostnames (ex: `docker17`) over raw IPs when available.
|
||||
- Prefer Cloudflare/public URLs for internet-facing apps where appropriate.
|
||||
- Keep "Vibe Apps" grouped under the existing Dashy section unless the user asks for taxonomy changes.
|
||||
- After edits, reload only Dashy (avoid restarting other docker_10 services).
|
||||
- After edits, reload only Dashy (avoid restarting other docker_17 services).
|
||||
|
||||
## Output Contract
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@ Live collection of plug-and-play Home Assistant packages. Each YAML file in this
|
||||
| [infrastructure_observability.yaml](infrastructure_observability.yaml) | Normalized WAN/DNS/backup/domain/cert health sensors used by the Infrastructure Home + Website Health dashboards. | `binary_sensor.infra_*`, `sensor.infra_*`, `script.send_to_logbook` |
|
||||
| [mariadb.yaml](mariadb.yaml) | MariaDB recorder health and capacity SQL sensors. | `sensor.mariadb_status`, `sensor.database_size` |
|
||||
| [tugtainer_updates.yaml](tugtainer_updates.yaml) | Tugtainer container update notifications via webhook + persistent alerts. | `persistent_notification.create`, `input_datetime.tugtainer_last_update` |
|
||||
| [bearclaw.yaml](bearclaw.yaml) | Joanna/BearClaw bridge automations that forward Telegram commands to codex_appliance and relay replies back. | `rest_command.bearclaw_*`, `automation.bearclaw_*`, webhook relay |
|
||||
| [telegram_bot.yaml](telegram_bot.yaml) | Telegram script wrappers used by BearClaw and other ops flows (UI integration remains the source for bot config). | `script.joanna_send_telegram`, `telegram_bot.send_message` |
|
||||
| [phynplus.yaml](phynplus.yaml) | Phyn shutoff automations with push + Activity feed + Repairs issues for leak events. | `valve.phyn_shutoff_valve`, `binary_sensor.phyn_leak_test_running`, `repairs.create` |
|
||||
| [water_delivery.yaml](water_delivery.yaml) | ReadyRefresh delivery date helper with night-before + garage door Alexa reminders. | `input_datetime.water_delivery_date`, `notify.alexa_media_garage` |
|
||||
| [powerwall.yaml](powerwall.yaml) | Track Tesla Powerwall grid status and shed loads automatically when off-grid (alerts include Activity feed + Repairs). | `binary_sensor.powerwall_grid_status`, `sensor.powerwall_*`, `repairs.create` |
|
||||
|
||||
120
config/packages/bearclaw.yaml
Normal file
120
config/packages/bearclaw.yaml
Normal file
@@ -0,0 +1,120 @@
|
||||
######################################################################
|
||||
# @CCOSTAN - Follow Me on X
|
||||
# For more info visit https://www.vcloudinfo.com/click-here
|
||||
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
||||
# -------------------------------------------------------------------
|
||||
# BearClaw Bridge - Telegram and webhook glue for Joanna agent
|
||||
# Routes Telegram -> codex_appliance and codex_appliance -> Telegram/HA.
|
||||
# -------------------------------------------------------------------
|
||||
# Notes: Keep BearClaw transport + bridge logic centralized in this package.
|
||||
######################################################################
|
||||
|
||||
rest_command:
|
||||
bearclaw_command:
|
||||
url: !secret bearclaw_command_url
|
||||
method: post
|
||||
content_type: application/json
|
||||
headers:
|
||||
x-codex-token: !secret bearclaw_token
|
||||
payload: >
|
||||
{
|
||||
"text": {{ text | tojson }},
|
||||
"user": {{ user | default('carlo') | tojson }},
|
||||
"source": {{ source | default('home_assistant') | tojson }}
|
||||
}
|
||||
|
||||
bearclaw_ingest:
|
||||
url: !secret bearclaw_ingest_url
|
||||
method: post
|
||||
content_type: application/json
|
||||
headers:
|
||||
x-codex-token: !secret bearclaw_token
|
||||
payload: >
|
||||
{
|
||||
"summary": {{ summary | default('event') | tojson }},
|
||||
"wake": {{ wake | default(false) | tojson }},
|
||||
"source": "home_assistant"
|
||||
}
|
||||
|
||||
automation:
|
||||
- id: bearclaw_telegram_bear_command
|
||||
alias: BearClaw Telegram Bear Command
|
||||
description: Handles /bear commands and forwards text to Joanna.
|
||||
mode: queued
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: telegram_command
|
||||
event_data:
|
||||
command: /bear
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.user_id is defined }}"
|
||||
action:
|
||||
- variables:
|
||||
command_text: "{{ (trigger.event.data.args | default([])) | join(' ') | trim }}"
|
||||
from_user: "{{ (trigger.event.data.from_first | default('carlo')) | lower }}"
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ command_text == '' }}"
|
||||
sequence:
|
||||
- service: script.joanna_send_telegram
|
||||
data:
|
||||
message: "Usage: /bear <message>"
|
||||
default:
|
||||
- service: rest_command.bearclaw_command
|
||||
data:
|
||||
text: "{{ command_text }}"
|
||||
user: "{{ from_user }}"
|
||||
source: telegram_command
|
||||
|
||||
- id: bearclaw_telegram_text_no_slash_needed
|
||||
alias: BearClaw Telegram Text No Slash Needed
|
||||
description: Treats plain Telegram text as BearClaw command input.
|
||||
mode: queued
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: telegram_text
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: "{{ trigger.event.data.user_id is defined }}"
|
||||
- condition: template
|
||||
value_template: "{{ (trigger.event.data.text | default('') | trim) != '' }}"
|
||||
- condition: template
|
||||
value_template: "{{ not (trigger.event.data.text | default('') | trim).startswith('/') }}"
|
||||
action:
|
||||
- variables:
|
||||
plain_text: "{{ trigger.event.data.text | default('') | trim }}"
|
||||
from_user: "{{ (trigger.event.data.from_first | default('carlo')) | lower }}"
|
||||
- service: rest_command.bearclaw_command
|
||||
data:
|
||||
text: "{{ plain_text }}"
|
||||
user: "{{ from_user }}"
|
||||
source: telegram_text
|
||||
|
||||
- id: bearclaw_reply_webhook
|
||||
alias: BearClaw Reply Webhook
|
||||
description: Receives BearClaw replies from codex_appliance and relays to Telegram/HA push.
|
||||
mode: queued
|
||||
trigger:
|
||||
- platform: webhook
|
||||
webhook_id: !secret bearclaw_reply_webhook_id
|
||||
allowed_methods:
|
||||
- POST
|
||||
local_only: true
|
||||
action:
|
||||
- variables:
|
||||
message: "{{ trigger.json.message | default('Joanna: empty reply') }}"
|
||||
level: "{{ trigger.json.level | default('active') | lower }}"
|
||||
- service: script.joanna_send_telegram
|
||||
data:
|
||||
message: "{{ message }}"
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ level in ['warning', 'error', 'critical'] }}"
|
||||
sequence:
|
||||
- service: script.notify_engine
|
||||
data:
|
||||
title: Joanna Alert
|
||||
value1: "{{ message }}"
|
||||
25
config/packages/telegram_bot.yaml
Normal file
25
config/packages/telegram_bot.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
######################################################################
|
||||
# @CCOSTAN - Follow Me on X
|
||||
# For more info visit https://www.vcloudinfo.com/click-here
|
||||
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
||||
# -------------------------------------------------------------------
|
||||
# Telegram Bot Helpers - Joanna/BearClaw Telegram send wrappers
|
||||
# Script wrappers for Telegram messaging using UI-configured integration.
|
||||
# -------------------------------------------------------------------
|
||||
# Notes: Do not add `telegram_bot:` YAML here; integration is UI-only.
|
||||
######################################################################
|
||||
|
||||
script:
|
||||
joanna_send_telegram:
|
||||
alias: Joanna Send Telegram
|
||||
description: Sends a Telegram message to Carlo's allowed chat id.
|
||||
mode: queued
|
||||
fields:
|
||||
message:
|
||||
description: Message body to send.
|
||||
example: Joanna is online.
|
||||
sequence:
|
||||
- service: telegram_bot.send_message
|
||||
data:
|
||||
target: !secret telegram_allowed_chat_id_carlo
|
||||
message: "{{ message }}"
|
||||
Reference in New Issue
Block a user