I have now been able to update to V4.05. Now I get this debug message:
I would like to insert my flow here, but unfortunately I don't know how to do it. Can anyone help me?
Ok, Thank you Colin, here ist my flow:
[
{
"id": "d9511de4bf3a6841",
"type": "tab",
"label": "Solis API Demo",
"disabled": false,
"info": ""
},
{
"id": "0595b7fdf2f8a18d",
"type": "function",
"z": "d9511de4bf3a6841",
"name": "apply headers",
"func": "// MD5 the payload\nconst payload = JSON.stringify(msg.payload)\nconst md5Hash = crypto.createHash('md5').update(payload, 'utf8').digest();\nconst contentMD5 = md5Hash.toString('base64')\n\n// extract other params or defaults\nmsg.method = msg.method || 'POST'\nconst canonicalResource = msg.canonicalResource || \"/v1/api/inverterDetail\"\nconst apiSecret = msg.secret || 'test-key' // UPDATE ME\nconst domain = msg.domain || 'blahblah.com' // UPDATE ME\nconst apiId = msg.apiId || 'your-api-id' // UPDATE ME\nconst contentType = 'application/json;charset=UTF-8' // fixed\n\n// this might need some work - just hoping the UTC format works\nconst date = new Date().toUTCString()\n\n// Generate the HMAC SHA-1 signature\nconst stringToSign = [\n msg.method, // HTTP verb\n contentMD5,\n contentType,\n date,\n canonicalResource\n].join('\\n')\n\nconst hmac = crypto.createHmac('sha1', apiSecret)\nhmac.update(stringToSign)\nconst signature = hmac.digest('base64')\n\n// add headers\n// doc states: \"all interface requests require adding\" \n// * Content MD5\n// * Content Type\n// * Date\n// * Authorization\nmsg.headers = msg.headers || {}\nmsg.headers['Content-MD5'] = contentMD5\nmsg.headers['Content-Type'] = contentType\nmsg.headers.Date = date\nmsg.headers.Authorization = `API ${apiId}:${signature}`\n\n// set full URL\nmsg.url = `https://${domain}${canonicalResource}`\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [
{
"var": "crypto",
"module": "crypto"
}
],
"x": 680,
"y": 320,
"wires": [
[
"1c201af348326481",
"12096b57ec3e815b"
]
]
},
{
"id": "ae84178bed4264ea",
"type": "inject",
"z": "d9511de4bf3a6841",
"name": "test object id + sn - UPDATE ME",
"props": [
{
"p": "payload"
},
{
"p": "method",
"v": "POST",
"vt": "str"
},
{
"p": "canonicalResource",
"v": "/v1/api/inverterDetail",
"vt": "str"
},
{
"p": "apiId",
"v": "KeyID",
"vt": "str"
},
{
"p": "secret",
"v": "KeySecret",
"vt": "str"
},
{
"p": "domain",
"v": "www.soliscloud.com:13333",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{ \"id\": \"14A67F\", \"sn\": \"1031030222210234\" }",
"payloadType": "json",
"x": 390,
"y": 320,
"wires": [
[
"0595b7fdf2f8a18d"
]
]
},
{
"id": "1c201af348326481",
"type": "http request",
"z": "d9511de4bf3a6841",
"name": "",
"method": "use",
"ret": "txt",
"paytoqs": "ignore",
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 890,
"y": 320,
"wires": [
[
"b4cce3e89b906a99"
]
]
},
{
"id": "12096b57ec3e815b",
"type": "debug",
"z": "d9511de4bf3a6841",
"name": "CHECK ME",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 890,
"y": 260,
"wires": []
},
{
"id": "b4cce3e89b906a99",
"type": "debug",
"z": "d9511de4bf3a6841",
"name": "Result",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1060,
"y": 320,
"wires": []
}
]