[ { "id": "7a27dcd1.d1ae04", "type": "ui_switch", "z": "5838e8c3.590008", "name": "", "label": "Randomize", "group": "43e50940.c708b8", "order": 0, "width": 0, "height": 0, "passthru": true, "decouple": "false", "topic": "", "style": "", "onvalue": "ON", "onvalueType": "str", "onicon": "", "oncolor": "", "offvalue": "OFF", "offvalueType": "str", "officon": "", "offcolor": "", "x": 110, "y": 120, "wires": [ [ "5388b5fb.5f413c" ] ] }, { "id": "5388b5fb.5f413c", "type": "function", "z": "5838e8c3.590008", "name": "Randomizing (On/Off)", "func": "flow.set(\"Randomizing\",msg.payload);\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 340, "y": 120, "wires": [ [] ] }, { "id": "9398df74.dbac5", "type": "inject", "z": "5838e8c3.590008", "name": "", "repeat": "1", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 110, "y": 220, "wires": [ [ "105affa1.858f" ] ] }, { "id": "105affa1.858f", "type": "switch", "z": "5838e8c3.590008", "name": "if ON", "property": "Randomizing", "propertyType": "flow", "rules": [ { "t": "eq", "v": "ON", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 290, "y": 220, "wires": [ [ "b1bcd840.b29f98" ] ] }, { "id": "b1bcd840.b29f98", "type": "function", "z": "5838e8c3.590008", "name": "random value in range (20.0,30.0)", "func": "msg.payload = parseFloat( (200 + Math.floor(Math.random() * 101))/10); // value between 20.0 and 30.0\n\nreturn msg;", "outputs": 1, "noerr": 0, "x": 540, "y": 220, "wires": [ [ "e7696bce.0895a8", "8fdf13b2.8537c", "c50b5b5b.b52358" ] ] }, { "id": "e7696bce.0895a8", "type": "ui_gauge", "z": "5838e8c3.590008", "name": "", "group": "43e50940.c708b8", "order": 0, "width": 0, "height": 0, "gtype": "gage", "title": "Temperature", "label": "units", "format": "{{value}}", "min": 0, "max": "40", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 640, "y": 160, "wires": [] }, { "id": "8fdf13b2.8537c", "type": "ui_chart", "z": "5838e8c3.590008", "name": "", "group": "43e50940.c708b8", "order": 0, "width": 0, "height": 0, "label": "Temperature", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "removeOlder": "2", "removeOlderPoints": "", "removeOlderUnit": "60", "cutout": 0, "useOneColor": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "useOldStyle": false, "outputs": 2, "x": 640, "y": 280, "wires": [ [], [] ] }, { "id": "c50b5b5b.b52358", "type": "influxdb out", "z": "5838e8c3.590008", "influxdb": "10f3d699.6bd469", "name": "", "measurement": "jb_Temp", "precision": "", "retentionPolicy": "", "database": "", "retentionPolicyV18Flux": "", "org": "", "bucket": "", "x": 750, "y": 320, "wires": [] }, { "id": "43e50940.c708b8", "type": "ui_group", "z": "", "name": "Aleatori", "tab": "d4f65aa2.f9f378", "order": 1, "disp": true, "width": "6", "collapse": false }, { "id": "10f3d699.6bd469", "type": "influxdb", "z": "", "hostname": "formacio.things.cat", "port": "8086", "protocol": "http", "database": "formacioDB", "name": "", "usetls": false, "tls": "", "influxdbVersion": "1.x", "url": "http://localhost:8086", "rejectUnauthorized": true }, { "id": "d4f65aa2.f9f378", "type": "ui_tab", "z": "", "name": "Exemple de panell de control", "icon": "dashboard", "order": 1, "disabled": false, "hidden": false } ]