Open Gidrogen opened 1 year ago
At the moment, this is not possible. What would be your use-case? If it's a different value per phone, why not let the phones post to different topics? Or do you want to regularly change the value?
Use case: A bash script forwards my mqtt messages to the corresponding telegram chat. So I want to pass the ID number. Also, I would like to pass the device name in the message body, which is much more convenient. I can't change the bash script to parse mqtt topics.
If it's just about the device name, how about just adding a data field DEVICE_NAME that is resolved from the device's name as configured in "Settings" - "About the phone" - "Device name" (starting from Android 7.1) or the device's Bluetooth name in older devices?
Does the new device name help with your use case? Or do you really need a freely configurable field?
Hi, Is there any way to add my key to the json message?