Current readings

edited February 2021 in API Info

I have had significant success with the API and can return readings from chosen dates and times, tariff information, first-time and last-time BUT have a few issues and the API documentation doesn't help:-

1. current returns no data. Here is the request and return, which does the same for any resource:-

https://api.glowmarkt.com/api/v0-1/resource/793b5726-a535-459f-9ad5-f144f678d165/current

[]


2. meterread doesn't seem to be valid. Here is the request and return, which does the same for any resource:-

https://api.glowmarkt.com/api/v0-1/resource/793b5726-a535-459f-9ad5-f144f678d165/meterread

System.Net.WebException: The remote server returned an error: (400) Bad Request.


3. how are the aggregate readings supposed to work? I assumed if I requested daily readings over a number of days with the sum option I would get the total otherwise what is the use of it? Here is the request and return, which does the same for any resource:-

https://api.glowmarkt.com/api/v0-1/resource/793b5726-a535-459f-9ad5-f144f678d165/readings?from=2021-02-19T00:00:00&to=2021-02-21T23:59:59&period=P1D&offset=-60&function=sum

[

 [

  1613692800,

  2.863

 ],

 [

  1613779200,

  2.806

 ],

 [

  1613865600,

  0.481

 ]

]


Many thanks for any suggestions

Comments

  • I too a finding the same issue with the 'meterread' and 'current' query strings.

    Has anyone found a workaround?

    It would be good if these options could be fixed - or the API documentation updated to remove them.

  • I’m new to this, but I’m slowly beginning to understand it and i’m making progress. However I still can’t find out how to get the actual meter readings (as displayed on the meters). Has any one managed to do this yet. Or is this data not available through the API

  • The API's do work, but remember 'current' and 'meterread' are point in time and not historical..

    I have just run the following....


    For 'current':-

    curl -X GET "https://api.glowmarkt.com/api/v0-1/resource/**RESOURCE ID**/current" -H "accept: application/json" -H "token: ***YOUR TOKEN ID***" -H "applicationId:**YOUR APPLICATION ID**"

    Result:-

    {

     "status": "OK",

     "name": "Smart Meter, electricity consumption",

     "resourceTypeId": "ea02304a-2820-4ea0-8399-f1d1b430c3a0",

     "resourceId": "**RESOURCE ID**",

     "data": [

      [

       1636726147,

       768

      ]

     ],

     "units": "W",

     "classifier": "electricity.consumption"

    }


    For 'meterread':-

    curl -X GET "https://api.glowmarkt.com/api/v0-1/resource/**RESOUCE ID**/meterread" -H "accept: application/json" -H "token: ***YOUR TOKEN ID***" -H "applicationId: **YOUR APPLICATION ID**"

    {

     "status": "OK",

     "name": "Smart Meter, electricity consumption",

     "resourceTypeId": "ea02304a-2820-4ea0-8399-f1d1b430c3a0",

     "resourceId": "**RESOURCE ID**",

     "data": [

      [

       1636726121,

       7924095

      ]

     ],

     "units": "Wh",

     "classifier": "electricity.consumption"

    }


    I would suggest using the MQTT service if you are only interested in meterread (for both import and export) and current/daily/weekly cumulative import data, as it is much easier to use/work with than the API.


    Dan.

  • Thanks Dan

    I followed your instructions and got the following two outputs:

    1 Current)

    {

     "status": "OK",

     "name": "electricity consumption",

     "resourceTypeId": "e3a5db34-6e0c-4221-9653-8d33e27511ba",

     "resourceId": "dde09176-dda0-4d44-8451-36e5805542ef",

     "data": [],

     "classifier": "electricity.consumption",

     "units": "kWh"

    }

    So no timestamp and no data!!

    2Metterread)


    {"status":"not implemented"}

    So nothing at all

    So it doesn't work for me!!!


    Maybe its because my data is sourced from the DCC and not from a CAD device.

    My understanding is that you need a CAD to be able to get your data via the MQTT service, hopefully I'll be able to buy a CAD soon.

    Thanks for your help


    John D

  • Ahhhh !!! Didn't realise that you haven't got a Glow CAD....Yep, that will do it :)

    I strongly recommend getting one from Glow and signing up for MQTT...

    All the best,

    Dan.

Sign In or Register to comment.