Licznik energii cieplnej Kamstrup Multical 402

Cześć @_Szczepan dziękuję bardzo za wskazówki!

Rzeczywiście mój licznik nadaje w C1 mode B.

Dodałem obsługę tego formatu (pewnie w ograniczonym zakresie - tak żeby działało dla mojego przypadku).
To pociągnęło za sobą kilka innych modyfikacji - inna interpretacja długości ramki (L-field), inny sposób szyfrowania danych (AES CTR). Ale w końcu udało się dobić do brzegu z dobrym rezultatem:


Wszystkie zmiany są dostępne w mojej kopii Twojego repo:

Pozdrawiam!

PS
Wrzucam jeszcze konfigurację YAML:

 - platform: wmbus

    # Meter ID (usually from sticker). Can be specified as decimal or hex.
    # only hex is working for my watermeter !
    # see: https://github.com/SzczepanLeon/esphome-components/issues/6
    # edit watermeterid in the secrets file
    ## add_prefix settings to add the watermeterid to the lqi, rssi and total_water_m3
    meter_id: !secret heatmeterId1 
    mode: T1C1
    type: kamheat
    key: !secret heatmeterId1key
    add_prefix: false

    # The LQI value reported by the CC1101 is a 7 bit unsigned number with a range from 0 to 127.
    # Note that a lower value indicates a better link.
    # The LQI of a received packet will be bad (higher number) when there is lot of interference.
    lqi:
      id: my_heat_cc1101_lqi
      name: "My Heat meter LQI"
      entity_category: "diagnostic"
      unit_of_measurement: "lqi"
      state_class: "measurement"

    # The RSSI value reported by the CC1101 is a 8 bit signed number with an effective
    # range from -138 dBm to -10.5 dBm when the CC1101 is operating around 868 MHz.
    # RSSI stands for received signal strength (power) indication (in dBm).
    # A higher value indicates higher power. (internal only)
    rssi:
      id: my_heat_cc1101_rssi
      name: "My Heat meter RSSI"
      unit_of_measurement: "dBm"
      entity_category: "diagnostic"

    # get the total energy in GJ from the wmbus telegram
    total_energy_consumption_gj:
      name: "My Heat consumption"
      id: my_heat_consumption
      unit_of_measurement: "GJ"
      state_class: total_increasing
      device_class: "energy"
      accuracy_decimals: 2
      icon: mdi:gauge
    # get the forward energy in m2*C from the wmbus telegram
    total_forward_energy_m3c:
      name: "My Heat forward energy"
      id: my_heat_forward_energy
      unit_of_measurement: "m³×°C"
      state_class: total_increasing
      device_class: "energy"
      accuracy_decimals: 0
      icon: mdi:counter      
    # get the return energy in m2*C from the wmbus telegram
    total_return_energy_m3c:
      name: "My Heat return energy"
      id: my_heat_return_energy
      unit_of_measurement: "m³×°C"
      state_class: total_increasing
      device_class: "energy"
      accuracy_decimals: 0
      icon: mdi:counter      
    # get the total volume in m3 from the wmbus telegram
    total_volume_m3:
      name: "My Heat total volume"
      id: my_heat_total_volume
      unit_of_measurement: "m³"
      state_class: total_increasing
      device_class: "volume"
      accuracy_decimals: 2
      icon: mdi:counter          
    # get current flow in l/h from the wmbus telegram
    volume_flow_lh:
      name: "My Heat flow"
      id: my_heat_flow
      unit_of_measurement: "l/h"
      state_class: "measurement"
      accuracy_decimals: 0
      icon: mdi:counter       
    # get current temperature at inlet in Celcius from the wmbus telegram
    flow_temperature_c:
      name: "My Heat inlet temperature"
      id: my_heat_temp_in
      unit_of_measurement: "°C"
      state_class: "measurement"
      device_class: "temperature"
      accuracy_decimals: 2
      icon: mdi:thermometer-high            
    # get current temperature at outlet in Celcius from the wmbus telegram
    return_temperature_c:
      name: "My Heat outlet temperature"
      id: my_heat_temp_out
      unit_of_measurement: "°C"
      state_class: "measurement"
      device_class: "temperature"
      accuracy_decimals: 2
      icon: mdi:thermometer-low

PPS
Dodałem sprawdzanie CRC bo ~2x na dobę zdarzały się błędne odczyty.

2 polubienia