How would I track the average and max time of doors being opened

How would I track the average and max time of doors being opened? And could I display the times on dashboard?

I need to track each door separately

I need the history over a weeks time period

Thanks in advanced

1 Like

Im kinda new to adding user apps, can you point me in the direct/links
where to get the Device active tracker app/code

OK I figured out how to get the app loaded into my hub, I needed some coffee ha

Ok, now that I got one door set to track, how do I get the average and max time per day of the door being in the open position?

I am not doubting your need for the metrics you have mentioned, but just to understand your situation a little better.... what exactly are you trying to achieve by seeing those min/max/etc on your dashboard? In my day job sometimes the simplest questions lead to the most useful insights into what we need to do.... :slight_smile:

Max time 'open' I can add to the Driver since it will be similar to the Max/Min values for the power and temperature tracking capability's. Average I suppose also possible because we already track the number of counts and total time it was 'open'.

I want to monitor (3) doors, I need to know how long on the (average ) each door stays open per week. This a rental condo. We want to monitor how the condo is being currently used by our renters. We will take that historical data and implement the AC disable logic based on the average times. but we need the historical data first. The condo is rented for a week at a time, the average time will help us determine the time to lock out the AC when left opened too long.

We also need to know the max times per door/per week.

We are experiencing a lot of internal furniture, wall, and AC damage, we think its from the renters keeping the door wide open and with the AC turn way down the coldest setting and creating a moisture issue.

While I would only sing praise on creations here that utilise the hub to it's limits, if you want historical results and options to derive new metrics as you need.... Then I would, personally, look at options outside of HE. That is not meant as a slight on HE, just an acknowledgement that HE is not, in my opinion, the solution in this case. Longer term storage of events and analysis are best managed through external means. Examples include InfluxDB and Grafana, but are not limited to these. I chose these for their support through their popularity, If their requirements don't suit your immediate needs or experience, then that is completely understandable and I would not criticise you for choosing an alternative, but would still advocate for an exrtanal option to HE.

1 Like

Long storage in the SCADA world is like 10 years. I only need weekly averages. What are the storage limits for HE? Im not looking for sql data base, just a 7 day average

Can HE do a simple 24hr average?

My point of view is that you can bend HE to do almost anything, but it's not always what you want it to be doing. Some may not be overloading it with automations, so asking it to do some simple weekly averages may seem insignificant, but for others who push their HE to the limit in terms of automation don't want to see options that could see users overload it with even some simple aggregation like you are suggesting....

That said.... :slight_smile: Putting aside some issues that could occur as a result of reboots and other issues.... You could export your readings to a local file and then read them in... to do the calculation. Not that I have done this.... Others may have implemented other alternatives.... Like I mentioned earlier... you will be making HE bend and sway to suit your analytical needs when it is not really built for this purpose.... You will find other platforms better suited and easier to use for this purpose (other analytical platforms I should say, not other automation platforms necessarily), admittedly with an up-front setup effort, but the pay-off is typically bigger than the initial inconvenience, plus the ongoing convenience as new analytical needs come and go.


My response may seem to downplay or dismiss this feature.... It's not that HE can't do this... it can (utilising Community developed storage and visualisation apps / drivers). I am just advocating not using it for this purpose.

1 Like

A more pointed response to what Simon is saying.

Hubitat is an automation platform, not an analytics platform (sure there's an argument that they go hand in hand, but the separation is still there). What you are looking for is a little more than just're also looking at analytics.

The point being, there are ways to do this with HE to a somewhat limited capacity, but you'd be better served in the long-term to use a product purpose built to do what you are looking to do...something like influxDB (technically, I don't think you actually need Graphana unless you want the graphs vs raw data).

Sorry for:

south park beat a dead horse GIF