CayenneLPP icon indicating copy to clipboard operation
CayenneLPP copied to clipboard

Add support for power measurement type (IPSO: 3305)

Open mincequi opened this issue 2 years ago • 0 comments

Hi, as i need support for a smart meter device, i was wondering if it is desired to support the power measurement type (IPSO:: 3305). Resulting in type 105 for CayenneLPP. Reasons to support this:

  • support negative consumption (energy export)
  • Provide min/max values
  • Provide range Alternatively, we could use IPSO Type 3421, which might fit even better (due to energy im- and export).

I would orient myself to the BIPSO specification and also support some optional values: https://github.com/bluetoother/bipso/wiki/BIPSO-Specification

What i also would add is support for SFLOAT16 data type (from bluetooth specification). The advantages of this type are:

  • high dynamic range
  • takes little space (16 vs 32-bit float)
  • better support for human readable values (exponent uses base 10 (instead base 2)).

For my intended design, the payload would look like this:

  • 1x uint8 for flags (see BIPSO spec)
  • 1x sfloat16: Instantaneous active power: Watts (mandatory): positive for export, negative for import
  • 1x sfloat16: Min Measured active power: Watts (optional)
  • 1x sfloat16: Max Measured active power: Watts (optional)
  • 1x sfloat16: Min Range active power: Watts (optional)
  • 1x sfloat16: Max Range active power: Watts (optional)
  • 1x sfloat16: Cumulative active power export: Wh (optional)
  • 1x sfloat16: Cumulative active power import: Wh (optional)

Please share your thoughts. I am also willing to provide a PR.

Thanks a lot :)

mincequi avatar Nov 22 '21 18:11 mincequi