donavanbecker / homebridge-rainbird

The Homebridge RainBird plugin allows you to access your RainBird Controller from HomeKit with Homebridge.
ISC License
20 stars 0 forks source link

Feature Request: Time duration in log #486

Closed tbaur closed 1 year ago

tbaur commented 1 year ago

Problem

No response

Solution

Add time duration in the run log entry

Alternatives

No response

Additional context

No response

tbaur commented 1 year ago

An extra touch in the logs could be:

FROM:

[5/22/2023, 4:04:38 AM] [RainBird] Program A: Running [5/22/2023, 4:04:38 AM] [RainBird] Zone 3: Running [5/22/2023, 4:45:08 AM] [RainBird] Zone 3: Complete [5/22/2023, 4:45:08 AM] [RainBird] Zone 4: Running [5/22/2023, 5:30:06 AM] [RainBird] Zone 4: Complete [5/22/2023, 5:30:06 AM] [RainBird] Zone 5: Running [5/22/2023, 6:45:06 AM] [RainBird] Zone 5: Complete [5/22/2023, 6:45:06 AM] [RainBird] Zone 6: Running [5/22/2023, 7:30:06 AM] [RainBird] Zone 6: Complete [5/22/2023, 7:30:06 AM] [RainBird] Zone 8: Running [5/22/2023, 7:31:55 AM] [RainBird] Zone 8: Complete [5/22/2023, 7:31:55 AM] [RainBird] Program A: Complete

TO, including the run time configured when run starts, example:

[5/22/2023, 4:04:38 AM] [RainBird] Program A: Running [5/22/2023, 4:04:38 AM] [RainBird] Zone 3: Running (45 minutes) [5/22/2023, 4:45:08 AM] [RainBird] Zone 3: Complete [5/22/2023, 4:45:08 AM] [RainBird] Zone 4: Running (45 minutes) [5/22/2023, 5:30:06 AM] [RainBird] Zone 4: Complete [5/22/2023, 5:30:06 AM] [RainBird] Zone 5: Running (1 hour and 15 minutes) [5/22/2023, 6:45:06 AM] [RainBird] Zone 5: Complete [5/22/2023, 6:45:06 AM] [RainBird] Zone 6: Running (45 minutes) [5/22/2023, 7:30:06 AM] [RainBird] Zone 6: Complete [5/22/2023, 7:30:06 AM] [RainBird] Zone 8: Running (30 minutes) [5/22/2023, 7:31:55 AM] [RainBird] Zone 8: Complete [5/22/2023, 7:31:55 AM] [RainBird] Program A: Complete

mantorok1 commented 1 year ago

It would be relatively easy to show the time remaining in hh:mm:ss format. Something like:

[5/22/2023, 4:45:08 AM] [RainBird] Zone 4: Running (0:45:00 remaining)

Be aware that it may not always be the total time that a zone runs for. It depends on when the plugin detects that a program has started due to the Refresh Rate you've specified in the settings.

tbaur commented 1 year ago

Makes sense! Great

mantorok1 commented 1 year ago

I've pushed a change for this feature. Try out the latest beta (1.11.0-beta.9) and see what you think

tbaur commented 1 year ago

This can work yep, thanks!

[5/27/2023, 4:00:29 PM] [Homebridge UI] Running Command: npm install -g homebridge-rainbird@1.11.0-beta.9 [5/27/2023, 4:00:57 PM] [RainBird] Zone 5: Start [Duration: 3600 seconds] [5/27/2023, 4:00:59 PM] [RainBird] Zone 5: Running [5/27/2023, 4:01:10 PM] [RainBird] Zone 5: Complete

mantorok1 commented 1 year ago

So it's not showing the time remaining (for the Running message)? Did you restart Homebridge after installing the new beta?

The [Duration: 3600 seconds] after the Start message has always been there but is only shown when you start a zone from HomeKit. You won't see it for a scheduled program from the Rainbird app for example.

I may change the format of the duration time to be hh:mm:ss to be consistent with the time remaining one.

tbaur commented 1 year ago

Sorry, moving too quickly.

[5/29/2023, 11:16:58 AM] [RainBird] Zone 2: Start [Duration: 3600 seconds] [5/29/2023, 11:17:00 AM] [RainBird] Zone 2: Running (01:00:00 remaining)

Thumbs up

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been closed as no further activity has occurred.

tbaur commented 1 year ago

we're good, can release