Skip to content

How to pass a file Buffer to MQTT APIs #3691

Answered by robertsLando
hassan-xy asked this question in Q&A
Discussion options

You must be logged in to vote

The arg of firmwareUpdateOTW is file that is like:

interface FwFile {
	name: string
	data: Buffer
	target?: number
}

So you should provide that as argument. Remember that for buffers the format is {"type": "Buffer", "data": [//the buffer data array] }

So:

{
    "api": "firmwareUpdateOTW",
    "args": [
        {
            "name": "zwave_ncp_serial_api_controller_BRD4207A.gbl",
            "data": {"type": "Buffer", "data": [//the buffer data array] }
        }
    ]
}

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by robertsLando
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #3687 on April 26, 2024 11:06.