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

Backend rework for 2.0 #16

Open
yesrod opened this issue Aug 1, 2023 · 1 comment
Open

Backend rework for 2.0 #16

yesrod opened this issue Aug 1, 2023 · 1 comment

Comments

@yesrod
Copy link
Owner

yesrod commented Aug 1, 2023

  • Introduce a tap object
    • Taps are where the beer comes out
    • Single object associated with kegs, specific sensor channels, in both real life and Hoplite
    • tap object will have references to a specific sensor instance and a single channel on said instance
    • also a reference to the currently loaded keg object for that tap
  • Create a generic sensor object
    • Subclass that object for hx711_sensor
    • Allows common logic for different sensor types in the future
  • Move all weight->volume logic inside keg objects
    • update() function for getting new weight data, converting to available volume
    • available_volume() function for getting that converted data out
    • data stored internally as metric volume, do all weight->volume conversion during update()
  • Rework UI process
    • Create sensor, define type, channels, etc.
    • Create tap, associate with sensor
    • Create keg with sizes, beer names, etc.
    • Associate keg with specific tap
@yesrod
Copy link
Owner Author

yesrod commented Mar 25, 2024

Also switch to FastAPI+Pydantic and make everything not suck. Guess it's rewrite time lol

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

1 participant