Hargassner heating integration

Hi all, I have just updated the github repository with some additional fixes. The integration should now work again with the latest Home Assistant version, also with the full parameter set. Please report here if you still encounter any issues after the update.

Thanks! Sorry, all Sensors Status is unknown. The last repository is installed. Telnet Gateway is up. IP Adress is OK.

Protokoll:

Logger: homeassistant
Source: components/sensor/init.py:478
First occurred: 16:05:42 (1 occurrences)
Last logged: 16:05:42

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 970, in _async_registry_updated
self.async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 590, in async_write_ha_state
self._async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 654, in _async_write_ha_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 596, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/sensor/init.py”, line 478, in state
raise ValueError(
ValueError: Sensor sensor.hargassner_boiler_state has a unit of measurement and thus indicating it has a numeric value; however, it has the non-numeric device class: enum

Logger: homeassistant.components.sensor
Source: components/sensor/init.py:478
Integration: Sensor (documentation, issues)
First occurred: 16:05:07 (2 occurrences)
Last logged: 16:05:07

Error adding entities for domain sensor with platform nano_pk
Error while setting up nano_pk platform for sensor
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 471, in async_add_entities
await asyncio.gather(*tasks)
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 749, in _async_add_entity
await entity.add_to_platform_finish()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 850, in add_to_platform_finish
self.async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 590, in async_write_ha_state
self._async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 654, in _async_write_ha_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 596, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/sensor/init.py”, line 478, in state
raise ValueError(
ValueError: Sensor sensor.hargassner_boiler_state has a unit of measurement and thus indicating it has a numeric value; however, it has the non-numeric device class: enum

Keine Veränderung der Daten.

Hello. Still remaining the same error after update…

Help. Is there a solution?
THS

Hey Martin.
that is really great, thank you. I managed to add a new sensor in my config yaml and is showing up with value.

However, (4) apparently is not the buffer temperature but the inside temperature of the heater. Would you be able to share the rest of your config as well or how do I find out the rest?
Thank you
Philip

I installed the git from GitHub - Jahislove/Hargassner: site web permettant la visualisation en temps réel d'une chaudière Hargassner Nano PK on my Synology and MariaDB. I get the data for the sensors from the SQL integration. This is working fine so far.

To all those that are still seeing error messages after updating the code from the latest github: I am not sure what is happening in your systems, but you might need to delete the pycache folder in your pk_nano directory after replacing the code . A system restart is always required after any changes, but I assume everybody here is aware of that.
I’m pretty sure that if the errors continue, that somehow in your installations the recent updates were not properly applied…

Hello,
I’ve cleared pycache rebooted → same problem
Removed integration - rebooted - removed entities - rebooted - reinstalled integration - rebooted - cleared pycache - rebooted but I’ve always the same problem:

Logger: homeassistant.components.sensor
Source: components/sensor/__init__.py:487
Integration: Sensore (documentation, issues)
First occurred: 17:05:12 (2 occurrences)
Last logged: 17:05:12

Error adding entities for domain sensor with platform nano_pk
Error while setting up nano_pk platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 504, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 788, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1006, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 742, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 810, in _async_write_ha_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 748, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 487, in state
    raise ValueError(
ValueError: Sensor sensor.nano_pk_boiler_state has a unit of measurement and thus indicating it has a numeric value; however, it has the non-numeric device class: enum

I don’t know what to do next…

Hi, my setup has been working for nearly one year now - without any problems at all.
Thank you “Killaruna” for your hard work and time!

But today at 13:00 it stopped sending Data - i have opened the “Hargassner App”: There was a notification that the Control did an update at exactly this point of time.

So maybe Murazor you have the same “problem” that your nana-ok control did an update.
I am trying to read the info from the SD-Card now and see if this fixes the problem.

Hi Philip,
since the last hargassner software update the Channel ID also changed for my HV20. With the current software V10.2HAR.m I read out follwowing channels:

- platform: tcp
  host: 192.168.XXX.XX
  port: 23
  name: Pufferladung
  scan_interval: 300
  payload: ""
  unit_of_measurement: "%"
  value_template: '{{ value.split(" ") [17] }}'

- platform: tcp
  host: 192.168.XXX.XX
  port: 23
  name: Aussentemperatur_gemittelt
  scan_interval: 60
  payload: ""
  unit_of_measurement: "°C"
  value_template: '{{ value.split(" ") [32] }}'

- platform: tcp
  host: 192.168.XXX.XX
  port: 23
  name: Kesseltemperatur
  scan_interval: 60
  payload: ""
  unit_of_measurement: "°C"
  value_template: '{{ value.split(" ") [4] }}'

- platform: tcp
  host: 192.168.XXX.XX
  port: 23
  name: Rauchgastemperatur
  scan_interval: 60
  payload: ""
  unit_of_measurement: "°C"
  value_template: '{{ value.split(" ") [8] }}'

- platform: tcp
  host: 192.168.XXX.XX
  port: 23
  name: Puffertemperatur_oben
  scan_interval: 60
  payload: ""
  unit_of_measurement: "°C"
  value_template: '{{ value.split(" ") [12] }}'

- platform: tcp
  host: 192.168.XXX.XX
  port: 23
  name: Puffertemperatur_mitte
  scan_interval: 60
  payload: ""
  unit_of_measurement: "°C"
  value_template: '{{ value.split(" ") [13] }}'

- platform: tcp
  host: 192.168.XXX.XX
  port: 23
  name: Puffertemperatur_unten
  scan_interval: 60
  payload: ""
  unit_of_measurement: "°C"
  value_template: '{{ value.split(" ") [14] }}'

- platform: tcp
  host: 192.168.XXX.XX
  port: 23
  name: Boilertemperatur
  scan_interval: 60
  payload: ""
  unit_of_measurement: "°C"
  value_template: '{{ value.split(" ") [66] }}'

- platform: tcp
  host: 192.168.XXX.XX
  port: 23
  name: Aussentemperatur
  scan_interval: 600
  payload: ""
  unit_of_measurement: "°C"
  value_template: '{{ value.split(" ") [31] }}'

- platform: tcp
  host: 192.168.XXX.XX
  port: 23
  name: Pelletverbrauch
  scan_interval: 60
  payload: ""
  unit_of_measurement: "kg"
  value_template: '{{ value.split(" ") [101] }}'

- platform: tcp
  host: 192.168.XXX.XX
  port: 23
  name: Pelletlagerstand
  scan_interval: 60
  payload: ""
  unit_of_measurement: "kg"
  value_template: '{{ value.split(" ") [100] }}'

Maybe for your heating type the channel IDs are different. If so you can try to find out the channel ID by using sd logging as it is decribed here:
[GitHub - TheRealKillaruna/nano_pk: Home Assistant integration of Hargassner Nano-PK ]
Search for an XML section <DAQPRJ> ... </DAQPRJ> in the DAQ File and find there some abbreviations for channel name and the corresponding channel ID.
An example from my DAQ File: CHANNEL name=“TB1” id=“65” unit=“°C”/
This is Boilertemperatur with hargassner channel ID 65. In the value template from yaml file you have to add 1 to hargassner channel ID, see code above

1 Like

Great. Thank you very much! Now I have all important values in my Home Assistant and can immediately see when I have to go into the basement and put new wood into my heating system :slight_smile:

1 Like

Thanks @ TheRealKillaruna, the new update on your Code (hargassner.py) is working fine.
All Sensors working.

Thanks @ TheRealKillaruna also from me. Now it works pretty good. I have only a different message set.

Now I check all the sensors if they coincide with my pellet boiler datas.

DAQ is like

<DAQPRJ><ANALOG><CHANNEL id='0' name='ZK' dop='0'/><CHANNEL id='1' name='O2' unit='%'/><CHANNEL id='2' name='O2soll' unit='%'/><CHANNEL id='3' name='TK' unit='°C'/><CHANNEL id='4' name='TKsoll' unit='°C' dop='0'/><CHANNEL id='5' name='TRL' unit='°C'/><CHANNEL id='6' name='TRLsoll' unit='°C' dop='0'/><CHANNEL id='7' name='Spreizung' unit='°C'/><CHANNEL id='8' name='TRG' unit='°C'/><CHANNEL id='9' name='SZist' unit='%' dop='0'/><CHANNEL id='10' name='SZsoll' unit='%'/><CHANNEL id='11' name='TPo' unit='°C'/><CHANNEL id='12' name='TPm' unit='°C'/><CHANNEL id='13' name='TPu' unit='°C'/><CHANNEL id='14' name='Puff Füllgrad' unit='%' dop='0'/><CHANNEL id='15' name='Puffer_soll oben' unit='°C' dop='0'/><CHANNEL id='16' name='Puffer_soll unten' unit='°C' dop='0'/><CHANNEL id='17' name='PuffZustand' dop='0'/><CHANNEL id='18' name='Höchste Anf' dop='0'/><CHANNEL id='19' name='TFW' unit='°C' dop='0'/><CHANNEL id='20' name='Leistung' unit='%' dop='0'/><CHANNEL id='21' name='ESsoll' unit='%'/><CHANNEL id='22' name='min.Leist.TRG' unit='%'/><CHANNEL id='23' name='max.Leist.TRG' unit='%'/><CHANNEL id='24' name='max.Leist.Fuell' unit='%'/><CHANNEL id='25' name='max.Leist.TPO' unit='%'/><CHANNEL id='26' name='ESRegler' unit='%' dop='0'/><CHANNEL id='27' name='Regler K'/><CHANNEL id='28' name='KeBrstScale' unit='%' dop='0'/><CHANNEL id='29' name='Programm' dop='0'/><CHANNEL id='30' name='Störungs Nr' dop='0'/><CHANNEL id='31' name='I Es' unit='mA' dop='0'/><CHANNEL id='32' name='I Ra' unit='mA' dop='0'/><CHANNEL id='33' name='I Aa' unit='mA' dop='0'/><CHANNEL id='34' name='I Sr' unit='mA' dop='0'/><CHANNEL id='35' name='I Rein' unit='mA' dop='0'/><CHANNEL id='36' name='BLDC_ES ist' unit='rpm' dop='0'/><CHANNEL id='37' name='BLDC_ES soll' unit='rpm' dop='0'/><CHANNEL id='38' name='LZ ES seit Füll.' unit='Min' dop='0'/><CHANNEL id='39' name='LZ ES seit Ent.' unit='Min' dop='0'/><CHANNEL id='40' name='Anzahl Entasch.' dop='0'/><CHANNEL id='41' name='Anzahl SR Beweg.' dop='0'/><CHANNEL id='42' name='Lagerstand' unit='kg' dop='0'/><CHANNEL id='43' name='Verbrauchszähler' unit='kg' dop='0'/><CHANNEL id='44' name='Heiz P Lambda' unit='W' dop='2'/><CHANNEL id='45' name='Heiz U Lambda' unit='V' dop='2'/><CHANNEL id='46' name='Heiz I Lambda' unit='mA' dop='0'/><CHANNEL id='47' name='U_Lambda' unit='mV'/><CHANNEL id='48' name='U Netzteil' unit='mV' dop='0'/><CHANNEL id='49' name='T Spülung' unit='°C'/><CHANNEL id='50' name='BRT' unit='°C'/><CHANNEL id='51' name='Tplat' unit='°C' dop='0'/><CHANNEL id='52' name='TVG' unit='°C'/><CHANNEL id='53' name='TVG2' unit='°C'/><CHANNEL id='54' name='AIN17' unit='V'/><CHANNEL id='55' name='Taus' unit='°C'/><CHANNEL id='56' name='TA Gem.' unit='°C'/><CHANNEL id='57' name='Ext.HK Soll' unit='°C' dop='0'/><CHANNEL id='58' name='TVL_A' unit='°C'/><CHANNEL id='59' name='TVLs_A' unit='°C' dop='0'/><CHANNEL id='60' name='TRA_A' unit='°C'/><CHANNEL id='61' name='TRs_A' unit='°C'/><CHANNEL id='62' name='HKZustand_A' dop='0'/><CHANNEL id='63' name='FRA Zustand' dop='0'/><CHANNEL id='64' name='TVL_1' unit='°C'/><CHANNEL id='65' name='TVLs_1' unit='°C' dop='0'/><CHANNEL id='66' name='TRA_1' unit='°C'/><CHANNEL id='67' name='TRs_1' unit='°C'/><CHANNEL id='68' name='HKZustand_1' dop='0'/><CHANNEL id='69' name='FR1 Zustand' dop='0'/><CHANNEL id='70' name='TVL_2' unit='°C'/><CHANNEL id='71' name='TVLs_2' unit='°C' dop='0'/><CHANNEL id='72' name='TRA_2' unit='°C'/><CHANNEL id='73' name='TRs_2' unit='°C'/><CHANNEL id='74' name='HKZustand_2' dop='0'/><CHANNEL id='75' name='FR2 Zustand' dop='0'/><CHANNEL id='76' name='TVL_B' unit='°C'/><CHANNEL id='77' name='TVLs_B' unit='°C' dop='0'/><CHANNEL id='78' name='TRA_B' unit='°C'/><CHANNEL id='79' name='TRs_B' unit='°C'/><CHANNEL id='80' name='HKZustand_B' dop='0'/><CHANNEL id='81' name='FRB Zustand' dop='0'/><CHANNEL id='82' name='TBA' unit='°C'/><CHANNEL id='83' name='TBs_A' unit='°C' dop='0'/><CHANNEL id='84' name='TB1' unit='°C'/><CHANNEL id='85' name='TBs_1' unit='°C' dop='0'/><CHANNEL id='86' name='BoiZustand_1' dop='0'/><CHANNEL id='87' name='TBB' unit='°C'/><CHANNEL id='88' name='TBs_B' unit='°C' dop='0'/><CHANNEL id='89' name='HKR Anf' unit='°C'/><CHANNEL id='90' name='Anf. HKR0' unit='°C' dop='0'/><CHANNEL id='91' name='Anf. HKR1' unit='°C' dop='0'/><CHANNEL id='92' name='Anf. HKR2' unit='°C' dop='0'/><CHANNEL id='93' name='Anf. HKR3' unit='°C' dop='0'/><CHANNEL id='94' name='Anf. HKR4' unit='°C' dop='0'/><CHANNEL id='95' name='Anf. HKR5' unit='°C' dop='0'/><CHANNEL id='96' name='Anf. HKR6' unit='°C' dop='0'/><CHANNEL id='97' name='Anf. HKR7' unit='°C' dop='0'/><CHANNEL id='98' name='Anf. HKR8' unit='°C' dop='0'/><CHANNEL id='99' name='Anf. HKR9' unit='°C' dop='0'/><CHANNEL id='100' name='Anf. HKR10' unit='°C' dop='0'/><CHANNEL id='101' name='Anf. HKR11' unit='°C' dop='0'/><CHANNEL id='102' name='Anf. HKR12' unit='°C' dop='0'/><CHANNEL id='103' name='Anf. HKR13' unit='°C' dop='0'/><CHANNEL id='104' name='Anf. HKR14' unit='°C' dop='0'/><CHANNEL id='105' name='Anf. HKR15' unit='°C' dop='0'/><CHANNEL id='106' name='MWZ Vorl.' unit='°C'/><CHANNEL id='107' name='MWZ Rueckl.' unit='°C'/><CHANNEL id='108' name='MWZ Durchf.' dop='0'/><CHANNEL id='109' name='MWZ Leist.' unit='KW'/><CHANNEL id='110' name='DReg Wq' unit='°C'/><CHANNEL id='111' name='DReg K1' dop='0'/><CHANNEL id='112' name='DReg K2' dop='0'/><CHANNEL id='113' name='DiffReg TK1' unit='°C'/><CHANNEL id='114' name='DiffReg TK2' unit='°C'/></ANALOG><DIGITAL><CHANNEL id='0' bit='0' name='Störung'/><CHANNEL id='0' bit='1' name='Stb'/><CHANNEL id='0' bit='2' name='Fuellstand'/><CHANNEL id='0' bit='3' name='RLP/PuffP'/><CHANNEL id='0' bit='4' name='RLm_auf'/><CHANNEL id='0' bit='5' name='RLm_zu'/><CHANNEL id='0' bit='10' name='WS freig.'/><CHANNEL id='0' bit='11' name='Akt. Code'/><CHANNEL id='0' bit='14' name='FW Freig.'/><CHANNEL id='0' bit='15' name='gFlP'/><CHANNEL id='0' bit='16' name='gFlM auf'/><CHANNEL id='0' bit='17' name='gFlM zu'/><CHANNEL id='0' bit='18' name='gFl2P'/><CHANNEL id='0' bit='19' name='gFl2M auf'/><CHANNEL id='0' bit='20' name='gFl2M zu'/><CHANNEL id='1' bit='0' name='L Heiz.'/><CHANNEL id='1' bit='1' name='Z Heiz.'/><CHANNEL id='1' bit='2' name='Z Geb.'/><CHANNEL id='1' bit='3' name='AA Run'/><CHANNEL id='1' bit='4' name='AA Dir'/><CHANNEL id='1' bit='5' name='ES Run'/><CHANNEL id='1' bit='6' name='ES Dir'/><CHANNEL id='1' bit='7' name='AS Saug'/><CHANNEL id='1' bit='8' name='AS RA Run'/><CHANNEL id='1' bit='9' name='AS RA Dir'/><CHANNEL id='1' bit='10' name='Rein En'/><CHANNEL id='1' bit='11' name='Rein Run'/><CHANNEL id='1' bit='12' name='Es Rein Endl'/><CHANNEL id='1' bit='13' name='sAS Anf Füll'/><CHANNEL id='2' bit='0' name='HKPA'/><CHANNEL id='2' bit='1' name='MAA'/><CHANNEL id='2' bit='2' name='MAZ'/><CHANNEL id='2' bit='3' name='HKP1'/><CHANNEL id='2' bit='4' name='M1A'/><CHANNEL id='2' bit='5' name='M1Z'/><CHANNEL id='2' bit='6' name='HKP2'/><CHANNEL id='2' bit='7' name='M2A'/><CHANNEL id='2' bit='8' name='M2Z'/><CHANNEL id='2' bit='9' name='HKP3'/><CHANNEL id='2' bit='10' name='M3A'/><CHANNEL id='2' bit='11' name='M3Z'/><CHANNEL id='2' bit='12' name='HKP4'/><CHANNEL id='2' bit='13' name='M4A'/><CHANNEL id='2' bit='14' name='M4Z'/><CHANNEL id='2' bit='15' name='HKP5'/><CHANNEL id='2' bit='16' name='M5A'/><CHANNEL id='2' bit='17' name='M5Z'/><CHANNEL id='2' bit='18' name='HKP6'/><CHANNEL id='2' bit='19' name='M6A'/><CHANNEL id='2' bit='20' name='M6Z'/><CHANNEL id='2' bit='21' name='HKPB'/><CHANNEL id='2' bit='22' name='MBA'/><CHANNEL id='2' bit='23' name='MBZ'/><CHANNEL id='3' bit='0' name='BPA'/><CHANNEL id='3' bit='1' name='BP1'/><CHANNEL id='3' bit='2' name='BP2'/><CHANNEL id='3' bit='3' name='BP3'/><CHANNEL id='3' bit='4' name='BPB'/><CHANNEL id='3' bit='5' name='BZPA'/><CHANNEL id='3' bit='6' name='BZP1'/><CHANNEL id='3' bit='7' name='BZP2'/><CHANNEL id='3' bit='8' name='BZP3'/><CHANNEL id='3' bit='9' name='BZPB'/><CHANNEL id='4' bit='0' name='Aschebox'/><CHANNEL id='4' bit='1' name='Netztrafo'/><CHANNEL id='4' bit='2' name='Netzrelais'/><CHANNEL id='4' bit='4' name='Lagerraum'/><CHANNEL id='4' bit='6' name='FLP'/><CHANNEL id='4' bit='8' name='ATW'/><CHANNEL id='4' bit='9' name='Entasch gesp.'/><CHANNEL id='4' bit='13' name='HKV'/><CHANNEL id='4' bit='14' name='Spülung Aktiv'/><CHANNEL id='6' bit='0' name='EHK Anf'/><CHANNEL id='6' bit='2' name='EHK Anf2'/><CHANNEL id='6' bit='3' name='EHK Anf3'/><CHANNEL id='6' bit='4' name='EHKP'/><CHANNEL id='6' bit='6' name='EHKP2'/><CHANNEL id='6' bit='7' name='EHKP3'/><CHANNEL id='6' bit='8' name='KASK1 MinLeist'/><CHANNEL id='6' bit='9' name='KASK2 MinLeist'/><CHANNEL id='6' bit='10' name='KASK3 MinLeist'/><CHANNEL id='6' bit='11' name='KASK4 MinLeist'/><CHANNEL id='6' bit='12' name='KASK1 MaxLeist'/><CHANNEL id='6' bit='13' name='KASK2 MaxLeist'/><CHANNEL id='6' bit='14' name='KASK3 MaxLeist'/><CHANNEL id='6' bit='15' name='KASK4 MaxLeist'/><CHANNEL id='6' bit='16' name='KASK1 Run'/><CHANNEL id='6' bit='17' name='KASK2 Run'/><CHANNEL id='6' bit='18' name='KASK3 Run'/><CHANNEL id='6' bit='19' name='KASK4 Run'/><CHANNEL id='6' bit='20' name='KASK1 OK'/><CHANNEL id='6' bit='21' name='KASK2 OK'/><CHANNEL id='6' bit='22' name='KASK3 OK'/><CHANNEL id='6' bit='23' name='KASK4 OK'/><CHANNEL id='6' bit='24' name='Kask KWK Out'/><CHANNEL id='6' bit='25' name='Kask FW Out'/><CHANNEL id='6' bit='26' name='KASK KWK OK'/><CHANNEL id='6' bit='27' name='KASK FW OK'/><CHANNEL id='7' bit='0' name='DReg P2'/><CHANNEL id='7' bit='1' name='DReg P3'/><CHANNEL id='7' bit='2' name='DReg Mi auf'/><CHANNEL id='7' bit='3' name='DReg Mi zu'/><CHANNEL id='7' bit='5' name='DReg2 P2'/><CHANNEL id='7' bit='6' name='DReg2 Mi auf'/><CHANNEL id='7' bit='7' name='DReg2 Mi zu'/><CHANNEL id='7' bit='9' name='DReg3 P2'/><CHANNEL id='7' bit='10' name='DReg3 P3'/><CHANNEL id='7' bit='11' name='DReg3 Mi auf'/><CHANNEL id='7' bit='12' name='DReg3 Mi zu'/></DIGITAL></DAQPRJ>

Excellent to hear, thanks for the fast feedback @zero007cool and @Murazor!

Are you on the latest Firmware? I’m on Software V14.0HAR.o2 (Nano-PK)
I can only see ‘unknown’ and I’m pretty sure the IP address is correct. However I do have the Gateway in between but with a fixed IP.
I tried both L and M option.

Thanks for all your work here. Relly appreciate the development!

Confirming functionality on older NANO-PK 12 model build around 2016.
I only modified the msgformat= data as described on GITHUB
Thank for your contribution!!!
Also worth mentioning you can add your energy consum provided by the sensor to your energy dashboard and keep track of costs
Unbenannt

Hey there, i´m on the same Firmware Version with my Nano PK, also with gateway and fixed IP Adress. I have the same problem “unknown” from any sensor in the integration.

What do you mean with L/M option?

Hi,
I am seeing the same behavior (no data on all sensors) as well, my Nano PK is on firmware V14.0n2 so I chose message format NANO_V14N2.
The heating is reachable via its IP and happily spits out data once I connect with a Telnet client.

In the Home Assistant log I see basically two errors:

2023-09-01 13:57:08.449 ERROR (SyncWorker_7) [custom_components.nano_pk.sensor] HargassnerBridge._update(): Received message has unexpected length.
HargassnerBridge._update(): Received message has unexpected length.
HargassnerBridge._update(): Received message has unexpected length.
HargassnerBridge._update(): Received message has unexpected length.
HargassnerBridge._update(): Received message has unexpected length.

and

2023-09-01 13:57:08.509 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.nano_pk_energy_consumption fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 699, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 940, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/nano_pk/sensor.py", line 133, in update
self._value = 4.8 * float(self._bridge.getValue(self._paramName))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: float() argument must be a string or a real number, not 'NoneType'

I could work around this second error by simply removing line 56 (and the trailing comma of line 55) from the sensors.py file, but the first error still persists, so I assume the message definition for V14N2 does not match the messages that are actually being put out by my heating.

I’ll try to write some log data to an SD and try to use that for the message format.

Edit:
Using the <DAQPRJ> string from the SD card logfile solved it for me.
This is what mine looks like on V14.0n2:

<DAQPRJ><ANALOG><CHANNEL id='0' name='ZK' dop='0'/><CHANNEL id='1' name='O2' unit='%'/><CHANNEL id='2' name='O2soll' unit='%'/><CHANNEL id='3' name='TK' unit='°C'/><CHANNEL id='4' name='TKsoll' unit='°C' dop='0'/><CHANNEL id='5' name='TRL' unit='°C'/><CHANNEL id='6' name='TRLsoll' unit='°C' dop='0'/><CHANNEL id='7' name='Spreizung' unit='°C'/><CHANNEL id='8' name='TRG' unit='°C'/><CHANNEL id='9' name='SZist' unit='%' dop='0'/><CHANNEL id='10' name='SZsoll' unit='%'/><CHANNEL id='11' name='TPo' unit='°C'/><CHANNEL id='12' name='TPm' unit='°C'/><CHANNEL id='13' name='TPu' unit='°C'/><CHANNEL id='14' name='Puff Füllgrad' unit='%' dop='0'/><CHANNEL id='15' name='Puffer_soll oben' unit='°C' dop='0'/><CHANNEL id='16' name='Puffer_soll unten' unit='°C' dop='0'/><CHANNEL id='17' name='PuffZustand' dop='0'/><CHANNEL id='18' name='Höchste Anf' dop='0'/><CHANNEL id='19' name='TFW' unit='°C' dop='0'/><CHANNEL id='20' name='Leistung' unit='%' dop='0'/><CHANNEL id='21' name='ESsoll' unit='%'/><CHANNEL id='22' name='min.Leist.TRG' unit='%'/><CHANNEL id='23' name='max.Leist.TRG' unit='%'/><CHANNEL id='24' name='max.Leist.Fuell' unit='%'/><CHANNEL id='25' name='max.Leist.TPO' unit='%'/><CHANNEL id='26' name='ESRegler' unit='%' dop='0'/><CHANNEL id='27' name='Regler K'/><CHANNEL id='28' name='KeBrstScale' unit='%' dop='0'/><CHANNEL id='29' name='Programm' dop='0'/><CHANNEL id='30' name='Störungs Nr' dop='0'/><CHANNEL id='31' name='I Es' unit='mA' dop='0'/><CHANNEL id='32' name='I Ra' unit='mA' dop='0'/><CHANNEL id='33' name='I Aa' unit='mA' dop='0'/><CHANNEL id='34' name='I Sr' unit='mA' dop='0'/><CHANNEL id='35' name='I Rein' unit='mA' dop='0'/><CHANNEL id='36' name='LZ ES seit Füll.' unit='Min' dop='0'/><CHANNEL id='37' name='LZ ES seit Ent.' unit='Min' dop='0'/><CHANNEL id='38' name='Anzahl Entasch.' dop='0'/><CHANNEL id='39' name='Anzahl SR Beweg.' dop='0'/><CHANNEL id='40' name='Lagerstand' unit='kg' dop='0'/><CHANNEL id='41' name='Verbrauchszähler' unit='kg' dop='0'/><CHANNEL id='42' name='Heiz P Lambda' unit='W' dop='2'/><CHANNEL id='43' name='Heiz U Lambda' unit='V' dop='2'/><CHANNEL id='44' name='Heiz I Lambda' unit='mA' dop='0'/><CHANNEL id='45' name='U_Lambda' unit='mV'/><CHANNEL id='46' name='U Netzteil' unit='mV' dop='0'/><CHANNEL id='47' name='T Spülung' unit='°C'/><CHANNEL id='48' name='BRT' unit='°C'/><CHANNEL id='49' name='Tplat' unit='°C' dop='0'/><CHANNEL id='50' name='TVG' unit='°C'/><CHANNEL id='51' name='TVG2' unit='°C'/><CHANNEL id='52' name='AIN17' unit='V'/><CHANNEL id='53' name='Taus' unit='°C'/><CHANNEL id='54' name='TA Gem.' unit='°C'/><CHANNEL id='55' name='Ext.HK Soll' unit='°C' dop='0'/><CHANNEL id='56' name='TVL_A' unit='°C'/><CHANNEL id='57' name='TVLs_A' unit='°C' dop='0'/><CHANNEL id='58' name='TRA_A' unit='°C'/><CHANNEL id='59' name='TRs_A' unit='°C'/><CHANNEL id='60' name='HKZustand_A' dop='0'/><CHANNEL id='61' name='FRA Zustand' dop='0'/><CHANNEL id='62' name='TVL_1' unit='°C'/><CHANNEL id='63' name='TVLs_1' unit='°C' dop='0'/><CHANNEL id='64' name='TRA_1' unit='°C'/><CHANNEL id='65' name='TRs_1' unit='°C'/><CHANNEL id='66' name='HKZustand_1' dop='0'/><CHANNEL id='67' name='FR1 Zustand' dop='0'/><CHANNEL id='68' name='TVL_2' unit='°C'/><CHANNEL id='69' name='TVLs_2' unit='°C' dop='0'/><CHANNEL id='70' name='TRA_2' unit='°C'/><CHANNEL id='71' name='TRs_2' unit='°C'/><CHANNEL id='72' name='HKZustand_2' dop='0'/><CHANNEL id='73' name='FR2 Zustand' dop='0'/><CHANNEL id='74' name='TVL_B' unit='°C'/><CHANNEL id='75' name='TVLs_B' unit='°C' dop='0'/><CHANNEL id='76' name='TRA_B' unit='°C'/><CHANNEL id='77' name='TRs_B' unit='°C'/><CHANNEL id='78' name='HKZustand_B' dop='0'/><CHANNEL id='79' name='FRB Zustand' dop='0'/><CHANNEL id='80' name='TBA' unit='°C'/><CHANNEL id='81' name='TBs_A' unit='°C' dop='0'/><CHANNEL id='82' name='TB1' unit='°C'/><CHANNEL id='83' name='TBs_1' unit='°C' dop='0'/><CHANNEL id='84' name='BoiZustand_1' dop='0'/><CHANNEL id='85' name='TBB' unit='°C'/><CHANNEL id='86' name='TBs_B' unit='°C' dop='0'/><CHANNEL id='87' name='HKR Anf' unit='°C'/><CHANNEL id='88' name='Anf. HKR0' unit='°C' dop='0'/><CHANNEL id='89' name='Anf. HKR1' unit='°C' dop='0'/><CHANNEL id='90' name='Anf. HKR2' unit='°C' dop='0'/><CHANNEL id='91' name='Anf. HKR3' unit='°C' dop='0'/><CHANNEL id='92' name='Anf. HKR4' unit='°C' dop='0'/><CHANNEL id='93' name='Anf. HKR5' unit='°C' dop='0'/><CHANNEL id='94' name='Anf. HKR6' unit='°C' dop='0'/><CHANNEL id='95' name='Anf. HKR7' unit='°C' dop='0'/><CHANNEL id='96' name='Anf. HKR8' unit='°C' dop='0'/><CHANNEL id='97' name='Anf. HKR9' unit='°C' dop='0'/><CHANNEL id='98' name='Anf. HKR10' unit='°C' dop='0'/><CHANNEL id='99' name='Anf. HKR11' unit='°C' dop='0'/><CHANNEL id='100' name='Anf. HKR12' unit='°C' dop='0'/><CHANNEL id='101' name='Anf. HKR13' unit='°C' dop='0'/><CHANNEL id='102' name='Anf. HKR14' unit='°C' dop='0'/><CHANNEL id='103' name='Anf. HKR15' unit='°C' dop='0'/></ANALOG><DIGITAL><CHANNEL id='0' bit='0' name='Störung'/><CHANNEL id='0' bit='1' name='Stb'/><CHANNEL id='0' bit='2' name='Fuellstand'/><CHANNEL id='0' bit='3' name='RLP/PuffP'/><CHANNEL id='0' bit='4' name='RLm_auf'/><CHANNEL id='0' bit='5' name='RLm_zu'/><CHANNEL id='0' bit='10' name='WS freig.'/><CHANNEL id='0' bit='11' name='Akt. Code'/><CHANNEL id='0' bit='14' name='FW Freig.'/><CHANNEL id='0' bit='15' name='gFlP'/><CHANNEL id='0' bit='16' name='gFlM auf'/><CHANNEL id='0' bit='17' name='gFlM zu'/><CHANNEL id='0' bit='18' name='gFl2P'/><CHANNEL id='0' bit='19' name='gFl2M auf'/><CHANNEL id='0' bit='20' name='gFl2M zu'/><CHANNEL id='1' bit='0' name='L Heiz.'/><CHANNEL id='1' bit='1' name='Z Heiz.'/><CHANNEL id='1' bit='2' name='Z Geb.'/><CHANNEL id='1' bit='3' name='AA Run'/><CHANNEL id='1' bit='4' name='AA Dir'/><CHANNEL id='1' bit='5' name='ES Run'/><CHANNEL id='1' bit='6' name='ES Dir'/><CHANNEL id='1' bit='7' name='AS Saug'/><CHANNEL id='1' bit='8' name='AS RA Run'/><CHANNEL id='1' bit='9' name='AS RA Dir'/><CHANNEL id='1' bit='10' name='Rein En'/><CHANNEL id='1' bit='11' name='Rein Run'/><CHANNEL id='1' bit='12' name='Es Rein Endl'/><CHANNEL id='1' bit='13' name='sAS Anf Füll'/><CHANNEL id='2' bit='0' name='HKPA'/><CHANNEL id='2' bit='1' name='MAA'/><CHANNEL id='2' bit='2' name='MAZ'/><CHANNEL id='2' bit='3' name='HKP1'/><CHANNEL id='2' bit='4' name='M1A'/><CHANNEL id='2' bit='5' name='M1Z'/><CHANNEL id='2' bit='6' name='HKP2'/><CHANNEL id='2' bit='7' name='M2A'/><CHANNEL id='2' bit='8' name='M2Z'/><CHANNEL id='2' bit='9' name='HKP3'/><CHANNEL id='2' bit='10' name='M3A'/><CHANNEL id='2' bit='11' name='M3Z'/><CHANNEL id='2' bit='12' name='HKP4'/><CHANNEL id='2' bit='13' name='M4A'/><CHANNEL id='2' bit='14' name='M4Z'/><CHANNEL id='2' bit='15' name='HKP5'/><CHANNEL id='2' bit='16' name='M5A'/><CHANNEL id='2' bit='17' name='M5Z'/><CHANNEL id='2' bit='18' name='HKP6'/><CHANNEL id='2' bit='19' name='M6A'/><CHANNEL id='2' bit='20' name='M6Z'/><CHANNEL id='2' bit='21' name='HKPB'/><CHANNEL id='2' bit='22' name='MBA'/><CHANNEL id='2' bit='23' name='MBZ'/><CHANNEL id='3' bit='0' name='BPA'/><CHANNEL id='3' bit='1' name='BP1'/><CHANNEL id='3' bit='2' name='BP2'/><CHANNEL id='3' bit='3' name='BP3'/><CHANNEL id='3' bit='4' name='BPB'/><CHANNEL id='3' bit='5' name='BZPA'/><CHANNEL id='3' bit='6' name='BZP1'/><CHANNEL id='3' bit='7' name='BZP2'/><CHANNEL id='3' bit='8' name='BZP3'/><CHANNEL id='3' bit='9' name='BZPB'/><CHANNEL id='4' bit='0' name='Aschebox'/><CHANNEL id='4' bit='1' name='Netztrafo'/><CHANNEL id='4' bit='2' name='Netzrelais'/><CHANNEL id='4' bit='4' name='Lagerraum'/><CHANNEL id='4' bit='6' name='FLP'/><CHANNEL id='4' bit='8' name='ATW'/><CHANNEL id='4' bit='9' name='Entasch gesp.'/><CHANNEL id='4' bit='13' name='HKV'/><CHANNEL id='4' bit='14' name='Spülung Aktiv'/><CHANNEL id='6' bit='0' name='EHK Anf'/><CHANNEL id='6' bit='2' name='EHK Anf2'/><CHANNEL id='6' bit='3' name='EHK Anf3'/><CHANNEL id='6' bit='4' name='EHKP'/><CHANNEL id='6' bit='6' name='EHKP2'/><CHANNEL id='6' bit='7' name='EHKP3'/><CHANNEL id='6' bit='8' name='KASK1 MinLeist'/><CHANNEL id='6' bit='9' name='KASK2 MinLeist'/><CHANNEL id='6' bit='10' name='KASK3 MinLeist'/><CHANNEL id='6' bit='11' name='KASK4 MinLeist'/><CHANNEL id='6' bit='12' name='KASK1 MaxLeist'/><CHANNEL id='6' bit='13' name='KASK2 MaxLeist'/><CHANNEL id='6' bit='14' name='KASK3 MaxLeist'/><CHANNEL id='6' bit='15' name='KASK4 MaxLeist'/><CHANNEL id='6' bit='16' name='KASK1 Run'/><CHANNEL id='6' bit='17' name='KASK2 Run'/><CHANNEL id='6' bit='18' name='KASK3 Run'/><CHANNEL id='6' bit='19' name='KASK4 Run'/><CHANNEL id='6' bit='20' name='KASK1 OK'/><CHANNEL id='6' bit='21' name='KASK2 OK'/><CHANNEL id='6' bit='22' name='KASK3 OK'/><CHANNEL id='6' bit='23' name='KASK4 OK'/><CHANNEL id='6' bit='24' name='Kask KWK Out'/><CHANNEL id='6' bit='25' name='Kask FW Out'/><CHANNEL id='6' bit='26' name='KASK KWK OK'/><CHANNEL id='6' bit='27' name='KASK FW OK'/><CHANNEL id='7' bit='0' name='DReg P2'/><CHANNEL id='7' bit='1' name='DReg P3'/><CHANNEL id='7' bit='2' name='DReg Mi auf'/><CHANNEL id='7' bit='3' name='DReg Mi zu'/><CHANNEL id='7' bit='5' name='DReg2 P2'/><CHANNEL id='7' bit='6' name='DReg2 Mi auf'/><CHANNEL id='7' bit='7' name='DReg2 Mi zu'/><CHANNEL id='7' bit='9' name='DReg3 P2'/><CHANNEL id='7' bit='10' name='DReg3 P3'/><CHANNEL id='7' bit='11' name='DReg3 Mi auf'/><CHANNEL id='7' bit='12' name='DReg3 Mi zu'/></DIGITAL></DAQPRJ>

It is indeed quite a bit shorter than the string for V14N2 in hargassner.py, so the error about a message length mismatch is somewhat expected.

Edit 2:
So it turns out my message format is identical to V14N but not V14N2 in hargassner.py, although my firmware version is actually 14.0n2. So I could just use V14N and be totally fine. If only I had tried that before, it would have saved me a couple of hours.