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

V2: Move all data gatherers into a plugin system. #31

Open
easytarget opened this issue Dec 8, 2021 · 0 comments
Open

V2: Move all data gatherers into a plugin system. #31

easytarget opened this issue Dec 8, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@easytarget
Copy link
Owner

V2 architecture:

  • overwatch.py main loop only services hardware and the data dictionary, it does handle any senses or work with sensed data directly.
    • performs startup, config, log setup, schedule init and running, signal handling and all other 'housekeeping' tasks
    • provides gpio, I2C (and SPI) bus objects for the gatherers to use.
    • directly handles all the button pin functions
    • spawns rrdb, http, display and alert tasks/processes that drive the core functionality
      • provides the global data{} dictionary
      • uses queues for display and alerts by extending the dictionary methods for data{}
  • gatherers focus on a single dataset, currently: 'system', 'environment', 'connectivity', 'pin'
    • init
    • updater
    • handler for http (show_panel)
    • Attributes (optional) for rrdb (limits, formats, graph)
    • Attributes (optional) for display
    • log directly
  • alerters
    • TBD: a plugin system for alerting
    • run in a separate process, possibly demonised so it can alert if the main process dies..
    • Pass the data{} dict to it via a Queue, same as for the display sub-process
    • Allow it to pass data back to the Web interface and display can show alerts?

In General:

  • We currently have tables defined in the http, rrd and display classes that should be moved out and become attributes provided by the relevant data gatherers.
  • the http server needs to become 'data neutral' as well, gatherers need to provide their own generators (emitting a formatted http table header and rows) so that the httpserver.py module can become data neutral.
@easytarget easytarget added the enhancement New feature or request label Dec 8, 2021
@easytarget easytarget added this to the 2.x milestone Dec 8, 2021
@easytarget easytarget mentioned this issue Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant