2022-10-01 15:16:18
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
Homeassistant diverse dingen
|
||||
|
||||
voor nginx doe altijd nginx -t om de kijken of je config klopt
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
esphome:
|
||||
name: bme680
|
||||
board: d1_mini
|
||||
platform: esp8266
|
||||
|
||||
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
#api:
|
||||
|
||||
ota:
|
||||
password: !secret ota
|
||||
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
- ssid: !secret wifi_ssid2
|
||||
password: !secret wifi_password2
|
||||
|
||||
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
#status_led:
|
||||
# pin:
|
||||
# number: GPIO2
|
||||
# inverted: True
|
||||
|
||||
|
||||
time:
|
||||
- platform: sntp
|
||||
id: homeassistant_time
|
||||
timezone: Europe/Amsterdam
|
||||
|
||||
mdns:
|
||||
disabled: false
|
||||
|
||||
captive_portal:
|
||||
|
||||
mqtt:
|
||||
broker: mqtt.lan
|
||||
discovery: true
|
||||
|
||||
#dallas:
|
||||
# - pin: D1
|
||||
|
||||
i2c:
|
||||
sda: D3
|
||||
scl: D2
|
||||
scan: true
|
||||
|
||||
bme680_bsec:
|
||||
# Default: 0x76
|
||||
address: 0x77
|
||||
temperature_offset: 0
|
||||
# Default: static
|
||||
iaq_mode: static
|
||||
|
||||
sample_rate: lp
|
||||
# Interval at which to save BSEC state
|
||||
# ------------------------------------
|
||||
# Default: 6h
|
||||
state_save_interval: 6h
|
||||
|
||||
sensor:
|
||||
- platform: bme680_bsec
|
||||
temperature:
|
||||
# Temperature in °C
|
||||
name: "Z1 BME680 T"
|
||||
sample_rate: lp
|
||||
filters:
|
||||
- median
|
||||
accuracy_decimals: 2
|
||||
pressure:
|
||||
# Pressure in hPa
|
||||
name: "Z1 BME680 Pres"
|
||||
sample_rate: lp
|
||||
filters:
|
||||
- median
|
||||
accuracy_decimals: 2
|
||||
humidity:
|
||||
# Relative humidity %
|
||||
name: "Z1 BME680 Hum"
|
||||
sample_rate: lp
|
||||
filters:
|
||||
- median
|
||||
accuracy_decimals: 1
|
||||
gas_resistance:
|
||||
# Gas resistance in Ω
|
||||
name: "Z1 BME680 Gas Resistance"
|
||||
filters:
|
||||
- median
|
||||
iaq:
|
||||
# Indoor air quality value
|
||||
name: "Z1 BME680 IAQ"
|
||||
filters:
|
||||
- median
|
||||
iaq_accuracy:
|
||||
# IAQ accuracy as a numeric value of 0, 1, 2, 3
|
||||
name: "Z1 BME680 Numeric IAQ Accuracy"
|
||||
co2_equivalent:
|
||||
# CO2 equivalent estimate in ppm
|
||||
name: "Z1 BME680 CO2 Equivalent"
|
||||
filters:
|
||||
- median
|
||||
breath_voc_equivalent:
|
||||
# Volatile organic compounds equivalent estimate in ppm
|
||||
name: "Z1 BME680 Breath VOC Equivalent"
|
||||
filters:
|
||||
- median
|
||||
|
||||
- platform: htu21d
|
||||
temperature:
|
||||
name: "Z1 HTU21 Temp"
|
||||
accuracy_decimals: 2
|
||||
humidity:
|
||||
name: "Z1 HTU21 Hum"
|
||||
accuracy_decimals: 1
|
||||
update_interval: 60s
|
||||
|
||||
|
||||
|
||||
|
||||
text_sensor:
|
||||
- platform: bme680_bsec
|
||||
iaq_accuracy:
|
||||
# IAQ accuracy as a text value of Stabilizing, Uncertain, Calibrating, Calibrated
|
||||
name: "Z1 BME680 IAQ Accuracy"
|
||||
|
||||
|
||||
|
||||
# RCWL-0516 Microwave Radar Motion Sensor
|
||||
#binary_sensor:
|
||||
# - platform: gpio
|
||||
# pin: D5
|
||||
# name: "Z1 Motion"
|
||||
# device_class: motion
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,76 @@
|
||||
esphome:
|
||||
name: p1
|
||||
platform: ESP8266
|
||||
board: d1_mini
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
baud_rate: 0
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
reboot_timeout: 0s
|
||||
|
||||
ota:
|
||||
password: !secret ota
|
||||
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
- ssid: !secret wifi_ssid2
|
||||
password: !secret wifi_password2
|
||||
|
||||
domain: .lan
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: !secret ap_ssid
|
||||
password: !secret ap_password
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
captive_portal:
|
||||
|
||||
time:
|
||||
- platform: sntp
|
||||
id: time1
|
||||
timezone: Europe/Amsterdam
|
||||
|
||||
|
||||
status_led:
|
||||
pin:
|
||||
number: GPIO2
|
||||
inverted: True
|
||||
|
||||
|
||||
|
||||
mqtt:
|
||||
broker: mqtt.lan
|
||||
discovery: true
|
||||
|
||||
dsmr:
|
||||
id: dsmr_instance
|
||||
|
||||
uart:
|
||||
- rx_pin: RX
|
||||
baud_rate: 115200
|
||||
|
||||
sensor:
|
||||
- platform: dsmr
|
||||
energy_delivered_tariff1:
|
||||
name: Energy Tarief 1
|
||||
energy_delivered_tariff2:
|
||||
name: Energy Tarief 2
|
||||
power_delivered:
|
||||
name: Power
|
||||
gas_delivered:
|
||||
name: Gas
|
||||
# tarief 1 is dal tarief!!!
|
||||
|
||||
text_sensor:
|
||||
- platform: dsmr
|
||||
identification:
|
||||
name: "DSMR Identification"
|
||||
p1_version:
|
||||
name: "DSMR Version"
|
||||
@@ -0,0 +1,49 @@
|
||||
# zet deze in je /etc/nginx/sites-enabled/
|
||||
|
||||
upstream ha1 {
|
||||
# ipnummer van je ha
|
||||
server IP-VULHIERIN:8123;
|
||||
keepalive 64;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
# if you need IPv6:
|
||||
listen [::]:443 ssl http2;
|
||||
server_name ha.jehostnaaam.nl;
|
||||
access_log /var/log/nginx/ha-access.log combined;
|
||||
error_log /var/log/nginx/ha-error.log info;
|
||||
http2_push_preload on; # Enable HTTP/2 Server Push
|
||||
|
||||
#aanpassen hieronder
|
||||
ssl_certificate /etc/letsencrypt/live/ha.jehostnaam.nl/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/ha.jehostnaam.nl/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
|
||||
add_header Strict-Transport-Security max-age=15768000;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
location / {
|
||||
proxy_pass http://ha1 ;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Frame-Options SAMEORIGIN;
|
||||
|
||||
}
|
||||
location /api/websocket {
|
||||
proxy_pass http://ha1/api/websocket;
|
||||
proxy_set_header Host $host;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user