Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add metric for last poll time #59

Closed
si458 opened this issue Nov 2, 2021 · 3 comments
Closed

add metric for last poll time #59

si458 opened this issue Nov 2, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@si458
Copy link

si458 commented Nov 2, 2021

Is your feature request related to a problem? Please describe.
the is currently an issue with the API and retrieving data (about 2.30am it just stopped)

Describe the solution you'd like
a metric to show the last poll time of your smart meters,
so you can do something when the is an outage like a notification

Describe alternatives you've considered
checking the raw API directly shows the lasttime they polled your smart meter
https://api.glowmarkt.com/api/v0-1/resource/{resourceId}/last-time

{
  "status": "OK",
  "name": "electricity consumption",
  "resourceTypeId": "e3a5db34-6e0c-4221-9653-8d33e27511ba",
  "resourceId": "5dbf33f3-1410-4334-a703-a3f9ad645a93",
  "classifier": "electricity.consumption",
  "data": {
    "lastTs": 1635820200
  }
}

Additional context

@ColinRobbins
Copy link
Contributor

That data is already available - see top right.

1261B798-FF86-4221-91AC-6D9058E38F1B

@si458
Copy link
Author

si458 commented Nov 2, 2021

@ColinRobbins how do you do something on this though?
like if its not had any data in say 2 hours send a notification?

@ColinRobbins
Copy link
Contributor

In the past, I have used a timer for that.

  1. create an automation that triggers when the value changes.
  2. in the automation start a timer helper.
  3. if the value changes again, reset the timer.
  4. if the timer expires, create a notification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants