UniversalDevicesInc-PG3 / udi-poly-FlumeWater

MIT License
0 stars 0 forks source link

Consider adding 2 new variables to help with GPM Calculation #2

Open SteveHoyt opened 2 years ago

SteveHoyt commented 2 years ago

Good Morning

I watched the node server info during a short watering session this morning. All appeared accurate. Thanks again for your help so far. Based on what I have seen I have 2 requests, I hope you would consider adding in the future.

A bit of background. As you know I am trying to calculate GPM on a circuit by circuit basis. If I understand how it seems to be working, I can do this in my ISY program ( GPM = current/interval time ). All is well and good, I have current interval value and I know I have it set to 5 minutes . However, I would not prefer to hard code a value for the interval in. If the node server reported the current interval setting, I could get what I need by coding the 2 node values directly. Also, I hope someday to convince you to let me set the current interval value from my ISY program. That way I could set it to 1 minute during watering hours and whatever outside of watering hours. Thats another issue.

Secondly, just as a convenience to me, if the node server would provide me with GPM ( again GPM = current/interval ) it would make my life even easier.

Summary TL:DR Would you consider adding

1) The current interval in minutes to the node server values reported, along with allowing me to change it from an ISY program.

2) Adding GPM to the node server values reported.

Thanks Steve

jimboca commented 2 years ago

Those are great suggestions, and not to difficult to implement. Will work on them when possible, and feel free to ping me here once and a while just incase I forget :)

jimboca commented 2 years ago

Add support for new GPH driver.

jimboca commented 1 month ago

The "Current" value is the flow during the current interval, which is the long poll. But I guess that still doesn't meet your needs? I could add an optional programable "Interval" and on each Interval it would update the "Interval Usage" but you would have to consider the Rate Limiting: Currently personal clients are allowed 120 requests per hour to our API. Once you have gone over the limit you will get a 429 rate limit error. So another option could be a Command which says "Start Tracking", and another that says "End Tracking" which would update the "Tracked Usage" to the gallons used between the start/end. There are a lot of options in the Flume API, but trying to figure out how to make those useful in the IoX is challenging.

jimboca commented 1 month ago

As you say, GPM could be Current / Interval, where Interval is the Long Poll. But that's really just the average over that time, right? Not exactly GPM. It seems like adding a "Start Tracking" and "End Tracking" may be the best to calculate Gallons used during a time period? But then you may have multiple programs that monitor "Tracked Usage" so it would still be cumbersome to code in IoX.