Export sensors activity via Maker API or custom driver/app

Hello, there
I found an issue which pushed me to migrate all my ZigBee sensors to zigbee2mqtt and gave up with using HE for sensors
I have integration with Grafana to monitor sensors data and found very convenient to have real data points, sent by devices, and is very confusing when data pulled from Maker API


HE is storing last variable value and there is no way to get real timestamp points, correct?
I see HE has logs and real timestamps

Is there any way to pull these points from outside or from HE API?

Without this functionality, external data analysis is not possible for the 100%

You can use the maker API to poll from another system for this information. But the maker API is reactive. It doesn't initiate the transfer of information. Another system would have to poll for it.

Is there any way to expose device events in Maker API

Not to my knowledge. The MakerAPI reports for that instant. So, if your device polls every 30 seconds, you would have to poll the maker api every 30 seconds.

zigbee device sending messages irregularly - there is no way to know when event will be in a system.

Then you can subscribe to the logsocket or the eventsocket via websocket instead.

are there any examples?

Here's an example of someone's JS websocket client.

But this is run outside of HE. You have to subscribe to it.

ah... thank you
but this is a workaround

Is there any option to not store variable value in Device after some time of inactivity?

I'm sorry....I'm not understanding your question. Do you mean in Rule Machine or in a driver or an app? Store it in a variable where?

HE is event-based and not a true data acquisition solution. The way folks address this is typically using node-red and influxdb to stuff values in periodically if they haven't changed by an event recently. Check out the MakerAPI node-red influxdb thread for more info.

1 Like

When sensor sending value to HE - that value is being kept by the driver for the time until next value arrived.
So when you decide to pull that value via Maker API - it'll be exposed every time. And there is no way to understand if this value new or still old.
Unless driver implements timestamp.

I don't know if this is helpful but I've been logging data for some days now using Node-RED and a PC. I don't think the collecting device (in my case a PC) is limited to any particular type. You might even be able to log to a NAS. The data does come through with a timestamp. See this post: Log Data

John

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.