keshavdv / victron-ble

A Python API to parse Victron Instant Readout BLE advertisements
The Unlicense
88 stars 30 forks source link

Add device type to decoded payload data? #11

Closed ctschach closed 1 year ago

ctschach commented 1 year ago

What about adding the device type to the decoded data? Something like

decoded_data.get_device_type()

Values could be generic descriptors like BMV, MPPT. or even more detailed names like "BatteryMonitor", "SolarCharger". I think this would be very helpful to know what functions to call to get the decoded data.

keshavdv commented 1 year ago

Is e1b4c3cda6a5a745c8a1e0e70108c06a7ca986ff what you're looking for or do you want a more general device type lookup?

ctschach commented 1 year ago

Is e1b4c3c what you're looking for or do you want a more general device type lookup?

More generic would make sense, but this will also work…

keshavdv commented 1 year ago

I think the best way to do this is to use the types directly like in https://github.com/stefanor/signalk-victron-ble/blob/main/plugin.py#L51-L54 to decipher general device types. Closing for now unless you have some other ideas!