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

How to better prevent overflow #384

Closed
6 tasks done
CamDavidsonPilon opened this issue Feb 17, 2023 · 2 comments
Closed
6 tasks done

How to better prevent overflow #384

CamDavidsonPilon opened this issue Feb 17, 2023 · 2 comments
Labels
dosing algorithms high priority performance Performance of Python app, databases, MQTT, or any other program safety user interface what-happened

Comments

@CamDavidsonPilon
Copy link
Member

CamDavidsonPilon commented Feb 17, 2023

Completed

1. UI: Improve the response time between UI click and action

Problem: suppose a user is adding media continuously. They hit [stop] because the level is getting high, or is already overflowing. Any lag between the action and stopping dosing can cause damage.

Solutions

  • What if MQTT is not connected / flakey?
  • The pump listens to an MQTT signal, can we speed this response time up?
  • Can we test that the signal works with "continuously"?
  • Is the MQTT message QOS 2?
  • Is a networking request slowing things down between signal and stopping?

2. If MQTT disconnects, we stop the pumps

3. UI suggestion: when clicking [continuously], always run waste pump, too.

If waste pump is automatically run with pump X, users don't need to think about sequence of actions (run waste -> run pump X -> stop pump X -> stop waste), nor make the mistake of forgetting to run waste pump until it's too late.

Q: What are the situations where we don't want to run waste pump with pump X?

  • cleaning pumps / tubes

Q: What are the situations where we do want to run waste pump with pump X?

  • diluting the vial's culture to some lower density
  • cleaning vial in-situ

4. UI suggestion: redesign the pump modal to encourage best practices

The current modal is too low level, and is a footgun. We can design it to support common routines (cycling, cleaning, etc) and put safety nets in those routines, which can help solve all of the above.

5. Pumps: when running waste pump and X concurrently, if rate of X > rate of removal, an overflow can occur.

Solutions

  • If calibrations are available for waste and pump X, we can use those to theoretically comparing dosing rates.

Note: There's always going to be a difference between the pumps: users could add a "super" pump as media, and a small pump as waste, and we can't prevent overflow without proper calibrations.

6. During a dosing automation, we track the vial volume, and produce a warning if the volume >= 17ml. We also halt dosing if the volume will exceed 18ml

@CamDavidsonPilon CamDavidsonPilon changed the title How to prevent overflow better How to better prevent overflow Feb 18, 2023
@CamDavidsonPilon

This comment was marked as outdated.

@CamDavidsonPilon CamDavidsonPilon pinned this issue Mar 1, 2023
@CamDavidsonPilon
Copy link
Member Author

If MQTT disconnects, we should halt any pumping.

CamDavidsonPilon added a commit that referenced this issue Apr 14, 2023
CamDavidsonPilon added a commit that referenced this issue Apr 28, 2023
* release/23.4.28:
  bump versions
  small docs
  fix od calibration
  more robust stirring job
  small improvements
  fix test
  just remove the progress..
  try 50
  we need to restart mqtt after this
  publish stats about writing to db, and use these stats to determine if we should backup the database or not. Use pages parameter to control how fast we backup
  new msgspec; more boundary for self-test REF
  adding flash for voltage problems
  vendoring rpi_bad_power. My code wasn't reliable
  vendoring rpi_bad_power. My code wasn't reliable
  fix test
  clean up
  using chatgpt to improve this code and write tests
  timeout should be low for pumping, since we want to detect a disconnect early
  close #394 and #384
@CamDavidsonPilon CamDavidsonPilon unpinned this issue Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dosing algorithms high priority performance Performance of Python app, databases, MQTT, or any other program safety user interface what-happened
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant