diff --git a/configuration.yaml b/configuration.yaml index c70d52d..b093ead 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -20,6 +20,7 @@ default: warn logs: # custom_components.energidataservice: debug + custom_components.igrill_ble: debug custom_components.localtuya: critical custom_components.xiaomi_miio_airpurifier: critical @@ -40,41 +41,10 @@ - weather - device_tracker entities: + - sensor.last_boot + - sensor.date - sun.sun - -history: - exclude: - domains: - - group - - history_graph - - media_player - - zone - - automation - - script - - light - - camera - - updater - - weather - - device_tracker - entities: - - sun.sun - -logbook: - exclude: - domains: - - group - - history_graph - - media_player - - zone - - automation - - script - - light - - camera - - updater - - weather - - device_tracker - entities: - - sun.sun + - sensor.router_uptime frontend: themes: !include_dir_merge_named themes/ @@ -105,6 +75,15 @@ default_measurement: state fuelprices_dk: + update_interval: 600 + companies: + - circlek + - f24 + - goon + - ingo + - oil + - ok + - q8 fueltypes: - oktan 95 diff --git a/dashboards/minimal/views/hjem.yaml b/dashboards/minimal/views/hjem.yaml index 660c25a..6c3cfdb 100644 --- a/dashboards/minimal/views/hjem.yaml +++ b/dashboards/minimal/views/hjem.yaml @@ -65,7 +65,13 @@ - entity: sensor.netatmo_simstrup_weather_indoor_outdoor_humidity show_icon: false entities: - - entity: sensor.igrill_temperature + - entity: sensor.filtered_igrill_probe_1 + show_icon: true + show_state: true + name: Filtered Grill + icon: "mdi:grill" + + - entity: sensor.igrill_mini_probe_1 show_icon: true show_state: true name: Grill diff --git a/esphome/nilan300.yaml b/esphome/nilan300.yaml index 9810a8c..d10e54a 100644 --- a/esphome/nilan300.yaml +++ b/esphome/nilan300.yaml @@ -69,22 +69,21 @@ address: 1200 bitmask: 1 - - platform: modbus_controller - modbus_controller_id: nilan_modbus_controller + #- platform: modbus_controller + # modbus_controller_id: nilan_modbus_controller + # name: "Air filter alarm" + # id: nilan_filter_alarm + # register_type: read + # address: 101 + # bitmask: 1 + + - platform: template name: "Air filter alarm" id: nilan_filter_alarm - register_type: read - address: 101 - bitmask: 1 - - -# - platform: modbus_controller -# modbus_controller_id: nilan_modbus_controller -# name: "Bypass IsOpen" -# id: nilan_bypass_isopen -# register_type: read -# address: 3000 -# bitmask: 1 + lambda: !lambda |- + return (id(nilan_alarm_list_1_id).state == 19 + || id(nilan_alarm_list_2_id).state == 19 + || id(nilan_alarm_list_3_id).state == 19); - platform: template id: nilan_bypass_state @@ -121,6 +120,7 @@ modbus_controller_id: nilan_modbus_controller name: "Bus version" id: nilan_bus_version + skip_updates: 60 internal: true accuracy_decimals: 0 entity_category: diagnostic @@ -264,9 +264,81 @@ accuracy_decimals: 0 register_type: read address: 400 + + - platform: modbus_controller + modbus_controller_id: nilan_modbus_controller + name: "Alarm list 1 id" + id: nilan_alarm_list_1_id + accuracy_decimals: 0 + register_type: read + address: 401 + + - platform: modbus_controller + modbus_controller_id: nilan_modbus_controller + internal: true + id: nilan_alarm_list_1_date + accuracy_decimals: 0 + register_type: read + address: 402 - platform: modbus_controller modbus_controller_id: nilan_modbus_controller + internal: true + id: nilan_alarm_list_1_time + accuracy_decimals: 0 + register_type: read + address: 403 + + - platform: modbus_controller + modbus_controller_id: nilan_modbus_controller + name: "Alarm list 2 id" + id: nilan_alarm_list_2_id + accuracy_decimals: 0 + register_type: read + address: 404 + + - platform: modbus_controller + modbus_controller_id: nilan_modbus_controller + internal: true + id: nilan_alarm_list_2_date + accuracy_decimals: 0 + register_type: read + address: 405 + + - platform: modbus_controller + modbus_controller_id: nilan_modbus_controller + internal: true + id: nilan_alarm_list_2_time + accuracy_decimals: 0 + register_type: read + address: 406 + + - platform: modbus_controller + modbus_controller_id: nilan_modbus_controller + name: "Alarm list 3 id" + id: nilan_alarm_list_3_id + accuracy_decimals: 0 + register_type: read + address: 407 + + - platform: modbus_controller + modbus_controller_id: nilan_modbus_controller + internal: true + id: nilan_alarm_list_3_date + accuracy_decimals: 0 + register_type: read + address: 408 + + - platform: modbus_controller + modbus_controller_id: nilan_modbus_controller + internal: true + id: nilan_alarm_list_3_time + accuracy_decimals: 0 + register_type: read + address: 409 + + - platform: modbus_controller + modbus_controller_id: nilan_modbus_controller name: "Actual on/off state" id: nilan_actual_on_off_state accuracy_decimals: 0 @@ -525,10 +597,83 @@ } return mode_str; + - platform: template + name: "Alarm 1 timestamp" + id: nilan_alarm_list_1_datetime + lambda: |- + uint16_t alarmDate = id(nilan_alarm_list_1_date).state; + uint16_t alarmTime = id(nilan_alarm_list_1_time).state; + + if(!alarmDate ||!alarmTime) return std::string(""); + + // Parse the date + auto year = (alarmDate >> 9) + 1980; + auto month = (alarmDate >> 5) & 0b00001111; + auto day = alarmDate & 0b00011111; + auto hour = (alarmTime >> 11) & 0b00011111; + auto minute = (alarmTime >> 5) & 0b0011111; + auto second = (alarmTime & 0b00011111) * 2; + + return std::to_string(year) + "-" + + ((month < 10) ? "0" : "") + std::to_string(month) + "-" + + ((day < 10) ? "0" : "") + std::to_string(day) + " " + + ((hour < 10) ? "0" : "") + std::to_string(hour) + ":" + + ((minute < 10) ? "0" : "") + std::to_string(minute) + ":" + + ((second < 10) ? "0" : "") + std::to_string(second); + + - platform: template + name: "Alarm 2 timestamp" + id: nilan_alarm_list_2_datetime + lambda: |- + uint16_t alarmDate = id(nilan_alarm_list_2_date).state; + uint16_t alarmTime = id(nilan_alarm_list_2_time).state; + + if(!alarmDate ||!alarmTime) return std::string(""); + + // Parse the date + auto year = (alarmDate >> 9) + 1980; + auto month = (alarmDate >> 5) & 0b00001111; + auto day = alarmDate & 0b00011111; + auto hour = (alarmTime >> 11) & 0b00011111; + auto minute = (alarmTime >> 5) & 0b0011111; + auto second = (alarmTime & 0b00011111) * 2; + + return std::to_string(year) + "-" + + ((month < 10) ? "0" : "") + std::to_string(month) + "-" + + ((day < 10) ? "0" : "") + std::to_string(day) + " " + + ((hour < 10) ? "0" : "") + std::to_string(hour) + ":" + + ((minute < 10) ? "0" : "") + std::to_string(minute) + ":" + + ((second < 10) ? "0" : "") + std::to_string(second); + + - platform: template + name: "Alarm 3 timestamp" + id: nilan_alarm_list_3_datetime + lambda: |- + uint16_t alarmDate = id(nilan_alarm_list_3_date).state; + uint16_t alarmTime = id(nilan_alarm_list_3_time).state; + + if(!alarmDate ||!alarmTime) return std::string(""); + + // Parse the date + auto year = (alarmDate >> 9) + 1980; + auto month = (alarmDate >> 5) & 0b00001111; + auto day = alarmDate & 0b00011111; + auto hour = (alarmTime >> 11) & 0b00011111; + auto minute = (alarmTime >> 5) & 0b0011111; + auto second = (alarmTime & 0b00011111) * 2; + + return std::to_string(year) + "-" + + ((month < 10) ? "0" : "") + std::to_string(month) + "-" + + ((day < 10) ? "0" : "") + std::to_string(day) + " " + + ((hour < 10) ? "0" : "") + std::to_string(hour) + ":" + + ((minute < 10) ? "0" : "") + std::to_string(minute) + ":" + + ((second < 10) ? "0" : "") + std::to_string(second); + - platform: modbus_controller modbus_controller_id: nilan_modbus_controller name: "Software version" id: nilan_version_info + skip_updates: 60 register_type: read register_count: 3 response_size: 6 @@ -563,6 +708,7 @@ modbus_controller_id: nilan_modbus_controller name: "Aggregate type" id: nilan_platform_id + skip_updates: 60 entity_category: diagnostic register_type: holding address: 1000 @@ -629,3 +775,18 @@ fan_speed_sensor_id: nilan_ventilation_speed_set mode_select_id: nilan_set_operation_mode +output: + - platform: modbus_controller + modbus_controller_id: nilan_modbus_controller + id: nilan_reset_alarm + address: 400 + use_write_multiple: true + value_type: U_WORD + write_lambda: return 255; + +button: + - platform: output + name: Reset alarm + id: nilan_reset_alarm_button + output: nilan_reset_alarm + duration: 5s \ No newline at end of file diff --git a/sensors/energy.yaml b/sensors/energy.yaml index 3d38aff..f4531f5 100644 --- a/sensors/energy.yaml +++ b/sensors/energy.yaml @@ -15,8 +15,8 @@ round: 4 - platform: integration - source: sensor.aircondition_energi - name: aircondition_power_used + source: sensor.sousvide_energi + name: sousvide_power_used method: left unit_prefix: k unit_time: h diff --git a/sensors/igrill.yaml b/sensors/igrill.yaml index ffc1468..ead0bfb 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_temperature.state | default(0) | int(0)) > 0}}" + availability_template: "{{(states.sensor.igrill_mini_probe_1.state | default(0) | int(0)) > 0}}" value_template: - "{% if (states.sensor.igrill_temperature.state | int(0)) >= (states.input_number.grill_probe_1_target.state | int) %} + "{% if (states.sensor.igrill_mini_probe_1.state | int(0)) >= (states.input_number.grill_probe_1_target.state | int) %} Alert - {% elif (states.sensor.igrill_temperature.state | int(0)) >= (states.input_number.grill_probe_1_target.state | int) - 4 %} + {% elif (states.sensor.igrill_mini_probe_1.state | int(0)) >= (states.input_number.grill_probe_1_target.state | int) - 4 %} Ready {% else %} Cooking @@ -15,6 +15,16 @@ time_to_done: friendly_name: iGrill Time Left to Target Temp value_template: | - {% set missing = states.input_number.grill_probe_1_target.state | float(0) - states.sensor.igrill_temperature.state | float(0) %} + {% set missing = states.input_number.grill_probe_1_target.state | float(0) - states.sensor.igrill_mini_probe_1.state | float(0) %} {% set timeLeft = missing / (states.sensor.igrill_temperature_change.state | float(0)) | round(1) %} {{ timeLeft | round(1) }} minutter + +- platform: filter + name: "filtered_igrill_probe_1" + entity_id: sensor.igrill_mini_probe_1 + filters: + - filter: lowpass + time_constant: 10 + - filter: time_simple_moving_average + window_size: "00:00:10" + precision: 2 diff --git a/template/aircondition.yaml b/template/aircondition.yaml index 6afacfd..682f1c7 100644 --- a/template/aircondition.yaml +++ b/template/aircondition.yaml @@ -1,29 +1,29 @@ - sensor: - - name: AirCondition Energi - state: "{{ (states.switch.aircondition_switch.attributes.current_consumption) | default(0) | float(0) }}" + - name: SousVide Energi + state: "{{ (states.switch.sousvide_switch.attributes.current_consumption) | default(0) | float(0) }}" unit_of_measurement: "W" device_class: power state_class: measurement - - name: AirCondition Spænding - state: "{{ (states.switch.aircondition_switch.attributes.voltage) | default(0) | float(0) }}" + - name: SousVide Spænding + state: "{{ (states.switch.sousvide_switch.attributes.voltage) | default(0) | float(0) }}" unit_of_measurement: "V" device_class: voltage state_class: measurement - - name: AirCondition Strøm - state: "{{ (states.switch.aircondition_switch.attributes.current) | default(0) | float(0) * 0.001 }}" + - name: SousVide Strøm + state: "{{ (states.switch.sousvide_switch.attributes.current) | default(0) | float(0) * 0.001 }}" unit_of_measurement: "A" device_class: current state_class: measurement - - name: AirCondition Power Factor - availability: "{{ states.sensor.aircondition_strom.state | float(0) > 0 }}" + - name: SousVide Power Factor + availability: "{{ states.sensor.sousvide_strom.state | float(0) > 0 }}" state: | {# Calculate power factor #} - {% set v = states.sensor.aircondition_spaending.state | float %} - {% set a = states.sensor.aircondition_strom.state | float %} - {% set wp = states.sensor.aircondition_energi.state | float %} + {% set v = states.sensor.sousvide_spaending.state | float %} + {% set a = states.sensor.sousvide_strom.state | float %} + {% set wp = states.sensor.sousvide_energi.state | float %} {% set ap = v * a %} {% if ap > 0 %} {% set pf = wp / ap * 100 %} diff --git a/zigbee2mqtt/coordinator_backup.json b/zigbee2mqtt/coordinator_backup.json index 3319948..3911b9c 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.16.0", + "source": "zigbee-herdsman@0.19.0", "internal": { - "date": "2023-07-08T17:30:54.238Z", + "date": "2023-10-13T20:04:43.034Z", "znpVersion": 1 } }, @@ -25,7 +25,7 @@ "network_key": { "key": "01030507090b0d0f00020406080a0c0d", "sequence_number": 0, - "frame_counter": 24200300 + "frame_counter": 32694177 }, "devices": [ { @@ -35,7 +35,7 @@ "link_key": { "key": "2dbd06f2c925d1440e77baca95187bb8", "rx_counter": 0, - "tx_counter": 165 + "tx_counter": 187 } }, { @@ -45,7 +45,7 @@ "link_key": { "key": "6a56d62baee038ec499c6a13f2dd9210", "rx_counter": 0, - "tx_counter": 143 + "tx_counter": 165 } }, { @@ -55,7 +55,7 @@ "link_key": { "key": "12112468ae69e11eee32eed49635dcb4", "rx_counter": 20150285, - "tx_counter": 200 + "tx_counter": 222 } }, { @@ -65,7 +65,7 @@ "link_key": { "key": "a358f80d1da831f869e4c0512002cddb", "rx_counter": 0, - "tx_counter": 165 + "tx_counter": 187 } }, { @@ -75,7 +75,7 @@ "link_key": { "key": "d2ccd31ef76ff9518ef179e2d4a54569", "rx_counter": 0, - "tx_counter": 132 + "tx_counter": 154 } }, { @@ -85,7 +85,7 @@ "link_key": { "key": "90c55cfc516ba81cb30fe0c40d5602e0", "rx_counter": 0, - "tx_counter": 132 + "tx_counter": 154 } }, { @@ -95,27 +95,27 @@ "link_key": { "key": "818230c908ff5fd5ddbf9a352b35e3ed", "rx_counter": 0, - "tx_counter": 132 + "tx_counter": 154 } }, { - "nwk_address": "52a3", + "nwk_address": "1a0e", "ieee_address": "00124b0029203033", "is_child": false, "link_key": { "key": "c2dd2d3410ab1ab47ee57109ba57397e", "rx_counter": 0, - "tx_counter": 162 + "tx_counter": 192 } }, { "nwk_address": "21a2", "ieee_address": "00124b002920814b", - "is_child": false, + "is_child": true, "link_key": { "key": "ffccf57820f10e2b3570cd241d5bf208", "rx_counter": 0, - "tx_counter": 132 + "tx_counter": 154 } }, { @@ -125,7 +125,7 @@ "link_key": { "key": "f987289d4d9e4320537b0b57f1a61f1d", "rx_counter": 0, - "tx_counter": 142 + "tx_counter": 164 } }, { @@ -135,7 +135,7 @@ "link_key": { "key": "50383e2bdf25d14473f2821383187bb8", "rx_counter": 0, - "tx_counter": 0 + "tx_counter": 22 } } ]