I’m trying out mDash to remotely control my IoT devices per e.g. Azure.
My goal is to get all MQTT messages that are published, like it is possible in the MQTT console (https://mdash.net/#/mqtt subscribing to ‘#’).
The only way I found to do this is:
create a dummy device with id ‘dummy’
create a mqtt client (e.g hivemq, paho)
connect as ‘dummy’ and dummy’s password
subscribe to ‘#’ to receive all messages
I’m wondering if there is another way than creating a dummy device?
Using REST API, which is a bridge to RPC over MQTT: Remote control over RPC - Overview . As a variation of this method, you can send raw MQTT messages that trigger RPC functions.
I’m happy with using MQTT - after the DEVICEID/shadow/get requests works it fits the use-case I’m trying to realise.
My approach would be the following:
1 subscribe the topics ‘+/shadow’ and ‘+/shadow/delta’ on Azure via MQTT client, authenticate as ‘dummydevice’ and dummydevice’s token
2 receive all devices via HTTP
3 trigger ‘DEVICEID/shadow/get’ for every device that was received via HTTP
4 the subscriptions made in (1) will get all current device states and further updates via delta
My MQTT client on Azure currently authenticates as a dummy device towards the MQTT broker running on mDash.
The question I have is whether there is a way to circumvent creating a dummy device and instead having something like a service-account - I guess the MQTT console on mDash is using something like that. I would like to prevent creating a device that just exists in order to have credentials that may be used to authenticate to the MQTT broker.