TawfikDaim / home_automation

home automation user stories
0 stars 0 forks source link

copy of configuration at working Zigbee at home #84

Open TawfikDaim opened 1 week ago

TawfikDaim commented 1 week ago

Image Image Image Image

TawfikDaim commented 1 week ago

`version: "3.8" services:

cloudflared:

container_name: cloudflared

image: visibilityspots/cloudflared:latest

restart: unless-stopped

networks:

pihole_net:

ipv4_address: 10.0.0.5

ha-fusion:

container_name: ha-fusion

image: ghcr.io/matt8707/ha-fusion

volumes:

- /home/tawfik/automation/ha-fusion:/app/data

network_mode: bridge

ports:

- 5050:5050

environment:

TZ: Africa/Cairo

HASS_URL: http://10.195.1.51:8123

restart: always

frigate: container_name: frigate image: ghcr.io/blakeblackshear/frigate:stable

# Example for eight cameras detecting at 1280x720, including logs
# $ python -c 'print("{:.2f}MB".format(((1280 * 720 * 1.5 * 9 + 270480) / 1048576) * 8 + 30))' 
# 126.99MB
# update for your cameras based on calculation above
shm_size: "5484mb" 
restart: always
volumes:
  #Mounting a remote volume:
  #sudo apt install sshfs
#sudo mkdir /mnt/
#sudo sshfs -o allow_other Tawfik@192.168.1.100:/share/Dyar153/recordings/ /home/tawfik/Videos/
# can use this on a remote server or on same server at a specific folder
  - /home/tawfik/automation/frigate/frigate.yaml:/config/config.yaml

- //192.168.1.40/backup/media/:/frigate/media/

  - /home/tawfik/automation/frigate/:/media/frigate/
  - type: tmpfs        # Optional: 1GB of memory, reduces SSD/SD Card wear
    target: /tmp/cache
    tmpfs:
      size: 1000000000

- /home/tawfik/Videos/:/media/frigate # secind line will be ignored

# if using as a local server then will be
# using same logic can get the config file from a emote server or on same server at a specific folder
#- /home/tawfik/frigate/frigate.yaml:/config/config.yaml
#- /home/tawfik/frigate/media:/media/frigate
#- //192.168.1.100/dyar153/recordings:/media/frigate
ports:
  - 5000:5000
  - 1935:1935
environment:
  TZ: Africa/Cairo
  FRIGATE_RTSP_PASSWORD: Newipad1
  Path: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

networks:

pihole_net:

ipv4_address: 10.0.0.2

dns:

- 127.0.0.1

version: "3.7"

services:

mqtt5: image: eclipse-mosquitto container_name: mqtt5 ports:

volumes for mapping data,config and log

volumes:

config:

data:

log:

networks:

default:

name: mqtt5-network

version: "3.1"

services:

z2mqtt: container_name: z2mqtt image: koenkk/zigbee2mqtt restart: always

priviliged: true

devices:
  - /dev/ttyACM0:/dev/ttyACM0  
volumes:
#Mounting a remote volume:
 #sudo apt install sshfs
 #sudo mkdir /mnt/<folder name>
 #sudo sshfs -o allow_other Tawfik@192.168.1.100:/share/Dyar153/recordings/ /home/tawfik/Videos/
 # can use this on a remote server or on same server at a specific folder 
  - /home/tawfik/automation/z2mqtt:/app/data
  - /run/udev:/run/udev:ro  
 # if using as a local server then will be
 # using same logic can get the config file from a emote server or on same server at a specific folder
 #- /home/tawfik/frigate/frigate.yaml:/config/config.yaml
 #- /home/tawfik/frigate/media:/media/frigate
 #- //192.168.1.100/dyar153/recordings:/media/frigate
ports: 
  - 8080:8080
environment:
  TZ: Africa/Cairo
 #FRIGATE_RTSP_PASSWORD: Newipad1!
 #Path: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# networks:
#   pihole_net:
#     ipv4_address: 10.0.0.3
# dns:
#   - 127.0.0.1

version: '3'

services:

homeassistant: container_name: homeassistant image: "ghcr.io/home-assistant/home-assistant:stable" volumes:

networks:

pihole_net:

driver: bridge

ipam:

config:

- subnet: 10.0.0.0/29

volumes:

pihole:

dnsmasq:

version: "2.1"

services:

duckdns: image: lscr.io/linuxserver/duckdns:latest container_name: duckdns network_mode: host

lets_encrypt: accept_terms

environment:
  - PUID=1000 #optional
  - PGID=1000 #optional
  - TZ=Africa/Cairo
  - DOMAINS = dyararco.duckdns.org
  - UPDATE_IP=ipv4
  - TOKEN = 4ebd937a-2ac0-46ab-a28b-2a8633ec8529
  - LOG_FILE=true #optional
volumes:
  - /home/tawfik/automation/duckdns/appdata/config:/config #optional
restart: unless-stopped

letsencrypt:

container_name: letsencrypt-nginx

image: linuxserver/letsencrypt

restart: unless-stopped

volumes:

- /etc/localtime:/etc/localtime:ro

- /home/tawfik/automation/letsencrypt-nginx:/config

environment:

PGID: 1000

PUID: 1000

EMAIL: tawfikabdeldaim@gmail.com

URL: dyararco.duckdns.org

SUBDOMAINS: dyararco

VALIDATION: https

TZ: Africa/Cairo

ports:

- "80:80"

- "433:433"

nginx:

image: nginx:alpine

volumes:

- ./nginx/conf:/etc/nginx/conf.d:ro

- ./certbot/conf:/etc/letsencrypt:ro

- ./certbot/www:/var/www/certbot:ro

- ./site:/var/www/html:ro # this static or specific frontend service

ports:

- 80:80

- 443:443

# restart: unless-stopped

certbot:

image: certbot/certbot

volumes:

- ./certbot/conf:/etc/letsencrypt:rw

- ./certbot/www:/var/www/certbot:rw

command: renew

restart: unless-stopped

---

version: "3.7"

services:

tailscale-nginx:

image: tailscale/tailscale:latest

hostname: tawfik-IdeaPad-3-15ITL6

container_name: tailscale-nginx

environment:

- TS_AUTHKEY=tskey-auth-kor7U8Fnfb11CNTRL-GiU1BswqXVFcer22DiL1WF4JjkcdQS6p2

- TS_EXTRA_ARGS=--advertise-tags=tag:container

- TS_STATE_DIR=/var/lib/tailscale

- TS_USERSPACE=false

volumes:

- /home/tawfik/automation/tailscale-nginx/state:/var/lib/tailscale

- /dev/net/tun:/dev/net/tun

cap_add:

- net_admin

- sys_module

restart: unless-stopped

nginx:

image: nginx

depends_on:

- tailscale-nginx

network_mode: service:tailscale-nginx

services:

swag:

image: lscr.io/linuxserver/swag:latest

container_name: swag

cap_add:

- NET_ADMIN

environment:

- PUID=1000

- PGID=1000

- TZ=Africa/Cairo

- URL=dyararco.duckdns.org

- VALIDATION=http

- SUBDOMAINS=www, #optional

- CERTPROVIDER= #optional

- DNSPLUGIN=cloudflare #optional

- PROPAGATION= #optional

- EMAIL= #optional

- ONLY_SUBDOMAINS=false #optional

- EXTRA_DOMAINS= #optional

- STAGING=false #optional

volumes:

- /home/tawfik/automation/swag/config:/config

ports:

- 443:443

- 80:80 #optional

restart: unless-stopped

duplicati:

image: lscr.io/linuxserver/duplicati:latest

container_name: duplicati

environment:

#  - PUID=1000
 # - PGID=1000
 # - TZ=Etc/UTC

- CLI_ARGS= #optional

volumes:

- /home/tawfik/automation/duplicati/config:/config

- /home/tawfik/automation:/source

#ports:
 # - 8200:8200

restart: unless-stopped`

TawfikDaim commented 1 week ago

Loads default set of integrations. Do not remove.

default_config:

lovelace: resources:

alarm_control_panel:

http:

ssl_certificate: /ssl/fullchain.pem

ssl_key: /ssl/privkey.pem

base_url: a153.dyararco.duckdns.org

use_x_forwarded_for: true

trusted_proxies:

- 127.0.0.1

ip_ban_enabled: true

login_attempts_threshold: 5

Example configuration.yaml entry

panel_iframe:

portainer:

title: "Portainer"

url: "https://10.195.1.51:9443"

require_admin: true

zigbee:

title: "Devices_zigbee"

url: "http://10.195.1.51:8080"

require_admin: true

frigate:

title: "Camera"

url: "http://10.195.1.51:5000"

notify:

bluetooth:

Load frontend themes from the themes folder

frontend: themes: !include_dir_merge_named themes

automation: !include automations.yaml script: !include scripts.yaml scene: !include scenes.yaml

command_line:

shell_command:

prepare_for_push_updates: git config --global --add safe.directory ./config user.name \"TawfikDaim\" user.email \"tawfik.daim@gmail.com\"

prepare_with_no_user_name: git config --global --add safe.directory ./config

pushupdates_to_github: /bin/bash /config/pushupdates.sh backup: /bin/bash /config/backup.sh

smartir:

climate:

- platform: smartir

name: Office AC

unique_id: office_ac

#device_code: 9507 #this device_code is the .json file you produced by learning IR codes for your climate device
#controller_data: zigbee2mqtt/zs06-ir/set
TawfikDaim commented 1 week ago

homeassistant: legacy_entity_attributes: true legacy_triggers: true frontend: true mqtt: base_topic: zigbee2mqtt server: mqqt://10.195.1.51:1883 availability: active: timeout: 30 passive: timeout: 1500 device_options: homeassistant: last_seen: enabled_by_default: true serial: port: /dev/ttyACM0 adapter: ezsp advanced: network_key:

TawfikDaim commented 1 week ago

allow_anonymous true listener 1883 listener 9001 protocol websockets

persistence true

password_file /mosquitto/config/pwfile

persistence_file mosquitto.db

persistence_location /mosquitto/data/