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

MQTT Device list topic #373

Open
wsobel opened this issue Dec 4, 2023 · 3 comments
Open

MQTT Device list topic #373

wsobel opened this issue Dec 4, 2023 · 3 comments
Labels

Comments

@wsobel
Copy link
Member

wsobel commented Dec 4, 2023

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?

@wsobel wsobel added the feature label Dec 4, 2023
@robot-ranger
Copy link
Contributor

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

@wsobel
Copy link
Member Author

wsobel commented Dec 7, 2023

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.

@robot-ranger
Copy link
Contributor

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
}

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

No branches or pull requests

2 participants