updating configuration
This commit is contained in:
@@ -5,7 +5,7 @@ ARGS = `arg="$(filter-out $@,$(MAKECMDGOALS))" && echo $${arg:-${1}}`
|
|||||||
update_secrets_sample:
|
update_secrets_sample:
|
||||||
@echo "Masking passwords..."
|
@echo "Masking passwords..."
|
||||||
#hass
|
#hass
|
||||||
@cat hass/settings/secrets.yaml | sed "s/\:.*/\: xxxxxxxxx/g" > hass/settings/secrets.yaml.sample #mask passwords
|
@cat secrets/hass/settings/secrets.yaml | sed "s/\:.*/\: xxxxxxxxx/g" > hass/settings/secrets.yaml.sample #mask passwords
|
||||||
@sed -i "s/latitude:.*/latitude: 1.0/g" hass/settings/secrets.yaml.sample #must be a number
|
@sed -i "s/latitude:.*/latitude: 1.0/g" hass/settings/secrets.yaml.sample #must be a number
|
||||||
@sed -i "s/longitude:.*/longitude: 1.0/g" hass/settings/secrets.yaml.sample #must be a number
|
@sed -i "s/longitude:.*/longitude: 1.0/g" hass/settings/secrets.yaml.sample #must be a number
|
||||||
@sed -i "s/aqara1_mac:.*/aqara1_mac: xxxxxxxxxxxx/g" hass/settings/secrets.yaml.sample #len 12
|
@sed -i "s/aqara1_mac:.*/aqara1_mac: xxxxxxxxxxxx/g" hass/settings/secrets.yaml.sample #len 12
|
||||||
@@ -29,16 +29,7 @@ update_secrets_sample:
|
|||||||
|
|
||||||
@cat zigbee2mqtt/settings/configuration.yaml | sed "s/\:.*/\: xxxxxxxxx/g" > zigbee2mqtt/settings/configuration.yaml.sample #mask passwords
|
@cat zigbee2mqtt/settings/configuration.yaml | sed "s/\:.*/\: xxxxxxxxx/g" > zigbee2mqtt/settings/configuration.yaml.sample #mask passwords
|
||||||
|
|
||||||
copy_secrets:
|
commit: update_secrets_sample
|
||||||
@echo "Copying secrets"
|
|
||||||
@cp hass/settings/secrets.yaml secrets/hass/settings/secrets.yaml
|
|
||||||
@cd secrets
|
|
||||||
@git add .
|
|
||||||
@git diff-index --quiet HEAD || git commit -m "secrets update"
|
|
||||||
@git push
|
|
||||||
@cd ../
|
|
||||||
|
|
||||||
commit: copy_secrets update_secrets_sample
|
|
||||||
git add .
|
git add .
|
||||||
git diff-index --quiet HEAD || git commit -m "$(call ARGS,\"updating configuration\")"
|
git diff-index --quiet HEAD || git commit -m "$(call ARGS,\"updating configuration\")"
|
||||||
git push
|
git push
|
||||||
|
|||||||
@@ -8,11 +8,3 @@ kitchen_led_controller:
|
|||||||
topic: home/kitchen-led/kitchen-led/state/set
|
topic: home/kitchen-led/kitchen-led/state/set
|
||||||
global_dependencies:
|
global_dependencies:
|
||||||
- globals
|
- globals
|
||||||
|
|
||||||
bath_led_controller:
|
|
||||||
module: kitchen_led_controller
|
|
||||||
class: KitchenLedController
|
|
||||||
watch_entity: light.bath
|
|
||||||
control_entity: light.philips_led
|
|
||||||
global_dependencies:
|
|
||||||
- globals
|
|
||||||
@@ -50,17 +50,17 @@ water_sensor:
|
|||||||
global_dependencies:
|
global_dependencies:
|
||||||
- globals
|
- globals
|
||||||
|
|
||||||
water_sender:
|
# water_sender:
|
||||||
class: WaterCounterSender
|
# class: WaterCounterSender
|
||||||
module: mosru
|
# module: mosru
|
||||||
entity_ids:
|
# entity_ids:
|
||||||
hot: sensor.counter_hot
|
# hot: sensor.counter_hot
|
||||||
cold: sensor.counter_cold
|
# cold: sensor.counter_cold
|
||||||
app: mosru_client
|
# app: mosru_client
|
||||||
dependencies:
|
# dependencies:
|
||||||
- mosru_client
|
# - mosru_client
|
||||||
global_dependencies:
|
# global_dependencies:
|
||||||
- globals
|
# - globals
|
||||||
|
|
||||||
power_sender:
|
power_sender:
|
||||||
class: PowerCounterSender
|
class: PowerCounterSender
|
||||||
|
|||||||
@@ -42,6 +42,9 @@ class TelegramTest(hass.Hass):
|
|||||||
self.log('Device has no screen present.')
|
self.log('Device has no screen present.')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if "&feature=share" in video_url:
|
||||||
|
video_url = video_url.replace("&feature=share", '')
|
||||||
|
|
||||||
# Preparing request
|
# Preparing request
|
||||||
headers = {
|
headers = {
|
||||||
"x-csrf-token": token,
|
"x-csrf-token": token,
|
||||||
|
|||||||
+12
-2
@@ -48,6 +48,7 @@ services:
|
|||||||
container_name: hass
|
container_name: hass
|
||||||
volumes:
|
volumes:
|
||||||
- ./hass/settings:/config
|
- ./hass/settings:/config
|
||||||
|
- ./secrets/hass/settings/secrets.yaml:/config/secrets.yaml:ro
|
||||||
- ./hass/settings/hosts.txt:/etc/hosts:ro
|
- ./hass/settings/hosts.txt:/etc/hosts:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ports:
|
ports:
|
||||||
@@ -59,6 +60,7 @@ services:
|
|||||||
- mysql
|
- mysql
|
||||||
- mosquitto
|
- mosquitto
|
||||||
- broadlink
|
- broadlink
|
||||||
|
- tor
|
||||||
network_mode: "host"
|
network_mode: "host"
|
||||||
restart: always
|
restart: always
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -71,6 +73,14 @@ services:
|
|||||||
options:
|
options:
|
||||||
max-size: 50m
|
max-size: 50m
|
||||||
|
|
||||||
|
tor:
|
||||||
|
build:
|
||||||
|
context: ./tor/docker
|
||||||
|
container_name: tor
|
||||||
|
ports:
|
||||||
|
- "9150:9150"
|
||||||
|
restart: always
|
||||||
|
|
||||||
appdaemon:
|
appdaemon:
|
||||||
image: monster1025/appdaemon
|
image: monster1025/appdaemon
|
||||||
build:
|
build:
|
||||||
@@ -82,7 +92,7 @@ services:
|
|||||||
- hass
|
- hass
|
||||||
volumes:
|
volumes:
|
||||||
- ./appdaemon/settings:/conf
|
- ./appdaemon/settings:/conf
|
||||||
- ./hass/settings/secrets.yaml:/conf/secrets.yaml:ro
|
- ./secrets/hass/settings/secrets.yaml:/conf/secrets.yaml:ro
|
||||||
- ./hass/settings/hosts.txt:/etc/hosts:ro
|
- ./hass/settings/hosts.txt:/etc/hosts:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
restart: always
|
restart: always
|
||||||
@@ -194,7 +204,7 @@ services:
|
|||||||
# - "6052:6052"
|
# - "6052:6052"
|
||||||
volumes:
|
volumes:
|
||||||
- ./esphome/settings:/config
|
- ./esphome/settings:/config
|
||||||
- ./hass/settings/secrets.yaml:/config/secrets.yaml:ro
|
- ./secrets/hass/settings/secrets.yaml:/config/secrets.yaml:ro
|
||||||
network_mode: "host"
|
network_mode: "host"
|
||||||
logging:
|
logging:
|
||||||
driver: json-file
|
driver: json-file
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ substitutions:
|
|||||||
devicename: watercontrol
|
devicename: watercontrol
|
||||||
upper_devicename: Watercontrol
|
upper_devicename: Watercontrol
|
||||||
pin_cold: D1
|
pin_cold: D1
|
||||||
init_cold: '210.29'
|
init_cold: '216.08'
|
||||||
pin_hot: D2
|
pin_hot: D2
|
||||||
init_hot: '109.74'
|
init_hot: '112.3'
|
||||||
water_open_pin: D5
|
water_open_pin: D5
|
||||||
water_close_pin: D3
|
water_close_pin: D3
|
||||||
ultrasonic_echo_pin: D6
|
ultrasonic_echo_pin: D6
|
||||||
@@ -54,23 +54,25 @@ globals:
|
|||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: pulse_cold
|
id: pulse_cold
|
||||||
pin:
|
pin:
|
||||||
number: $pin_cold
|
number: $pin_cold
|
||||||
mode: INPUT_PULLUP
|
mode: INPUT_PULLUP
|
||||||
filters:
|
filters:
|
||||||
- delayed_off: 100ms
|
- delayed_on: 1s
|
||||||
|
- delayed_off: 1s
|
||||||
on_press:
|
on_press:
|
||||||
then:
|
then:
|
||||||
- lambda: 'id(counter_cold_value) += 0.01;'
|
- lambda: 'id(counter_cold_value) += 0.01;'
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: pulse_hot
|
id: pulse_hot
|
||||||
pin:
|
pin:
|
||||||
number: $pin_hot
|
number: $pin_hot
|
||||||
mode: INPUT_PULLUP
|
mode: INPUT_PULLUP
|
||||||
filters:
|
filters:
|
||||||
- delayed_off: 100ms
|
- delayed_on: 1s
|
||||||
|
- delayed_off: 1s
|
||||||
on_press:
|
on_press:
|
||||||
then:
|
then:
|
||||||
- lambda: 'id(counter_hot_value) += 0.01;'
|
- lambda: 'id(counter_hot_value) += 0.01;'
|
||||||
@@ -129,3 +131,12 @@ switch:
|
|||||||
- delay: 5s
|
- delay: 5s
|
||||||
- switch.turn_off: water_close
|
- switch.turn_off: water_close
|
||||||
- lambda: 'id(water_state) = false;'
|
- lambda: 'id(water_state) = false;'
|
||||||
|
|
||||||
|
- platform: template
|
||||||
|
name: "Reset"
|
||||||
|
turn_on_action:
|
||||||
|
- lambda: 'id(counter_cold_value) = 216.08;'
|
||||||
|
- lambda: 'id(counter_hot_value) = 112.3;'
|
||||||
|
turn_off_action:
|
||||||
|
- lambda: 'id(counter_cold_value) = 216.08;'
|
||||||
|
- lambda: 'id(counter_hot_value) = 112.3;'
|
||||||
|
|||||||
@@ -35,8 +35,10 @@ atv4_credentials: xxxxxxxxx
|
|||||||
###################################
|
###################################
|
||||||
# PROXY SETTINGS #
|
# PROXY SETTINGS #
|
||||||
###################################
|
###################################
|
||||||
|
# proxy_url: xxxxxxxxx
|
||||||
proxy_url: xxxxxxxxx
|
proxy_url: xxxxxxxxx
|
||||||
|
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
# MQTT SETTINGS #
|
# MQTT SETTINGS #
|
||||||
###################################
|
###################################
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ views:
|
|||||||
- vacuum.xiaomi_vacuum_cleaner
|
- vacuum.xiaomi_vacuum_cleaner
|
||||||
- switch.domofon_force_open
|
- switch.domofon_force_open
|
||||||
- switch.wifi_socket
|
- switch.wifi_socket
|
||||||
- light.wled
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: "Гостиная"
|
title: "Гостиная"
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
|
|||||||
+1
-1
Submodule secrets updated: e3bb1c5a44...8a0d926ab3
@@ -0,0 +1,13 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
RUN apk update \
|
||||||
|
&& apk upgrade \
|
||||||
|
&& apk add tor \
|
||||||
|
&& rm /var/cache/apk/*
|
||||||
|
|
||||||
|
EXPOSE 9150
|
||||||
|
|
||||||
|
ADD ./torrc /etc/tor/torrc
|
||||||
|
|
||||||
|
USER tor
|
||||||
|
CMD /usr/bin/tor -f /etc/tor/torrc
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
## The directory for keeping all the keys/etc
|
||||||
|
DataDirectory /var/lib/tor
|
||||||
|
|
||||||
|
## Tor opens a socks proxy on port 9150
|
||||||
|
SocksPort 0.0.0.0:9150
|
||||||
|
|
||||||
|
## Entry policies to allow/deny SOCKS requests based on IP address.
|
||||||
|
## SocksPolicy accept 192.168.1.0/24
|
||||||
|
SocksPolicy accept *
|
||||||
|
|
||||||
|
## Logs go to stdout at level "notice"
|
||||||
|
Log notice stdout
|
||||||
|
|
||||||
|
ControlPort 9051
|
||||||
|
|
||||||
|
# Try for at most NUM seconds when building circuits. If the circuit isn't open in that time, give up on it. (Default: 1 minute.)
|
||||||
|
CircuitBuildTimeout 5
|
||||||
|
|
||||||
|
# Send a padding cell every N seconds to keep firewalls from closing our connections while Tor is not in use.
|
||||||
|
KeepalivePeriod 60
|
||||||
|
# Force Tor to consider whether to build a new circuit every NUM seconds.
|
||||||
|
NewCircuitPeriod 15
|
||||||
|
# How many entry guards should we keep at a time?
|
||||||
|
NumEntryGuards 8
|
||||||
|
|
||||||
Reference in New Issue
Block a user