Skip to content

[Request] Add profile usage data to /metrics.json API to prevent user conflicts on shared profiles #411

@alexandrglm

Description

@alexandrglm

Feature Description:

Public ./metrics.json API Update to Track Shared Profiles and Prevent Conflicts

The issue is that when a profile is marked as "Shared", a new user connecting and changing the frequency can override the session of someone already using it. Currently, ordinary users have no way of knowing if a profile is in use.

I propose enhancing the public /metrics.json API by adding a profiles_usage section under openwebrx. This would provide, for each profile:

  • Whether it is shared (isShared)
  • Current frequency and mode (currentFreq, currentMode) if shared
  • Digital decoding details (digData) if relevant
  • Number of users currently active on that profile (active_users)

This change (the main idea of this request) would let the users be noticed, via further UI implementation, before they inadvertently overwrite someone else's session.


Here's an example of how the new data might look:

{
  "openwebrx": {

    "users": 16,


    "profiles_usage": {


      "RTL-SDR Device 1, 20m": {
        "shared_profile": {
          "isShared": true,
          "currentFreq": 14074000,
          "currentMode": "USB",
          "digData": {
            "isDig": true,
            "digMode": "FT8"
          }
        },
        "active_users": 5
      },


      "SDR Device 2, 40m": {
        "shared_profile": {
          "isShared": false
        },
        "active_users": 1


      }
    }
  }

// Actual metrics API json data ... 

}

Target Audience

This feature would benefit all users by keeping them informed about shared profile usage and who is currently connected:

  • Helps prevent conflicts between users
  • Makes coordination easier
  • Maintains backward compatibility with the existing /metrics.json structure
  • Minimal performance impact on metrics collection
  • Only minor changes needed in the endpoint route at owrx/metrics.py and owrx/websocket.py

In the end, an admin could easily implement a panel to display this information to new users, or it could even be shown by default when selecting a Shared Profile.


Thanks in advance for considering my suggestion!
Alexandr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurefeature requests

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions