Compare commits

...

46 Commits

Author SHA1 Message Date
dbecd67471 modified: README.md
All checks were successful
Casa Home Assistant CI/CD Pipeline / deploy (push) Successful in 17s
modified:   deploy/README.md
renamed:    deploy/rbac.yaml -> deploy/cicd-rbac.yaml
2025-11-22 22:57:43 +00:00
2881eb1167 modified: deploy/deployment.yaml
All checks were successful
Casa Home Assistant CI/CD Pipeline / deploy (push) Successful in 16s
2025-11-22 18:51:39 +00:00
755d68a844 modified: deploy/deployment.yaml
All checks were successful
Casa Home Assistant CI/CD Pipeline / deploy (push) Successful in 18s
2025-11-22 18:36:03 +00:00
f40a899200 modified: .gitea/workflows/deploy.yaml
All checks were successful
Casa Home Assistant CI/CD Pipeline / deploy (push) Successful in 17s
2025-11-22 17:57:01 +00:00
d30aad3058 modified: .gitea/workflows/deploy.yaml
All checks were successful
Casa Home Assistant CI/CD Pipeline / deploy (push) Successful in 17s
2025-11-22 17:51:36 +00:00
6149826bc6 modified: .gitea/workflows/deploy.yaml
modified:   README.md
2025-11-22 17:50:45 +00:00
0d2b30a83a fix/cicd (#3)
Co-authored-by: Márcio Fernandes <marcio.fernandes@outlook.pt>
Reviewed-on: #3
2025-11-22 17:43:57 +00:00
001e785192 continuos deploy 2025-11-22 01:57:22 +00:00
726f3c5bb3 deleted: .gitea/workflows/deploy.yml 2025-11-16 11:59:50 +00:00
8a9c6760d5 fix: set dnsPolicy to ClusterFirstWithHostNet
Some checks failed
/ deploy-to-homesrv01 (push) Has been cancelled
2025-11-16 10:15:51 +00:00
0f51497688 modified: deploy/home-assistant-deploy.yaml
Some checks failed
/ deploy-to-homesrv01 (push) Has been cancelled
2025-11-15 21:15:31 +00:00
dee53f847e modified: deploy/home-assistant-deploy.yaml 2025-11-15 20:45:27 +00:00
59071cbcb5 deploy revision
Some checks failed
/ deploy-to-homesrv01 (push) Has been cancelled
2025-11-15 11:32:37 +00:00
b54f2c9c21 moved to casa kubernetes
Some checks failed
/ deploy-to-homesrv01 (push) Has been cancelled
2025-11-09 20:55:41 +00:00
00c462b908 modified: README.md
All checks were successful
/ deploy-to-homesrv01 (push) Successful in 1m3s
2025-09-07 18:39:54 +00:00
45d75e84b8 modified: README.md
Some checks failed
/ deploy-to-homesrv01 (push) Failing after 5m42s
2025-05-25 19:13:12 +00:00
6a93a7342e modified: README.md
All checks were successful
/ deploy-to-homesrv01 (push) Successful in 5m29s
2025-05-18 00:22:25 +01:00
40e6414e68 pipelines - cron weekly and changed act runner
All checks were successful
/ deploy-to-homesrv01 (push) Successful in 5m49s
2025-05-04 14:13:20 +01:00
faf176cc8d modified: README.md
All checks were successful
/ deploy-to-homesrv01 (push) Successful in 20s
2025-05-04 13:02:12 +01:00
49261d5e0f modified: README.md
All checks were successful
/ deploy-to-homesrv01 (push) Successful in 36s
2025-04-05 23:07:00 +01:00
18f27615a3 modified: README.md
All checks were successful
/ deploy-to-homesrv01 (push) Successful in 4m51s
2024-12-30 00:24:34 +00:00
dd9d1e32e3 modified: docker-compose.yaml
All checks were successful
/ deploy-to-homesrv01 (push) Successful in 7s
2024-12-30 00:11:04 +00:00
cd1469f7a0 new file: .gitea/workflows/deploy.yml 2024-12-30 00:08:05 +00:00
a88fecd697 modified: .gitignore 2024-12-29 21:50:06 +00:00
4afbea5ad4 modified: README.md 2024-12-29 21:22:24 +00:00
dbf8cffcb8 modified: README.md 2024-12-29 15:43:54 +00:00
bc6776d4da modified: docker-compose.yaml 2024-12-01 20:09:13 +00:00
95d93fd2c5 README.md 2024-08-31 11:14:34 +01:00
61d2fa83dd README.md 2024-08-31 03:17:33 +01:00
9ed47a4605 remove has config from repo 2024-08-31 03:01:05 +01:00
d76173697a devices documentation 2024-08-31 02:54:21 +01:00
ee9ed5f1f8 README.md 2024-08-30 22:24:10 +01:00
b5446a7304 README.md 2024-08-29 23:35:40 +01:00
2beee8f7f0 remove unused configuration panel_iframe 2024-08-29 00:32:53 +01:00
196f1ac84d README.md 2024-08-28 22:24:39 +01:00
8b4142e680 README.md 2024-08-27 12:11:53 +01:00
ae5d6fe785 README.md 2024-08-27 11:48:46 +01:00
2e4a05e0bb documentation 2024-08-25 11:13:04 +01:00
0facf469b5 modified: README.md 2024-08-24 23:15:32 +01:00
4f8417fcf7 documentation 2024-08-24 23:04:56 +01:00
4547c073fb Update README.md 2024-08-24 11:01:33 +00:00
b35fa7099f modified: README.md 2024-08-24 11:56:36 +01:00
c5ed855b98 modified: README.md
new file:   documentation/images/integrations-broadlink.png
2024-08-24 11:51:18 +01:00
967e9957b2 Changes to be committed:
modified:   .gitignore
	modified:   volumes/config/.gitignore
	modified:   volumes/config/scripts.yaml
2024-08-24 10:43:04 +01:00
8fcd987489 Update docker-compose.yaml 2024-08-24 00:31:36 +00:00
192d4ac117 add host documentation 2024-05-31 16:14:30 +01:00
26 changed files with 508 additions and 579 deletions

View File

@@ -0,0 +1,48 @@
name: Casa Home Assistant CI/CD Pipeline
on:
push:
branches:
- fix/*
- main
- master
pull_request:
schedule:
- cron: '0 16 * * 0' # every sunday 4 pm
jobs:
deploy:
runs-on: casa-vlan-cicd
env:
GITHUB_TEMP: ${{ runner.temp }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Fetch limbo public actions
env:
RUNNER_TEMP: "${{ runner.temp }}"
WORKSPACE: "${{ gitea.workspace }}"
run: |
curl -fsSL https://git.limbosolutions.com/kb/gitea/raw/branch/main/cloud-scripts/setup-limbo-actions.sh | bash 2>&1
- name: Setup kubectl
uses: ./.gitea/limbo_actions/kubectl-setup
with:
kube_server: ${{ secrets.CASA_VLAN_KUBE_SERVER }}
kube_ca_base64: ${{ secrets.CASA_VLAN_KUBE_CA_BASE64 }}
kube_token: ${{ secrets.CASA_VLAN_KUBE_TOKEN }}
- name: Deploy Home Assistant
shell: bash
env:
ENDPOINT_IP: "${{ secrets.CASA_HOMEASSISTANT_ENDPOINT_IP }}"
SERVICE_PORT: "${{ secrets.CASA_HOMEASSISTANT_ENDPOINT_SERVICE_PORT }}"
INGRESS_ROUTES_MATCH: "${{ secrets.CASA_HOMEASSISTANT_INGRESS_ROUTES_MATCH }}"
INGRESS_TLS_SECRET_NAME: "${{ secrets.CASA_HOMEASSISTANT_INGRESS_TLS_SECRET_NAME }}"
run: |
kubectl apply -f ./deploy/deployment.yaml \
&& envsubst < ./deploy/service.template.yaml | kubectl apply -f -

3
.gitignore vendored
View File

@@ -1,3 +1,4 @@
**.env
.vscode
volumes/config/www/pimusicbox
.devcontainer
.tmp/**

257
README.md
View File

@@ -0,0 +1,257 @@
# Home Assistant
Welcome to my Home Assistant setup repository.
This repository documents and maintains the Home Assistant instance running in my home, hosted on casa server k3s cluster.
Related containers, such as MQTT and speech recognition, are hosted on same cluster.
**Table of Contents:**
- [Devices](#devices)
- [Broadlink - RM4 Pro](#broadlink---rm4-pro)
- [ZigBee - Smart Plugs](#zigbee---smart-plugs)
- [Shelly - Smart Plugs](#shelly---smart-plugs)
- [Integrations](#integrations)
- [MQTT](#mqtt)
- [zigbee2mqtt](#zigbee2mqtt)
- [Broadlink](#broadlink)
- [Wyoming Protocol](#wyoming-protocol)
- [HACS](#hacs)
- [Google Cast](#google-cast)
- [LG webOS Smart TV](#lg-webos-smart-tv)
- [Mobile App](#mobile-app)
- [Meteorologisk institutt (Met.no)](#meteorologisk-institutt-metno)
- [Pi-hole](#pi-hole)
- [Proxmox VE](#proxmox-ve)
- [Shelly](#shelly)
- [Speedtest.net](#speedtestnet)
- [Squeezebox (Lyrion Music Server)](#squeezebox-lyrion-music-server)
- [Sun](#sun)
- [Time \& Date](#time--date)
- [Xbox](#xbox)
- [Setup](#setup)
## Devices
### Broadlink - RM4 Pro
Using as Ir blaster for living room devices and temperature meter.
![ZigBee Smart Plugs](./docs/images/broadlink-universal-remote-irwifi-rm4-mini.jpg)
**Integrations:**
- [broadlink](#broadlink)
### ZigBee - Smart Plugs
Currently controlling:
- bed room lights
- dining table lights
- office room lights
![ZigBee Smart Plugs](./docs/images/51ojy7qoMmL._SL1500_.jpg)
**Integrations:**
- [zigbee2mqtt](#zigbee2mqtt)
- [mqtt](#mqtt)
### Shelly - Smart Plugs
- brutusplug
- shellyplug-s-80646f83bcf2.dev.lan
- brutus.dev.lan (proxmox server)
- gaiaplug
- shellyplug-s-80646F80FB14.dev.lan
- gaia.dev.lan (proxmox server)
![Shelly - Smart Plug](./docs/images/shellysmartplug.png)
Devices connected to IOT lan.
**Integrations:**
- [shelly](#shelly)
## Integrations
### MQTT
MQTT (Message Queuing Telemetry Transport) is a lightweight, publish/subscribe messaging protocol designed for machine-to-machine (M2M) communication and the Internet of Things (IoT). It operates on top of TCP/IP, making it ideal for resource-constrained devices.
**Setup:**
The Mosquitto MQTT broker is configured as the central messaging hub. For setup details, refer to the [Mosquitto setup repository](https://git.limbosolutions.com/marcio.fernandes/mosquitto).
**Requirements:**
Ensure port `1883` is accessible from Home Assistant to the Mosquitto server (`mqtt.lan`).
**Links:**
- [Home Assistant MQTT Integration Documentation](https://www.home-assistant.io/integrations/mqtt)
### zigbee2mqtt
Configured as a docker container on [homesrv01](/marcio.fernandes/homesrv01.dev.lan#zigbee2mqtt).
Using SONOFF Universal Zigbee 3.0 USB Dongle Plus.
### Broadlink
The [broadlink integration](https://www.home-assistant.io/integrations/broadlink) allows you to control and monitor Broadlink universal remotes, smart plugs, power strips, switches and sensors.
![broadlink integration](./docs/images/integrations-broadlink.png).
Devices:
- RM4 mini (IR Blaster)
Requires port 80 access from home assistant to Broadlink devices.
### Wyoming Protocol
A peer-to-peer protocol for voice assistants (basically JSONL + PCM audio)
```json
{ "type": "...", "data": { ... }, "data_length": ..., "payload_length": ... }
<data_length bytes (optional)>
<payload_length bytes (optional)>
```
Used in Rhasspy and Home Assistant for communication with voice services.
This is an open standard of the Open Home Foundation.
Docker containers currently hosted at [homesrv01.dev.lan](https://git.limbosolutions.com/marcio.fernandes/homesrv01.dev.lan#wyoming).
**Links:**
- <https://github.com/home-assistant/addons/blob/master/whisper/DOCS.md>
- <https://github.com/rhasspy/wyoming-faster-whisper>
### HACS
**Links:**
- [Official git repo](https://github.com/hacs/integration)
### Google Cast
**Links:**
- [Home Assistant - Official integration documentation](https://www.home-assistant.io/integrations/cast)
- [Official git repo](https://github.com/home-assistant/core/tree/dev/homeassistant/components/cast)
### LG webOS Smart TV
The webostv platform allows you to control a LG webOS Smart TV.
There is currently support for the following device types within Home Assistant:
- Media player
- Notifications
To begin with enable LG Connect Apps feature in Network settings of the TV.
### Mobile App
The Mobile App integration allows Home Assistant mobile apps to easily integrate with Home Assistant.
**Links:**
- [Home Assistant - Official integration documentation](https://www.home-assistant.io/integrations/mobile_app)
### Meteorologisk institutt (Met.no)
The met platform uses the Met.no web service as a source for meteorological data for your location. The weather forecast is delivered by the Norwegian Meteorological Institute and the NRK.
**Links:**
- [Home Assistant - Official integration documentation](https://www.home-assistant.io/integrations/met)
### Pi-hole
The Pi-hole integration allows you to retrieve statistics and interact with a Pi-hole system.
**Links:**
- [Home Assistant - Official integration documentation](https://www.home-assistant.io/integrations/pi_hole)
### Proxmox VE
Proxmox VE Custom Integration Home Assistant
**Links:**
- [Official integration repo](https://github.com/dougiteixeira/proxmoxve)
### Shelly
Integrate Shelly devices into Home Assistant.
[Devices](#shelly---smart-plugs) connected to IOT lan.
**Firewall rules:**
- allow TCP:80(HTTP) from server homesrv to vlan IOT
- allow TCP:5683(CoIoT) from vlan IOT to server homesrv
- allow TCP:80(HTTP) from vlan IOT to server homesrv
**Links:**
- [Home Assistant - Official integration documentation](https://www.home-assistant.io/integrations/shelly)
### Speedtest.net
The Speedtest.net integration uses the Speedtest.net web service to measure network bandwidth performance.
**Links:**
- [Home Assistant - Official integration documentation](https://www.home-assistant.io/integrations/speedtestdotnet)
### Squeezebox (Lyrion Music Server)
The Squeezebox integration allows you to control music players from the Lyrion Music Server (LMS) ecosystem. Lyrion Music Server was previously known as Logitech Media Server.
The Squeezebox music player ecosystem, which can be controlled through this integration, includes hardware audio players from Logitech, including Squeezebox 3rd Generation, Squeezebox Boom, Squeezebox Receiver, Transporter, Squeezebox2, Squeezebox and SLIMP3, and many software emulators like Squeezelite, SqueezeSlave, SoftSqueeze and SqueezePlay.
[Check git repo](/marcio.fernandes/lms) for more information how to setup Lyrion Music Server docker container.
RaspberryPI client:
- <https://git.limbosolutions.com/marcio.fernandes/pi.bluetooth.speaker>
**Links:**
- [Home Assistant - Official integration documentation](https://www.home-assistant.io/integrations/squeezebox)
### Sun
The sun integration will use the location as configured in your Home Assistant configuration to track if the sun is above or below the horizon. The sun can be used within automation's as a trigger with an optional offset to simulate dawn/dusk or as a condition with an optional offset to test if the sun has already set or risen.
**Links:**
- [Home Assistant - Official integration documentation](https://www.home-assistant.io/integrations/sun)
### Time & Date
The time and date (time_date) integration allows one to create sensors for the current date or time in different formats. All values are based on the timezone which is set in “General Configuration”.
**Links:**
- [Home Assistant - Official integration documentation](https://www.home-assistant.io/integrations/time_date)
### Xbox
The Xbox integration allows you to control Xbox One (or newer) consoles from Home Assistant.
Home Assistant authenticates with Xbox Live through OAuth2 using the Home Assistant Cloud account linking service.
**Links:**
- [Home Assistant - Official integration documentation](https://www.home-assistant.io/integrations/xbox)
## Setup
[Deploy documentation](./deploy/README.md).

51
deploy/README.md Normal file
View File

@@ -0,0 +1,51 @@
# Home Assistant Deploy
## Namespace
```bash { cwd=../ terminalRows=15 }
# from repo root folder
kubectl create namespace home-assistant
```
## Deployment
### Environments requirements
``` bash
#./deploy/.env
export ENDPOINT_IP="xxx.xxx.xxx.xxxx"
export SERVICE_PORT=xxxx
export INGRESS_ROUTES_MATCH="Host(`xxxx`)"
export INGRESS_TLS_SECRET_NAME=xxxxxx
```
## Test Templates
```bash { cwd=../ terminalRows=15 }
# from repo root folder
source ./deploy/.env \
&& cat ./deploy/deployment.yaml \
&& envsubst < ./deploy/service.template.yaml
```
## Deploy
```bash { cwd=../ terminalRows=15 }
# from repo root folder
source ./deploy/.env \
&& kubectl apply -f ./deploy/deployment.yaml \
&& envsubst < ./deploy/service.template.yaml | kubectl apply -f -
```
## Continuos Deploy
All Environment variables requirements as set as secrets.
[gitea workflow](../.gitea/workflows/deploy.yaml)
## cicd RBAC
```bash { cwd=../ }
kubectl apply -f ./deploy/cicd-rbac.yaml
```

34
deploy/cicd-rbac.yaml Normal file
View File

@@ -0,0 +1,34 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: home-assistant
name: ci-cd
rules:
- apiGroups: [""]
resources: ["pods", "services", "secrets", "configmaps", "persistentvolumeclaims", "endpoints"]
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
- apiGroups: ["apps"]
resources: ["deployments", "statefulsets"]
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
- apiGroups: ["networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
- apiGroups: ["traefik.io"]
resources: ["ingressroutes"]
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ci-cd
namespace: home-assistant
subjects:
- kind: ServiceAccount
name: casa-ci-cd
namespace: home-assistant
roleRef:
kind: Role
name: ci-cd
apiGroup: rbac.authorization.k8s.io

61
deploy/deployment.yaml Normal file
View File

@@ -0,0 +1,61 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: home-assistant-config
namespace: home-assistant
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
storageClassName: local-path
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: home-assistant
namespace: home-assistant
labels:
app: home-assistant
spec:
replicas: 1
selector:
matchLabels:
app: home-assistant
template:
metadata:
labels:
app: home-assistant
spec:
dnsPolicy: ClusterFirstWithHostNet # ensures pod uses cluster DNS (CoreDNS) for service discovery even with host networking
hostNetwork: true
nodeName: casa # force deploy to master node cluster
tolerations:
- key: "node-role.kubernetes.io/control-plane" # allow installation on control-plane
operator: "Exists"
effect: "NoSchedule"
containers:
- name: home-assistant
image: "homeassistant/home-assistant"
imagePullPolicy: Always
env:
- name: TZ
value: Europe/Lisbon # set timezone
volumeMounts:
- name: home-assistant-config
mountPath: /config
resources:
requests:
memory: "256Mi"
cpu: "400m"
limits:
memory: "724Mi"
cpu: "1000m"
volumes:
- name: home-assistant-config
persistentVolumeClaim:
claimName: home-assistant-config

View File

@@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: casa-ci-cd
annotations:
kubernetes.io/service-account.name: casa-ci-cd
type: kubernetes.io/service-account-token

View File

@@ -0,0 +1,6 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: casa-ci-cd
namespace: home-assistant

View File

@@ -0,0 +1,42 @@
apiVersion: v1
kind: Service
metadata:
name: home-assistant
namespace: home-assistant
spec:
clusterIP: None
ports:
- port: ${SERVICE_PORT}
protocol: TCP
---
apiVersion: v1
kind: Endpoints
metadata:
name: home-assistant
namespace: home-assistant
subsets:
- addresses:
- ip: ${ENDPOINT_IP}
ports:
- port: ${SERVICE_PORT}
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: home-assistant
namespace: home-assistant
spec:
entryPoints:
- websecure
routes:
- match: ${INGRESS_ROUTES_MATCH}
kind: Rule
services:
- name: home-assistant
port: ${SERVICE_PORT}
tls:
secretName: ${INGRESS_TLS_SECRET_NAME}

View File

@@ -1,22 +0,0 @@
version: '3'
services:
app:
container_name: homeassistant-app
image: "homeassistant/home-assistant"
volumes:
- app_config:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
networks:
has:
reverseproxy_public:
ports:
- 8080:80
- 5683:5683/udp # SELLY INTEGRATION
volumes:
app_config:
networks:
has:
reverseproxy_public:
external: true

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@@ -1,52 +0,0 @@
# Created by https://www.toptal.com/developers/gitignore/api/homeassistant
# Edit at https://www.toptal.com/developers/gitignore?templates=homeassistant
### HomeAssistant ###
# Files with personal details
*.crt
*.csr
*.key
.cloud
.google.token
.HA_VERSION
.storage
.uuid
icloud/
google_calendars.yaml
harmony_media_room.conf
home-assistant.db
home-assistant_v2.db
home-assistant_v2.db-*
html5_push_registrations.conf
image
ip_bans.yaml
known_devices.yaml
phue.conf
plex.conf
pyozw.sqlite
secrets.yaml
tradfri.conf
webostv.conf
# Temporary files
*.db-journal
*.pid
tts
# automatically downloaded dependencies
deps
lib
# Log files
home-assistant.log
home-assistant.log.*
ozw_log.txt
# Development files
custom_components
# End of https://www.toptal.com/developers/gitignore/api/homeassistant

View File

@@ -1,39 +0,0 @@
- id: '1713172414513'
alias: Door Batery Low
description: ''
trigger:
- platform: numeric_state
entity_id:
- sensor.portadaentrada_battery
below: 40
enabled: false
- type: bat_low
platform: device
device_id: 3bc6bb9f522dc44ba7b223511d124978
entity_id: d1a83c7b24d0cb0e3d98221176596f21
domain: binary_sensor
for:
hours: 0
minutes: 5
seconds: 0
- type: bat_low
platform: device
device_id: 3bc6bb9f522dc44ba7b223511d124978
entity_id: cc070eaef8e0231e7a580b17e4826b73
domain: binary_sensor
for:
hours: 0
minutes: 5
seconds: 0
condition: []
action:
- service: notify.mobile_app_mfs9plus
metadata: {}
data:
title: Porta da entrada
message: low bat
- service: notify.persistent_notification
data:
title: Porta da entrada
message: low bat
mode: single

View File

@@ -1,50 +0,0 @@
blueprint:
name: Motion-activated Light
description: Turn on a light when motion is detected.
domain: automation
source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/motion_light.yaml
input:
motion_entity:
name: Motion Sensor
selector:
entity:
domain: binary_sensor
device_class: motion
light_target:
name: Light
selector:
target:
entity:
domain: light
no_motion_wait:
name: Wait time
description: Time to leave the light on after last motion is detected.
default: 120
selector:
number:
min: 0
max: 3600
unit_of_measurement: seconds
# If motion is detected within the delay,
# we restart the script.
mode: restart
max_exceeded: silent
trigger:
platform: state
entity_id: !input motion_entity
from: "off"
to: "on"
action:
- service: light.turn_on
target: !input light_target
- wait_for_trigger:
platform: state
entity_id: !input motion_entity
from: "on"
to: "off"
- delay: !input no_motion_wait
- service: light.turn_off
target: !input light_target

View File

@@ -1,43 +0,0 @@
blueprint:
name: Zone Notification
description: Send a notification to a device when a person leaves a specific zone.
domain: automation
source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/notify_leaving_zone.yaml
input:
person_entity:
name: Person
selector:
entity:
domain: person
zone_entity:
name: Zone
selector:
entity:
domain: zone
notify_device:
name: Device to notify
description: Device needs to run the official Home Assistant app to receive notifications.
selector:
device:
integration: mobile_app
trigger:
platform: state
entity_id: !input person_entity
variables:
zone_entity: !input zone_entity
# This is the state of the person when it's in this zone.
zone_state: "{{ states[zone_entity].name }}"
person_entity: !input person_entity
person_name: "{{ states[person_entity].name }}"
condition:
condition: template
value_template: "{{ trigger.from_state.state == zone_state and trigger.to_state.state != zone_state }}"
action:
domain: mobile_app
type: notify
device_id: !input notify_device
message: "{{ person_name }} has left {{ zone_state }}"

View File

@@ -1,84 +0,0 @@
blueprint:
name: Confirmable Notification
description: >-
A script that sends an actionable notification with a confirmation before
running the specified action.
domain: script
source_url: https://github.com/home-assistant/core/blob/master/homeassistant/components/script/blueprints/confirmable_notification.yaml
input:
notify_device:
name: Device to notify
description: Device needs to run the official Home Assistant app to receive notifications.
selector:
device:
integration: mobile_app
title:
name: "Title"
description: "The title of the button shown in the notification."
default: ""
selector:
text:
message:
name: "Message"
description: "The message body"
selector:
text:
confirm_text:
name: "Confirmation Text"
description: "Text to show on the confirmation button"
default: "Confirm"
selector:
text:
confirm_action:
name: "Confirmation Action"
description: "Action to run when notification is confirmed"
default: []
selector:
action:
dismiss_text:
name: "Dismiss Text"
description: "Text to show on the dismiss button"
default: "Dismiss"
selector:
text:
dismiss_action:
name: "Dismiss Action"
description: "Action to run when notification is dismissed"
default: []
selector:
action:
mode: restart
sequence:
- alias: "Set up variables"
variables:
action_confirm: "{{ 'CONFIRM_' ~ context.id }}"
action_dismiss: "{{ 'DISMISS_' ~ context.id }}"
- alias: "Send notification"
domain: mobile_app
type: notify
device_id: !input notify_device
title: !input title
message: !input message
data:
actions:
- action: "{{ action_confirm }}"
title: !input confirm_text
- action: "{{ action_dismiss }}"
title: !input dismiss_text
- alias: "Awaiting response"
wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: "{{ action_confirm }}"
- platform: event
event_type: mobile_app_notification_action
event_data:
action: "{{ action_dismiss }}"
- choose:
- conditions: "{{ wait.trigger.event.data.action == action_confirm }}"
sequence: !input confirm_action
- conditions: "{{ wait.trigger.event.data.action == action_dismiss }}"
sequence: !input dismiss_action

View File

@@ -1,81 +0,0 @@
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# enable wake on lan integration
wake_on_lan:
http:
server_port: 80
use_x_forwarded_for: true
trusted_proxies:
- 0.0.0.0/0 #cuidado com isto
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
#light:
# Example configuration.yaml entry
# - platform: flux_led
# devices:
# 192.168.2.48:
# name: movel_tv_strip
# mode: rgb
#sensor:
# - platform: command_line
# command: "python3 /config/scripts/limbowiki_get_info.py"
# name: limbowiki_info
# json_attributes:
# - status
# - version
# - platform: template
# sensors:
# limbowiki_info_status:
# value_template: "{{ state_attr('sensor.limbowiki_info', 'status') }}"
# limbowiki_info_version:
# value_template: "{{ state_attr('sensor.limbowiki_info', 'version') }}"
# sensor livingroom audio:
# platform: mqtt
# state_topic: "home/devices/livingroom/audio/input"
# name: "livingroom Audio"
#sensor pilivingroom bluetoothctl-dev:
# platform: mqtt
# state_topic: "home/devices/pimusicmydev/bluetooth"
# json_attributes_topic: "home/devices/pimusicmydev/bluetooth"
# name: "pilivingroom-dev bluetoothctl-dev"
# value_template: Bluetoothctl mqtt
# json_attributes_template: >
# {
# "mqttTopic":"{{value_json.mqttTopic}}",
# "devices":{{value_json.devices|to_json}}
# }
#sensor livingroom bluetooth devices:
# platform: mqtt
# state_topic: "home/devices/livingroom/bluetooth/devices"
# json_attributes_topic: "home/devices/livingroom/bluetooth/devices"
# name: "livingroom bluetooth devices"
# value_template: Bluetooth Devices Counter {{ value_json|length }}
# json_attributes_template: >
# {"devices":{{value_json|to_json}}}
panel_iframe:
homeserver_dashboad:
title: "HomeServer Admin"
icon: mdi:qrcode-edit
url: "http://homesrv01.dev.lan:9777"
require_admin: true
lms:
title: "LMS"
icon: mdi:music-box
url: "http://homesrv01.dev.lan:9000"
require_admin: false

View File

@@ -1,67 +0,0 @@
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
http:
server_port: 80
use_x_forwarded_for: true
trusted_proxies:
- 192.168.1.0/24
# Text to speech
tts:
- platform: google_translate
webostv:
name: Living Room TV
host: 192.168.1.249
#other settings
turn_on_action:
service: wake_on_lan.send_magic_packet
data:
mac: B0:37:95:8D:06:78
wake_on_lan:
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
light:
# Example configuration.yaml entry
- platform: flux_led
devices:
192.168.2.48:
name: movel_tv_strip
mode: rgb
sensor:
- platform: command_line
command: "python3 /config/scripts/limbowiki_get_info.py"
name: limbowiki_info
json_attributes:
- status
- version
- platform: template
sensors:
limbowiki_info_status:
value_template: "{{ state_attr('sensor.limbowiki_info', 'status') }}"
limbowiki_info_version:
value_template: "{{ state_attr('sensor.limbowiki_info', 'version') }}"
sensor livingroom audio:
platform: mqtt
state_topic: "home/devices/livingroom/audio/input"
name: "livingroom Audio"
sensor livingroom bluetooth devices:
platform: mqtt
state_topic: "home/devices/livingroom/bluetooth/devices"
json_attributes_topic: "home/devices/livingroom/bluetooth/devices"
name: "livingroom bluetooth devices"
value_template: Bluetooth Devices Counter {{ value_json|length }}
json_attributes_template: >
{"json":"{{value_json|json}}"}
| json

View File

@@ -1,122 +0,0 @@
livingroom_start_playing_xbox_script:
sequence:
- service: script.livingroom_tvon_if_off
data: {}
- type: turn_on
device_id: ab5d0bc41be685464f6308e6a96f6bbe
entity_id: remote.xbox_remote
domain: remote
- service: media_player.select_source
target:
entity_id: media_player.living_room_tv
data:
source: XBOX Game Console
- service: remote.send_command
data:
device: irblaster-01
command: bddvd
target:
entity_id: remote.irblaster_01_remote
mode: single
alias: livingroom_start_playing_xbox
icon: mdi:microsoft-xbox
livingroom_start_watching_amazonprime:
alias: livingroom_start_watching_amazonprime
sequence:
- service: script.livingroom_tvon_if_off
data: {}
- service: media_player.select_source
target:
entity_id: media_player.living_room_tv
data:
source: Prime Video
- service: remote.send_command
data:
device: irblaster-01
command: bddvd
target:
entity_id: remote.irblaster_01_remote
mode: single
icon: mid:microsoft-xbox
livingroom_start_watching_youtube:
alias: livingroom_start_watching_youtube
sequence:
- service: script.livingroom_tvon_if_off
data: {}
- service: media_player.select_source
target:
entity_id: media_player.living_room_tv
data:
source: YouTube
- service: remote.send_command
data:
device: irblaster-01
command: bddvd
target:
entity_id: remote.irblaster_01_remote
mode: single
icon: mid:microsoft-xbox
livingroom_start_watching_hbomax:
alias: livingroom_start_watching_hbomax
sequence:
- service: script.livingroom_tvon_if_off
data: {}
- service: media_player.select_source
target:
entity_id: media_player.living_room_tv
data:
source: HBO Max
- service: remote.send_command
data:
device: irblaster-01
command: bddvd
target:
entity_id: remote.irblaster_01_remote
mode: single
icon: mdi:television
livingroom_start_watch_vodafone:
alias: livingroom_start_watch_vodafone
sequence:
- service: script.livingroom_tvon_if_off
data: {}
- service: media_player.select_source
target:
entity_id: media_player.living_room_tv
data:
source: HBO Max
- service: remote.send_command
data:
device: irblaster-01
command: bddvd
target:
entity_id: remote.irblaster_01_remote
mode: single
icon: mdi:television
livingroom_tvon_if_off:
alias: livingroom_tv_on_if_off
sequence:
- if:
- condition: device
device_id: 40438b8ef2cbd6e06c3a1835498c70f0
domain: media_player
entity_id: media_player.living_room_tv
type: is_off
then:
- service: wake_on_lan.send_magic_packet
data:
mac: B0:37:95:8D:06:78
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
mode: single
icon: mdi:television
livingroom_power_off:
alias: livingroom_power_off
sequence:
- service: media_player.turn_off
data: {}
target:
entity_id: media_player.living_room_tv
mode: single

View File

@@ -1,18 +0,0 @@
from lxml import html
import requests
# Request the page
try:
page = requests.get('https://wiki.limbosolutions.com/index.php/P%C3%A1gina_principal', timeout=2)
# Parsing the page
# (We need to use page.content rather than
# page.text because html.fromstring implicitly
# expects bytes as input.)
tree = html.fromstring(page.content)
# Get element using XPath
buyers = tree.xpath('string(//html//head//meta//@content)')
print("{\"status\":\"On\",\"version\":\"" + buyers + "\"}")
except:
print("{\"status\":\"error\"}")