Skip to content

[DESIGN] - Control Flow Suggestions #132

@lmajor91

Description

@lmajor91

Control Flow Suggestions

  • 'Up To Date?' could potentially brick a system whose update changes some core function or if there is an entirely new version of
    PeaPod that doesn't function the same way as the old.
    • this can be resolved by properly detecting updates for that specific peapod's version/model number
    • this should have an option to be disabled in case the user doesn't want it to update for whatever reason.
  • sub to config will have to constantly check if the config has been changed. this will increase overhead and possibly decrease
    performance.
    • there should be an option to turn this off if needed; perhaps to save power. if this option exists, it should
      be enabled by default
  • Publish Data to MQTT broker;
    • during the Online? step, if the peapod isn't online it how will it publish data? when I say online does it have an
      internet connection or if its networking module works correctly?
      • this could be changed if peapod can properly communicate with a set endpoint and use the proper protocol
        to communicate with said endpoint
        • endpoint; url (MQTT endpoint, HTTP, webhook, etc.) or a file (a special program/function/script on the
          machine)
      • there should be a step between 'Online?' and 'Choose Program' that does a POST to its endpoint to ensure that the peapod can properly publish data there. Something like the torrent networks' 'announce' endpoint on a tracker
  • MQTT broker/publish endpoint
    • this should either be hotpluggable (it can change during run time) or during the 'Setup MQTT' phase
    • you should be able to connect to whatever MQTT or publisher endpoint, however we might have to modify the
      method of transmission depending on protocol (MQTT, HTTP, FTP, SSH, rsync, etc.)
      • this should either be detected or a manual option should be set to dictate the transfer protocol
      • if this is the case then there should be some universal interface which has a transfer protocol and each protocol is implemented differently. might have to use libraries to accomplish this.
  • Main Loop
    • since plants don't grow over seconds but over hours and days, is it worth it to put the main loop (not to say the controls which manage the plant e.g., water, lighting, etc.) on a timer which checks its broker for any changes then finishes on the 'Act' phase.
    • this could increase power saving since the CPU onboard won't be doing anything therefore saving power.
  • Camera Capture
    • we're going to need some serious machine learning for debris detection or for camera imaging to determine whether or not the plant is growing correctly. or this is just pure speculation and a more 'dumb' implementation should suffice.
  • Software wise is it better to create software designed with specific parameters to flash onto the arduino/peapod or if it should be
    hotpluggable (in terms of settings). Or there can be an option to do both

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions