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

Control Loops - what should they look like in a poor internet situation? #18

Open
mitra42 opened this issue Sep 25, 2024 · 0 comments
Open

Comments

@mitra42
Copy link
Owner

mitra42 commented Sep 25, 2024

From a design perspective, there is an important question of what control loops should look like in Resource Constrained environments, where - in particular - the internet cannot be relied on to be stable.

Lets take a simple example - lets say you have a soil moisture sensor, and you have a server (cloud) -side control loop that says whenever moisture gets below X percent, turn the pump on, and when it gets above Y, turn the pump back off.

If the net goes down between the pump on, and pump off decision, you’ve got an empty tank, and a flooded crop.

There are a few ways to design around this.

  1. Where the node has both the sensor and the actuator, then put the control loop in the node. We can still adjust X and Y via the cloud, but the device should be able to operate autonomously once these are set.
    See - [ ] MQTT: Local broker #26

  2. If the sensor and the actuator are separate devices, then we should rely on the local net, but not the internet for control, and there are two ways to do this.

  • Allow the actuator to access the sensor data, and put the control loop there. (Or the reverse)
  • allow a separate device to interrogate parameters of both sensor and pump and make control decisions. - See [ ] MQTT - stand alone reflector #27
  1. Instead of turning the pump “ON” add a parameter that says how long it should be “ON” for.
  2. Define a default state of the pump that it should always go to when it doesn’t receive a state update within a certain time-period.

I’m not particularly interested in which option is right for the trivial sensor/pump example, but I think each of these should be a supported strategy that is easy to configure.

We are a little way off from designing this - but I’m putting this out for discussion.

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

No branches or pull requests

1 participant