diff --git a/configuration.yaml b/configuration.yaml index 06245b4..aafcb91 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -105,6 +105,10 @@ stecamonitor: ip: 10.0.1.4 +aula: + username: rolf1451 + password: b3K0utzxIMuuXbFUe5NG + sensor: !include_dir_merge_list sensors/ template: !include_dir_merge_list template/ diff --git a/esphome/sovebt.yaml b/esphome/sovebt.yaml new file mode 100644 index 0000000..859ee92 --- /dev/null +++ b/esphome/sovebt.yaml @@ -0,0 +1,87 @@ +esphome: + name: sovebt + +esp32: + board: esp32dev + framework: + type: arduino + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "27U+L64zHMWVsRmb7KpIAUshBLXcmsITzMzHnvJ+5ZE=" + +ota: + password: "03bdb91f990a4f77a925da3c16eb655b" + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Sovebt Fallback Hotspot" + password: "0J9xgK0Qev9M" + +captive_portal: + +esp32_ble_tracker: + scan_parameters: + interval: 300ms + window: 300ms + duration: 1s + +bluetooth_proxy: + active: true + +sensor: + - platform: xiaomi_miscale + mac_address: '5C:CA:D3:8F:B1:B6' + weight: + name: "Xiaomi Mi Scale Weight" + id: weight_miscale + on_value: + then: + - lambda: |- + if (id(weight_miscale).state >= 65 && id(weight_miscale).state <= 90) { + return id(weight_user2).publish_state(x);} + else if (id(weight_miscale).state >= 90 && id(weight_miscale).state <= 100) { + return id(weight_user1).publish_state(x);} + impedance: + name: "Xiaomi Mi Scale Impedance" + id: impedance_miscale + on_value: + then: + - lambda: |- + if (id(weight_miscale).state >= 65 && id(weight_miscale).state <= 90) { + return id(impedance_user2).publish_state(x);} + else if (id(weight_miscale).state >= 90 && id(weight_miscale).state <= 100) { + return id(impedance_user1).publish_state(x);} + - platform: template + name: Weight Rolf + id: weight_user1 + unit_of_measurement: 'kg' + icon: mdi:weight-kilogram + accuracy_decimals: 2 + - platform: template + name: Impedance Rolf + id: impedance_user1 + unit_of_measurement: 'Ω' + icon: mdi:omega + accuracy_decimals: 0 + + - platform: template + name: Weight Berit + id: weight_user2 + unit_of_measurement: 'kg' + icon: mdi:weight-kilogram + accuracy_decimals: 2 + - platform: template + name: Impedance Berit + id: impedance_user2 + unit_of_measurement: 'Ω' + icon: mdi:omega + accuracy_decimals: 0 \ No newline at end of file diff --git a/mqtt/igrill.yaml b/mqtt/igrill.yaml new file mode 100644 index 0000000..da65c54 --- /dev/null +++ b/mqtt/igrill.yaml @@ -0,0 +1,11 @@ +- state_topic: "bbq/grill/grill/probe1" + name: "iGrill Temperature" + qos: 0 + unit_of_measurement: "°C" + value_template: "{{ (value | default(0) | float(0) - 32) * 5/9 | round(1) }}" + +- state_topic: "bbq/grill/grill/battery" + name: "iGrill Battery" + qos: 0 + unit_of_measurement: "%" + device_class: battery diff --git a/sensors/energy.yaml b/sensors/energy.yaml index e0e1531..6fe57e6 100644 --- a/sensors/energy.yaml +++ b/sensors/energy.yaml @@ -46,6 +46,14 @@ unit_time: h round: 4 +- platform: integration + source: sensor.retur_til_elnet + name: solcelle_energy_to_grid + method: left + unit_prefix: k + unit_time: h + round: 4 + - platform: statistics name: Average energy price last 30d mean entity_id: sensor.energi_data_service diff --git a/sensors/igrill.yaml b/sensors/igrill.yaml index 0628a45..6fc7844 100644 --- a/sensors/igrill.yaml +++ b/sensors/igrill.yaml @@ -1,11 +1,11 @@ - platform: template sensors: target_alert_temp_probe_1: - availability_template: "{{(states.sensor.igrill_mini_probe_1.state | default(0) | int(0)) > 0}}" + availability_template: "{{(states.sensor.igrill_temperature.state | default(0) | int(0)) > 0}}" value_template: - "{% if (states.sensor.igrill_mini_probe_1.state | int(0)) >= (states.input_number.grill_probe_1_target.state | int) %} + "{% if (states.sensor.igrill_temperature.state | int(0)) >= (states.input_number.grill_probe_1_target.state | int) %} Alert - {% elif (states.sensor.igrill_mini_probe_1.state | int(0)) >= (states.input_number.grill_probe_1_target.state | int) - 4 %} + {% elif (states.sensor.igrill_temperature.state | int(0)) >= (states.input_number.grill_probe_1_target.state | int) - 4 %} Ready {% else %} Cooking diff --git "a/template/elm\303\245ler.yaml" "b/template/elm\303\245ler.yaml" new file mode 100644 index 0000000..17b52b4 --- /dev/null +++ "b/template/elm\303\245ler.yaml" @@ -0,0 +1,16 @@ +- sensor: + - name: Retur til elnet + state: | + {% set forbrug = states.sensor.elmaler_power.state | default(0) | float(0) %} + {% set produceret = states.sensor.steca_inverter_10_0_1_4_ac_power.state | default(0) | float(0) %} + + {% set salg = (produceret - forbrug) %} + + {% if salg > 0 %} + {{ salg }} + {% else %} + {{ 0 }} + {% endif %} + unit_of_measurement: "W" + device_class: power + state_class: measurement diff --git a/template/mikroovn.yaml b/template/mikroovn.yaml index 5665021..fe584df 100644 --- a/template/mikroovn.yaml +++ b/template/mikroovn.yaml @@ -1,10 +1,10 @@ - sensor: - - name: Mikroovn Power Factor + - name: Mikroovn Plug Power Factor state: | {# Calculate power factor #} - {% set v = states.sensor.mikroovn_voltage.state | default(0) | float(0) %} - {% set a = states.sensor.mikroovn_current.state | default(0) | float(0) %} - {% set wp = states.sensor.mikroovn_power.state | default(0) | float(0) %} + {% set v = states.sensor.mikroovn_plug_voltage.state | default(0) | float(0) %} + {% set a = states.sensor.mikroovn_plug_current.state | default(0) | float(0) %} + {% set wp = states.sensor.mikroovn_plug_power.state | default(0) | float(0) %} {% set ap = v * a %} {% if ap > 0 %} {% set pf = wp / ap * 100 %} diff --git a/zigbee2mqtt/configuration.yaml b/zigbee2mqtt/configuration.yaml index 9a62679..e5fe5d7 100644 --- a/zigbee2mqtt/configuration.yaml +++ b/zigbee2mqtt/configuration.yaml @@ -22,15 +22,23 @@ protocol: tcp4 type: '5424' channel: 15 + log_level: info device_options: legacy: false devices: '0x000b57fffeda5b94': friendly_name: Bryggers + '0xf0d1b8000015a9dd': + friendly_name: JanusDims + '0x00000000e203d9a9': + friendly_name: Elmåler + '0xa4c138c41ff7c306': + friendly_name: Teknikskab_Plug '0xa4c1387b259019f2': - friendly_name: Mikroovn + friendly_name: Mikroovn_Plug availability: active: timeout: 10 passive: timeout: 1500 +blocklist: [] diff --git a/zigbee2mqtt/coordinator_backup.json b/zigbee2mqtt/coordinator_backup.json index 0472c9e..fca919e 100644 --- a/zigbee2mqtt/coordinator_backup.json +++ b/zigbee2mqtt/coordinator_backup.json @@ -2,9 +2,9 @@ "metadata": { "format": "zigpy/open-coordinator-backup", "version": 1, - "source": "zigbee-herdsman@0.14.62", + "source": "zigbee-herdsman@0.14.68", "internal": { - "date": "2022-11-01T06:35:15.729Z", + "date": "2022-11-11T09:45:58.332Z", "znpVersion": 1 } }, @@ -25,15 +25,45 @@ "network_key": { "key": "01030507090b0d0f00020406080a0c0d", "sequence_number": 0, - "frame_counter": 282532 + "frame_counter": 387622 }, "devices": [ { - "nwk_address": "7e42", - "ieee_address": "000b57fffeda5b94", + "nwk_address": "36b8", + "ieee_address": "a4c1387b259019f2", "is_child": false, "link_key": { - "key": "bf252b13f24a1be09cef972bae77b11c", + "key": "1f148d359b3075e92748b09f6713bf55", + "rx_counter": 0, + "tx_counter": 5099 + } + }, + { + "nwk_address": "accb", + "ieee_address": "a4c138d2c6cf467b", + "is_child": false, + "link_key": { + "key": "765bdf26da8c8c712a6675daf9463049", + "rx_counter": 0, + "tx_counter": 2544 + } + }, + { + "nwk_address": "146f", + "ieee_address": "a4c138c41ff7c306", + "is_child": true, + "link_key": { + "key": "0bdee7ffcc8c8c7157e34d03ef463049", + "rx_counter": 0, + "tx_counter": 0 + } + }, + { + "nwk_address": "97fb", + "ieee_address": "f0d1b8000015a9dd", + "is_child": false, + "link_key": { + "key": "a358f80d1da831f869e4c0512002cddb", "rx_counter": 0, "tx_counter": 0 } diff --git a/zigbee2mqtt/state.json b/zigbee2mqtt/state.json index c6132ba..660befd 100644 --- a/zigbee2mqtt/state.json +++ b/zigbee2mqtt/state.json @@ -1,22 +1,60 @@ { - "0x000b57fffeda5b94": { + "0xf0d1b8000015a9dd": { + "state": "OFF", "update": { "state": "idle" }, - "linkquality": 90, - "state": "ON", - "brightness": 254, - "power_on_behavior": "on" + "linkquality": 87 + }, + "0x00000000e203d9a9": { + "voltage_phase_a": 233.1, + "voltage_phase_b": 232.5, + "voltage_phase_c": 232.2, + "voltage_phase_ab": 403.4, + "voltage_phase_bc": 402.4, + "voltage_phase_ca": 402.9, + "current_phase_a": 0, + "current_phase_b": 1.35, + "current_phase_c": 1.43, + "power": 497, + "power_apparent": 636, + "ac_frequency": 50.1, + "power_phase_a": 0, + "power_phase_b": 273, + "power_phase_c": 224, + "power_factor": 78, + "energy": 2.897, + "energy_phase_a": 0.428, + "energy_phase_b": 1.587, + "energy_phase_c": 0.882, + "linkquality": 87 + }, + "0xa4c138c41ff7c306": { + "energy": 0, + "power": 0, + "current": 0, + "voltage": 231, + "state": "OFF", + "power_outage_memory": "restore", + "indicator_mode": "off/on", + "child_lock": "UNLOCK", + "update": { + "state": "available" + }, + "linkquality": 160 }, "0xa4c1387b259019f2": { - "energy": 0, - "power": 25, - "current": 0.11, - "voltage": 233, + "energy": 0.23, + "power": 0, + "current": 0, + "voltage": 230, "state": "ON", "power_outage_memory": "on", "indicator_mode": "off/on", "child_lock": "UNLOCK", - "linkquality": 39 + "update": { + "state": "available" + }, + "linkquality": 72 } } \ No newline at end of file