Class DiscovergyApiClient

    • Constructor Summary

      Constructors 
      Constructor Description
      DiscovergyApiClient​(java.lang.String email, java.lang.String password)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.gson.JsonArray getFieldNames​(java.lang.String meterId)
      Returns the available measurement field names for the specified meter.
      com.google.gson.JsonObject getLastReading​(java.lang.String meterId, Field... fields)
      Returns the last measurement for the specified meter.
      com.google.gson.JsonArray getMeters()
      Returns all meters that the user has access to.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DiscovergyApiClient

        public DiscovergyApiClient​(java.lang.String email,
                                   java.lang.String password)
    • Method Detail

      • getFieldNames

        public com.google.gson.JsonArray getFieldNames​(java.lang.String meterId)
                                                throws OpenemsError.OpenemsNamedException
        Returns the available measurement field names for the specified meter.

        See https://api.discovergy.com/docs/ for details.

        Parameters:
        meterId - the Discovergy Meter-ID
        Returns:
        the Meters as a JsonArray.
        Throws:
        OpenemsError.OpenemsNamedException - on error
      • getLastReading

        public com.google.gson.JsonObject getLastReading​(java.lang.String meterId,
                                                         Field... fields)
                                                  throws OpenemsError.OpenemsNamedException
        Returns the last measurement for the specified meter.

        See https://api.discovergy.com/docs/ for details.

        Parameters:
        meterId - the Discovergy Meter-ID
        fields - the fields to be queried
        Returns:
        the Meters as a JsonArray.
        Throws:
        OpenemsError.OpenemsNamedException - on error