Ich bin mir jetzt nicht sicher was du genau wissen willst.
Ein funktionierender Node:
[
{
"id": "5ef15cbd.a8264c",
"type": "inject",
"z": "69046dac.23e24c",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 380,
"y": 140,
"wires": [
[
"c26ceda4.3390b8",
"a1b8b384.e57f2"
]
]
},
{
"id": "a1b8b384.e57f2",
"type": "function",
"z": "69046dac.23e24c",
"name": "Text anzeigen",
"func": "return {\n payload: \n {\"jsonrpc\": \"2.0\", \n \"method\": \"GUI.ShowNotification\", \n \"params\": {\n \"title\": \"Hallo!\", \n \"message\": \"Viele Grüße von OSMC\"},\n \"id\": 1}\n};\n// return msg;",
"outputs": 1,
"noerr": 0,
"x": 580,
"y": 200,
"wires": [
[
"522c068c.176b78",
"e5164a1e.bbe338",
"bcac8d2f.b0f488"
]
]
},
{
"id": "bcac8d2f.b0f488",
"type": "http request",
"z": "69046dac.23e24c",
"name": "",
"method": "POST",
"ret": "obj",
"paytoqs": true,
"url": "http://192.168.10.20:8080/jsonrpc",
"tls": "",
"persist": false,
"proxy": "",
"authType": "",
"x": 870,
"y": 120,
"wires": [
[
"e5164a1e.bbe338"
]
]
}
]
Grundsätzlich habe ich bislang noch nichts mit dem Header gemacht, weil der Inhalt z.B. dieses Funktionsblocks (anderer Funktionsblock als oben) gut funktioniert:
return {
payload:
{"jsonrpc": "2.0",
"method": "Player.GetActivePlayers",
"id": 1
}
};
Ausgabe:
{"id":1,"jsonrpc":"2.0","result":[{"playerid":0,"playertype":"internal","type":"audio"}]}
Dieser hingegen nicht:
return {
payload:
{"jsonrpc": "2.0",
"method": "Player.GetItem",
"Player.Id": 0,
}
};