FLOW... (use CTRL+I) to import this
[{"id":"7a01d3ed98699202","type":"inject","z":"a55f8f0f93e84992","name":"Click me","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":400,"y":640,"wires":[["7a01d3ed98699203"]]},{"id":"7a01d3ed98699203","type":"function","z":"a55f8f0f93e84992","name":"","func":"//original curl: \n//\n//curl -i -s -k -X 'POST' -H 'Host: 192.168.178.87' -H 'Connection: close' -H 'Accept: application/json, text/plain, */*' -H 'User-Agent: okhttp/3.10.0' -H 'Sec-Fetch-Site: same-origin' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Dest: empty' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7' -H 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8' -H 'Content-Length: 56' -H 'Origin: https://192.168.178.87' -H 'Referer: https://192.168.178.87/webui/login' --data-binary 'grant_type=password&username=<USERNAME>&password=<PASSWORD>' https://192.168.178.87/api/v1/token\n\nconst user = \"user\";\nconst pass = \"pass\";\n\nmsg.method = \"post\";\nmsg.url = \"https://192.168.178.87/api/v1/token\";\nmsg.payload = `grant_type=password&username=${user}&password=${pass}`;\nmsg.headers = {\n \"Host\": \"192.168.178.87\",\n \"Connection\": \"close\",\n \"Accept\": \"application/json, text/plain, */*\",\n \"User-Agent\": \"okhttp/3.10.0\",\n \"Sec-Fetch-Site\": \"same-origin\",\n \"Sec-Fetch-Mode\": \"cors\",\n \"Sec-Fetch-Dest\": \"empty\",\n \"Accept-Encoding\": \"gzip, deflate\",\n \"Accept-Language\": \"de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7\",\n \"Content-Type\": \"application/x-www-form-urlencoded;charset=UTF-8\",\n \"Content-Length\": \"56\",\n \"Origin\": \"https://192.168.178.87\",\n \"Referer\": \"https://192.168.178.87/webui/login\"\n};\nmsg.cookies = null;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":640,"wires":[["7a01d3ed98699204"]]},{"id":"7a01d3ed98699204","type":"http request","z":"a55f8f0f93e84992","name":"","method":"use","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"credentials":{"user":"","password":""},"x":760,"y":640,"wires":[["5cdd4962fb5278c6"]]},{"id":"7a01d3ed98699205","type":"debug","z":"a55f8f0f93e84992","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1230,"y":640,"wires":[]},{"id":"86c76882daddd902","type":"inject","z":"a55f8f0f93e84992","name":"Click me","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":400,"y":760,"wires":[["86c76882daddd903"]]},{"id":"86c76882daddd903","type":"function","z":"a55f8f0f93e84992","name":"","func":"//original curl: \n//\n//curl -i -s -k -X 'POST' -H 'Host: 192.168.178.87' -H 'Connection: close' -H 'Accept: application/json, text/plain, */*' -H 'User-Agent: okhttp/3.10.0' -H 'Sec-Fetch-Site: same-origin' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Dest: empty' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7' -H 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8' -H 'Content-Length: 30' -H 'Referer: https://192.168.178.87/webui/login' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2NDE2NzE3MzYsInN1YiI6IldCQWRtaW4iLCJ1aWQiOiJkYThmNzMxNi1kZmUxLTQzNjMtODU2Yi0yZmI5YjMwNzJkNTAiLCJleHAiOjE2NDE2NzUzMzZ9.EOUQkXk9Fw7vhZeFE-2TFxHqoNv5fJZo7CXs7H-be6o' -b 'node03v08nb30tz041fqxrsfye75cv502.node0' --data-binary '[{\"componentId\":\"IGULD:SELF\"}]' https://192.168.178.87/api/v1/measurements/live/\nconst token = flow.get(\"token\");;\nmsg.method = \"post\";\nmsg.url = \"https://192.168.178.87/api/v1/measurements/live/\";\nmsg.payload = `[{\"componentId\":\"IGULD:SELF\"}]`;\nmsg.headers = {\n \"Host\": \"192.168.178.87\",\n \"Connection\": \"close\",\n \"Accept\": \"application/json, text/plain, */*\",\n \"User-Agent\": \"okhttp/3.10.0\",\n \"Sec-Fetch-Site\": \"same-origin\",\n \"Sec-Fetch-Mode\": \"cors\",\n \"Sec-Fetch-Dest\": \"empty\",\n \"Accept-Encoding\": \"gzip, deflate\",\n \"Accept-Language\": \"de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7\",\n \"Content-Type\": \"application/x-www-form-urlencoded;charset=UTF-8\",\n \"Content-Length\": \"30\",\n \"Referer\": \"https://192.168.178.87/webui/login\",\n \"Authorization\": `Bearer ${token}`\n};\nmsg.cookies = {};\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":760,"wires":[["86c76882daddd904"]]},{"id":"86c76882daddd904","type":"http request","z":"a55f8f0f93e84992","name":"","method":"use","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":760,"y":760,"wires":[["86c76882daddd905"]]},{"id":"86c76882daddd905","type":"debug","z":"a55f8f0f93e84992","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":940,"y":760,"wires":[]},{"id":"4a16b9dc548f9f9f","type":"comment","z":"a55f8f0f93e84992","name":"Login / get token","info":"","x":400,"y":600,"wires":[]},{"id":"5cdd4962fb5278c6","type":"change","z":"a55f8f0f93e84992","name":"store payload.access_token","rules":[{"t":"set","p":"token","pt":"flow","to":"payload.access_token","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":640,"wires":[["7a01d3ed98699205"]]},{"id":"df379a4c2f4ef2f1","type":"comment","z":"a55f8f0f93e84992","name":"Use token (get data)","info":"","x":410,"y":720,"wires":[]}]
Open the first function node and set user
and pass
as required.
DISCLAIMER - untested (since I dont have your device nor have i read any manuals - but it should give you the gist of how to achieve it)