Skip to content

Add property to Device and Signal that tracks connection state. #1475

Open

Description

@jwlodek

In ophyd v1 each device and signal has a connected property that is updated live if a virtual circuit disconnects or reconnects. In order for a user interface to correctly display device state, it would be good to have something equivalent for ophyd async.

Activity

  1. jwlodek commented on Nov 3, 2026

    @jwlodek
    MemberAuthor

    In aioca, this appears to be straightforward by accessing the channel cache via get_channel, though this is coming from a private module. Perhaps it could be re-exported? P4P doesn't have a way to do this, but I've added it in epics-base/p4p#229

  2. jacopoabramo commented on Nov 3, 2026

    @jacopoabramo
    Contributor

    Is this somehow related to #1416 ?

  3. jwlodek commented on Nov 3, 2026

    @jwlodek
    MemberAuthor

    Not exactly, I'm more interested in giving users feedback on whether or not devices are connected in a UI (and using that information to display or not display portions of the UI).

  4. jacopoabramo commented on Nov 3, 2026

    @jacopoabramo
    Contributor

    Got it. Still I guess it's also something I'd want to have too, it'll tie nicely with a graceful disconnection mechanism in the future

  5. coretl commented on Nov 10, 2026

    @coretl
    Collaborator

    How will the UI use this? I imagine it would want to subscribe to changes in connected state instead of polling. You can do this on Signals at the moment with subscribe_reading which gives you back alarm_severity:

    "alarm_severity": -1 if value.severity > 2 else value.severity,

    I imagine there is already a subscription for updating value, so could use this?

  6. jwlodek commented on Nov 10, 2026

    @jwlodek
    MemberAuthor

    A subscription would work, and probably be preferable, but I'm intending to do this on a device level rather than a signal level. It's meant to just have a panel showing the connection state of each device with an option to attempt reconnects. Do we propagate child signal severity up to the device level?

  7. jwlodek commented on Nov 10, 2026

    @jwlodek
    MemberAuthor
    Image

    This is what I have in a UI at the beamline currently. I get connection state via the on-connect-hook, but it's not live.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions