diff --git a/PCB_file_measurement_card/measurement_board/kicad_v5.00/VMN/#auto_saved_files# b/PCB_file_measurement_card/measurement_board/kicad_v5.00/VMN/#auto_saved_files# index e4157d4aa08307d653dad6a35abc3bb36bb494e7..4e3cbf713672a3ea8841481da91a7f79411de2e3 100644 --- a/PCB_file_measurement_card/measurement_board/kicad_v5.00/VMN/#auto_saved_files# +++ b/PCB_file_measurement_card/measurement_board/kicad_v5.00/VMN/#auto_saved_files# @@ -1 +1 @@ -C:\Users\reclement\Documents\39_ohmpi\OhmPi\PCB_file_measurement_card\measurement_board\kicad_v5.00\VMN\_autosave-VMN.kicad_sch +/home/arnaud/codes/OhmPi/PCB_file_measurement_card/measurement_board/kicad_v5.00/VMN/_autosave-VMN.kicad_sch diff --git a/examples/basic_ohmpi_flows_node-red.json b/examples/basic_ohmpi_flows_node-red.json index 2cdf5c89c42d46bb1d079a260d169214b5072505..e6184859f8a3875961dfb3ac1696d8cc9f6798ea 100644 --- a/examples/basic_ohmpi_flows_node-red.json +++ b/examples/basic_ohmpi_flows_node-red.json @@ -1 +1,782 @@ -[{"id":"61c1655c50bd371c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"2d6881abe9336fbf","type":"mqtt in","z":"61c1655c50bd371c","name":"","topic":"ohmpi_0001/exec","qos":"2","datatype":"auto-detect","broker":"6ae7e77e.04c64","nl":false,"rap":false,"inputs":0,"x":390,"y":40,"wires":[["02e94bb48ce2cded"]]},{"id":"e2590e574c551cb9","type":"mqtt in","z":"61c1655c50bd371c","name":"","topic":"ohmpi_0001/data","qos":"2","datatype":"auto","broker":"6ae7e77e.04c64","nl":false,"rap":false,"inputs":0,"x":380,"y":140,"wires":[["b9a9d56fd4fb0b8c"]]},{"id":"e2c109f78f9e714c","type":"mqtt out","z":"61c1655c50bd371c","name":"MQTT ctrl","topic":"ohmpi_0001/ctrl","qos":"2","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"6ae7e77e.04c64","x":820,"y":340,"wires":[]},{"id":"e1d067d8532ff36b","type":"mqtt in","z":"61c1655c50bd371c","name":"","topic":"ohmpi_0001/soh","qos":"2","datatype":"auto","broker":"6ae7e77e.04c64","nl":false,"rap":false,"inputs":0,"x":380,"y":240,"wires":[["f5c9dacaafac51d0"]]},{"id":"a7a6f6068e01c7eb","type":"ui_button","z":"61c1655c50bd371c","name":"Run sequence","group":"142ad6ae.d55e29","order":1,"width":"1","height":"1","passthru":false,"label":"⏺","tooltip":"run sequence","color":"red","bgcolor":"lightgrey","className":"","icon":"","payload":"{\"cmd_id\" :\"0\", \"cmd\":\"run_sequence_async\"}","payloadType":"str","topic":"topic","topicType":"msg","x":380,"y":340,"wires":[["e2c109f78f9e714c"]]},{"id":"d82912d9c5b122fe","type":"ui_button","z":"61c1655c50bd371c","name":"Interrupt","group":"142ad6ae.d55e29","order":2,"width":"1","height":"1","passthru":false,"label":" ◾","tooltip":"interrupt sequence","color":"black","bgcolor":"lightgrey","className":"","icon":"","payload":"{\"cmd_id\" :\"0\", \"cmd\":\"interrupt\"}","payloadType":"str","topic":"topic","topicType":"msg","x":360,"y":400,"wires":[["e2c109f78f9e714c"]]},{"id":"02e94bb48ce2cded","type":"ui_text","z":"61c1655c50bd371c","group":"64a75353.37700c","order":2,"width":"16","height":"3","name":"MQTT exec","label":"Execution","format":"{{msg.payload}}","layout":"row-spread","className":"","x":830,"y":40,"wires":[]},{"id":"b9a9d56fd4fb0b8c","type":"ui_text","z":"61c1655c50bd371c","group":"64a75353.37700c","order":3,"width":"16","height":"3","name":"MQTT Data","label":"Data","format":"{{msg.payload}}","layout":"row-spread","className":"","x":830,"y":140,"wires":[]},{"id":"f5c9dacaafac51d0","type":"ui_text","z":"61c1655c50bd371c","group":"64a75353.37700c","order":4,"width":0,"height":0,"name":"MQTT SOH","label":"SOH","format":"{{msg.payload}}","layout":"row-spread","className":"","x":830,"y":240,"wires":[]},{"id":"329591d611aa2704","type":"ui_button","z":"61c1655c50bd371c","name":"","group":"64a75353.37700c","order":1,"width":0,"height":0,"passthru":false,"label":"clear messages","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":" ","payloadType":"str","topic":"topic","topicType":"msg","x":580,"y":160,"wires":[["f5c9dacaafac51d0","b9a9d56fd4fb0b8c","02e94bb48ce2cded"]]},{"id":"25d69085f401beae","type":"ui_dropdown","z":"61c1655c50bd371c","name":"","label":"command","tooltip":"","place":"Select option","group":"142ad6ae.d55e29","order":5,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"","value":"load_sequence","type":"str"},{"label":"","value":"reset_mux","type":"str"},{"label":"","value":"set_sequence","type":"str"},{"label":"","value":"update_settings","type":"str"}],"payload":"","topic":"command","topicType":"str","className":"","x":140,"y":480,"wires":[["182249692ee7502c"]]},{"id":"edbd2d507fbf085a","type":"ui_text_input","z":"61c1655c50bd371c","name":"","label":"kwargs","tooltip":"","group":"142ad6ae.d55e29","order":5,"width":0,"height":0,"passthru":false,"mode":"text","delay":"0","topic":"kwargs","sendOnBlur":true,"className":"","topicType":"str","x":140,"y":600,"wires":[["679471976db01c0e"]]},{"id":"679471976db01c0e","type":"json","z":"61c1655c50bd371c","name":"","property":"payload","action":"","pretty":false,"x":290,"y":600,"wires":[["b11654144c63d1b2"]]},{"id":"435a126aec0c424c","type":"debug","z":"61c1655c50bd371c","name":"debug 5","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":640,"y":480,"wires":[]},{"id":"45c95568bb348470","type":"join","z":"61c1655c50bd371c","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":650,"y":540,"wires":[["41122cfe96dd471a","e2c109f78f9e714c"]]},{"id":"41122cfe96dd471a","type":"ui_text","z":"61c1655c50bd371c","group":"142ad6ae.d55e29","order":6,"width":"2","height":"3","name":"","label":"Command to send","format":"{{msg.payload}}","layout":"row-spread","className":"","x":870,"y":600,"wires":[]},{"id":"182249692ee7502c","type":"function","z":"61c1655c50bd371c","name":"set cmd","func":"var newMsg = { payload: {\"cmd\": msg.payload }};\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":300,"y":480,"wires":[["435a126aec0c424c","45c95568bb348470"]]},{"id":"1549f01b20537e60","type":"ui_button","z":"61c1655c50bd371c","name":"","group":"142ad6ae.d55e29","order":7,"width":0,"height":0,"passthru":false,"label":"Send command","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":160,"y":700,"wires":[["c81857e22b65ef26","ae78c7b9e5aaeede"]]},{"id":"d4f6486f114c987d","type":"change","z":"61c1655c50bd371c","name":"","rules":[{"t":"set","p":"complete","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":700,"wires":[["45c95568bb348470"]]},{"id":"b11654144c63d1b2","type":"function","z":"61c1655c50bd371c","name":"set kwargs","func":"var newMsg = { payload: {\"kwargs\": msg.payload }};\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":450,"y":600,"wires":[["45c95568bb348470"]]},{"id":"c81857e22b65ef26","type":"uuid","z":"61c1655c50bd371c","uuidVersion":"v1","namespaceType":"","namespace":"","namespaceCustom":"","name":"","field":"payload","fieldType":"msg","x":310,"y":660,"wires":[["1f97edbce5f88461"]]},{"id":"ae78c7b9e5aaeede","type":"delay","z":"61c1655c50bd371c","name":"","pauseType":"delay","timeout":"250","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":390,"y":700,"wires":[["d4f6486f114c987d"]]},{"id":"1f97edbce5f88461","type":"function","z":"61c1655c50bd371c","name":"set cmd_id","func":"var newMsg = { payload: {\"cmd_id\": msg.payload }};\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":490,"y":660,"wires":[["45c95568bb348470"]]},{"id":"6ae7e77e.04c64","type":"mqtt-broker","name":"ohmpi_mqtt_broker","broker":"mg3d-dev.umons.ac.be","port":"1883","clientid":"","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"142ad6ae.d55e29","type":"ui_group","name":"Commands","tab":"5d888f29.07334","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"64a75353.37700c","type":"ui_group","name":"Messages","tab":"5d888f29.07334","order":2,"disp":true,"width":"16","collapse":true},{"id":"5d888f29.07334","type":"ui_tab","name":"Simple OhmPi controller","icon":"dashboard","disabled":false,"hidden":false}] \ No newline at end of file +[ + { + "id": "b19c51e9d4d25a33", + "type": "tab", + "label": "Flow 1", + "disabled": false, + "info": "" + }, + { + "id": "0f23781293c4b819", + "type": "mqtt in", + "z": "b19c51e9d4d25a33", + "name": "", + "topic": "ohmpi_0001/exec", + "qos": "2", + "datatype": "auto-detect", + "broker": "6ae7e77e.04c64", + "nl": false, + "rap": false, + "inputs": 0, + "x": 390, + "y": 40, + "wires": [ + [ + "f4b6096e60252b62" + ] + ] + }, + { + "id": "36ba500fac1d0f38", + "type": "mqtt in", + "z": "b19c51e9d4d25a33", + "name": "", + "topic": "ohmpi_0001/data", + "qos": "2", + "datatype": "auto", + "broker": "6ae7e77e.04c64", + "nl": false, + "rap": false, + "inputs": 0, + "x": 380, + "y": 140, + "wires": [ + [ + "f6075b441607acc4", + "9465b94aca687c9f", + "f655ae35cc8d0036" + ] + ] + }, + { + "id": "16b2937ad25f25d2", + "type": "mqtt out", + "z": "b19c51e9d4d25a33", + "name": "MQTT ctrl", + "topic": "ohmpi_0001/ctrl", + "qos": "2", + "retain": "false", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "6ae7e77e.04c64", + "x": 820, + "y": 340, + "wires": [] + }, + { + "id": "c7c725c7f947f5a8", + "type": "mqtt in", + "z": "b19c51e9d4d25a33", + "name": "", + "topic": "ohmpi_0001/soh", + "qos": "2", + "datatype": "auto", + "broker": "6ae7e77e.04c64", + "nl": false, + "rap": false, + "inputs": 0, + "x": 380, + "y": 240, + "wires": [ + [ + "6d9397b8b510b4b8" + ] + ] + }, + { + "id": "06e401792488500e", + "type": "ui_button", + "z": "b19c51e9d4d25a33", + "name": "Run sequence", + "group": "142ad6ae.d55e29", + "order": 1, + "width": "1", + "height": "1", + "passthru": false, + "label": "⏺", + "tooltip": "run sequence", + "color": "red", + "bgcolor": "lightgrey", + "className": "", + "icon": "", + "payload": "{\"cmd_id\" :\"0\", \"cmd\":\"run_sequence_async\"}", + "payloadType": "str", + "topic": "topic", + "topicType": "msg", + "x": 380, + "y": 340, + "wires": [ + [ + "16b2937ad25f25d2" + ] + ] + }, + { + "id": "c427102c051828b6", + "type": "ui_button", + "z": "b19c51e9d4d25a33", + "name": "Interrupt", + "group": "142ad6ae.d55e29", + "order": 2, + "width": "1", + "height": "1", + "passthru": false, + "label": " ◾", + "tooltip": "interrupt sequence", + "color": "black", + "bgcolor": "lightgrey", + "className": "", + "icon": "", + "payload": "{\"cmd_id\" :\"0\", \"cmd\":\"interrupt\"}", + "payloadType": "str", + "topic": "topic", + "topicType": "msg", + "x": 360, + "y": 400, + "wires": [ + [ + "16b2937ad25f25d2" + ] + ] + }, + { + "id": "f4b6096e60252b62", + "type": "ui_text", + "z": "b19c51e9d4d25a33", + "group": "b0990b3c5ff3c09a", + "order": 2, + "width": "16", + "height": "3", + "name": "MQTT exec", + "label": "Execution", + "format": "{{msg.payload}}", + "layout": "row-spread", + "className": "", + "x": 830, + "y": 40, + "wires": [] + }, + { + "id": "f6075b441607acc4", + "type": "ui_text", + "z": "b19c51e9d4d25a33", + "group": "b0990b3c5ff3c09a", + "order": 3, + "width": "16", + "height": "3", + "name": "MQTT Data", + "label": "Data", + "format": "{{msg.payload}}", + "layout": "row-spread", + "className": "", + "x": 830, + "y": 140, + "wires": [] + }, + { + "id": "6d9397b8b510b4b8", + "type": "ui_text", + "z": "b19c51e9d4d25a33", + "group": "b0990b3c5ff3c09a", + "order": 4, + "width": 0, + "height": 0, + "name": "MQTT SOH", + "label": "SOH", + "format": "{{msg.payload}}", + "layout": "row-spread", + "className": "", + "x": 830, + "y": 240, + "wires": [] + }, + { + "id": "455f7fa404a19428", + "type": "ui_button", + "z": "b19c51e9d4d25a33", + "name": "", + "group": "b0990b3c5ff3c09a", + "order": 1, + "width": 0, + "height": 0, + "passthru": false, + "label": "clear messages", + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "payload": " ", + "payloadType": "str", + "topic": "topic", + "topicType": "msg", + "x": 580, + "y": 160, + "wires": [ + [ + "6d9397b8b510b4b8", + "f6075b441607acc4", + "f4b6096e60252b62" + ] + ] + }, + { + "id": "de9e803de4d28986", + "type": "ui_dropdown", + "z": "b19c51e9d4d25a33", + "name": "", + "label": "command", + "tooltip": "", + "place": "Select option", + "group": "142ad6ae.d55e29", + "order": 5, + "width": 0, + "height": 0, + "passthru": true, + "multiple": false, + "options": [ + { + "label": "", + "value": "load_sequence", + "type": "str" + }, + { + "label": "", + "value": "reset_mux", + "type": "str" + }, + { + "label": "", + "value": "set_sequence", + "type": "str" + }, + { + "label": "", + "value": "update_settings", + "type": "str" + } + ], + "payload": "", + "topic": "command", + "topicType": "str", + "className": "", + "x": 120, + "y": 700, + "wires": [ + [ + "68222c7c6633d3fb" + ] + ] + }, + { + "id": "17f76c1517cb0285", + "type": "ui_text_input", + "z": "b19c51e9d4d25a33", + "name": "", + "label": "kwargs", + "tooltip": "", + "group": "142ad6ae.d55e29", + "order": 5, + "width": 0, + "height": 0, + "passthru": true, + "mode": "text", + "delay": "250", + "topic": "kwargs", + "sendOnBlur": false, + "className": "", + "topicType": "str", + "x": 119, + "y": 777, + "wires": [ + [ + "c25811ae6ee89f2d" + ] + ] + }, + { + "id": "c25811ae6ee89f2d", + "type": "json", + "z": "b19c51e9d4d25a33", + "name": "", + "property": "payload", + "action": "", + "pretty": false, + "x": 269, + "y": 777, + "wires": [ + [ + "071930f0cabf3d94" + ] + ] + }, + { + "id": "d84418dc2b7c5e26", + "type": "debug", + "z": "b19c51e9d4d25a33", + "name": "debug 5", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 1140, + "y": 460, + "wires": [] + }, + { + "id": "91523713d9d4918e", + "type": "join", + "z": "b19c51e9d4d25a33", + "name": "", + "mode": "custom", + "build": "merged", + "property": "payload", + "propertyType": "msg", + "key": "topic", + "joiner": "\\n", + "joinerType": "str", + "accumulate": true, + "timeout": "", + "count": "3", + "reduceRight": false, + "reduceExp": "", + "reduceInit": "", + "reduceInitType": "", + "reduceFixup": "", + "x": 710, + "y": 480, + "wires": [ + [ + "0566358048ec3fdb", + "16b2937ad25f25d2", + "d84418dc2b7c5e26" + ] + ] + }, + { + "id": "0566358048ec3fdb", + "type": "ui_text", + "z": "b19c51e9d4d25a33", + "group": "142ad6ae.d55e29", + "order": 6, + "width": "2", + "height": "3", + "name": "", + "label": "Command to send", + "format": "{{msg.payload}}", + "layout": "row-spread", + "className": "", + "x": 850, + "y": 580, + "wires": [] + }, + { + "id": "68222c7c6633d3fb", + "type": "function", + "z": "b19c51e9d4d25a33", + "name": "set cmd", + "func": "var newMsg = { payload: {\"cmd\": msg.payload }};\nglobal.set(\"command_tmp\",newMsg)\nreturn global.get(\"command_tmp\");", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 280, + "y": 700, + "wires": [ + [] + ] + }, + { + "id": "2d858a81f7e7f2b3", + "type": "ui_button", + "z": "b19c51e9d4d25a33", + "name": "", + "group": "142ad6ae.d55e29", + "order": 7, + "width": 0, + "height": 0, + "passthru": false, + "label": "Send command", + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "payload": "", + "payloadType": "str", + "topic": "topic", + "topicType": "msg", + "x": 140, + "y": 580, + "wires": [ + [ + "731085dbdb634028", + "d6ed89221d8bd997", + "0af4c77ea5f4fdf3", + "6e58cc6bf0e75a67" + ] + ] + }, + { + "id": "8571a140d714f9f3", + "type": "change", + "z": "b19c51e9d4d25a33", + "name": "", + "rules": [ + { + "t": "set", + "p": "complete", + "pt": "msg", + "to": "true", + "tot": "bool" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 570, + "y": 580, + "wires": [ + [ + "91523713d9d4918e" + ] + ] + }, + { + "id": "071930f0cabf3d94", + "type": "function", + "z": "b19c51e9d4d25a33", + "name": "set kwargs", + "func": "var newMsg = { payload: {\"kwargs\": msg.payload }};\nglobal.set(\"kwargs_tmp\", newMsg)\nreturn global.get(\"kwargs_tmp\");", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 429, + "y": 777, + "wires": [ + [] + ] + }, + { + "id": "d6ed89221d8bd997", + "type": "delay", + "z": "b19c51e9d4d25a33", + "name": "", + "pauseType": "delay", + "timeout": "250", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 370, + "y": 580, + "wires": [ + [ + "8571a140d714f9f3" + ] + ] + }, + { + "id": "e25b5009b71765aa", + "type": "function", + "z": "b19c51e9d4d25a33", + "name": "set cmd_id", + "func": "var newMsg = { payload: {\"cmd_id\": msg.payload }};\nreturn newMsg;", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 470, + "y": 540, + "wires": [ + [ + "91523713d9d4918e" + ] + ] + }, + { + "id": "731085dbdb634028", + "type": "uuid", + "z": "b19c51e9d4d25a33", + "uuidVersion": "v1", + "namespaceType": "", + "namespace": "", + "namespaceCustom": "", + "name": "", + "field": "payload", + "fieldType": "msg", + "x": 290, + "y": 540, + "wires": [ + [ + "e25b5009b71765aa" + ] + ] + }, + { + "id": "63021563a27e162b", + "type": "ui_chart", + "z": "b19c51e9d4d25a33", + "name": "", + "group": "7792ecc419ecbb59", + "order": 3, + "width": "11", + "height": "7", + "label": "chart", + "chartType": "line", + "legend": "true", + "xformat": "HH:mm:ss", + "interpolate": "linear", + "nodata": "", + "dot": true, + "ymin": "", + "ymax": "", + "removeOlder": 1, + "removeOlderPoints": "", + "removeOlderUnit": "3600", + "cutout": 0, + "useOneColor": false, + "useUTC": false, + "colors": [ + "#1f77b4", + "#aec7e8", + "#ff7f0e", + "#2ca02c", + "#98df8a", + "#d62728", + "#ff9896", + "#9467bd", + "#c5b0d5" + ], + "outputs": 1, + "useDifferentColor": false, + "className": "", + "x": 1130, + "y": 180, + "wires": [ + [] + ] + }, + { + "id": "f655ae35cc8d0036", + "type": "function", + "z": "b19c51e9d4d25a33", + "name": "function 3", + "func": "var msg2 = { payload: JSON.parse(msg.payload.split(' | ')[2].slice(6,).split(`'`).join(`\"`))[\"R [ohm]\"] };\nreturn msg2;", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 980, + "y": 180, + "wires": [ + [ + "d891753fb13281c2", + "63021563a27e162b" + ] + ] + }, + { + "id": "d891753fb13281c2", + "type": "debug", + "z": "b19c51e9d4d25a33", + "name": "debug 6", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 1140, + "y": 240, + "wires": [] + }, + { + "id": "8b35e61a7f7a37f8", + "type": "ui_gauge", + "z": "b19c51e9d4d25a33", + "name": "", + "group": "7792ecc419ecbb59", + "order": 4, + "width": 0, + "height": 0, + "gtype": "gage", + "title": "Measured Resistances", + "label": "R [Ohm]", + "format": "{{value}}", + "min": 0, + "max": "50", + "colors": [ + "#00b500", + "#e6e600", + "#ca3838" + ], + "seg1": "", + "seg2": "", + "className": "", + "x": 1180, + "y": 100, + "wires": [] + }, + { + "id": "9465b94aca687c9f", + "type": "function", + "z": "b19c51e9d4d25a33", + "name": "function 4", + "func": "var msg2 = { payload: JSON.parse(msg.payload.split(' | ')[2].slice(6,).split(`'`).join(`\"`))[\"R [ohm]\"] };\nreturn msg2;", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 980, + "y": 100, + "wires": [ + [ + "8b35e61a7f7a37f8", + "763ea2c282b8b81a" + ] + ] + }, + { + "id": "763ea2c282b8b81a", + "type": "debug", + "z": "b19c51e9d4d25a33", + "name": "debug 7", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 1160, + "y": 40, + "wires": [] + }, + { + "id": "0af4c77ea5f4fdf3", + "type": "function", + "z": "b19c51e9d4d25a33", + "name": "set cmd", + "func": "return global.get(\"command_tmp\");", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 460, + "y": 620, + "wires": [ + [ + "91523713d9d4918e" + ] + ] + }, + { + "id": "6e58cc6bf0e75a67", + "type": "function", + "z": "b19c51e9d4d25a33", + "name": "set kwargs", + "func": "return global.get(\"kwargs_tmp\");", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 470, + "y": 660, + "wires": [ + [ + "91523713d9d4918e" + ] + ] + }, + { + "id": "6ae7e77e.04c64", + "type": "mqtt-broker", + "name": "ohmpi_local_broker", + "broker": "127.0.0.1", + "port": "1883", + "clientid": "", + "autoConnect": true, + "usetls": false, + "compatmode": false, + "protocolVersion": "4", + "keepalive": "60", + "cleansession": true, + "birthTopic": "", + "birthQos": "0", + "birthPayload": "", + "birthMsg": {}, + "closeTopic": "", + "closeQos": "0", + "closePayload": "", + "closeMsg": {}, + "willTopic": "", + "willQos": "0", + "willPayload": "", + "willMsg": {}, + "userProps": "", + "sessionExpiry": "" + }, + { + "id": "142ad6ae.d55e29", + "type": "ui_group", + "name": "Buttons", + "tab": "5d888f29.07334", + "order": 3, + "disp": true, + "width": "6", + "collapse": false + }, + { + "id": "b0990b3c5ff3c09a", + "type": "ui_group", + "name": "Messages", + "tab": "5d888f29.07334", + "order": 2, + "disp": true, + "width": "16", + "collapse": true + }, + { + "id": "7792ecc419ecbb59", + "type": "ui_group", + "name": "Messages", + "tab": "5d888f29.07334", + "order": 2, + "disp": true, + "width": "16", + "collapse": true, + "className": "" + }, + { + "id": "5d888f29.07334", + "type": "ui_tab", + "name": "Home", + "icon": "dashboard", + "disabled": false, + "hidden": false + } +] diff --git a/examples/example_ohmpi_flows_node-red.json b/examples/example_ohmpi_flows_node-red.json deleted file mode 100644 index 3ee6c3d2dc504204697ba64857d465f67f6f044a..0000000000000000000000000000000000000000 --- a/examples/example_ohmpi_flows_node-red.json +++ /dev/null @@ -1,557 +0,0 @@ -[ - { - "id": "6fef03d5598b4c7a", - "type": "tab", - "label": "Flow 1", - "disabled": false, - "info": "" - }, - { - "id": "77db8af51a12093d", - "type": "mqtt in", - "z": "6fef03d5598b4c7a", - "name": "", - "topic": "ohmpi_0001/exec", - "qos": "2", - "datatype": "auto", - "broker": "5a09c1ee2a3419c3", - "nl": false, - "rap": false, - "inputs": 0, - "x": 410, - "y": 500, - "wires": [ - [ - "b30d9b90bda62986", - "3f46bb85053b613c" - ] - ] - }, - { - "id": "b30d9b90bda62986", - "type": "debug", - "z": "6fef03d5598b4c7a", - "name": "", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "payload", - "targetType": "msg", - "statusVal": "", - "statusType": "auto", - "x": 850, - "y": 500, - "wires": [] - }, - { - "id": "d9745ad9da06b862", - "type": "mqtt in", - "z": "6fef03d5598b4c7a", - "name": "", - "topic": "ohmpi_0001/data", - "qos": "2", - "datatype": "auto", - "broker": "5a09c1ee2a3419c3", - "nl": false, - "rap": false, - "inputs": 0, - "x": 400, - "y": 600, - "wires": [ - [ - "c5dc2f808ccac105", - "3ef697f4f3fdc90e", - "a67154e86b9510f8", - "1bc67267d61f8ac7" - ] - ] - }, - { - "id": "c5dc2f808ccac105", - "type": "debug", - "z": "6fef03d5598b4c7a", - "name": "", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "payload", - "targetType": "msg", - "statusVal": "", - "statusType": "auto", - "x": 850, - "y": 600, - "wires": [] - }, - { - "id": "bafb34347dc3236b", - "type": "mqtt out", - "z": "6fef03d5598b4c7a", - "name": "MQTT ctrl", - "topic": "ohmpi_0001/ctrl", - "qos": "2", - "retain": "false", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "5a09c1ee2a3419c3", - "x": 840, - "y": 180, - "wires": [] - }, - { - "id": "8dc72d9df180684c", - "type": "mqtt in", - "z": "6fef03d5598b4c7a", - "name": "", - "topic": "ohmpi_0001/soh", - "qos": "2", - "datatype": "auto", - "broker": "5a09c1ee2a3419c3", - "nl": false, - "rap": false, - "inputs": 0, - "x": 400, - "y": 700, - "wires": [ - [ - "9ecd9ccb499016d2" - ] - ] - }, - { - "id": "9ecd9ccb499016d2", - "type": "debug", - "z": "6fef03d5598b4c7a", - "name": "", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "payload", - "targetType": "msg", - "statusVal": "", - "statusType": "auto", - "x": 850, - "y": 700, - "wires": [] - }, - { - "id": "78c8945000eccf7d", - "type": "ui_button", - "z": "6fef03d5598b4c7a", - "name": "", - "group": "142ad6ae.d55e29", - "order": 0, - "width": "2", - "height": "1", - "passthru": false, - "label": "Run", - "tooltip": "", - "color": "", - "bgcolor": "green", - "className": "", - "icon": "", - "payload": "{\"cmd_id\" :\"0\", \"cmd\":\"run_sequence\"}", - "payloadType": "str", - "topic": "topic", - "topicType": "msg", - "x": 370, - "y": 80, - "wires": [ - [ - "bafb34347dc3236b" - ] - ] - }, - { - "id": "819bb1f07e51b8c6", - "type": "ui_button", - "z": "6fef03d5598b4c7a", - "name": "", - "group": "142ad6ae.d55e29", - "order": 0, - "width": "2", - "height": "1", - "passthru": false, - "label": "Interrupt", - "tooltip": "", - "color": "", - "bgcolor": "red", - "className": "", - "icon": "", - "payload": "{\"cmd_id\" :\"0\", \"cmd\":\"stop\"}", - "payloadType": "str", - "topic": "topic", - "topicType": "msg", - "x": 380, - "y": 140, - "wires": [ - [ - "bafb34347dc3236b" - ] - ] - }, - { - "id": "4ec24224cfd4e4e8", - "type": "ui_form", - "z": "6fef03d5598b4c7a", - "name": "Commands", - "label": "", - "group": "142ad6ae.d55e29", - "order": 4, - "width": 0, - "height": 0, - "options": [ - { - "label": "cmd_id", - "value": "cmd_id", - "type": "text", - "required": false, - "rows": null - }, - { - "label": "cmd", - "value": "cmd", - "type": "text", - "required": true, - "rows": null - }, - { - "label": "args", - "value": "args", - "type": "text", - "required": false, - "rows": null - } - ], - "formValue": { - "cmd_id": "", - "cmd": "", - "args": "" - }, - "payload": "", - "submit": "submit", - "cancel": "cancel", - "topic": "topic", - "topicType": "msg", - "splitLayout": "", - "className": "", - "x": 390, - "y": 340, - "wires": [ - [ - "547fb5791365f6f7", - "bafb34347dc3236b" - ] - ] - }, - { - "id": "3f46bb85053b613c", - "type": "ui_text", - "z": "6fef03d5598b4c7a", - "group": "7792ecc419ecbb59", - "order": 0, - "width": "16", - "height": "12", - "name": "MQTT exec", - "label": "Execution", - "format": "{{msg.payload}}", - "layout": "row-spread", - "className": "", - "x": 850, - "y": 540, - "wires": [] - }, - { - "id": "3ef697f4f3fdc90e", - "type": "ui_text", - "z": "6fef03d5598b4c7a", - "group": "7792ecc419ecbb59", - "order": 1, - "width": "16", - "height": "12", - "name": "MQTT Data", - "label": "Data", - "format": "{{msg.payload}}", - "layout": "row-spread", - "className": "", - "x": 850, - "y": 640, - "wires": [] - }, - { - "id": "547fb5791365f6f7", - "type": "debug", - "z": "6fef03d5598b4c7a", - "name": "debug 1", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 680, - "y": 360, - "wires": [] - }, - { - "id": "c7c6c06cfd2c4646", - "type": "ui_button", - "z": "6fef03d5598b4c7a", - "name": "", - "group": "142ad6ae.d55e29", - "order": 0, - "width": "2", - "height": "1", - "passthru": false, - "label": "Set sequence", - "tooltip": "", - "color": "", - "bgcolor": "green", - "className": "", - "icon": "", - "payload": "{\"cmd_id\":\"\",\"cmd\":\"set_sequence\",\"args\": \"5 6 7 8\\n10 11 12 13\"}", - "payloadType": "str", - "topic": "topic", - "topicType": "msg", - "x": 400, - "y": 200, - "wires": [ - [ - "bafb34347dc3236b" - ] - ] - }, - { - "id": "68a3f36a08839f62", - "type": "ui_button", - "z": "6fef03d5598b4c7a", - "name": "", - "group": "142ad6ae.d55e29", - "order": 0, - "width": "2", - "height": "1", - "passthru": false, - "label": "Update settings", - "tooltip": "", - "color": "", - "bgcolor": "green", - "className": "", - "icon": "", - "payload": "{\"cmd_id\":\"\",\"cmd\":\"update_settings\",\"args\":{\"sequence\":\"5 6 7 8\\n10 11 12 13\"}}", - "payloadType": "str", - "topic": "topic", - "topicType": "msg", - "x": 400, - "y": 260, - "wires": [ - [ - "bafb34347dc3236b" - ] - ] - }, - { - "id": "b7f0b15aea29d7d2", - "type": "ui_chart", - "z": "6fef03d5598b4c7a", - "name": "", - "group": "7792ecc419ecbb59", - "order": 3, - "width": "11", - "height": "7", - "label": "chart", - "chartType": "line", - "legend": "true", - "xformat": "HH:mm:ss", - "interpolate": "linear", - "nodata": "", - "dot": true, - "ymin": "", - "ymax": "", - "removeOlder": 1, - "removeOlderPoints": "", - "removeOlderUnit": "3600", - "cutout": 0, - "useOneColor": false, - "useUTC": false, - "colors": [ - "#1f77b4", - "#aec7e8", - "#ff7f0e", - "#2ca02c", - "#98df8a", - "#d62728", - "#ff9896", - "#9467bd", - "#c5b0d5" - ], - "outputs": 1, - "useDifferentColor": false, - "className": "", - "x": 1270, - "y": 640, - "wires": [ - [] - ] - }, - { - "id": "1bc67267d61f8ac7", - "type": "function", - "z": "6fef03d5598b4c7a", - "name": "function 1", - "func": "var msg2 = { payload: JSON.parse(msg.payload.split(' | ')[2].slice(6,).split(`'`).join(`\"`))[\"R [ohm]\"] };\nreturn msg2;", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 1120, - "y": 640, - "wires": [ - [ - "249d43079fd9a894", - "b7f0b15aea29d7d2" - ] - ] - }, - { - "id": "249d43079fd9a894", - "type": "debug", - "z": "6fef03d5598b4c7a", - "name": "debug 2", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 1280, - "y": 700, - "wires": [] - }, - { - "id": "24e6dbe73ec692f9", - "type": "ui_gauge", - "z": "6fef03d5598b4c7a", - "name": "", - "group": "7792ecc419ecbb59", - "order": 4, - "width": 0, - "height": 0, - "gtype": "gage", - "title": "Measured Resistances", - "label": "R [Ohm]", - "format": "{{value}}", - "min": 0, - "max": "50", - "colors": [ - "#00b500", - "#e6e600", - "#ca3838" - ], - "seg1": "", - "seg2": "", - "className": "", - "x": 1320, - "y": 560, - "wires": [] - }, - { - "id": "a67154e86b9510f8", - "type": "function", - "z": "6fef03d5598b4c7a", - "name": "function 2", - "func": "var msg2 = { payload: JSON.parse(msg.payload.split(' | ')[2].slice(6,).split(`'`).join(`\"`))[\"R [ohm]\"] };\nreturn msg2;", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 1120, - "y": 560, - "wires": [ - [ - "24e6dbe73ec692f9", - "df445e407bbcd544" - ] - ] - }, - { - "id": "df445e407bbcd544", - "type": "debug", - "z": "6fef03d5598b4c7a", - "name": "debug 3", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 1300, - "y": 500, - "wires": [] - }, - { - "id": "5a09c1ee2a3419c3", - "type": "mqtt-broker", - "name": "ohmpi_local", - "broker": "127.0.0.1", - "port": "1880", - "clientid": "", - "autoConnect": true, - "usetls": false, - "protocolVersion": "4", - "keepalive": "60", - "cleansession": true, - "birthTopic": "", - "birthQos": "0", - "birthPayload": "", - "birthMsg": {}, - "closeTopic": "", - "closeQos": "0", - "closePayload": "", - "closeMsg": {}, - "willTopic": "", - "willQos": "0", - "willPayload": "", - "willMsg": {}, - "userProps": "", - "sessionExpiry": "" - }, - { - "id": "142ad6ae.d55e29", - "type": "ui_group", - "name": "Buttons", - "tab": "5d888f29.07334", - "order": 3, - "disp": true, - "width": "6", - "collapse": false - }, - { - "id": "7792ecc419ecbb59", - "type": "ui_group", - "name": "Messages", - "tab": "5d888f29.07334", - "order": 2, - "disp": true, - "width": "16", - "collapse": true, - "className": "" - }, - { - "id": "5d888f29.07334", - "type": "ui_tab", - "name": "Home", - "icon": "dashboard", - "disabled": false, - "hidden": false - } -] \ No newline at end of file