diff --git a/.HA_VERSION b/.HA_VERSION index 65620ba..eaa15bf 100644 --- a/.HA_VERSION +++ b/.HA_VERSION @@ -1 +1 @@ -2024.10.3 \ No newline at end of file +2024.10.4 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2cf8b80..aa34636 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ custom_components/* www/community/* image/* +esphome/trash/* *.log *.log* diff --git a/automations.yaml b/automations.yaml index 1f1d390..1aaee70 100644 --- a/automations.yaml +++ b/automations.yaml @@ -449,3 +449,42 @@ target: entity_id: switch.fan_low_2 mode: single +- id: '1729393621896' + alias: Send humidify dew point to test topic. + description: '' + triggers: + - trigger: state + entity_id: + - input_number.humidify_dew_point + conditions: [] + actions: + - action: mqtt.publish + data: + evaluate_payload: false + qos: 0 + retain: false + topic: frankensystem/test + payload: '{{ state_attr(''input_number.humidify_dew_point'', ''state'') | float + }}' + mode: single +- id: '1729433000402' + alias: Notify Authentik postgres changed. + description: Send a notification when the state of postgres changed for the Authentik + service. This generally happens when the docker volume is disconnected and requires + attention. + triggers: + - trigger: state + entity_id: + - sensor.portainer_mighty_mini_authentik_postgres + for: + hours: 0 + minutes: 0 + seconds: 0 + conditions: [] + actions: + - action: notify.notify + metadata: {} + data: + message: Authentik postgres changed {{ states('sensor.portainer_mighty_mini_authentik_postgres') + }} + mode: single diff --git a/configuration.yaml b/configuration.yaml index 741e6e4..8370fd5 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -17,10 +17,22 @@ scene: !include scenes.yaml #influxdb: !include influxdb.yaml template: !include templates.yaml +# Move to a package +input_number: + humidify_dew_point: + name: "Humidify Dew Point" + initial: 50 + min: 30 + max: 55 + step: 0.5 + unit_of_measurement: "°F" + icon: "mdi:temperature-fahrenheit" + # Example configuration.yaml entry for the HTTP component http: server_port: 443 ssl_certificate: /ssl/fullchain.pem ssl_key: /ssl/privkey.pem +mqtt: !include sensors.yaml diff --git a/esphome/aqi-sensor.yaml b/esphome/aqi-sensor.yaml new file mode 100644 index 0000000..d97dab3 --- /dev/null +++ b/esphome/aqi-sensor.yaml @@ -0,0 +1,47 @@ +esphome: + name: aqi-sensor + friendly_name: AQI-Sensor + +esp8266: + board: esp01_1m + +# Enable logging +logger: + #level: VERY_VERBOSE + +# Enable Home Assistant API +api: + encryption: + key: "3CIARK+MjVSvSJ1VP/GjplrkvFb+TlVPH0CTsHciKdw=" + +ota: + - platform: esphome + password: "cbc40991e6bdea7d9ce6c63085403419" + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Aqi-Sensor Fallback Hotspot" + password: "ddjn1Ua2MWWf" + +captive_portal: + + +# Configuration +i2c: + scan: true + +sensor: + - platform: ccs811 + eco2: + name: "AQI eCO2 Value" + tvoc: + name: "AQI TVOC" + update_interval: 10s + #baseline: 0x19BC +switch: + - platform: restart + name: "AQI Sensor Restart" \ No newline at end of file diff --git a/esphome/damper-relay-1.yaml b/esphome/damper-relay-1.yaml index e9c5c73..a5a72dc 100644 --- a/esphome/damper-relay-1.yaml +++ b/esphome/damper-relay-1.yaml @@ -56,29 +56,34 @@ mqtt: username: !secret mqtt_username password: !secret mqtt_password topic_prefix: frankensystem - discovery: true + discovery: false switch: # 8 Channel Relay - 2 - platform: gpio pin: $relay5_pin name: "Coil Damper - 1" + restore_mode: RESTORE_DEFAULT_OFF - platform: gpio pin: $relay3_pin name: "Coil Damper - 2" + restore_mode: RESTORE_DEFAULT_OFF - platform: gpio pin: $relay1_pin name: "Coil Damper - 3" + restore_mode: RESTORE_DEFAULT_OFF - platform: gpio pin: $relay2_pin name: "Bypass Damper - 1" + restore_mode: RESTORE_DEFAULT_OFF - platform: gpio pin: $relay4_pin name: "Bypass Damper - 2" + restore_mode: RESTORE_DEFAULT_ON - platform: gpio pin: $relay6_pin @@ -92,3 +97,5 @@ switch: pin: $relay8_pin name: "Spare - 3" + - platform: restart + name: "FrankenSystem Damper Relay Restart" \ No newline at end of file diff --git a/esphome/sensor-1.yaml b/esphome/sensor-1.yaml index b8b0b58..ad94e54 100644 --- a/esphome/sensor-1.yaml +++ b/esphome/sensor-1.yaml @@ -2,7 +2,16 @@ esphome: name: sensor-1 platform: ESP8266 board: nodemcuv2 + libraries: + - ESP8266WiFi + - https://github.com/akaJes/AsyncPing#95ac7e4 +external_components: + - source: + type: git + url: https://github.com/trombik/esphome-component-ping + ref: main + # Enable logging logger: @@ -28,7 +37,9 @@ mqtt: username: !secret mqtt_username password: !secret mqtt_password topic_prefix: frankensystem - discovery: true + discovery: false + will_message: + captive_portal: @@ -64,4 +75,19 @@ sensor: name: "Supply Temperature" humidity: name: "Supply Humidity" - update_interval: 5s \ No newline at end of file + update_interval: 5s + + - platform: ping + ip_address: 192.168.1.1 ## Router IP + num_attempts: 5 + timeout: 1sec + loss: + name: Packet loss + latency: + name: Latency + accuracy_decimals: 3 + update_interval: 30s + +switch: + - platform: restart + name: "FrankenSystem Sensors Restart" \ No newline at end of file diff --git a/esphome/system-relays.yaml b/esphome/system-relays.yaml index 3fc2fa0..6a1ee6c 100644 --- a/esphome/system-relays.yaml +++ b/esphome/system-relays.yaml @@ -57,7 +57,7 @@ mqtt: username: !secret mqtt_username password: !secret mqtt_password topic_prefix: frankensystem - discovery: true + discovery: false network: enable_ipv6: True @@ -67,34 +67,45 @@ switch: - platform: gpio pin: $relay4_pin name: "Fan Low" + restore_mode: RESTORE_DEFAULT_OFF - platform: gpio pin: $relay5_pin name: "Fan Medium Low" + restore_mode: RESTORE_DEFAULT_OFF - platform: gpio pin: $relay8_pin name: "Fan Medium High" + restore_mode: RESTORE_DEFAULT_OFF - platform: gpio pin: $relay7_pin name: "Fan High" + restore_mode: RESTORE_DEFAULT_ON - platform: gpio pin: number: $relay3_pin inverted: true name: "Dehumidification" + restore_mode: ALWAYS_ON - platform: gpio pin: $relay1_pin name: "Humidification" + restore_mode: ALWAYS_ON - platform: gpio pin: $relay2_pin name: "Reheat" + restore_mode: ALWAYS_ON - platform: gpio pin: $relay6_pin name: "Cooling" + restore_mode: ALWAYS_ON + + - platform: restart + name: "FrankenSystem System Relays Restart" diff --git a/mqtt.yaml b/mqtt.yaml new file mode 100644 index 0000000..8cf7dd1 --- /dev/null +++ b/mqtt.yaml @@ -0,0 +1,9 @@ +number: + - name: "Frankensystem Test" + command_topic: "frankensystem/test" + state_topic: "frankensystem/test" + +sensor: + name: "Frankensystem Test Sensor" + state_topic: "frankensystem/sensor/test/state" + value_template: "{{ value_json['temperature'] | float }}" diff --git a/sensors.yaml b/sensors.yaml index 57dbac8..7c8a020 100644 --- a/sensors.yaml +++ b/sensors.yaml @@ -1,72 +1,65 @@ # Custom MQTT Sensor values. -- platform: mqtt - name: Mixed Air Dew Point - state_topic: "frankensystem/sensor/mixed_air_dew_point/state" - unit_of_measurement: "°F" - value_template: "{{ value_json.temperature }}" - payload_available: "online" - payload_not_available: "offline" - unique_id: "mixed_air_dew_point" - -- platform: mqtt - name: Mixed Air Enthalpy - state_topic: "frankensystem/sensor/mixed_air_enthalpy/state" - value_template: "{{ value_json.temperature }}" - #unit_of_measurement: "°F" - payload_available: "online" - payload_not_available: "offline" - unique_id: "mixed_air_enthalpy" - -- platform: mqtt - name: Post Coil Dew Point - state_topic: "frankensystem/sensor/post_coil_dew_point/state" - unit_of_measurement: "°F" - value_template: "{{ value_json.temperature }}" - payload_available: "online" - payload_not_available: "offline" - unique_id: "post_coil_dew_point" - -- platform: mqtt - name: Post Coil Enthalpy - state_topic: "frankensystem/sensor/post_coil_enthalpy/state" - value_template: "{{ value_json.temperature }}" - #unit_of_measurement: "°F" - payload_available: "online" - payload_not_available: "offline" - unique_id: "post_coil_enthalpy" - -- platform: mqtt - name: Return Dew Point - state_topic: "frankensystem/sensor/return_dew_point/state" - value_template: "{{ value_json.temperature }}" - unit_of_measurement: "°F" - payload_available: "online" - payload_not_available: "offline" - unique_id: "return_dew_point" - -- platform: mqtt - name: Return Enthalpy - state_topic: "frankensystem/sensor/return_enthalpy/state" - #unit_of_measurement: "°F" - #value_template: "{{ value_json.temperature }}"" - payload_available: "online" - payload_not_available: "offline" - unique_id: "return_enthalpy" - -- platform: mqtt - name: Supply Dew Point - state_topic: "frankensystem/sensor/supply_dew_point/state" - unit_of_measurement: "°F" - value_template: "{{ value_json.temperature }}" - payload_available: "online" - payload_not_available: "offline" - unique_id: "supply_dew_point" - -- platform: mqtt - name: Supply Enthalpy - state_topic: "frankensystem/sensor/supply_enthalpy/state" - #unit_of_measurement: "°F" - value_template: "{{ value_json.temperature }}" - payload_available: "online" - payload_not_available: "offline" - unique_id: "supply_enthalpy" +sensor: + - name: Mixed Air Dew Point + state_topic: "frankensystem/sensor/mixed_air_dew_point/state" + unit_of_measurement: "°F" + #value_template: "{{ value_json.temperature }}" + payload_available: "online" + payload_not_available: "offline" + unique_id: "mixed_air_dew_point" + + - name: Mixed Air Enthalpy + state_topic: "frankensystem/sensor/mixed_air_enthalpy/state" + #value_template: "{{ value_json.temperature }}" + unit_of_measurement: "BTU/lb" + payload_available: "online" + payload_not_available: "offline" + unique_id: "mixed_air_enthalpy" + + - name: Post Coil Dew Point + state_topic: "frankensystem/sensor/post_coil_dew_point/state" + unit_of_measurement: "°F" + #value_template: "{{ value_json.temperature }}" + payload_available: "online" + payload_not_available: "offline" + unique_id: "post_coil_dew_point" + + - name: Post Coil Enthalpy + state_topic: "frankensystem/sensor/post_coil_enthalpy/state" + #value_template: "{{ value_json.temperature }}" + unit_of_measurement: "BTU/lb" + payload_available: "online" + payload_not_available: "offline" + unique_id: "post_coil_enthalpy" + + - name: Return Dew Point + state_topic: "frankensystem/sensor/return_dew_point/state" + #value_template: "{{ value_json.temperature }}" + unit_of_measurement: "°F" + payload_available: "online" + payload_not_available: "offline" + unique_id: "return_dew_point" + + - name: Return Enthalpy + state_topic: "frankensystem/sensor/return_enthalpy/state" + unit_of_measurement: "BTU/lb" + #value_template: "{{ value_json.temperature }}"" + payload_available: "online" + payload_not_available: "offline" + unique_id: "return_enthalpy" + + - name: Supply Dew Point + state_topic: "frankensystem/sensor/supply_dew_point/state" + unit_of_measurement: "°F" + #value_template: "{{ value_json.temperature }}" + payload_available: "online" + payload_not_available: "offline" + unique_id: "supply_dew_point" + + - name: Supply Enthalpy + state_topic: "frankensystem/sensor/supply_enthalpy/state" + unit_of_measurement: "BTU/lb" + #value_template: "{{ value_json.temperature }}" + payload_available: "online" + payload_not_available: "offline" + unique_id: "supply_enthalpy"