[ { "id": "4938d3f3.61060c", "type": "tab", "label": "Sonnenbattery", "disabled": false, "info": "" }, { "id": "9523aeef.2031c", "type": "inject", "z": "4938d3f3.61060c", "name": "Tic 2s", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "0.5", "crontab": "", "once": false, "onceDelay": "0.01", "topic": "", "payload": "", "payloadType": "date", "x": 240, "y": 180, "wires": [ [ "d7995e17.2d00e", "117e6fa5.12fce" ] ] }, { "id": "d7995e17.2d00e", "type": "http request", "z": "4938d3f3.61060c", "name": "Sonnenbattery", "method": "GET", "ret": "obj", "paytoqs": "ignore", "url": "http://192.168.49.3/api/v1/status", "tls": "", "persist": false, "proxy": "", "authType": "", "x": 460, "y": 280, "wires": [ [ "835eb984.457168", "40328a2a.aa5d64" ] ] }, { "id": "835eb984.457168", "type": "ui_gauge", "z": "4938d3f3.61060c", "name": "Production in Watt", "group": "9dc3fba4.2f8f08", "order": 3, "width": 0, "height": 0, "gtype": "gage", "title": "Solar Production", "label": "Watt", "format": "{{msg.payload.Production_W}}", "min": 0, "max": "7200", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 730, "y": 280, "wires": [] }, { "id": "40328a2a.aa5d64", "type": "function", "z": "4938d3f3.61060c", "name": "Build SQL Query", "func": "var newMsg = {};\nvar timestamp = {};\n//timestamp = JSON.stringify(msg.Payload.Timestamp);//.replace(\"\\\"\",\"\");\n//newMsg.payload = {\"action\":\"I\",\"query\":\"insert into dbo.mySonnenTableSmall (Timestamp, Production_W, GridFeedIn_W) VALUES ('\" + msg.payload.Timestamp + \"', '\" + msg.payload.Production_W + \"', '\" + msg.payload.GridFeedIn_W + \"')\"}\nnewMsg.payload = {\"action\":\"I\",\"query\":\"insert into dbo.mySonnenTableSmall (Timestamp, Production_W, GridFeedIn_W) VALUES ('\" + msg.payload.Timestamp + \"', '\" + msg.payload.Production_W + \"', '\" + msg.payload.GridFeedIn_W + \"')\"}\nreturn newMsg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 750, "y": 340, "wires": [ [] ] }, { "id": "117e6fa5.12fce", "type": "function", "z": "4938d3f3.61060c", "name": "", "func": "var now = new Date().toLocaleString(\"en-GB\");\nreturn {payload: now};", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 480, "y": 140, "wires": [ [ "e9107170.d0684" ] ] }, { "id": "e9107170.d0684", "type": "ui_text", "z": "4938d3f3.61060c", "group": "9dc3fba4.2f8f08", "order": 2, "width": 0, "height": 0, "name": "", "label": "Time Date", "format": "{{msg.payload}}", "layout": "row-spread", "x": 630, "y": 140, "wires": [] }, { "id": "9dc3fba4.2f8f08", "type": "ui_group", "name": "Sonnen", "tab": "c5a11306.dd898", "order": 1, "disp": true, "width": "6", "collapse": false }, { "id": "c5a11306.dd898", "type": "ui_tab", "name": "Sonnen", "icon": "dashboard", "disabled": false, "hidden": false } ]