Like maybe some input msg flag that sends everything in the cache. I can see a few uses for that... Deciding on the format of the payload would be interesting though.
I would vote for:
payload: {
attribute name 1: value,
attribute name 2: value,
...
}
But if we think we need dataType, etc, in there then it would have to be something similar to how Maker API returns the values, in an array. The bad part about that is that Maker API returns it with just an indexed array, so you have to check each element of the array to know what the attribute type is.
This is the Maker API response format. The array levels being indices are annoying:
If it came down to an array, doing it like Maker API could work - but with a twist... Just use attribute name for the array tree level instead of "0", "1", "2", etc. I "think" that is possible...
Then users could just do msg.payload.level.value or msg.payload.switch.value, etc. And not have to search or walk the array to find the value they want.
Something like this for msg.payload:
{
"level": {
"value": 50,
"dataType": "NUMBER"
},
"switch": {
"value": "on",
"dataType": "ENUM"
}
}