Skip to content

CAN frames with different format causing false readings? #22

@moritzj29

Description

@moritzj29

Hi, first of all thanks for this awesome library! I have been tinkering with it for some time already, getting all the sensor readings from my heatpumps into Home Assistant for monitoring purposes.

I recognized, that for some sensors spikes with absurdly high/low values are observed and tried to identify the root cause. The issue appears to be due to some differently formatted CAN frames appearing from time to time:

Regular CAN frame:

[13:07:45.662][D][tt:360]:      - Can-ID: 0x1F400FFF Start of message with id: 150 with length 2
[13:07:45.666][D][tt:369]:      - Can-ID: 0x1E800FFF Part of message with id: 150 with remaining length 0
[13:07:45.677][D][tt:430]: [EXS] Can-ID: 0x1E800FFF (511709183), Device ID: 1, Data: 0x423cfe002f00005c66, Datapoint: 0x002F (47), ID: 0x2FFE3C (3145276), function_group: 0x3C (60), function_number: 0xFE (254)
[13:07:45.682][D][sensor:135]: 'Wärmemenge Heizen': Sending state 23.65400 MWh with 3 decimals of accuracy

Irregular CAN frame:

[13:08:08.006][D][tt:369]:      - Can-ID: 0x00000FFF Part of message with id: 209 with remaining length 0
[13:08:08.017][D][tt:430]: [EXS] Can-ID: 0x00000FFF (4095), Device ID: 1, Data: 0x423cfe002f00008f040104, Datapoint: 0x002F (47), ID: 0x2FFE3C (3145276), function_group: 0x3C (60), function_number: 0xFE (254)
[13:08:08.022][D][sensor:135]: 'Wärmemenge Heizen': Sending state 2399404.50000 MWh with 3 decimals of accuracy

As you can see, I already modified the code a little bit to generate these log messages of existing sensors.
Both CAN IDs translate into the same device/function_group/function_number/datapoint. Therefore setting the same Home Assistant Sensor. But the data is different, as well as the first part of the CAN ID.

Does anyone have observed similar messages on the Hoval CAN bus? In my case it is a setup consisting of two heatpumps incl. control displays and a modbus gateway.

Do you have any idea on how to interpret those messages correctly?
Based on the current implementation of TopTronic::parse_frame, these CAN frames do not have msg_id = 0x1f set, which should indicate the start of a message. They are currently parsed as an additional frame, without an explicit starting frame.

Quick fix would be to exclude these kind of CAN IDs completely from processing, of course, but I would really like to know what their purpose is...

I hope it's not too pushy, but if you have a minute I would really like to get your opinion @dkarv and @abichinger, since you contributed heavily to this part of the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions