How to pass a file Buffer
to MQTT APIs
#3691
-
Hi guys, My question is How can I place zwave_ncp_serial_api_controller_BRD4207A.gbl file properly from my /root directory into the API? Please share any information that might be of relevance. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@hassan-xy Why you don't use the UI instead of the API? |
Beta Was this translation helpful? Give feedback.
-
Because i will place my device in a remote location and won’t have access to the UI. So I need to hit the API. Can you suggest something. Thanks |
Beta Was this translation helpful? Give feedback.
-
The arg of interface FwFile {
name: string
data: Buffer
target?: number
} So you should provide that as argument. Remember that for buffers the format is So: {
"api": "firmwareUpdateOTW",
"args": [
{
"name": "zwave_ncp_serial_api_controller_BRD4207A.gbl",
"data": {"type": "Buffer", "data": [//the buffer data array] }
}
]
} |
Beta Was this translation helpful? Give feedback.
The arg of
firmwareUpdateOTW
isfile
that is like:So you should provide that as argument. Remember that for buffers the format is
{"type": "Buffer", "data": [//the buffer data array] }
So: