I have a question about identifying gateway devices and peripheral devices in MQTT communication.
In the documentation,
・losant/my-gateway-id/state
・losant/my-peripheral-device/state
It says that the devices are identified by my-gateway-id and my-peripheral-device in the above topic, but could you tell me if there are any other ways to identify them?
Hi @Rei_Naraoka and welcome to the Losant Forums!
my-gateway-id
and my-peripheral-device
are just placeholders; what is actually in that spot is the ID of the device.
So, given a gateway device whose ID is 111122223333444455556666
, it will publish state on the topic losant/111122223333444455556666/state
.
You can also write an application workflow with a Device: State Trigger targeting one or more devices, and identifying information about the device that published a message on that topic - including its ID, name, and meta tags - will be on the initial payload.
Let us know if you have any more questions!