Skip to content
Snippets Groups Projects
Commit 2d8c371c authored by void's avatar void
Browse files
parents 1efae591 c8ac533e
No related branches found
No related tags found
No related merge requests found
Showing
with 99 additions and 9 deletions
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
state: present state: present
vars: vars:
packages: packages:
- apparmor
- docker-ce - docker-ce
- docker-compose - docker-compose
- python3 - python3
......
...@@ -27,6 +27,10 @@ external_components: ...@@ -27,6 +27,10 @@ external_components:
payload: "OFF" payload: "OFF"
then: then:
- light.turn_off: matrix_light - light.turn_off: matrix_light
- topic: warpzone/door/status
payload: "CLOSED"
then:
- light.turn_off: matrix_light
light: light:
- platform: monochromatic - platform: monochromatic
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
{% include "/includes/common.inc.yaml" %} {% include "/includes/common.inc.yaml" %}
on_message: on_message:
- topic: ESPHome/{{ devicename }}/state/command - topic: warpzone/door/status
payload: "ON" payload: "OPEN"
then: then:
- light.turn_on: - light.turn_on:
id: logo_led id: logo_led
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
id: kuehl_led id: kuehl_led
effect: "Rainbow" effect: "Rainbow"
brightness: 100% brightness: 100%
- topic: ESPHome/{{ devicename }}/state/command - topic: warpzone/door/status
payload: "OFF" payload: "CLOSED"
then: then:
- light.turn_off: logo_led - light.turn_off: logo_led
- light.turn_off: kuehl_led - light.turn_off: kuehl_led
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
payload: "OFF" payload: "OFF"
then: then:
- switch.turn_off: relay - switch.turn_off: relay
- topic: warpzone/door/status
payload: "CLOSED"
then:
- switch.turn_off: relay
status_led: status_led:
pin: pin:
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
payload: "OFF" payload: "OFF"
then: then:
- switch.turn_off: relay - switch.turn_off: relay
- topic: warpzone/door/status
payload: "CLOSED"
then:
- switch.turn_off: relay
status_led: status_led:
pin: pin:
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
payload: "OFF" payload: "OFF"
then: then:
- switch.turn_off: relay - switch.turn_off: relay
- topic: warpzone/door/status
payload: "CLOSED"
then:
- switch.turn_off: relay
status_led: status_led:
pin: pin:
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
payload: "OFF" payload: "OFF"
then: then:
- switch.turn_off: relay - switch.turn_off: relay
- topic: warpzone/door/status
payload: "CLOSED"
then:
- switch.turn_off: relay
status_led: status_led:
pin: pin:
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
payload: "OFF" payload: "OFF"
then: then:
- switch.turn_off: relay - switch.turn_off: relay
- topic: warpzone/door/status
payload: "CLOSED"
then:
- switch.turn_off: relay
substitutions: substitutions:
plug_name: {{ devicename }} plug_name: {{ devicename }}
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
payload: "OFF" payload: "OFF"
then: then:
- switch.turn_off: relay - switch.turn_off: relay
- topic: warpzone/door/status
payload: "CLOSED"
then:
- switch.turn_off: relay
substitutions: substitutions:
plug_name: {{ devicename }} plug_name: {{ devicename }}
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
payload: "OFF" payload: "OFF"
then: then:
- switch.turn_off: relay - switch.turn_off: relay
- topic: warpzone/door/status
payload: "CLOSED"
then:
- switch.turn_off: relay
substitutions: substitutions:
plug_name: {{ devicename }} plug_name: {{ devicename }}
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
payload: "OFF" payload: "OFF"
then: then:
- switch.turn_off: relay - switch.turn_off: relay
- topic: warpzone/door/status
payload: "CLOSED"
then:
- switch.turn_off: relay
substitutions: substitutions:
plug_name: {{ devicename }} plug_name: {{ devicename }}
......
...@@ -59,7 +59,7 @@ binary_sensor: ...@@ -59,7 +59,7 @@ binary_sensor:
host: TL-SG3452X host: TL-SG3452X
name: "Switch02" name: "Switch02"
count: 3 count: 3
scan_interval: 5 scan_interval: 20
# https://www.home-assistant.io/integrations/rest_command/ # https://www.home-assistant.io/integrations/rest_command/
rest_command: rest_command:
...@@ -96,7 +96,7 @@ input_select: ...@@ -96,7 +96,7 @@ input_select:
- closed - closed
icon: mdi:door-open icon: mdi:door-open
# current time for # current time for zonenstatus telegram
sensor: sensor:
- platform: time_date - platform: time_date
display_options: display_options:
...@@ -142,7 +142,7 @@ automation ansible: ...@@ -142,7 +142,7 @@ automation ansible:
option: closed option: closed
target: target:
entity_id: input_select.zonenstatus entity_id: input_select.zonenstatus
mode: single mode: restart
# send zonenstatus to MQTT, REST # send zonenstatus to MQTT, REST
- alias: ANSIBLE_zonenstatus_send_MQTT_REST - alias: ANSIBLE_zonenstatus_send_MQTT_REST
...@@ -175,7 +175,7 @@ automation ansible: ...@@ -175,7 +175,7 @@ automation ansible:
payload: CLOSED payload: CLOSED
- service: rest_command.set_zone_status_closed - service: rest_command.set_zone_status_closed
data: {} data: {}
mode: single mode: restart
# send zonenstatus to telegram # send zonenstatus to telegram
- alias: ANSIBLE_zonenstatus_send_telegram - alias: ANSIBLE_zonenstatus_send_telegram
...@@ -207,4 +207,4 @@ automation ansible: ...@@ -207,4 +207,4 @@ automation ansible:
target: -1001893089134 target: -1001893089134
timeout: 30 timeout: 30
message: Die warpzone ist seit {{ '{{' }} states('sensor.time') {{ '}}' }} geschlossen! message: Die warpzone ist seit {{ '{{' }} states('sensor.time') {{ '}}' }} geschlossen!
mode: single mode: restart
---
- name: "create folder struct for {{ servicename }}"
ansible.builtin.file:
path: "{{ item }}"
state: "directory"
recurse: yes
owner: 1000
group: 1000
with_items:
- "{{ basedir }}/data/"
- name: "copy config files file for {{ servicename }}"
ansible.builtin.template:
src: "{{ item }}"
dest: "{{ basedir }}/{{ item }}"
mode: '0755'
with_items:
- "docker-compose.yml"
- name: "start {{ servicename }} with docker-compose"
community.docker.docker_compose:
state: present
project_src: "{{ basedir }}"
version: "3"
services:
app:
image: ghcr.io/tasmoadmin/tasmoadmin:latest
restart: always
volumes:
- "{{ basedir }}/data:/data"
environment:
- TZ=Europe/Berlin
labels:
- traefik.enable=true
- traefik.http.routers.{{ servicename }}.rule=Host(`{{ domain }}`)
- traefik.http.routers.{{ servicename }}.entrypoints=websecure
- traefik.http.services.{{ servicename }}.loadbalancer.server.port=80
networks:
- default
- web
networks:
web:
external: true
...@@ -102,6 +102,12 @@ ...@@ -102,6 +102,12 @@
basedir: /srv/graylog, basedir: /srv/graylog,
domain: "graylog.warpzone.lan" domain: "graylog.warpzone.lan"
} }
- {
role: intern/docker_tasmoadmin, tags: tasmoadmin,
servicename: tasmoadmin,
basedir: /srv/tasmoadmin,
domain: "tasmoadmin.warpzone.lan"
}
- hosts: webserver - hosts: webserver
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment