Hello,
To save power, using MQTT, we would like to update several attribute with a single message. Unfortunately, the MQTT API allows only one attribute per mesage.
To workaround this limitations, we are publishing a JSON payload to an “inbound” attribute and using AttributeLinks to update individual attributes. This, however, seems a bit awkward, especially the setup.
Do you plan to support this (i.e., to update several attributes with a single message) in the near future?
We though of adding support for this with a special attribute name (in {realm}/{clientId}/writeattributevalue/{attributeName}/{assetId}). However, there seems to be an issue with this.
Because access control seems to be performed in DefaultMQTTHandler::canPublish, if we authorize such a publication, such a JSON payload may be used to update an attribute whose access is not authorized.
To workaround this, we thought of:
- Accepting all such publications (with the special attribute name).
- But, whenever there’s a publication, of using canPublish for each individual attribute and only updating the attribute if access is authorized.
Any thoughts?
Thank you.
Best regards,
Adriano Carvalho