CamDavidsonPilon/pioreactor-relay-plugin

How to make more than one PWM a relay?

Opened this issue · 2 comments

And how does one control the multiple relays from the UI?

What should the config look like?

[PWM]
2=relay2
3=relay3

(we need to have unique names here)

What does the UI Settings look like?

Ideally it's something like:

Screen Shot 2023-01-17 at 7 45 08 PM

Actually even better would be to give them alias.

The problem is this data lives in the plugins yaml file, and that data is fixed: server -> client -> /pioreactors card. Nothing edits it. So even if a user only has two relays, the UI will show 4 relays "available", but only two are ever on.

Similar problem in the Manage modal.

We could dynamically populate the settings, by showing them only when the job starts and intersecting with the $properties message in MQTT. This way the job, at runtime, can define its settings: overpromise in the yaml, and deliver from the runtime. This has some latency problems though.

Another option:

Screw it, users can make a custom set up instead of my trying to fin-angle the 4 possible cases:

  1. 1 relay (done)
  2. 2 relays
  3. 3 relays
  4. 4 relays