Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| home_assistant [2024/07/04 23:53] – created admin | home_assistant [2026/01/26 11:57] (current) – admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Home Assistant ====== | ====== Home Assistant ====== | ||
| + | ===== Commands ===== | ||
| + | rtl_433 | ||
| + | < | ||
| + | mosquitto_sub -h core-mosquitto -t ' | ||
| + | </ | ||
| + | |||
| + | Docker stats | ||
| + | < | ||
| + | docker stats --no-stream --format " | ||
| + | | awk -F'[ /]+' ' | ||
| + | function to_mb(x, u) { | ||
| + | if (u ~ /GiB/) return x * 1024 | ||
| + | if (u ~ /MiB/) return x | ||
| + | if (u ~ /KiB/) return x / 1024 | ||
| + | return x | ||
| + | } | ||
| + | { mem = to_mb($1, $2); print mem " | ||
| + | ' \ | ||
| + | | sort -nr \ | ||
| + | | cut -f2- | ||
| + | </ | ||
| + | < | ||
| + | docker stats --no-stream --format " | ||
| + | | sort -hr | ||
| + | </ | ||
| + | |||
| + | mtqtt.yaml | ||
| + | < | ||
| + | sensor: | ||
| + | # | ||
| + | # CH 1 — Nexus-TH — ID 224 | ||
| + | # | ||
| + | - name: Temperature | ||
| + | default_entity_id: | ||
| + | unique_id: nexus_th_224_temperature | ||
| + | state_topic: | ||
| + | device_class: | ||
| + | unit_of_measurement: | ||
| + | state_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | name: " | ||
| + | manufacturer: | ||
| + | model: " | ||
| + | |||
| + | - name: Humidity | ||
| + | default_entity_id: | ||
| + | unique_id: nexus_th_224_humidity | ||
| + | state_topic: | ||
| + | device_class: | ||
| + | unit_of_measurement: | ||
| + | state_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | |||
| + | # | ||
| + | # CH 2 — Nexus-TH — ID 97 | ||
| + | # | ||
| + | - name: Temperature | ||
| + | default_entity_id: | ||
| + | unique_id: nexus_th_111_temperature | ||
| + | state_topic: | ||
| + | device_class: | ||
| + | unit_of_measurement: | ||
| + | state_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | name: "Cave - CH2" | ||
| + | manufacturer: | ||
| + | model: " | ||
| + | |||
| + | - name: Humidity | ||
| + | default_entity_id: | ||
| + | unique_id: nexus_th_111_humidity | ||
| + | state_topic: | ||
| + | device_class: | ||
| + | unit_of_measurement: | ||
| + | state_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | |||
| + | # | ||
| + | # CH 3 — Nexus-TH — ID 111 | ||
| + | # | ||
| + | - name: Temperature | ||
| + | default_entity_id: | ||
| + | unique_id: nexus_th_119_temperature | ||
| + | state_topic: | ||
| + | device_class: | ||
| + | unit_of_measurement: | ||
| + | state_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | name: "Den - CH3" | ||
| + | manufacturer: | ||
| + | model: " | ||
| + | |||
| + | - name: Humidity | ||
| + | default_entity_id: | ||
| + | unique_id: nexus_th_119_humidity | ||
| + | state_topic: | ||
| + | device_class: | ||
| + | unit_of_measurement: | ||
| + | state_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | |||
| + | # | ||
| + | # CH 4 — Eurochron EFTH800 — ID 348 | ||
| + | # | ||
| + | - name: Temperature | ||
| + | default_entity_id: | ||
| + | unique_id: eurochron_348_temperature | ||
| + | state_topic: | ||
| + | device_class: | ||
| + | unit_of_measurement: | ||
| + | state_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | name: " | ||
| + | manufacturer: | ||
| + | model: " | ||
| + | |||
| + | - name: Humidity | ||
| + | default_entity_id: | ||
| + | unique_id: eurochron_348_humidity | ||
| + | state_topic: | ||
| + | device_class: | ||
| + | unit_of_measurement: | ||
| + | state_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | |||
| + | # | ||
| + | # CH 7 — Eurochron EFTH800 — ID 2836 | ||
| + | # | ||
| + | - name: Temperature | ||
| + | default_entity_id: | ||
| + | unique_id: eurochron_2836_temperature | ||
| + | state_topic: | ||
| + | device_class: | ||
| + | unit_of_measurement: | ||
| + | state_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | name: " | ||
| + | manufacturer: | ||
| + | model: " | ||
| + | |||
| + | - name: Humidity | ||
| + | default_entity_id: | ||
| + | unique_id: eurochron_2836_humidity | ||
| + | state_topic: | ||
| + | device_class: | ||
| + | unit_of_measurement: | ||
| + | state_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | |||
| + | # | ||
| + | # CH 8 — AmbientWeather WH31E — ID 158 | ||
| + | # | ||
| + | - name: Temperature | ||
| + | default_entity_id: | ||
| + | unique_id: ambientweather_158_temperature | ||
| + | state_topic: | ||
| + | device_class: | ||
| + | unit_of_measurement: | ||
| + | state_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | name: " | ||
| + | manufacturer: | ||
| + | model: " | ||
| + | |||
| + | - name: Humidity | ||
| + | default_entity_id: | ||
| + | unique_id: ambientweather_158_humidity | ||
| + | state_topic: | ||
| + | device_class: | ||
| + | unit_of_measurement: | ||
| + | state_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | |||
| + | binary_sensor: | ||
| + | # | ||
| + | # Battery sensors (battery_ok = boolean) | ||
| + | # | ||
| + | - name: Battery | ||
| + | default_entity_id: | ||
| + | unique_id: nexus_th_224_battery | ||
| + | state_topic: | ||
| + | payload_on: " | ||
| + | payload_off: | ||
| + | device_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | |||
| + | - name: Battery | ||
| + | default_entity_id: | ||
| + | unique_id: nexus_th_111_battery | ||
| + | state_topic: | ||
| + | payload_on: " | ||
| + | payload_off: | ||
| + | device_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | |||
| + | - name: Battery | ||
| + | default_entity_id: | ||
| + | unique_id: nexus_th_119_battery | ||
| + | state_topic: | ||
| + | payload_on: " | ||
| + | payload_off: | ||
| + | device_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | |||
| + | - name: Battery | ||
| + | default_entity_id: | ||
| + | unique_id: eurochron_348_battery | ||
| + | state_topic: | ||
| + | payload_on: " | ||
| + | payload_off: | ||
| + | device_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | |||
| + | - name: Battery | ||
| + | default_entity_id: | ||
| + | unique_id: eurochron_2836_battery | ||
| + | state_topic: | ||
| + | payload_on: " | ||
| + | payload_off: | ||
| + | device_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | |||
| + | - name: Battery | ||
| + | default_entity_id: | ||
| + | unique_id: ambientweather_158_battery | ||
| + | state_topic: | ||
| + | payload_on: " | ||
| + | payload_off: | ||
| + | device_class: | ||
| + | device: | ||
| + | identifiers: | ||
| + | </ | ||
| + | |||
| + | prometheus.yaml | ||
| + | < | ||
| + | include: | ||
| + | entities: | ||
| + | - sensor.nexus_th_119_temperature | ||
| + | - sensor.nexus_th_119_humidity | ||
| + | - sensor.nexus_th_224_temperature | ||
| + | - sensor.nexus_th_224_humidity | ||
| + | - sensor.nexus_th_111_temperature | ||
| + | - sensor.nexus_th_111_humidity | ||
| + | - sensor.eurochron_348_temperature | ||
| + | - sensor.eurochron_348_humidity | ||
| + | - sensor.eurochron_2836_temperature | ||
| + | - sensor.eurochron_2836_humidity | ||
| + | - sensor.ambientweather_158_temperature | ||
| + | - sensor.ambientweather_158_humidity | ||
| + | - sun.sun | ||
| + | </ | ||
| + | |||
| + | |||
| configuration.yaml additions: | configuration.yaml additions: | ||
| < | < | ||
| + | # Home network stuff | ||
| homeassistant: | homeassistant: | ||
| external_url: | external_url: | ||
| Line 9: | Line 280: | ||
| trusted_proxies: | trusted_proxies: | ||
| - 192.168.1.0/ | - 192.168.1.0/ | ||
| + | |||
| + | # Weather stuff | ||
| + | mqtt: !include mqtt.yaml | ||
| + | prometheus: !include prometheus.yaml | ||
| + | |||
| + | template: | ||
| + | - sensor: | ||
| + | - name: "Sun Elevation" | ||
| + | unit_of_measurement: | ||
| + | state: "{{ state_attr(' | ||
| </ | </ | ||
| + | |||