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

Zone Turned Off time is not correct, actually reflects program end time rather than zone end time #41

Open
jbrukardt opened this issue Oct 21, 2020 · 8 comments

Comments

@jbrukardt
Copy link

jbrukardt commented Oct 21, 2020

Runtime appears correctly, and zone on timestamp is correct. However the zone off timestamp reflects when the program ends, not when the zone actually shuts off.

Turned off
2:50:00 PM - 1 hour ago
Turned on
1:59:59 PM - 2 hours ago
Turned off
6:49:59 AM - 9 hours ago
Turned on
5:59:58 AM - 10 hours ago

device name: XXXXXXXXX B-hyve
device id: XXXXX
zone name: Garden Sprinklers
smart watering enabled: false
manual preset runtime: 600
sprinkler type: rotor
program a:
  enabled: true
  name: New Grass
  is_smart_program: false
  start_times:
    - "06:00"
    - "14:00"
  frequency:
    type: days
    days:
      - 0
      - 1
      - 2
      - 3
      - 4
      - 5
      - 6
  run_times:
    - run_time: 10
      station: 1
program b:
  enabled: false
  name: Sprinkler Test
  is_smart_program: false
program c:
  enabled: false
  name: Run Now
  is_smart_program: false
@sebr
Copy link
Owner

sebr commented Oct 22, 2020

@jbrukardt what output are you expecting?

And what's the difference between the zone shutting off vs the program ending?

@jbrukardt
Copy link
Author

Additional information:

Hardware, Bhyve sprinkler controller, 8 zone, indoor

The program "new grass" runs 5 zones, each for 10 minutes.

The expected output would be for the turned off time to be 10 minutes after the turned on time.

The program end time (which is whats being reflected) is the time at which no zones are on and the entire program (all 5 zones, 10 minutes each) is complete, rather than an individual zone.

This may be a remnant of the code thinking that the "program" is an individual "one zone" bhyve hose timer rather than a program that runs multiple zones from the sprinkler controller?

@sebr
Copy link
Owner

sebr commented Oct 23, 2020

This may be a remnant of the code thinking that the "program" is an individual "one zone" bhyve hose timer rather than a program that runs multiple zones from the sprinkler controller?

This is almost certainly the case - I only have the faucet timer devices which have a 1:1 mapping of zone-program.

I'd be happy to take a look and try improve the functionality to support this hardware, but in order to do so I'll need you to upload a bunch of logs and event data.

Step 1: Enable debugging & packet dumps

Add the following to configuration.yaml and then restart Home Assistant.

logger:
  logs:
    custom_components.bhyve: debug

bhyve:
  username: !secret bhyve_username
  password: !secret bhyve_password
  packet_dump: true

Step 2: Wait for (or trigger) the zone watering

⏳ wait for watering 💦🌷

Step 3: Upload debug data

  1. Open home-assistant.log
  2. Identify lines which begin with:
DEBUG (MainThread) [custom_components.bhyve] Devices:
DEBUG (MainThread) [custom_components.bhyve] Programs:
  1. Copy these two lines and paste them in a comment below.
  2. Open .bhyve/packets.dump
  3. Copy all the contents (or upload the file)

@jbrukardt
Copy link
Author

jbrukardt commented Oct 24, 2020

Sure thing, glad to help out. See attached for a filtered log and the dump file.

deleted

@sebr
Copy link
Owner

sebr commented Oct 25, 2020

Thanks @jbrukardt. I've deleted the file you've uploaded as it contained some longitude/latitude location in the logs which you uploaded (these were stray HA logs, not from my integration).

@sebr
Copy link
Owner

sebr commented Oct 25, 2020

@jbrukardt I'm interested to know what data is available in the BHyve app...

From the logs and event stream which you provided, there are individual watering started events for each zone, but there is only one watering completed event:

{ 'current_station': 1, // Garden Sprinklers
  'event': 'watering_in_progress_notification',
  'run_time': 10 }
{ 'current_station': 2, // Front Lawn Sprinkler
  'event': 'watering_in_progress_notification',
  'run_time': 10 }
{ 'current_station': 3, // Driveway Sprinkler
  'event': 'watering_in_progress_notification',
  'run_time': 10 }
{ 'current_station': 5, // Barn Sprinkler
  'event': 'watering_in_progress_notification',
  'run_time': 10 }
{ 'current_station': 7, // Oil Tank Sprinklers
  'event': 'watering_in_progress_notification',
  'run_time': 10 }
{ 'event': 'watering_complete' }

I'm curious if the BHyve app shows this data, and if it does... then where/how.

@jbrukardt
Copy link
Author

Thanks for the clear on the lat/long, missed those.

In the bhyve app, it shows watering start times for each zone in the watering history, but no end time. However, during a watering program, it does send push notifications when each zone finishes.

I see where you're getting at though, nowhere in the app, except when the program is running, does it have indications of zone watering complete as a logged event. It all seems to reference start time and duration.

Id be willing to privately share access to my bhyve account for development, you could run short test events/etc if itd be helpful

@gdgeist
Copy link

gdgeist commented Aug 13, 2024

@jbrukardt what output are you expecting?

And what's the difference between the zone shutting off vs the program ending?

@sebr thanks for this integration. Assume since this is years later that this will only reflect when a program finishes versus a zone stops watering. For those that use the bhyve controller to set watering (having a $1000 water bill from trusting Openhab which locked up in the middle of watering) this will never report the actual times each zone was watered.
I would suggest you update the documentation to reflect this limitation if that's the plan going forward. Right now it appears that these cases are just ignored if they don't match your use case

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

No branches or pull requests

3 participants