esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 35 forks source link

dsmr component #4464

Open ph-wheels opened 1 year ago

ph-wheels commented 1 year ago

The problem

first of all thanks for making this component available to us, it really makes things much easier. using the dsmr component in dsmr version 2.2 does not return value for gas_delivered: while it does do so for gas_delivered_text:

My partial yaml file I used for testing is below.

the data returned as per log file is below.

and the test data (obtain from an actual dsmr device) being sent to esp32 on rx pin io34 is in additional information

could I ask to provide feedback on how to resolve, many thanks and if testing needs to be done I could so so

Which version of ESPHome has the issue?

version: 2023.4.1

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

haos9.5

What platform are you using?

ESP32

Board

ESP32_Devkitc V4

Component causing the issue

dsmr

Example YAML snippet

dsmr:
  max_telegram_length: 1000
  receive_timeout: 500ms
  crc_check: false

sensor:
  - platform: internal_temperature
    name: "MCU Temperature"

  - platform: dsmr
    energy_delivered_tariff1:
      name: dsmr_energy_delivered_tariff1
    energy_delivered_tariff2:
      name: dsmr_energy_delivered_tariff2
    energy_returned_tariff1:
      name: dsmr_energy_returned_tariff1
    energy_returned_tariff2:
      name: dsmr_energy_returned_tariff2
    power_delivered:
      name: dsmr_power_delivered
    power_returned:
      name: dsmr_power_returned
    gas_delivered:
      name: gas_delivered

text_sensor:
  - platform: dsmr
    identification:
      name: "dsmr_identification"
    p1_version:
      name: 2.2
    gas_delivered_text:
      name: "gas_delivered_raw"
    electricity_tariff:
      name: "active tarriff"

Anything in the logs that might be useful for us?

[21:25:23][C][dsmr:275]: DSMR:
[21:25:23][C][dsmr:276]:   Max telegram length: 1000
[21:25:23][C][dsmr:277]:   Receive timeout: 0.5s
[21:25:23][C][dsmr:286]:   energy_delivered_tariff1 'dsmr_energy_delivered_tariff1'
[21:25:23][C][dsmr:286]:     Device Class: 'energy'
[21:25:23][C][dsmr:286]:     State Class: 'total_increasing'
[21:25:23][C][dsmr:286]:     Unit of Measurement: 'kWh'
[21:25:23][C][dsmr:286]:     Accuracy Decimals: 3
[21:25:23][C][dsmr:286]:   energy_delivered_tariff2 'dsmr_energy_delivered_tariff2'
[21:25:23][C][dsmr:286]:     Device Class: 'energy'
[21:25:23][C][dsmr:286]:     State Class: 'total_increasing'
[21:25:23][C][dsmr:286]:     Unit of Measurement: 'kWh'
[21:25:23][C][dsmr:286]:     Accuracy Decimals: 3
[21:25:23][C][dsmr:286]:   energy_returned_tariff1 'dsmr_energy_returned_tariff1'
[21:25:23][C][dsmr:286]:     Device Class: 'energy'
[21:25:23][C][dsmr:286]:     State Class: 'total_increasing'
[21:25:23][C][dsmr:286]:     Unit of Measurement: 'kWh'
[21:25:23][C][dsmr:286]:     Accuracy Decimals: 3
[21:25:23][C][dsmr:286]:   energy_returned_tariff2 'dsmr_energy_returned_tariff2'
[21:25:23][C][dsmr:286]:     Device Class: 'energy'
[21:25:23][C][dsmr:286]:     State Class: 'total_increasing'
[21:25:23][C][dsmr:286]:     Unit of Measurement: 'kWh'
[21:25:23][C][dsmr:286]:     Accuracy Decimals: 3
[21:25:23][C][dsmr:286]:   power_delivered 'dsmr_power_delivered'
[21:25:23][C][dsmr:286]:     Device Class: 'power'
[21:25:23][C][dsmr:286]:     State Class: 'measurement'
[21:25:23][C][dsmr:286]:     Unit of Measurement: 'kW'
[21:25:23][C][dsmr:286]:     Accuracy Decimals: 3
[21:25:23][C][dsmr:286]:   power_returned 'dsmr_power_returned'
[21:25:23][C][dsmr:286]:     Device Class: 'power'
[21:25:23][C][dsmr:286]:     State Class: 'measurement'
[21:25:23][C][dsmr:286]:     Unit of Measurement: 'kW'
[21:25:24][C][dsmr:286]:     Accuracy Decimals: 3
[21:25:24][C][dsmr:286]:   gas_delivered 'gas_delivered'
[21:25:24][C][dsmr:286]:     Device Class: 'gas'
[21:25:24][C][dsmr:286]:     State Class: 'total_increasing'
[21:25:24][C][dsmr:286]:     Unit of Measurement: 'm³'
[21:25:24][C][dsmr:286]:     Accuracy Decimals: 3
[21:25:24][C][dsmr:289]:   identification 'dsmr_identification'
[21:25:24][C][dsmr:289]:   p1_version '2.2'
[21:25:24][C][dsmr:289]:   gas_delivered_text 'gas_delivered_raw'
[21:25:24][C][dsmr:289]:   electricity_tariff 'active tarriff'
[21:25:24][C][captive_portal:088]: Captive Portal:
[21:25:24][C][mdns:108]: mDNS:
[21:25:24][C][mdns:109]:   Hostname: esphome-web-faca98
[21:25:24][C][ota:093]: Over-The-Air Updates:
[21:25:24][C][ota:094]:   Address: esphome-web-faca98.local:3232
[21:25:24][C][api:138]: API Server:
[21:25:24][C][api:139]:   Address: esphome-web-faca98.local:6053
[21:25:24][C][api:141]:   Using noise encryption: YES
[21:25:32][D][sensor:110]: 'dsmr_energy_delivered_tariff1': Sending state 19457.30273 kWh with 3 decimals of accuracy
[21:25:32][D][sensor:110]: 'dsmr_energy_delivered_tariff2': Sending state 19855.87695 kWh with 3 decimals of accuracy
[21:25:32][D][sensor:110]: 'dsmr_energy_returned_tariff1': Sending state 6735.08789 kWh with 3 decimals of accuracy
[21:25:32][D][sensor:110]: 'dsmr_energy_returned_tariff2': Sending state 16076.18848 kWh with 3 decimals of accuracy
[21:25:32][D][sensor:110]: 'dsmr_power_delivered': Sending state 0.00000 kW with 3 decimals of accuracy
[21:25:33][D][sensor:110]: 'dsmr_power_returned': Sending state 0.33000 kW with 3 decimals of accuracy
[21:25:33][D][text_sensor:064]: 'dsmr_identification': Sending state 'ISk5\2MT382-1003'
[21:25:33][D][text_sensor:064]: 'gas_delivered_raw': Sending state '(220611150000)(00)(60)(1)(0-1:24.2.1)(m3)(10527.266)'
[21:25:33][D][text_sensor:064]: 'active tarriff': Sending state '0001'

Additional information

/ISk5\2MT382-1003

0-0:96.1.1(5A424556303035303936303530313132) 1-0:1.8.1(19457.303kWh) 1-0:1.8.2(19855.877kWh) 1-0:2.8.1(06735.088kWh) 1-0:2.8.2(16076.188kWh) 0-0:96.14.0(0001) 1-0:1.7.0(0000.00kW) 1-0:2.7.0(0000.33kW) 0-0:17.0.0(0999.00*kW) 0-0:96.3.10(1) 0-0:96.13.1() 0-0:96.13.0() 0-1:24.1.0(3) 0-1:96.1.0(3238313031353431323030333330313132) 0-1:24.3.0(220611150000)(00)(60)(1)(0-1:24.2.1)(m3) (10527.266) 0-1:24.4.0(1) !

AussiSG commented 1 year ago

You can find some info in my posted "issue". It;'s not really resolved but does contain a work around

https://github.com/esphome/issues/issues/4490

ph-wheels commented 1 year ago

THANKS, works ok

From: AussiSG @.> Sent: Wednesday, May 17, 2023 7:22 AM To: esphome/issues @.> Cc: Paul @.>; Author @.> Subject: Re: [esphome/issues] dsmr component (Issue #4464)

You can find some info in my posted "issue". It;'s not really resolved but do contains a work around

4490 https://github.com/esphome/issues/issues/4490

— Reply to this email directly, view it on GitHub https://github.com/esphome/issues/issues/4464#issuecomment-1550752156 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRWQA7AIT5BI2Q3PMKNMLTXGROA3ANCNFSM6AAAAAAXM4PHWE . You are receiving this because you authored the thread. https://github.com/notifications/beacon/ACRWQA7CDZ47HRPNCNDZPGLXGROA3A5CNFSM6AAAAAAXM4PHWGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS4N2MZY.gif Message ID: @. @.> >

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ph-wheels commented 1 year ago

Work around works but would have been nice if the underlaying problem could have been addressed, I'm able to test any suggested fix