java.lang.Object
com.github.kaklakariada.fritzbox.model.homeautomation.Statistics

public class Statistics extends Object
  • Constructor Details

    • Statistics

      public Statistics()
  • Method Details

    • getCount

      public int getCount()
    • getGrid

      public int getGrid()
    • getDataTimeRaw

      public Long getDataTimeRaw()
      Get the raw timestamp in seconds since epoch.
      Returns:
      raw timestamp or null if not available
    • getDataTime

      public Instant getDataTime()
      Get the timestamp.
      Returns:
      timestamp or null if not available
    • getCsvValues

      public String getCsvValues()
      Provide the gathered data as provided by Fritz!Box
      Returns:
      data provided by the Fritz!Box
    • getValues

      public List<Optional<Number>> getValues()
      Provide the gathered data as computed as meant to be used by AVM
      Returns:
      the gathered data
    • getMeasurementUnit

      public MeasurementUnit getMeasurementUnit()
      Provide the measurement unit to be used with the statistics.

      Consists of:

      • measurment unit [V, W, Wh, %]
      • precision as double to multiply with the gathered Integer
      Sample: The Voltage is measured in 'V' (Volt) and has a precision of '0.001'. The number 237123 provided by the statistics must be multiplied by the precision which gives us 237.123 V.
      Returns:
      the measurement unit
    • setMeasurementUnit

      public void setMeasurementUnit(MeasurementUnit measurementUnit)
    • computeValue

      protected Number computeValue(String aValue)