[ { "id": "e8d4d920.35344", "type": "tab", "label": "Main", "disabled": false, "info": "" }, { "id": "21b3da63.2cef2e", "type": "subflow", "name": "RPi Monitoring", "info": "", "category": "", "in": [], "out": [], "env": [], "color": "#87A980", "icon": "node-red/status.svg" }, { "id": "130e0533.4f1813", "type": "subflow", "name": "Acquisition actuation", "info": "", "category": "", "in": [], "out": [], "env": [], "color": "#A6BBCF", "icon": "font-awesome/fa-camera" }, { "id": "1bc3f9f9.1ee996", "type": "subflow", "name": "Acquisition inputs", "info": "", "category": "", "in": [ { "x": 40, "y": 40, "wires": [ { "id": "8887f3e7.e79b5" }, { "id": "14be4afa.2ba67d" }, { "id": "600c2b46.83db14" } ] } ], "out": [ { "x": 740, "y": 40, "wires": [ { "id": "d3caa802.6f22d8", "port": 0 }, { "id": "3a773a31.a6caee", "port": 0 }, { "id": "5d4c755a.800b44", "port": 0 } ] } ], "env": [], "color": "#A6BBCF", "icon": "node-red-contrib-camerapi/photo.png" }, { "id": "714bd4fe.163ab4", "type": "subflow", "name": "Process metadata", "info": "", "category": "", "in": [ { "x": 40, "y": 80, "wires": [ { "id": "706715a3.5ad1c4" } ] } ], "out": [ { "x": 700, "y": 80, "wires": [ { "id": "7cdadcd1.736f04", "port": 0 } ] } ], "env": [], "color": "#DDAA99" }, { "id": "bee3b478.ef4b88", "type": "subflow", "name": "MQTT Receive & Plot", "info": "# MQTT Topics follows this architecture:\n\n - actuator : This topic adresses the stepper control thread\n No publication under this topic should happen from Python\n - actuator/pump : Control of the pump\n The message is something like \"FORWARD 10 1\"\n to move 10mL forward at 1mL/min\n Receive only\n - actuator/focus : Control of the focus stage\n The message is something like \"UP 10\"\n to move up 10mm\n Receive only\n - imager/image : This topic adresses the imaging thread\n Receive only\n - status : This topics sends feedback to Node-Red\n No publication or receive at this level\n - status/pump : State of the pump\n Is one of Start, Done, Interrupted\n Publish only\n - status/focus : State of the focus stage\n Is one of Start, Done, Interrupted\n Publish only\n - status/imager : State of the imager\n Is one of Start, Completed or 12_11_15_0.1.jpg has been imaged.\n Publish only\n - status/segmentation : Status of the segmentation\n - status/segmentation/name\n - status/segmentation/object_id\n - status/segmentation/metric\n", "category": "", "in": [], "out": [], "env": [], "color": "#F3B567", "icon": "node-red/bridge.svg" }, { "id": "9c3e6ad4.7471a8", "type": "subflow", "name": "System Commands", "info": "", "category": "", "in": [], "out": [], "env": [], "color": "#FFCC66", "icon": "node-red-dashboard/ui_button.png" }, { "id": "1a447be0.198674", "type": "subflow", "name": "Object metadata", "info": "", "category": "", "in": [ { "x": 60, "y": 160, "wires": [ { "id": "5cdbcd15.17ec94" }, { "id": "c2ccc2e1.a697f8" }, { "id": "b3e8d04.7c83d3" } ] } ], "out": [ { "x": 1060, "y": 159, "wires": [ { "id": "f435f66d.26d73", "port": 0 }, { "id": "79026dc4.133a7c", "port": 0 } ] }, { "x": 1060, "y": 59, "wires": [ { "id": "9c08f843.b1e1b", "port": 0 }, { "id": "157ba5ca.c88a52", "port": 0 } ] } ], "env": [], "color": "#DDAA99" }, { "id": "758bc08f.c57318", "type": "subflow", "name": "Acquisition metadata", "info": "", "category": "", "in": [ { "x": 50, "y": 30, "wires": [ { "id": "f3658d30.b8448" }, { "id": "5acd51d4.4ab13" }, { "id": "de2c90cf.b73b08" }, { "id": "5e3dec55.881074" }, { "id": "d3ca8847.4d1ae" }, { "id": "1f133196.96564e" }, { "id": "3414b477.4d711c" }, { "id": "a52e7caf.6bde48" }, { "id": "68fa1227.dbdd5c" } ] } ], "out": [ { "x": 740, "y": 40, "wires": [ { "id": "98d1f331.a06938", "port": 0 }, { "id": "3b9700c4.b93ec", "port": 0 }, { "id": "42505cbd.f02b1c", "port": 0 }, { "id": "2f9ae002.b4c96", "port": 0 }, { "id": "c86d98d4.c56538", "port": 0 }, { "id": "13b51e1e.1f603a", "port": 0 }, { "id": "6c391d10.2f9744", "port": 0 }, { "id": "163df12e.f73f5f", "port": 0 } ] }, { "x": 900, "y": 360, "wires": [ { "id": "701120fd.c5516", "port": 0 } ] } ], "env": [], "color": "#DDAA99" }, { "id": "977131e7.c2e76", "type": "subflow", "name": "Pump actuation", "info": "", "category": "", "in": [ { "x": 40, "y": 40, "wires": [ { "id": "cc757614.c8fc58" }, { "id": "8ae06f9a.4b253" } ] } ], "out": [ { "x": 700, "y": 40, "wires": [ { "id": "b8bf2a9.be099d8", "port": 0 }, { "id": "f1b85f22.ac673", "port": 0 } ] } ], "env": [], "color": "#A6BBCF", "icon": "font-awesome/fa-recycle" }, { "id": "a0f9bde.423644", "type": "subflow", "name": "Focus actuation", "info": "", "category": "", "in": [ { "x": 40, "y": 40, "wires": [ { "id": "411211be.745ef8" } ] } ], "out": [ { "x": 1040, "y": 40, "wires": [ { "id": "b69e435f.b93558", "port": 0 }, { "id": "d9930546.489a58", "port": 0 } ] } ], "env": [], "color": "#A6BBCF", "icon": "node-red/sort.svg" }, { "id": "81483277.2521e", "type": "subflow", "name": "Sample metadata", "info": "", "category": "", "in": [ { "x": 40, "y": 40, "wires": [ { "id": "d027a6bf.7049e8" }, { "id": "45911c98.2bd83c" }, { "id": "5a811caf.0f3144" }, { "id": "1e09a4ab.72996b" }, { "id": "a3272681.f271c8" } ] } ], "out": [ { "x": 840, "y": 40, "wires": [ { "id": "adaccbb2.320458", "port": 0 }, { "id": "a63c1b66.f9a77", "port": 0 }, { "id": "67fc8b3f.96c6cc", "port": 0 }, { "id": "8cc6c6f1.65bf28", "port": 0 }, { "id": "91a896c8.7c9fb8", "port": 0 } ] } ], "env": [], "color": "#DDAA99" }, { "id": "4b508eab.dccae8", "type": "subflow", "name": "Segmentation control", "info": "", "category": "", "in": [], "out": [], "env": [], "color": "#D7D7A0", "icon": "node-red/db.svg" }, { "id": "674362b7.9b6574", "type": "subflow", "name": "Camera settings", "info": "", "category": "", "in": [], "out": [], "env": [], "color": "#3FADB5", "icon": "font-awesome/fa-camera" }, { "id": "d95291dc.83b0b8", "type": "subflow", "name": "Python Startup", "info": "", "category": "", "in": [ { "x": 160, "y": 40, "wires": [ { "id": "afa9f4b.2e77988" }, { "id": "35ea3cf0.a398ac" }, { "id": "a776b9fc.d542e8" } ] } ], "out": [], "env": [], "color": "#DDAA99" }, { "id": "779606c9.19d2b8", "type": "ui_group", "z": "", "name": "Monitor RPi", "tab": "a3de84cd.c01b6", "order": 13, "disp": true, "width": "24", "collapse": false }, { "id": "75a5ce1f.728d", "type": "ui_group", "z": "", "name": "Acquisition actuation", "tab": "d10d9d99.00f4b8", "order": 11, "disp": true, "width": 24, "collapse": false }, { "id": "758f41b8.1680c8", "type": "ui_group", "z": "", "name": "Acquisition inputs", "tab": "d10d9d99.00f4b8", "order": 10, "disp": true, "width": "24", "collapse": false }, { "id": "eef6f881.7b3b38", "type": "ui_group", "z": "", "name": "Process metadata", "tab": "d10d9d99.00f4b8", "order": 9, "disp": true, "width": 24, "collapse": false }, { "id": "6d1af0ab.7b4a18", "type": "ui_group", "z": "", "name": "MQTT Plots", "tab": "d10d9d99.00f4b8", "order": 14, "disp": true, "width": "24", "collapse": false }, { "id": "ab1d06d6.bf9898", "type": "ui_group", "z": "", "name": "Object metadata", "tab": "d10d9d99.00f4b8", "order": 2, "disp": true, "width": "24", "collapse": true }, { "id": "4361c3b6.e2b7a4", "type": "ui_group", "z": "", "name": "Acquisition metadata", "tab": "d10d9d99.00f4b8", "order": 3, "disp": true, "width": "24", "collapse": true }, { "id": "34f03c4a.abdf94", "type": "ui_group", "z": "", "name": "Pump actuation", "tab": "d10d9d99.00f4b8", "order": 8, "disp": true, "width": "24", "collapse": false }, { "id": "de7c8e82.7faa98", "type": "ui_group", "z": "", "name": "Focus actuation", "tab": "d10d9d99.00f4b8", "order": 7, "disp": true, "width": "24", "collapse": false }, { "id": "8dc3722c.06efa8", "type": "mqtt-broker", "z": "", "name": "", "broker": "0.0.0.0", "port": "1883", "clientid": "Client_node", "usetls": false, "compatmode": false, "keepalive": "60", "cleansession": true, "birthTopic": "", "birthQos": "0", "birthPayload": "", "closeTopic": "", "closeQos": "0", "closePayload": "", "willTopic": "", "willQos": "0", "willPayload": "" }, { "id": "71c63dd4.311c44", "type": "ui_group", "z": "", "name": "Sample Metadata", "tab": "d10d9d99.00f4b8", "order": 1, "disp": true, "width": "24", "collapse": true }, { "id": "d10d9d99.00f4b8", "type": "ui_tab", "z": "", "name": "Acquisition", "icon": "fa-eyedropper", "order": 1, "disabled": false, "hidden": false }, { "id": "59434d8d.70ed94", "type": "ui_group", "z": "", "name": "Streaming camera", "tab": "d10d9d99.00f4b8", "order": 5, "disp": true, "width": "24", "collapse": false }, { "id": "9b06d49f.aa144", "type": "ui_base", "theme": { "name": "theme-dark", "lightTheme": { "default": "#0094CE", "baseColor": "#0094CE", "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif", "edited": true, "reset": false }, "darkTheme": { "default": "#097479", "baseColor": "#097479", "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif", "edited": true, "reset": false }, "customTheme": { "name": "Untitled Theme 1", "default": "#4B7930", "baseColor": "#4B7930", "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif" }, "themeState": { "base-color": { "default": "#097479", "value": "#097479", "edited": false }, "page-titlebar-backgroundColor": { "value": "#097479", "edited": false }, "page-backgroundColor": { "value": "#111111", "edited": false }, "page-sidebar-backgroundColor": { "value": "#333333", "edited": false }, "group-textColor": { "value": "#0eb8c0", "edited": false }, "group-borderColor": { "value": "#555555", "edited": false }, "group-backgroundColor": { "value": "#333333", "edited": false }, "widget-textColor": { "value": "#eeeeee", "edited": false }, "widget-backgroundColor": { "value": "#097479", "edited": false }, "widget-borderColor": { "value": "#333333", "edited": false }, "base-font": { "value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif" } }, "angularTheme": { "primary": "indigo", "accents": "blue", "warn": "red", "background": "grey" } }, "site": { "name": "PlanktoScope Dashboard", "hideToolbar": "false", "allowSwipe": "true", "lockMenu": "false", "allowTempTheme": "true", "dateFormat": "DD/MM/YYYY", "sizes": { "sx": 48, "sy": 48, "gx": 6, "gy": 6, "cx": 6, "cy": 6, "px": 0, "py": 0 } } }, { "id": "a3de84cd.c01b6", "type": "ui_tab", "z": "", "name": "Management", "icon": "dashboard", "order": 2, "disabled": false, "hidden": false }, { "id": "adcd0ef7.81a7f8", "type": "ui_group", "z": "", "name": "RPi commands", "tab": "a3de84cd.c01b6", "order": 1, "disp": true, "width": 13, "collapse": false }, { "id": "566dcd6a.03db74", "type": "ui_group", "z": "", "name": "Segmentation control", "tab": "d10d9d99.00f4b8", "order": 12, "disp": true, "width": "24", "collapse": false }, { "id": "e8b67968.dea6", "type": "ui_group", "z": "", "name": "Camera settings", "tab": "d10d9d99.00f4b8", "order": 6, "disp": true, "width": "24", "collapse": true }, { "id": "f1dc35d9.99b9f8", "type": "ui_spacer", "name": "spacer", "group": "adcd0ef7.81a7f8", "order": 2, "width": 13, "height": 1 }, { "id": "248136a7.29b74a", "type": "ui_spacer", "name": "spacer", "group": "adcd0ef7.81a7f8", "order": 4, "width": 5, "height": 1 }, { "id": "7b7849e8.363288", "type": "ui_group", "z": "1a447be0.198674", "name": "GPS", "tab": "d10d9d99.00f4b8", "order": 4, "disp": true, "width": "24", "collapse": false }, { "id": "91acd434.6205", "type": "ui_group", "z": "bee3b478.ef4b88", "name": "Status", "tab": "d10d9d99.00f4b8", "order": 13, "disp": true, "width": "24", "collapse": true }, { "id": "4e3f24b.177a7dc", "type": "ui_spacer", "name": "spacer", "group": "de7c8e82.7faa98", "order": 7, "width": 6, "height": 1 }, { "id": "4bb924fe.fc097c", "type": "ui_spacer", "name": "spacer", "group": "de7c8e82.7faa98", "order": 9, "width": 10, "height": 1 }, { "id": "98b8d88c.dc5d", "type": "exec", "z": "21b3da63.2cef2e", "command": "free -m | grep \"Mem\" | awk -F ' ' '{print $3}'", "addpay": false, "append": "", "useSpawn": "", "timer": "", "name": "Get memory used", "x": 430, "y": 100, "wires": [ [ "ddf0e242.88258", "f1a7a389.2cc528" ], [], [] ] }, { "id": "34130a77.042d46", "type": "inject", "z": "21b3da63.2cef2e", "name": "", "repeat": "1", "crontab": "", "once": false, "onceDelay": "", "topic": "", "payload": "", "payloadType": "num", "x": 210, "y": 100, "wires": [ [ "98b8d88c.dc5d" ] ] }, { "id": "ddf0e242.88258", "type": "ui_chart", "z": "21b3da63.2cef2e", "name": "Memory Load Chart", "group": "779606c9.19d2b8", "order": 8, "width": 19, "height": 4, "label": "Memory Load Chart", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "bezier", "nodata": "", "dot": true, "ymin": "", "ymax": "", "removeOlder": "20", "removeOlderPoints": "", "removeOlderUnit": "60", "cutout": 0, "useOneColor": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "useOldStyle": false, "outputs": 1, "x": 650, "y": 120, "wires": [ [] ] }, { "id": "f1a7a389.2cc528", "type": "ui_gauge", "z": "21b3da63.2cef2e", "name": "Memory Load Donut", "group": "779606c9.19d2b8", "order": 7, "width": 5, "height": 4, "gtype": "donut", "title": "Memory Load Donut", "label": "Mo", "format": "{{value}}", "min": 0, "max": "4000", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "1000", "seg2": "2000", "x": 660, "y": 80, "wires": [] }, { "id": "30fcb8f6.12fe", "type": "ui_gauge", "z": "21b3da63.2cef2e", "name": "CPU Temp Donut", "group": "779606c9.19d2b8", "order": 1, "width": 5, "height": 4, "gtype": "donut", "title": "CPU Temp Donut", "label": "C", "format": "{{value}}", "min": "35", "max": "55", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 650, "y": 160, "wires": [] }, { "id": "81105630.ed06e8", "type": "exec", "z": "21b3da63.2cef2e", "command": "vcgencmd measure_temp | tr -d \"temp=\" | tr -d \"'C\" | tr -d \"\\n\"", "addpay": false, "append": "", "useSpawn": "", "timer": "", "name": "RPi Temp.", "x": 410, "y": 180, "wires": [ [ "59fe3900.da6c8", "30fcb8f6.12fe", "d70d3e88.eaca48" ], [], [] ] }, { "id": "d70d3e88.eaca48", "type": "ui_chart", "z": "21b3da63.2cef2e", "name": "CPU Temp Chart", "group": "779606c9.19d2b8", "order": 2, "width": 19, "height": 4, "label": "CPU Temp Chart", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "removeOlder": "20", "removeOlderPoints": "200", "removeOlderUnit": "60", "cutout": 0, "useOneColor": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "useOldStyle": true, "outputs": 1, "x": 650, "y": 200, "wires": [ [] ] }, { "id": "6e383122.133d5", "type": "python3-function", "z": "21b3da63.2cef2e", "name": "fan.py", "func": "#!/usr/bin/python\nimport smbus\nimport sys\n\nstate = msg[\"payload\"]\n\nbus = smbus.SMBus(1)\n\nDEVICE_ADDRESS = 0x0d\n\nif state == \"off\":\n bus.write_byte_data(DEVICE_ADDRESS, 0x08, 0x00)\n bus.write_byte_data(DEVICE_ADDRESS, 0x08, 0x00)\nif state == \"on\":\n bus.write_byte_data(DEVICE_ADDRESS, 0x08, 0x01)\n bus.write_byte_data(DEVICE_ADDRESS, 0x08, 0x01)", "outputs": 1, "x": 1290, "y": 140, "wires": [ [] ] }, { "id": "59fe3900.da6c8", "type": "switch", "z": "21b3da63.2cef2e", "name": "", "property": "payload", "propertyType": "msg", "rules": [ { "t": "gt", "v": "45", "vt": "num" }, { "t": "lte", "v": "35", "vt": "num" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 950, "y": 140, "wires": [ [ "1d11bfc1.ad4788" ], [ "5aeccc80.5e9c54" ] ] }, { "id": "5aeccc80.5e9c54", "type": "change", "z": "21b3da63.2cef2e", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "off", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1120, "y": 160, "wires": [ [ "6e383122.133d5" ] ] }, { "id": "8338294b.8082d", "type": "inject", "z": "21b3da63.2cef2e", "name": "", "repeat": "5", "crontab": "", "once": false, "onceDelay": "", "topic": "", "payload": "", "payloadType": "date", "x": 190, "y": 260, "wires": [ [ "e7fe62ae.efb4f", "eba0a98a.e4d56", "81105630.ed06e8" ] ] }, { "id": "e7fe62ae.efb4f", "type": "exec", "z": "21b3da63.2cef2e", "command": "top -d 0.5 -b -n2 | grep \"Cpu(s)\"|tail -n 1 | awk '{print $2 + $4}' | tr -d \"\\n\"", "addpay": false, "append": "", "useSpawn": "", "timer": "", "name": "CPU Load", "x": 410, "y": 260, "wires": [ [ "aa4065d2.14a66", "a9aef217.f0aae" ], [], [] ] }, { "id": "eba0a98a.e4d56", "type": "exec", "z": "21b3da63.2cef2e", "command": "free | grep Mem | awk '{print 100*($4+$6+$7)/$2}' | awk -F \".\" '{print $1}' | tr -d \"\\n\"", "addpay": false, "append": "", "useSpawn": "", "timer": "", "name": "Free Memory", "x": 410, "y": 340, "wires": [ [ "539c69d4.618bd8", "96ceb8d7.0ed66" ], [], [] ] }, { "id": "aa4065d2.14a66", "type": "ui_gauge", "z": "21b3da63.2cef2e", "name": "CPU Load Donut", "group": "779606c9.19d2b8", "order": 5, "width": 5, "height": 4, "gtype": "donut", "title": "CPU Load Donut", "label": "CPU", "format": "{{value}}", "min": 0, "max": "100", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 650, "y": 240, "wires": [] }, { "id": "539c69d4.618bd8", "type": "ui_gauge", "z": "21b3da63.2cef2e", "name": "Free memory Donut", "group": "779606c9.19d2b8", "order": 9, "width": 5, "height": 4, "gtype": "donut", "title": "Free memory Donut", "label": "RAM", "format": "{{value}}", "min": 0, "max": "200", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 650, "y": 320, "wires": [] }, { "id": "9031b9ea.483fa8", "type": "exec", "z": "21b3da63.2cef2e", "command": "df -h | grep /dev/root | awk -F ' ' '{print $3}' | tr -d G | tr \"\\n$\" \"\\ \" | sed 's/,/./' | tr -d \" \" ", "addpay": false, "append": "", "useSpawn": "", "timer": "", "name": "Disk Usage", "x": 410, "y": 420, "wires": [ [ "32eded3f.f3b42a", "49c71440.02a25c" ], [], [] ] }, { "id": "32eded3f.f3b42a", "type": "ui_gauge", "z": "21b3da63.2cef2e", "name": "Disk Usage Donut", "group": "779606c9.19d2b8", "order": 3, "width": 5, "height": 4, "gtype": "donut", "title": "Disk Usage Donut", "label": "Go", "format": "{{value}}", "min": 0, "max": "256", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 650, "y": 400, "wires": [] }, { "id": "a9aef217.f0aae", "type": "ui_chart", "z": "21b3da63.2cef2e", "name": "CPU Load Chart", "group": "779606c9.19d2b8", "order": 6, "width": 19, "height": 4, "label": "CPU Load Chart", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "removeOlder": "20", "removeOlderPoints": "", "removeOlderUnit": "60", "cutout": 0, "useOneColor": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "useOldStyle": true, "outputs": 1, "x": 640, "y": 280, "wires": [ [] ] }, { "id": "96ceb8d7.0ed66", "type": "ui_chart", "z": "21b3da63.2cef2e", "name": "Free memory Chart", "group": "779606c9.19d2b8", "order": 10, "width": 19, "height": 4, "label": "Free memory Chart", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "removeOlder": "20", "removeOlderPoints": "", "removeOlderUnit": "60", "cutout": 0, "useOneColor": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "useOldStyle": true, "outputs": 1, "x": 650, "y": 360, "wires": [ [] ] }, { "id": "fb614565.7a2108", "type": "inject", "z": "21b3da63.2cef2e", "name": "", "repeat": "60", "crontab": "", "once": false, "onceDelay": "", "topic": "", "payload": "", "payloadType": "date", "x": 190, "y": 420, "wires": [ [ "9031b9ea.483fa8" ] ] }, { "id": "49c71440.02a25c", "type": "ui_chart", "z": "21b3da63.2cef2e", "name": "Disk Usage Chart", "group": "779606c9.19d2b8", "order": 4, "width": 19, "height": 4, "label": "Disk Usage Chart", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "removeOlder": "20", "removeOlderPoints": "", "removeOlderUnit": "60", "cutout": 0, "useOneColor": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "useOldStyle": true, "outputs": 1, "x": 650, "y": 440, "wires": [ [] ] }, { "id": "1d11bfc1.ad4788", "type": "change", "z": "21b3da63.2cef2e", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "on", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1120, "y": 120, "wires": [ [ "6e383122.133d5" ] ] }, { "id": "4b489713.ccde5", "type": "ui_button", "z": "130e0533.4f1813", "name": "", "group": "75a5ce1f.728d", "order": 1, "width": 16, "height": 1, "passthru": false, "label": "Start Acquisition", "tooltip": "", "color": "", "bgcolor": "", "icon": "", "payload": "", "payloadType": "str", "topic": "imager/image", "x": 200, "y": 100, "wires": [ [ "52ea7d01.711034", "40c12463.a1f84c" ] ] }, { "id": "c9f510c0.7d1328", "type": "function", "z": "130e0533.4f1813", "name": "image.js", "func": "state = global.get(\"state\");\nglobal.set('img_counter',0);\nglobal.set('obj_counter',0);\nif (state === null){state=\"free\"}\n\nvar sleep_before= global.get(\"custom_sleep_before\");\nvar nb_step= global.get(\"custom_nb_step\");\nvar nb_frame= global.get(\"custom_nb_frame\");\n\nif (sleep_before === undefined || sleep_before === \"\" || sleep_before === null) {\n msg.topic = \"Missing entry :\";\n msg.payload = \"Duration before the acquisition\";\n \n}else if (nb_step === undefined || nb_step === \"\" || nb_step === null) {\n msg.topic = \"Missing entry :\";\n msg.payload = \"Number of step in between two frames\";\n \n}else if (nb_frame === undefined || nb_frame === \"\" || nb_frame === null) {\n msg.topic = \"Missing entry :\";\n msg.payload = \"Number of image to save\";\n \n}else {\n msg.payload={\"action\":\"image\", \n \"sleep\":sleep_before,\n \"volume\":nb_step,\n \"nb_frame\":nb_frame,\n }\n}\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 560, "y": 100, "wires": [ [ "d6ebaa2.ea21d58" ] ], "info": "### Focusing\n##### focus.py `nb_step` `orientation`\n\n- `nb_step` : **integer** (from 1 to 100000) - number of step to perform by the stage (about 31um/step)\n- `orientation` : **string** - orientation of the focus either `up` or `down`\n\nExample:\n\n python3.7 $HOME/PlanktonScope/scripts/focus.py 650 up\n" }, { "id": "d6ebaa2.ea21d58", "type": "switch", "z": "130e0533.4f1813", "name": "", "property": "topic", "propertyType": "msg", "rules": [ { "t": "eq", "v": "imager/image", "vt": "str" }, { "t": "eq", "v": "Missing entry :", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 710, "y": 100, "wires": [ [ "c3e50240.82aa58" ], [ "20e0a8c8.edbeb" ] ] }, { "id": "20e0a8c8.edbeb", "type": "ui_toast", "z": "130e0533.4f1813", "position": "dialog", "displayTime": "3", "highlight": "", "sendall": true, "outputs": 1, "ok": "OK", "cancel": "", "raw": false, "topic": "", "name": "", "x": 870, "y": 140, "wires": [ [] ] }, { "id": "c3e50240.82aa58", "type": "mqtt out", "z": "130e0533.4f1813", "name": "", "topic": "", "qos": "", "retain": "", "broker": "8dc3722c.06efa8", "x": 850, "y": 60, "wires": [] }, { "id": "3a4450b1.4459a8", "type": "ui_button", "z": "130e0533.4f1813", "name": "Stop Acquisition", "group": "75a5ce1f.728d", "order": 2, "width": 8, "height": 1, "passthru": true, "label": "STOP ACQUISITION", "tooltip": "", "color": "", "bgcolor": "#AD1625", "icon": "", "payload": "{\"action\":\"stop\"}", "payloadType": "json", "topic": "imager/image", "x": 200, "y": 140, "wires": [ [ "d74210ef.edc15" ] ] }, { "id": "d74210ef.edc15", "type": "mqtt out", "z": "130e0533.4f1813", "name": "", "topic": "", "qos": "", "retain": "", "broker": "8dc3722c.06efa8", "x": 390, "y": 140, "wires": [] }, { "id": "d3caa802.6f22d8", "type": "ui_text_input", "z": "1bc3f9f9.1ee996", "name": "custom_nb_step", "label": "Volume in mL between two images", "tooltip": "TODO This should be in mm ?", "group": "758f41b8.1680c8", "order": 2, "width": 0, "height": 0, "passthru": true, "mode": "number", "delay": 300, "topic": "custom_nb_step", "x": 540, "y": 80, "wires": [ [] ] }, { "id": "5d4c755a.800b44", "type": "ui_text_input", "z": "1bc3f9f9.1ee996", "name": "custom_nb_frame", "label": "Number of images per acquisition", "tooltip": "", "group": "758f41b8.1680c8", "order": 3, "width": 0, "height": 0, "passthru": true, "mode": "number", "delay": 300, "topic": "custom_nb_frame", "x": 530, "y": 120, "wires": [ [] ] }, { "id": "8887f3e7.e79b5", "type": "function", "z": "1bc3f9f9.1ee996", "name": "get custom_nb_step", "func": "msg.payload = msg.payload.custom_nb_step;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 220, "y": 80, "wires": [ [ "d3caa802.6f22d8" ] ] }, { "id": "600c2b46.83db14", "type": "function", "z": "1bc3f9f9.1ee996", "name": "get custom_nb_frame", "func": "msg.payload = msg.payload.custom_nb_frame;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 220, "y": 120, "wires": [ [ "5d4c755a.800b44" ] ] }, { "id": "14be4afa.2ba67d", "type": "function", "z": "1bc3f9f9.1ee996", "name": "get custom_sleep_before", "func": "msg.payload = msg.payload.custom_sleep_before;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 230, "y": 40, "wires": [ [ "3a773a31.a6caee" ] ] }, { "id": "3a773a31.a6caee", "type": "ui_text_input", "z": "1bc3f9f9.1ee996", "name": "custom_sleep_before", "label": "Duration before the acquisition (s)", "tooltip": "", "group": "758f41b8.1680c8", "order": 1, "width": 0, "height": 0, "passthru": true, "mode": "number", "delay": 300, "topic": "custom_sleep_before", "x": 520, "y": 40, "wires": [ [] ] }, { "id": "7cdadcd1.736f04", "type": "ui_text_input", "z": "714bd4fe.163ab4", "name": "process_id", "label": "Id of the process", "tooltip": "", "group": "eef6f881.7b3b38", "order": 1, "width": 0, "height": 0, "passthru": true, "mode": "number", "delay": 300, "topic": "process_id", "x": 550, "y": 80, "wires": [ [] ] }, { "id": "706715a3.5ad1c4", "type": "function", "z": "714bd4fe.163ab4", "name": "get process_id", "func": "msg.payload = msg.payload.process_id+1;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 200, "y": 80, "wires": [ [ "7cdadcd1.736f04" ] ] }, { "id": "8cb80d95.13d2e8", "type": "mqtt in", "z": "bee3b478.ef4b88", "name": "", "topic": "status/#", "qos": "0", "datatype": "json", "broker": "8dc3722c.06efa8", "x": 70, "y": 300, "wires": [ [ "2aa5b118.d75f2e", "f6fd015e.5c1fe" ] ] }, { "id": "ecedbda4.fed15", "type": "switch", "z": "bee3b478.ef4b88", "name": "topic filter", "property": "topic", "propertyType": "msg", "rules": [ { "t": "eq", "v": "status/pump", "vt": "str" }, { "t": "eq", "v": "status/focus", "vt": "str" }, { "t": "eq", "v": "status/imager", "vt": "str" }, { "t": "cont", "v": "status/segmenter", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 4, "x": 360, "y": 300, "wires": [ [ "117aad13.53e11b", "d700c8a1.2d1f48" ], [ "117aad13.53e11b", "dc72e121.0aacd" ], [ "af9a1d81.c21fa8", "5a159d39.3bdca4" ], [ "30a9de16.d55cda", "89058790.909e7" ] ] }, { "id": "af9a1d81.c21fa8", "type": "switch", "z": "bee3b478.ef4b88", "name": "Imaging state", "property": "payload", "propertyType": "msg", "rules": [ { "t": "else" }, { "t": "jsonata_exp", "v": "$contains(msg.payload.status, \"jpg\")\t", "vt": "jsonata" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 640, "y": 340, "wires": [ [ "117aad13.53e11b" ], [ "a636cac5.e28448" ] ] }, { "id": "a636cac5.e28448", "type": "function", "z": "bee3b478.ef4b88", "name": "img_counter.js", "func": "img_counter=global.get('img_counter')\nimg_counter=img_counter+1\nglobal.set('img_counter',img_counter)\nmsg.payload = img_counter\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 900, "y": 400, "wires": [ [ "abd84e73.aefc9" ] ] }, { "id": "f71d0cda.0a4f88", "type": "function", "z": "bee3b478.ef4b88", "name": "obj_counter.js", "func": "obj_counter=global.get('obj_counter')\nobj_counter=obj_counter+1\nglobal.set('obj_counter',obj_counter)\nmsg.payload = obj_counter\nreturn msg;", "outputs": 1, "noerr": 0, "x": 900, "y": 500, "wires": [ [ "d0d14f00.e2ff88" ] ] }, { "id": "abd84e73.aefc9", "type": "ui_chart", "z": "bee3b478.ef4b88", "name": "img_counter", "group": "6d1af0ab.7b4a18", "order": 1, "width": 24, "height": 2, "label": "image counter", "chartType": "horizontalBar", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "removeOlder": 1, "removeOlderPoints": "", "removeOlderUnit": "3600", "cutout": 0, "useOneColor": false, "useUTC": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "useOldStyle": false, "outputs": 1, "x": 1370, "y": 400, "wires": [ [] ] }, { "id": "30a9de16.d55cda", "type": "switch", "z": "bee3b478.ef4b88", "name": "Segmenter", "property": "topic", "propertyType": "msg", "rules": [ { "t": "eq", "v": "status/segmenter", "vt": "str" }, { "t": "eq", "v": "status/segmenter/name", "vt": "str" }, { "t": "eq", "v": "status/segmenter/object_id", "vt": "str" }, { "t": "eq", "v": "status/segmenter/metric", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 4, "x": 630, "y": 480, "wires": [ [ "117aad13.53e11b" ], [ "c2d35803.b5024" ], [ "f71d0cda.0a4f88" ], [ "87d402c5.c02008" ] ] }, { "id": "d0d14f00.e2ff88", "type": "ui_chart", "z": "bee3b478.ef4b88", "name": "obj_counter", "group": "6d1af0ab.7b4a18", "order": 2, "width": 24, "height": 2, "label": "obj_counter", "chartType": "horizontalBar", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": false, "ymin": "", "ymax": "", "removeOlder": 1, "removeOlderPoints": "", "removeOlderUnit": "3600", "cutout": 0, "useOneColor": true, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "useOldStyle": false, "outputs": 1, "x": 1370, "y": 500, "wires": [ [] ] }, { "id": "d7944cf2.1ddb18", "type": "function", "z": "bee3b478.ef4b88", "name": "ex : area", "func": "msg.payload=msg.payload.object_area\nmsg.topic=\"area\"\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 1000, "y": 540, "wires": [ [ "6f64625f.243fd4", "f6fd015e.5c1fe" ] ] }, { "id": "87d402c5.c02008", "type": "json", "z": "bee3b478.ef4b88", "name": "", "property": "payload", "action": "", "pretty": false, "x": 870, "y": 540, "wires": [ [ "d7944cf2.1ddb18" ] ] }, { "id": "1403e1a4.528926", "type": "ui_toast", "z": "bee3b478.ef4b88", "position": "top right", "displayTime": "5", "highlight": "", "sendall": true, "outputs": 0, "ok": "OK", "cancel": "", "raw": false, "topic": "", "name": "", "x": 1390, "y": 280, "wires": [] }, { "id": "6f64625f.243fd4", "type": "ui_chart", "z": "bee3b478.ef4b88", "name": "chart area", "group": "6d1af0ab.7b4a18", "order": 3, "width": 24, "height": 7, "label": "chart area", "chartType": "line", "legend": "false", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": true, "ymin": "", "ymax": "", "removeOlder": 1, "removeOlderPoints": "1000", "removeOlderUnit": "3600", "cutout": 0, "useOneColor": false, "useUTC": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "useOldStyle": false, "outputs": 1, "x": 1370, "y": 540, "wires": [ [] ] }, { "id": "c2d35803.b5024", "type": "debug", "z": "bee3b478.ef4b88", "name": "segmentation name", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 920, "y": 460, "wires": [] }, { "id": "ce12cb65.115838", "type": "ui_button", "z": "9c3e6ad4.7471a8", "name": "", "group": "adcd0ef7.81a7f8", "order": 3, "width": 4, "height": 1, "passthru": false, "label": "Reboot", "tooltip": "", "color": "", "bgcolor": "#AD1625", "icon": "", "payload": "reboot", "payloadType": "str", "topic": "reboot", "x": 240, "y": 80, "wires": [ [ "677f762b.43c648" ] ] }, { "id": "690ed112.f50c3", "type": "exec", "z": "9c3e6ad4.7471a8", "command": "sudo", "addpay": true, "append": "now", "useSpawn": "false", "timer": "2", "oldrc": false, "name": "cmd", "x": 530, "y": 80, "wires": [ [], [], [] ] }, { "id": "4a608a65.1882ec", "type": "ui_button", "z": "9c3e6ad4.7471a8", "name": "", "group": "adcd0ef7.81a7f8", "order": 5, "width": 4, "height": 1, "passthru": false, "label": "Shutdown", "tooltip": "", "color": "", "bgcolor": "#AD1625", "icon": "", "payload": "shutdown", "payloadType": "str", "topic": "shutdown", "x": 230, "y": 160, "wires": [ [ "677f762b.43c648" ] ] }, { "id": "677f762b.43c648", "type": "python3-function", "z": "9c3e6ad4.7471a8", "name": "action", "func": "#!/usr/bin/python\nimport smbus\nimport time\nbus = smbus.SMBus(1)\ntime.sleep(1)\n#turn off fan RGB\nbus.write_byte_data(0x0d, 0x07, 0x00)\nbus.write_byte_data(0x0d, 0x07, 0x00)\n\n#msg[\"payload\"] = str(msg[\"topic\"])+' now'\nreturn msg", "outputs": 1, "x": 390, "y": 120, "wires": [ [ "50d1becd.7b5f", "690ed112.f50c3" ] ] }, { "id": "50d1becd.7b5f", "type": "exec", "z": "9c3e6ad4.7471a8", "command": "i2cdetect -y 1", "addpay": false, "append": "", "useSpawn": "false", "timer": "1", "oldrc": false, "name": "i2c update", "x": 550, "y": 160, "wires": [ [], [], [] ] }, { "id": "f435f66d.26d73", "type": "ui_numeric", "z": "1a447be0.198674", "name": "object_depth_min", "label": "Minimum depth (m)", "tooltip": "", "group": "ab1d06d6.bf9898", "order": 3, "width": 0, "height": 0, "wrap": false, "passthru": true, "topic": "object_depth_min", "format": "{{value}}", "min": "0", "max": "2000", "step": "1", "x": 610, "y": 120, "wires": [ [] ] }, { "id": "79026dc4.133a7c", "type": "ui_numeric", "z": "1a447be0.198674", "name": "object_depth_max", "label": "Maximum depth (m)", "tooltip": "", "group": "ab1d06d6.bf9898", "order": 2, "width": 0, "height": 0, "wrap": false, "passthru": true, "topic": "object_depth_max", "format": "{{value}}", "min": "0", "max": "2000", "step": "1", "x": 610, "y": 160, "wires": [ [] ] }, { "id": "5cdbcd15.17ec94", "type": "function", "z": "1a447be0.198674", "name": "get object_depth_min", "func": "msg.payload = msg.payload.object_depth_min;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 360, "y": 120, "wires": [ [ "f435f66d.26d73" ] ] }, { "id": "c2ccc2e1.a697f8", "type": "function", "z": "1a447be0.198674", "name": "get object_depth_max", "func": "msg.payload = msg.payload.object_depth_max;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 360, "y": 160, "wires": [ [ "79026dc4.133a7c" ] ] }, { "id": "cb77803f.357f88", "type": "gpsd", "z": "1a447be0.198674", "name": "", "hostname": "localhost", "port": "2947", "tpv": true, "sky": false, "info": false, "device": false, "gst": false, "att": false, "x": 90, "y": 220, "wires": [ [ "b3e8d04.7c83d3", "3f718ceb.5e9f34", "74554b33.14ab6c" ] ] }, { "id": "f7ae988c.184598", "type": "ui_worldmap", "z": "1a447be0.198674", "d": true, "group": "7b7849e8.363288", "order": 1, "width": 0, "height": 0, "name": "", "lat": "", "lon": "", "zoom": "7", "layer": "Nat Geo", "cluster": "1", "maxage": "", "usermenu": "hide", "layers": "hide", "panit": "false", "panlock": "false", "zoomlock": "false", "hiderightclick": "true", "coords": "deg", "showgrid": "false", "path": "/worldmap", "x": 640, "y": 200, "wires": [] }, { "id": "b3e8d04.7c83d3", "type": "function", "z": "1a447be0.198674", "name": "get object_lat & object_lon", "func": "error = Math.sqrt(msg.payload.epx**2+msg.payload.epy**2)\n\nmsg.payload = {\n \"name\":\"sailboat\",\n \"lat\":msg.payload.lat,\n \"lon\":msg.payload.lon,\n \"speed\":msg.payload.speed,\n \"bearing\":msg.payload.track,\n \"icon\":\"ship\",\n \"accuracy\":error,\n \"command\": { \"lat\":msg.payload.lat, \"lon\":msg.payload.lon,\n grid : {showgrid: true,\n opt: { showLabel:true, dashArray:[5, 5], fontColor:\"#900\" }\n }\n }\n};\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 350, "y": 200, "wires": [ [ "f7ae988c.184598" ] ] }, { "id": "9c08f843.b1e1b", "type": "function", "z": "1a447be0.198674", "name": "set object_time", "func": "var time = new Date(msg.payload);\n\nvar hour = time.getUTCHours();\nif (hour<10){hour = \"0\"+hour;}\nvar minute = time.getUTCMinutes();\nif (minute<10){minute = \"0\"+minute;}\n\nvar time_UTC = \"\"+hour+minute;\nglobal.set('object_time',time_UTC);\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 620, "y": 80, "wires": [ [] ] }, { "id": "157ba5ca.c88a52", "type": "function", "z": "1a447be0.198674", "name": "set object_date", "func": "var date = new Date(msg.payload);\n\nvar year = date.getUTCFullYear();\nvar month = date.getUTCMonth()+1;\nif (month<10){month = \"0\"+month;}\nvar day = date.getUTCDate();\nif (day<10){day = \"0\"+day;}\n\nvar date_UTC = \"\"+year+month+day;\nglobal.set('object_date',date_UTC);\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 620, "y": 40, "wires": [ [] ] }, { "id": "701120fd.c5516", "type": "function", "z": "758bc08f.c57318", "name": "set optical config", "func": "global.set(msg.topic,msg.payload);\nvar acq_fnumber_objective = String(global.get(msg.topic));\n\nswitch(acq_fnumber_objective) {\n case \"25\":\n global.set(\"acq_magnification\",0.6);\n global.set(\"process_pixel\",1.86);\n global.set(\"sug_min\",60);\n global.set(\"sug_max\",670);\n global.set(\"sug_flowrate\",3);\n break;\n case \"16\":\n global.set(\"acq_magnification\",0.94);\n global.set(\"process_pixel\",1.19);\n global.set(\"sug_min\",40);\n global.set(\"sug_max\",430);\n global.set(\"sug_flowrate\",2.4);\n break;\n case \"12\":\n global.set(\"acq_magnification\",1.20);\n global.set(\"process_pixel\",0.94);\n global.set(\"sug_min\",30);\n global.set(\"sug_max\",340);\n global.set(\"sug_flowrate\",1.25);\n break;\n case \"8\":\n global.set(\"acq_magnification\",1.78);\n global.set(\"process_pixel\",0.63);\n global.set(\"sug_min\",20);\n global.set(\"sug_max\",230);\n global.set(\"sug_flowrate\",0.42);\n break;\n case \"6\":\n global.set(\"acq_magnification\",2.36);\n global.set(\"process_pixel\",0.48);\n global.set(\"sug_min\",15);\n global.set(\"sug_max\",170);\n global.set(\"sug_flowrate\",0.32);\n break;\n}\nreturn msg;", "outputs": 1, "noerr": 0, "x": 750, "y": 360, "wires": [ [] ] }, { "id": "2554ff8e.8cf1a8", "type": "ui_dropdown", "z": "758bc08f.c57318", "name": "acq_fnumber_objective", "label": "M12 Lens*", "tooltip": "", "place": "Select option", "group": "4361c3b6.e2b7a4", "order": 3, "width": 0, "height": 0, "passthru": true, "options": [ { "label": "f 25mm 1/2\" 5MP IR", "value": 25, "type": "num" }, { "label": "f 16mm 1/2.5\" 5MP IR", "value": 16, "type": "num" }, { "label": "f 12mm 1/2.5\" 5MP IR", "value": 12, "type": "num" }, { "label": "f 8mm 1/2.5\" 5MP IR", "value": 8, "type": "num" }, { "label": "f 6mm 1/2.5\" 5MP IR", "value": 6, "type": "num" } ], "payload": "", "topic": "acq_fnumber_objective", "x": 526, "y": 360, "wires": [ [ "701120fd.c5516" ] ] }, { "id": "2f9ae002.b4c96", "type": "ui_numeric", "z": "758bc08f.c57318", "name": "acq_minimum_mesh", "label": "Min fraction size (μm)", "tooltip": "", "group": "4361c3b6.e2b7a4", "order": 8, "width": 0, "height": 0, "wrap": false, "passthru": true, "topic": "acq_minimum_mesh", "format": "{{value}}", "min": 0, "max": "300", "step": "10", "x": 536, "y": 160, "wires": [ [] ] }, { "id": "c86d98d4.c56538", "type": "ui_numeric", "z": "758bc08f.c57318", "name": "acq_maximum_mesh", "label": "Max fraction size (μm)", "tooltip": "", "group": "4361c3b6.e2b7a4", "order": 4, "width": 0, "height": 0, "wrap": false, "passthru": true, "topic": "acq_maximum_mesh", "format": "{{value}}", "min": "200", "max": "2000", "step": "100", "x": 536, "y": 200, "wires": [ [] ] }, { "id": "98d1f331.a06938", "type": "ui_text_input", "z": "758bc08f.c57318", "name": "acq_id", "label": "Acquisition unique ID*", "tooltip": "", "group": "4361c3b6.e2b7a4", "order": 1, "width": 0, "height": 0, "passthru": true, "mode": "number", "delay": 300, "topic": "acq_id", "x": 586, "y": 40, "wires": [ [] ] }, { "id": "42505cbd.f02b1c", "type": "ui_dropdown", "z": "758bc08f.c57318", "name": "acq_celltype", "label": "Thickness flowcell*", "tooltip": "", "place": "Select option", "group": "4361c3b6.e2b7a4", "order": 7, "width": 0, "height": 0, "passthru": true, "options": [ { "label": "200 μm µ-Slide I Luer", "value": 200, "type": "num" }, { "label": "400 μm µ-Slide I Luer", "value": 400, "type": "num" }, { "label": "600 μm µ-Slide I Luer", "value": 600, "type": "num" }, { "label": "800 μm µ-Slide I Luer", "value": 800, "type": "num" } ], "payload": "", "topic": "acq_celltype", "x": 566, "y": 120, "wires": [ [] ] }, { "id": "13b51e1e.1f603a", "type": "ui_text_input", "z": "758bc08f.c57318", "name": "acq_volume", "label": "Volume to pass (ml)", "tooltip": "", "group": "4361c3b6.e2b7a4", "order": 2, "width": 0, "height": 0, "passthru": true, "mode": "number", "delay": 300, "topic": "acq_volume", "x": 566, "y": 240, "wires": [ [] ] }, { "id": "3b9700c4.b93ec", "type": "ui_text_input", "z": "758bc08f.c57318", "name": "acq_instrument", "label": "Acquisition instrument", "tooltip": "PlanktonScope V2.1", "group": "4361c3b6.e2b7a4", "order": 6, "width": 0, "height": 0, "passthru": true, "mode": "text", "delay": 300, "topic": "acq_instrument", "x": 556, "y": 80, "wires": [ [] ] }, { "id": "f3658d30.b8448", "type": "function", "z": "758bc08f.c57318", "name": "get acq_id", "func": "msg.payload = msg.payload.acq_id+1;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 210, "y": 40, "wires": [ [ "98d1f331.a06938" ] ] }, { "id": "5acd51d4.4ab13", "type": "function", "z": "758bc08f.c57318", "name": "get acq_instrument", "func": "msg.payload = msg.payload.acq_instrument;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 230, "y": 80, "wires": [ [ "3b9700c4.b93ec" ] ] }, { "id": "de2c90cf.b73b08", "type": "function", "z": "758bc08f.c57318", "name": "get acq_celltype", "func": "msg.payload = msg.payload.acq_celltype;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 220, "y": 120, "wires": [ [ "42505cbd.f02b1c" ] ] }, { "id": "5e3dec55.881074", "type": "function", "z": "758bc08f.c57318", "name": "get acq_minimum_mesh", "func": "msg.payload = msg.payload.acq_minimum_mesh;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 250, "y": 160, "wires": [ [ "2f9ae002.b4c96" ] ] }, { "id": "d3ca8847.4d1ae", "type": "function", "z": "758bc08f.c57318", "name": "get acq_maximum_mesh", "func": "msg.payload = msg.payload.acq_maximum_mesh;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 250, "y": 200, "wires": [ [ "c86d98d4.c56538" ] ] }, { "id": "1f133196.96564e", "type": "function", "z": "758bc08f.c57318", "name": "get acq_volume", "func": "msg.payload = msg.payload.acq_volume;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 220, "y": 240, "wires": [ [ "13b51e1e.1f603a" ] ] }, { "id": "68fa1227.dbdd5c", "type": "function", "z": "758bc08f.c57318", "name": "get acq_fnumber_objective", "func": "msg.payload = msg.payload.acq_fnumber_objective;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 260, "y": 360, "wires": [ [ "2554ff8e.8cf1a8" ] ] }, { "id": "6c391d10.2f9744", "type": "ui_numeric", "z": "758bc08f.c57318", "name": "acq_min_esd", "label": "Minimum size to segment (μm)", "tooltip": "", "group": "4361c3b6.e2b7a4", "order": 9, "width": 0, "height": 0, "wrap": false, "passthru": true, "topic": "acq_min_esd", "format": "{{value}}", "min": 0, "max": "300", "step": "5", "x": 566, "y": 280, "wires": [ [] ] }, { "id": "163df12e.f73f5f", "type": "ui_numeric", "z": "758bc08f.c57318", "name": "acq_max_esd", "label": "Maximum size to segment (μm)", "tooltip": "", "group": "4361c3b6.e2b7a4", "order": 5, "width": 0, "height": 0, "wrap": false, "passthru": true, "topic": "acq_max_esd", "format": "{{value}}", "min": "100", "max": "2000", "step": "5", "x": 556, "y": 320, "wires": [ [] ] }, { "id": "3414b477.4d711c", "type": "function", "z": "758bc08f.c57318", "name": "get acq_min_esd", "func": "msg.payload = msg.payload.acq_min_esd;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 230, "y": 280, "wires": [ [ "6c391d10.2f9744" ] ] }, { "id": "a52e7caf.6bde48", "type": "function", "z": "758bc08f.c57318", "name": "get acq_max_esd", "func": "msg.payload = msg.payload.acq_max_esd;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 230, "y": 320, "wires": [ [ "163df12e.f73f5f" ] ] }, { "id": "3cb96380.e575ec", "type": "function", "z": "977131e7.c2e76", "name": "pump.js", "func": "state = global.get(\"state\");\n\nif (state == null){state=\"free\"}\n\nvar manual_volume= global.get(\"pump_manual_volume\");\nvar flowrate= global.get(\"pump_flowrate\");\n\nif (manual_volume === undefined || manual_volume === \"\" || manual_volume === null) {\n msg.topic = \"Missing entry :\"\n msg.payload = \"Volume to pass\";\n \n}else if (flowrate === undefined || flowrate === \"\" || flowrate === null) {\n msg.topic = \"Missing entry :\"\n msg.payload = \"Flowrate\";\n \n}else {\n volume = global.get(\"pump_manual_volume\");\n msg.volume = volume;\n flowrate = global.get(\"pump_flowrate\");\n msg.topic = \"actuator/pump\";\n \n if(state===\"free\"){\n // msg.payload is FORWARD or BACKWARD here\n msg.payload={\"action\":\"move\", \n \"direction\":msg.payload,\n \"volume\":volume,\n \"flowrate\":flowrate};\n }\n}\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 640, "y": 140, "wires": [ [ "43fa762d.35bcb" ] ], "info": "### Focusing\n##### focus.py `nb_step` `orientation`\n\n- `nb_step` : **integer** (from 1 to 100000) - number of step to perform by the stage (about 31um/step)\n- `orientation` : **string** - orientation of the focus either `up` or `down`\n\nExample:\n\n python3.7 $HOME/PlanktonScope/scripts/focus.py 650 up\n" }, { "id": "517efd7f.811f44", "type": "ui_button", "z": "977131e7.c2e76", "name": "BACKWARD", "group": "34f03c4a.abdf94", "order": 2, "width": 6, "height": 1, "passthru": false, "label": "", "tooltip": "", "color": "", "bgcolor": "", "icon": "arrow_back", "payload": "BACKWARD", "payloadType": "str", "topic": "actuator/pump", "x": 470, "y": 120, "wires": [ [ "3cb96380.e575ec" ] ] }, { "id": "d5de2fb4.dc9d8", "type": "ui_button", "z": "977131e7.c2e76", "name": "FORWARD", "group": "34f03c4a.abdf94", "order": 4, "width": 6, "height": 1, "passthru": true, "label": "", "tooltip": "", "color": "", "bgcolor": "", "icon": "arrow_forward", "payload": "FORWARD", "payloadType": "str", "topic": "actuator/pump", "x": 470, "y": 160, "wires": [ [ "3cb96380.e575ec" ] ] }, { "id": "43fa762d.35bcb", "type": "switch", "z": "977131e7.c2e76", "name": "", "property": "topic", "propertyType": "msg", "rules": [ { "t": "eq", "v": "actuator/pump", "vt": "str" }, { "t": "eq", "v": "Missing entry :", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 770, "y": 140, "wires": [ [ "bdc8ce57.de1f08" ], [ "8bcce348.efc1a" ] ] }, { "id": "8bcce348.efc1a", "type": "ui_toast", "z": "977131e7.c2e76", "position": "dialog", "displayTime": "3", "highlight": "", "sendall": true, "outputs": 1, "ok": "OK", "cancel": "", "raw": false, "topic": "", "name": "", "x": 930, "y": 160, "wires": [ [] ] }, { "id": "f162cc1b.985148", "type": "ui_button", "z": "977131e7.c2e76", "name": "stop pump", "group": "34f03c4a.abdf94", "order": 5, "width": 4, "height": 1, "passthru": true, "label": "STOP PUMP", "tooltip": "", "color": "", "bgcolor": "#AD1625", "icon": "", "payload": "{\"action\":\"stop\"}", "payloadType": "json", "topic": "actuator/pump", "x": 470, "y": 200, "wires": [ [ "c38103c0.9aaa18" ] ] }, { "id": "bdc8ce57.de1f08", "type": "mqtt out", "z": "977131e7.c2e76", "name": "", "topic": "", "qos": "", "retain": "", "broker": "8dc3722c.06efa8", "x": 910, "y": 120, "wires": [] }, { "id": "c38103c0.9aaa18", "type": "mqtt out", "z": "977131e7.c2e76", "name": "", "topic": "", "qos": "", "retain": "", "broker": "8dc3722c.06efa8", "x": 610, "y": 200, "wires": [] }, { "id": "f1b85f22.ac673", "type": "ui_text_input", "z": "977131e7.c2e76", "name": "pump_manual_volume", "label": "Volume to pass (ml)", "tooltip": "", "group": "34f03c4a.abdf94", "order": 3, "width": 8, "height": 1, "passthru": true, "mode": "number", "delay": 300, "topic": "pump_manual_volume", "x": 510, "y": 80, "wires": [ [] ] }, { "id": "8ae06f9a.4b253", "type": "function", "z": "977131e7.c2e76", "name": "get pump_manual_volume", "func": "msg.payload = msg.payload.pump_manual_volume;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 220, "y": 80, "wires": [ [ "f1b85f22.ac673" ] ] }, { "id": "b8bf2a9.be099d8", "type": "ui_slider", "z": "977131e7.c2e76", "name": "pump_flowrate", "label": "Flowrate (ml/min)*", "tooltip": "", "group": "34f03c4a.abdf94", "order": 1, "width": 0, "height": 0, "passthru": true, "outs": "end", "topic": "pump_flowrate", "min": "0.1", "max": "10", "step": "0.1", "x": 480, "y": 40, "wires": [ [] ] }, { "id": "cc757614.c8fc58", "type": "function", "z": "977131e7.c2e76", "name": "get pump_flowrate", "func": "msg.payload = msg.payload.pump_flowrate;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 190, "y": 40, "wires": [ [ "b8bf2a9.be099d8" ] ] }, { "id": "f49b3397.2599f8", "type": "ui_text_input", "z": "a0f9bde.423644", "name": "focus_distance", "label": "Distance in µm", "tooltip": "This will be rounded to the nearest 25µm", "group": "de7c8e82.7faa98", "order": 8, "width": 8, "height": 1, "passthru": true, "mode": "number", "delay": 300, "topic": "focus_distance", "x": 540, "y": 40, "wires": [ [ "b69e435f.b93558" ] ] }, { "id": "411211be.745ef8", "type": "function", "z": "a0f9bde.423644", "name": "get focus_distance", "func": "msg.payload = msg.payload.focus_distance;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 220, "y": 40, "wires": [ [ "f49b3397.2599f8", "d9930546.489a58" ] ] }, { "id": "30718b7.3986b74", "type": "ui_button", "z": "a0f9bde.423644", "name": "DOWN", "group": "de7c8e82.7faa98", "order": 4, "width": 3, "height": 1, "passthru": true, "label": "", "tooltip": "", "color": "", "bgcolor": "", "icon": "arrow_downward", "payload": "DOWN", "payloadType": "str", "topic": "actuator/focus", "x": 280, "y": 320, "wires": [ [ "ee01103f.f91b28" ] ] }, { "id": "e0e433da.64e4e8", "type": "ui_button", "z": "a0f9bde.423644", "name": "UP", "group": "de7c8e82.7faa98", "order": 2, "width": 3, "height": 1, "passthru": false, "label": "", "tooltip": "", "color": "", "bgcolor": "", "icon": "arrow_upwards", "payload": "UP", "payloadType": "str", "topic": "actuator/focus", "x": 290, "y": 281, "wires": [ [ "ee01103f.f91b28" ] ] }, { "id": "c46d3379.54e17", "type": "switch", "z": "a0f9bde.423644", "name": "", "property": "topic", "propertyType": "msg", "rules": [ { "t": "eq", "v": "actuator/focus", "vt": "str" }, { "t": "eq", "v": "Missing entry :", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 570, "y": 300, "wires": [ [ "a8dfcfd1.c5863" ], [ "6e5f2b4e.fcbeac" ] ] }, { "id": "6e5f2b4e.fcbeac", "type": "ui_toast", "z": "a0f9bde.423644", "position": "dialog", "displayTime": "3", "highlight": "", "sendall": true, "outputs": 1, "ok": "OK", "cancel": "", "raw": false, "topic": "", "name": "", "x": 730, "y": 340, "wires": [ [] ] }, { "id": "ee01103f.f91b28", "type": "function", "z": "a0f9bde.423644", "name": "focus.js", "func": "state = global.get(\"state\");\n\nif (state == null){state=\"free\"}\n\nvar distance = global.get(\"focus_distance\");\n\nif (distance === undefined || distance === \"\" || distance === null) {\n msg.topic = \"Missing entry :\"\n msg.payload = \"Distance\";\n}else {\n distance = global.get(\"focus_distance\");\n if(state===\"free\"){\n // msg.payload is UP or DOWN here\n msg.payload={\"action\":\"move\", \n \"direction\":msg.payload,\n \"distance\":(distance/1000)};\n }\n}\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 420, "y": 300, "wires": [ [ "c46d3379.54e17" ] ] }, { "id": "b8a2ecb3.f4f5f", "type": "ui_button", "z": "a0f9bde.423644", "name": "stop focus", "group": "de7c8e82.7faa98", "order": 6, "width": 4, "height": 1, "passthru": true, "label": "STOP FOCUS", "tooltip": "", "color": "", "bgcolor": "#AD1625", "icon": "", "payload": "{\"action\":\"stop\"}", "payloadType": "json", "topic": "actuator/focus", "x": 270, "y": 400, "wires": [ [ "2c100d73.ac6fba" ] ] }, { "id": "a8dfcfd1.c5863", "type": "mqtt out", "z": "a0f9bde.423644", "name": "", "topic": "", "qos": "", "retain": "", "broker": "8dc3722c.06efa8", "x": 710, "y": 280, "wires": [] }, { "id": "2c100d73.ac6fba", "type": "mqtt out", "z": "a0f9bde.423644", "name": "", "topic": "", "qos": "", "retain": "", "broker": "8dc3722c.06efa8", "x": 410, "y": 400, "wires": [] }, { "id": "67fc8b3f.96c6cc", "type": "ui_text_input", "z": "81483277.2521e", "name": "sample_ship", "label": "Name of the ship", "tooltip": "", "group": "71c63dd4.311c44", "order": 3, "width": 0, "height": 0, "passthru": true, "mode": "text", "delay": 300, "topic": "sample_ship", "x": 590, "y": 160, "wires": [ [] ] }, { "id": "91a896c8.7c9fb8", "type": "ui_dropdown", "z": "81483277.2521e", "name": "sample_sampling_gear", "label": "Sampling gear", "tooltip": "", "place": "Select", "group": "71c63dd4.311c44", "order": 5, "width": 0, "height": 0, "passthru": true, "multiple": true, "options": [ { "label": "Plankton net", "value": "net", "type": "str" }, { "label": "Niskin bottle 12L", "value": "niskin_12L", "type": "str" }, { "label": "Niskin bottle 24L", "value": "niskin_24L", "type": "str" }, { "label": "Pass Hull", "value": "pass_hull", "type": "str" }, { "label": "Flask", "value": "flask", "type": "str" } ], "payload": "", "topic": "sample_sampling_gear", "x": 550, "y": 240, "wires": [ [] ] }, { "id": "8cc6c6f1.65bf28", "type": "ui_text_input", "z": "81483277.2521e", "name": "sample_operator", "label": "Name of the operator", "tooltip": "", "group": "71c63dd4.311c44", "order": 4, "width": 0, "height": 0, "passthru": true, "mode": "text", "delay": 300, "topic": "sample_operator", "x": 570, "y": 200, "wires": [ [] ] }, { "id": "adaccbb2.320458", "type": "ui_text_input", "z": "81483277.2521e", "name": "sample_project", "label": "Name of the project*", "tooltip": "", "group": "71c63dd4.311c44", "order": 2, "width": 0, "height": 0, "passthru": true, "mode": "text", "delay": 300, "topic": "sample_project", "x": 580, "y": 80, "wires": [ [] ] }, { "id": "a63c1b66.f9a77", "type": "ui_text_input", "z": "81483277.2521e", "name": "sample_id", "label": "ID of the station*", "tooltip": "", "group": "71c63dd4.311c44", "order": 6, "width": 0, "height": 0, "passthru": true, "mode": "number", "delay": 300, "topic": "sample_id", "x": 590, "y": 120, "wires": [ [] ] }, { "id": "d027a6bf.7049e8", "type": "function", "z": "81483277.2521e", "name": "get sample_projet", "func": "msg.payload = msg.payload.sample_project;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 250, "y": 80, "wires": [ [ "adaccbb2.320458" ] ] }, { "id": "5a811caf.0f3144", "type": "function", "z": "81483277.2521e", "name": "get sample_ship", "func": "msg.payload = msg.payload.sample_ship;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 250, "y": 160, "wires": [ [ "67fc8b3f.96c6cc" ] ] }, { "id": "45911c98.2bd83c", "type": "function", "z": "81483277.2521e", "name": "get sample_id", "func": "msg.payload = msg.payload.sample_id+1;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 240, "y": 120, "wires": [ [ "a63c1b66.f9a77" ] ] }, { "id": "1e09a4ab.72996b", "type": "function", "z": "81483277.2521e", "name": "get sample_operator", "func": "msg.payload = msg.payload.sample_operator;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 260, "y": 200, "wires": [ [ "8cc6c6f1.65bf28" ] ] }, { "id": "a3272681.f271c8", "type": "function", "z": "81483277.2521e", "name": "get sample_sampling_gear", "func": "msg.payload = msg.payload.sample_sampling_gear;\nreturn msg;", "outputs": 1, "noerr": 0, "x": 280, "y": 240, "wires": [ [ "91a896c8.7c9fb8" ] ] }, { "id": "10bfbbf.494c244", "type": "ui_template", "z": "81483277.2521e", "group": "71c63dd4.311c44", "name": "Information message", "order": 1, "width": 24, "height": "1", "format": "