Bouni / python-luxtronik

python-luxtronik is a library that allow you to interact with a Luxtronik heatpump controller.
MIT License
37 stars 20 forks source link

Provide raw data #46

Closed BenPru closed 1 year ago

BenPru commented 1 year ago

Currently it is not possible to get the luxtronik raw value. The most values are automaticly converted. This is good in the most cases but for example it is not possible to get a raw export. I have added a ha diagnostic for my integration which exports a dump of all luxtronik values. But I would like to add a field for the raw values.

kbabioch commented 1 year ago

@benpru Where do you think this needs to be implemented?

BenPru commented 1 year ago
Bouni commented 1 year ago

I think .value of every class should give you the raw value as far as I remember

BenPru commented 1 year ago

I think .value of every class should give you the raw value as far as I remember

Unfortunately not, it presents the converted value returned by from_heatpump. https://github.com/Bouni/python-luxtronik/blob/main/luxtronik/parameters.py#L1167

Bouni commented 1 year ago

You're right, but adding raw that holds the raw value is very easy

kbabioch commented 1 year ago

@Bouni I think this might be related to #49.

From my understanding the value attribute is never used.

You're right, but adding raw that holds the raw value is very easy

We could add another attribute raw_value, which gets filled whenever something is read from the heat pump.

Guzz-T commented 1 year ago

Do the changes in #92 fix this issue too?

gerw commented 1 year ago

@Guzz-T I think so.

kbabioch commented 1 year ago

Do the changes in #92 fix this issue too?

Yes, the raw value can now be accessed using the raw property, for instance:

a.get(81) V3.85.8 a.get(81).raw [86, 51, 46, 56, 53, 46, 56, 0, 0]

So, values are being converted / represented by the internal datatype (if available), but the raw data can also be accessed.

I'm closing the issue to keep the backlog small-ish, feel free to re-open it (or create another one), if something essential is missing.