Patryk M. Gutowski 2 жил өмнө
commit
558ac34916
7 өөрчлөгдсөн 286 нэмэгдсэн , 0 устгасан
  1. 6 0
      .gitignore
  2. 0 0
      README.md
  3. 87 0
      bath_basic.yaml
  4. 2 0
      dashboard.sh
  5. 43 0
      ff-bath-btgate.yaml
  6. 46 0
      gf-bt-proxy-01.yaml
  7. 102 0
      gf-gate-cam-l.yaml

+ 6 - 0
.gitignore

@@ -0,0 +1,6 @@
+# Gitignore settings for ESPHome
+# This is an example and may include too much for your use-case.
+# You can modify this file to suit your needs.
+/.esphome/
+/secrets.yaml
+index.dat

+ 0 - 0
README.md


+ 87 - 0
bath_basic.yaml

@@ -0,0 +1,87 @@
+---
+# Basic Config
+esphome:
+  name: ff-bath-fan
+  platform: ESP8266
+  board: esp8285
+
+web_server:
+  port: 80
+  
+wifi:
+  ssid: !secret wifi_ssid
+  password: !secret wifi_password
+  domain: .int.mmax.cloud
+
+button:
+  - platform: restart
+    name: "FF-Bath-Fan Restart"
+
+logger:
+api:
+  encryption:
+    key: "ejeMnlF5M60w/yuYwAWn/kIBz701xLwVkUGf9iN8uLA="
+ota:
+  password: "73cea25506d095b4970dedc41e2399fb"
+
+# Device Specific Config
+binary_sensor:
+  - platform: gpio
+    id: push_button
+    pin:
+      number: GPIO0
+      mode:
+        input: true
+        pullup: true
+      inverted: true
+    internal: true
+    on_press:
+      # Prevents unintended LED lit states.
+      if:
+        condition:
+          - switch.is_off: relay
+        then:
+          - switch.turn_on: blue_led
+          - switch.turn_on: relay
+        else:
+          - switch.turn_off: relay
+
+switch:
+  # The relay switches on the red side of the LED when active.
+  - platform: gpio
+    name: "FF_Bath_Fan"
+    pin: GPIO12
+    id: relay
+    on_turn_off:
+      if:
+        condition:
+          - switch.is_on: blue_led
+        then:
+          - switch.turn_off: blue_led
+  # With this we can control the blue side of the LED.
+  - platform: gpio
+    id: blue_led
+    pin:
+      number: GPIO13
+      inverted: True
+
+sensor:
+  - platform: dht
+    pin: GPIO14
+    model: AM2302
+    temperature:
+      name: "FF Bath Temperature"
+    humidity:
+      name: "FF Bath Humidity"
+      on_value_range:
+        - above: 85.0
+          then:
+            - switch.turn_on: relay
+        - below: 80.0
+          then:
+            - switch.turn_off: relay
+    update_interval: 30s
+  - platform: uptime
+    name: Uptime Sensor
+    id: uptime_sensor
+    update_interval: 60s

+ 2 - 0
dashboard.sh

@@ -0,0 +1,2 @@
+sudo podman  run --rm -v "${PWD}":/config -p 6052:6052 -e ESPHOME_DASHBOARD_USE_PING=true  --device=/dev/ttyUSB0 -it ghcr.io/esphome/esphome
+#sudo podman  run --rm -v "${PWD}":/config -p 6052:6052  --device=/dev/ttyUSB0 -it ghcr.io/esphome/esphome

+ 43 - 0
ff-bath-btgate.yaml

@@ -0,0 +1,43 @@
+substitutions:
+  hostname: ff-bath-btgate
+
+esphome:
+  name: ${hostname}
+  friendly_name: ff-bath-btgate
+
+esp32:
+  board: esp32cam
+  framework:
+    type: esp-idf
+
+# Enable logging
+logger:
+
+# Enable Home Assistant API
+api:
+  encryption:
+    key: "ejeMnlF5M60w/yuYwAWn/kIBz701xLwVkUGf9iN8uLA="
+
+ota:
+  password: "2c27af3ab81f992e23745c20ab5dfc02"
+
+wifi:
+  ssid: !secret iot_ssid
+  password: !secret iot_password
+
+bluetooth_proxy:
+  active: True
+
+esp32_ble_tracker:
+  scan_parameters:
+    interval: 1100ms
+    window: 1100ms
+    active: true
+
+##  # Enable fallback hotspot (captive portal) in case wifi connection fails
+##  ap:
+##    ssid: "Ff-Bath-Btgate Fallback Hotspot"
+##    password: "BTL4Ai6SC8Td"
+
+#captive_portal:
+    

+ 46 - 0
gf-bt-proxy-01.yaml

@@ -0,0 +1,46 @@
+esphome:
+  name: gf-bt-proxy-01
+  friendly_name: gf-bt-proxy-01
+
+esp32:
+  board: esp32dev
+  framework:
+    type: esp-idf
+
+# Enable logging
+logger:
+
+# Enable Home Assistant API
+api:
+  encryption:
+    key: "ejeMnlF5M60w/yuYwAWn/kIBz701xLwVkUGf9iN8uLA="
+
+ota:
+  password: "2c27af3ab81f992e23745c20ab5dfc02"
+
+wifi:
+  ssid: !secret iot_ssid
+  password: !secret iot_password
+
+  # Enable fallback hotspot (captive portal) in case wifi connection fails
+  ap:
+    ssid: "Gf-Bt-Proxy-01 Fallback Hotspot"
+    password: "Ry3eaIb2vmf1"
+
+improv_serial:
+  
+
+esp32_ble_tracker:
+  scan_parameters:
+    # We currently use the defaults to ensure Bluetooth
+    # can co-exist with WiFi In the future we may be able to
+    # enable the built-in coexistence logic in ESP-IDF
+    active: true
+
+bluetooth_proxy:
+  active: true
+
+button:
+- platform: safe_mode
+  name: Safe Mode Boot
+  entity_category: diagnostic

+ 102 - 0
gf-gate-cam-l.yaml

@@ -0,0 +1,102 @@
+substitutions:
+  devicename: gf-gate-cam-l
+  low_devicename: gf_gate_cam_l
+  upper_devicename: GF Gate CAM L
+
+esphome:
+  name: $devicename
+  friendly_name: $upper_devicename
+
+  
+esp32:
+  board: esp32cam
+  framework:
+    # type: esp-idf
+    type: arduino
+    version: 2.0.5
+      
+web_server:
+  port: 80
+
+button:
+  - platform: restart
+    name: "${upper_devicename} Restart"
+
+logger:
+api:
+  encryption:
+    key: "ejeMnlF5M60w/yuYwAWn/kIBz701xLwVkUGf9iN8uLA="
+
+ota:
+  password: "73cea25506d095b4970dedc41e2399fb"
+
+wifi: 
+  ssid: !secret cctv_ssid
+  password: !secret cctv_password
+  # networks: !secret wifi_networks
+  domain: .cctv.int.mmax.cloud
+  fast_connect: True
+  power_save_mode: none
+
+
+esp32_camera:
+  external_clock:
+    pin: GPIO0
+    frequency: 8 MHz
+  i2c_pins:
+    sda: GPIO26
+    scl: GPIO27
+  data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
+  vsync_pin: GPIO25
+  href_pin: GPIO23
+  pixel_clock_pin: GPIO22
+  power_down_pin: GPIO32
+  test_pattern: False
+  resolution: UXGA
+  name: ${upper_devicename}
+  max_framerate:  5 fps
+  idle_framerate: 0.1 fps
+  jpeg_quality: 20
+  aec2: true
+
+esp32_camera_web_server:
+  - port: 8080
+    mode: stream
+  - port: 8081
+    mode: snapshot
+
+#esp32_ble_beacon:
+#  type: iBeacon
+#  uuid: '2e69ba96-feed-2208-9078-7deb9d62e69c' 
+
+output:
+  - platform: ledc
+    pin: GPIO4
+    channel: 2 # channel 1 is used for esp32_camera
+    id: ${low_devicename}_led
+# red status light
+  - platform: gpio
+    pin:
+      number: GPIO33
+      inverted: True
+    id: ${low_devicename}_status_led
+light:
+  - platform: monochromatic
+    output: ${low_devicename}_led
+    name: "${upper_devicename} light"
+  - platform: binary
+    output: ${low_devicename}_status_led
+    name: "${upper_devicename} status led"
+
+sensor:
+  - platform: wifi_signal
+    name: "${upper_devicename} WiFi Signal"
+    id: ${low_devicename}_wifi_signal
+
+binary_sensor:
+  - platform: status
+    name: "${upper_devicename} status"
+
+text_sensor:
+  - platform: version
+    name: ${upper_devicename} Version