Skip to content

MQTT Device list topic #373

Open
Open

Description

@wsobel

Create a topic that lists all the devices as a JSON array of name, uuid, and relates topic.

What should the topic be?

Does the payload make sense?

Activity

  1. robot-ranger commented on Dec 7, 2023

    @robot-ranger
    Collaborator

    maybe im missing something...but isnt this what probe is for?

  2. wsobel commented on Dec 7, 2023

    @wsobel
    MemberAuthor

    This is what the probe is for. The MQTT implementation breaks the document into separate devices.

    We could have a single probe payload, that would be an option. Or we can provide a separate device list. If you subscribe to MTConnect/Probe/#, you will effectively get all the devices.

  3. robot-ranger commented on Dec 7, 2023

    @robot-ranger
    Collaborator

    i think im following you now. the agent could be configured with user-customized topic prefixes. So youre suggesting a topic with payload like the following to inform client apps of where to look for their device of interest; is that right?

    {
    	"myDeviceA_UUID":{
    		"id": "deviceA_ID",
    		"name": "deviceA_NAME",
    		"topics":{
    			"probe": "MTConnect/Probe/myDeviceA_UUID",
    			"current": "MTConnect/Current/myDeviceA_UUID",
    			"sample": "MTConnect/Sample/myDeviceA_UUID"
    		}
    	},
    	"myDeviceB_UUID":{
    		"id": "deviceB_ID",
    		"name": "deviceB_NAME",
    		"topics":{
    			"probe": "MTConnect/Probe/myDeviceB_UUID",
    			"current": "MTConnect/Current/myDeviceB_UUID",
    			"sample": "MTConnect/Sample/myDeviceB_UUID"
    		}
    	}
    	# ... rest of devices
    }
  4. emvarunp commented on Jun 24, 2024

    @emvarunp

    Hi @wsobel.
    The payload makes sense.

    We usually subscribe to probe/# to get the UUID of a device.
    But having a seperate topic like mtconnect/devices or mtconnect/probe/devices which gives a list of devices info would be very helpful.

    Thank you.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions