planktoscope/flows/main.json

4374 lines
134 KiB
JSON
Raw Normal View History

2020-01-08 14:32:46 +01:00
[
{
2020-09-15 17:33:49 +02:00
"id": "c4414305.176578",
"type": "tab",
"label": "Main",
"disabled": false,
"info": ""
},
{
"id": "aafb7d9f.f516f",
"type": "subflow",
"name": "RPi Monitoring",
"info": "",
"category": "",
"in": [],
"out": [],
"env": [],
"color": "#87A980",
"icon": "node-red/status.svg"
},
{
"id": "3f0fd072.06e2c8",
2020-07-14 18:27:49 +02:00
"type": "subflow",
"name": "Acquisition actuation",
"info": "",
"category": "",
"in": [],
"out": [],
"env": [],
2020-09-15 17:33:49 +02:00
"color": "#A6BBCF",
"icon": "font-awesome/fa-camera"
2020-01-08 14:32:46 +01:00
},
{
2020-09-15 17:33:49 +02:00
"id": "435c6174.e0c8b",
"type": "subflow",
"name": "Python Code Creation",
"info": "",
"category": "",
"in": [
{
"x": 40,
"y": 40,
"wires": [
{
"id": "10348484.8ca5b3"
},
{
"id": "e49710cf.c4831"
}
]
}
],
"out": [],
"env": [],
"color": "#DDAA99"
2020-01-08 14:32:46 +01:00
},
{
2020-09-15 17:33:49 +02:00
"id": "4273b9bf.bb07a8",
"type": "subflow",
"name": "Acquisition inputs",
"info": "",
"category": "",
"in": [
{
"x": 40,
"y": 40,
"wires": [
{
"id": "55d70110.127d38"
},
{
"id": "4e6a3b73.7472d4"
},
{
"id": "ec5967a.409eb18"
}
]
}
2020-07-14 18:22:31 +02:00
],
2020-09-15 17:33:49 +02:00
"out": [
{
"x": 740,
"y": 40,
"wires": [
{
"id": "a105d7c9.07d71",
"port": 0
},
{
"id": "816c19e2.f940e",
"port": 0
},
{
"id": "530d8426.5c4bec",
"port": 0
}
]
}
],
"env": [],
"color": "#A6BBCF",
"icon": "node-red-contrib-camerapi/photo.png"
2020-07-14 18:22:31 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "4d3786dd.dd79f",
"type": "subflow",
"name": "Process metadata",
"info": "",
"category": "",
"in": [
2020-07-14 18:22:31 +02:00
{
2020-09-15 17:33:49 +02:00
"x": 40,
"y": 80,
"wires": [
{
"id": "7228965.6f65ae8"
}
]
}
],
"out": [
{
"x": 700,
"y": 80,
"wires": [
{
"id": "7bad3862.c22b5",
"port": 0
}
]
}
],
"env": [],
"color": "#DDAA99"
},
{
"id": "20bc0424.146724",
"type": "subflow",
"name": "MQTT Receive & Plot",
"info": "",
"category": "",
"in": [],
"out": [],
"env": [],
"color": "#F3B567",
"icon": "node-red/bridge.svg"
},
{
"id": "7aea7e49.4a3c88",
"type": "subflow",
"name": "System Commands",
"info": "",
"category": "",
"in": [],
"out": [],
"env": [],
"color": "#FFCC66",
"icon": "node-red-dashboard/ui_button.png"
},
{
"id": "672ac548.1a9bac",
"type": "subflow",
"name": "Object metadata",
"info": "",
"category": "",
"in": [
{
"x": 40,
"y": 40,
"wires": [
{
"id": "46ef98a.3d3e8e8"
},
{
"id": "e6b2a290.7593c8"
},
{
"id": "61bc4942.96a3d"
}
]
}
],
"out": [
{
"x": 1060,
"y": 159,
"wires": [
{
"id": "d7ac6b26.75e388",
"port": 0
},
{
"id": "70dcbf49.4b0e6",
"port": 0
}
]
2020-07-14 18:22:31 +02:00
},
{
2020-09-15 17:33:49 +02:00
"x": 1060,
"y": 59,
"wires": [
{
"id": "415b9f0c.5f0b48",
"port": 0
},
{
"id": "3e9ae6e6.35b942",
"port": 0
}
]
2020-07-14 18:22:31 +02:00
}
],
2020-09-15 17:33:49 +02:00
"env": [],
"color": "#DDAA99"
2020-07-14 18:22:31 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "5163a57b.0008b4",
"type": "subflow",
"name": "Acquisition metadata",
"info": "",
"category": "",
"in": [
{
"x": 50,
"y": 30,
"wires": [
{
"id": "7c09012f.b50098"
},
{
"id": "3e3b0646.cf9a1a"
},
{
"id": "2b4282c2.8752ae"
},
{
"id": "90439ce.e3524e"
},
{
"id": "7f710823.92974"
},
{
"id": "9355d580.a2338"
},
{
"id": "c8be3f91.8686e"
},
{
"id": "98bb1c89.99c7b8"
},
{
"id": "218c020a.2b0566"
}
]
}
],
"out": [
{
"x": 740,
"y": 40,
"wires": [
{
"id": "52374b71.714fd4",
"port": 0
},
{
"id": "858ed565.0993b8",
"port": 0
},
{
"id": "2cf276d8.880672",
"port": 0
},
{
"id": "ebcf7cae.9e21c8",
"port": 0
},
{
"id": "7291a2a3.c9a974",
"port": 0
},
{
"id": "25294db5.4fe722",
"port": 0
},
{
"id": "4cfd49e3.3db3c",
"port": 0
},
{
"id": "7dbb773.926b488",
"port": 0
}
]
},
{
"x": 900,
"y": 360,
"wires": [
{
"id": "79923da9.365d7c",
"port": 0
}
]
}
],
"env": [],
"color": "#DDAA99"
},
{
"id": "b1edcbe7.366f7",
"type": "subflow",
"name": "Pump actuation",
"info": "",
"category": "",
"in": [
{
"x": 40,
"y": 40,
"wires": [
{
"id": "66f2533e.b3080c"
},
{
"id": "e3472832.6c2cc8"
}
]
}
],
"out": [
{
"x": 700,
"y": 40,
"wires": [
{
"id": "1f1c2de7.b242f2",
"port": 0
},
{
"id": "8cab4571.004668",
"port": 0
}
]
}
],
"env": [],
"color": "#A6BBCF",
"icon": "font-awesome/fa-recycle"
},
{
"id": "3df4e02.36602a",
"type": "subflow",
"name": "Focus actuation",
"info": "",
"category": "",
"in": [
{
"x": 40,
"y": 40,
"wires": [
{
"id": "ba9fc5ee.19aee8"
}
]
}
],
"out": [
{
"x": 800,
"y": 200,
"wires": [
{
"id": "3df51223.81e336",
"port": 0
}
]
}
],
"env": [],
"color": "#A6BBCF",
"icon": "node-red/sort.svg"
},
{
"id": "6bc47c75.93e24c",
"type": "subflow",
"name": "Sample metadata",
"info": "",
"category": "",
"in": [
{
"x": 40,
"y": 40,
"wires": [
{
"id": "a4b7cb08.270d"
},
{
"id": "d7cff063.331ff8"
},
{
"id": "acfe2f.33fd31d"
},
{
"id": "cfaa2598.c63ec"
},
{
"id": "25201379.163e3c"
}
]
}
],
"out": [
{
"x": 840,
"y": 40,
"wires": [
{
"id": "412da17d.09c39",
"port": 0
},
{
"id": "236eeefd.7d50f2",
"port": 0
},
{
"id": "ccb4ce9e.4f9108",
"port": 0
},
{
"id": "d76b1790.9ffc2",
"port": 0
},
{
"id": "50431d7c.cc673c",
"port": 0
}
]
}
],
"env": [],
"color": "#DDAA99"
},
{
"id": "7a723961.386be",
"type": "ui_group",
"z": "",
"name": "Monitor RPi",
"tab": "c4349ea0.ea1cc8",
"order": 11,
"disp": true,
"width": 24,
"collapse": false
},
{
"id": "3bd8d121.499b96",
"type": "ui_group",
"z": "",
"name": "Acquisition actuation",
"tab": "c4349ea0.ea1cc8",
"order": 9,
"disp": true,
"width": 24,
"collapse": false
},
{
"id": "6fdfb3ec.fd451c",
"type": "ui_group",
"z": "",
"name": "Acquisition inputs",
"tab": "c4349ea0.ea1cc8",
"order": 8,
"disp": true,
"width": "24",
"collapse": false
},
{
"id": "c32bf44c.3b67a8",
"type": "ui_group",
"z": "",
"name": "Process metadata",
"tab": "c4349ea0.ea1cc8",
"order": 7,
"disp": true,
"width": 24,
"collapse": false
},
{
"id": "6e9cdee.ac3c2a",
"type": "mqtt-broker",
"z": "",
2020-07-14 18:22:31 +02:00
"name": "",
2020-09-15 17:33:49 +02:00
"broker": "127.0.0.1",
"port": "1883",
"clientid": "test",
"usetls": false,
"compatmode": false,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
},
{
"id": "1f183a1c.7d2846",
"type": "ui_group",
"z": "",
"name": "MQTT Plots",
"tab": "c4349ea0.ea1cc8",
"order": 10,
"disp": true,
"width": "24",
"collapse": false
},
{
"id": "1f044bf8.be704c",
"type": "ui_group",
"z": "",
"name": "RPi commands",
"tab": "c4349ea0.ea1cc8",
"order": 12,
"disp": true,
"width": "24",
"collapse": false
},
{
"id": "2f95b761.bd818",
"type": "ui_group",
"z": "",
"name": "Object metadata",
"tab": "c4349ea0.ea1cc8",
"order": 2,
"disp": true,
"width": 24,
"collapse": false
2020-07-14 18:22:31 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "14742691.56c8c1",
"type": "ui_group",
"z": "",
"name": "Acquisition metadata",
"tab": "c4349ea0.ea1cc8",
"order": 3,
"disp": true,
"width": 24,
"collapse": false
2020-07-14 18:22:31 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "517b2aa5.93722c",
"type": "ui_group",
"z": "",
"name": "Pump actuation",
"tab": "c4349ea0.ea1cc8",
"order": 6,
"disp": true,
"width": "24",
"collapse": false
2020-07-14 18:22:31 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "88613aab.984d18",
"type": "ui_group",
"z": "",
"name": "Focus actuation",
"tab": "c4349ea0.ea1cc8",
"order": 5,
"disp": true,
"width": "24",
"collapse": false
2020-07-14 18:22:31 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "e6efd12e.dedae8",
"type": "mqtt-broker",
"z": "",
2020-07-14 18:22:31 +02:00
"name": "",
2020-09-15 17:33:49 +02:00
"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": ""
2020-07-14 18:22:31 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "bfdb5a44.4223",
2020-07-14 18:27:49 +02:00
"type": "ui_group",
"z": "",
2020-09-15 17:33:49 +02:00
"name": "Sample metadata",
"tab": "c4349ea0.ea1cc8",
"order": 1,
2020-07-14 18:27:49 +02:00
"disp": true,
"width": 24,
"collapse": false
},
{
2020-09-15 17:33:49 +02:00
"id": "c4349ea0.ea1cc8",
"type": "ui_tab",
"z": "",
"name": "Acquisition",
"icon": "fa-eyedropper",
"order": 3,
"disabled": false,
"hidden": false
},
{
"id": "6b2a8cdd.9f43cc",
"type": "ui_group",
"z": "",
"name": "Streaming camera",
"tab": "c4349ea0.ea1cc8",
"order": 4,
"disp": true,
"width": 24,
"collapse": false
},
{
"id": "b6a679c9.da3fa8",
"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": false,
"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"
2020-07-14 18:27:49 +02:00
}
2020-09-15 17:33:49 +02:00
},
"site": {
"name": "Node-RED Dashboard",
"hideToolbar": "false",
"allowSwipe": "false",
"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
}
}
2020-07-14 18:27:49 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "d4285aee.f326e",
2020-07-14 18:22:31 +02:00
"type": "exec",
2020-09-15 17:33:49 +02:00
"z": "aafb7d9f.f516f",
"command": "free -m | grep \"Mem\" | awk -F ' ' '{print $3}'",
2020-07-14 18:22:31 +02:00
"addpay": false,
"append": "",
2020-09-15 17:33:49 +02:00
"useSpawn": "",
2020-07-14 18:22:31 +02:00
"timer": "",
2020-09-15 17:33:49 +02:00
"name": "Get memory used",
"x": 430,
"y": 100,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"5d2fe716.8ad198",
"6326d8e5.292c5"
2020-07-14 18:22:31 +02:00
],
2020-09-15 17:33:49 +02:00
[],
[]
]
},
{
"id": "d6e7a1be.f8f8f8",
"type": "inject",
"z": "aafb7d9f.f516f",
"name": "",
"repeat": "1",
"crontab": "",
"once": false,
"onceDelay": "",
"topic": "",
"payload": "",
"payloadType": "num",
"x": 210,
"y": 100,
"wires": [
2020-07-14 18:22:31 +02:00
[
2020-09-15 17:33:49 +02:00
"d4285aee.f326e"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "5d2fe716.8ad198",
"type": "ui_chart",
"z": "aafb7d9f.f516f",
"name": "Memory Load Chart",
"group": "7a723961.386be",
"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": 660,
"y": 120,
"wires": [
[]
]
},
{
"id": "6326d8e5.292c5",
"type": "ui_gauge",
"z": "aafb7d9f.f516f",
"name": "Memory Load Donut",
"group": "7a723961.386be",
"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": "b38a018c.21dc18",
"type": "ui_gauge",
"z": "aafb7d9f.f516f",
"name": "CPU Temp Donut",
"group": "7a723961.386be",
"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": "c35a43a5.f0d1e8",
2020-07-14 18:22:31 +02:00
"type": "exec",
2020-09-15 17:33:49 +02:00
"z": "aafb7d9f.f516f",
"command": "vcgencmd measure_temp | tr -d \"temp=\" | tr -d \"'C\" | tr -d \"\\n\"",
2020-07-14 18:22:31 +02:00
"addpay": false,
"append": "",
2020-09-15 17:33:49 +02:00
"useSpawn": "",
2020-07-14 18:22:31 +02:00
"timer": "",
2020-09-15 17:33:49 +02:00
"name": "RPi Temp.",
"x": 410,
"y": 180,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"8f6f6c48.fe30c",
"b38a018c.21dc18",
"d2d8b9f6.c82e68"
2020-07-14 18:22:31 +02:00
],
[],
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "d2d8b9f6.c82e68",
"type": "ui_chart",
"z": "aafb7d9f.f516f",
"name": "CPU Temp Chart",
"group": "7a723961.386be",
"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": [
[]
2020-07-14 18:22:31 +02:00
]
},
{
2020-09-15 17:33:49 +02:00
"id": "602add74.9aa2a4",
"type": "python3-function",
"z": "aafb7d9f.f516f",
"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,
2020-01-08 14:32:46 +01:00
"wires": [
2020-09-15 17:33:49 +02:00
[]
2020-01-08 14:32:46 +01:00
]
},
{
2020-09-15 17:33:49 +02:00
"id": "8f6f6c48.fe30c",
"type": "switch",
"z": "aafb7d9f.f516f",
2020-01-08 14:32:46 +01:00
"name": "",
2020-09-15 17:33:49 +02:00
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "gt",
"v": "45",
"vt": "num"
},
{
"t": "lte",
"v": "40",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 950,
2020-07-14 18:22:31 +02:00
"y": 140,
2020-01-08 14:32:46 +01:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"916264f4.1b31f"
],
[
"743c04f5.97e51c"
2020-01-08 14:32:46 +01:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "743c04f5.97e51c",
"type": "change",
"z": "aafb7d9f.f516f",
2020-07-14 18:27:49 +02:00
"name": "",
2020-09-15 17:33:49 +02:00
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "off",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1120,
"y": 160,
2020-07-14 18:27:49 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"602add74.9aa2a4"
2020-07-14 18:27:49 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "9f9c97d.42b1768",
"type": "inject",
"z": "aafb7d9f.f516f",
"name": "",
"repeat": "5",
"crontab": "",
"once": false,
"onceDelay": "",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 190,
"y": 180,
2020-07-14 18:27:49 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"2d899302.9bc384",
"e0f99dcc.c0257",
"c35a43a5.f0d1e8"
2020-07-14 18:27:49 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "2d899302.9bc384",
2020-07-14 18:27:49 +02:00
"type": "exec",
2020-09-15 17:33:49 +02:00
"z": "aafb7d9f.f516f",
"command": "top -d 0.5 -b -n2 | grep \"Cpu(s)\"|tail -n 1 | awk '{print $2 + $4}' | tr -d \"\\n\"",
2020-07-14 18:27:49 +02:00
"addpay": false,
"append": "",
2020-09-15 17:33:49 +02:00
"useSpawn": "",
2020-07-14 18:27:49 +02:00
"timer": "",
2020-09-15 17:33:49 +02:00
"name": "CPU Load",
"x": 410,
"y": 260,
2020-07-14 18:27:49 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"35e3cb5a.debb74",
"84d67d53.6001e"
2020-07-14 18:27:49 +02:00
],
[],
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "e0f99dcc.c0257",
2020-07-14 18:27:49 +02:00
"type": "exec",
2020-09-15 17:33:49 +02:00
"z": "aafb7d9f.f516f",
"command": "free | grep Mem | awk '{print 100*($4+$6+$7)/$2}' | awk -F \".\" '{print $1}' | tr -d \"\\n\"",
"addpay": false,
2020-07-14 18:27:49 +02:00
"append": "",
2020-09-15 17:33:49 +02:00
"useSpawn": "",
2020-07-14 18:27:49 +02:00
"timer": "",
2020-09-15 17:33:49 +02:00
"name": "Free Memory",
"x": 410,
"y": 340,
2020-07-14 18:27:49 +02:00
"wires": [
2020-09-15 17:33:49 +02:00
[
"f86fc2d5.49c258",
"cf879f92.12d6b"
],
2020-07-14 18:27:49 +02:00
[],
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "35e3cb5a.debb74",
"type": "ui_gauge",
"z": "aafb7d9f.f516f",
"name": "CPU Load Donut",
"group": "7a723961.386be",
"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": []
2020-07-14 18:27:49 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "f86fc2d5.49c258",
"type": "ui_gauge",
"z": "aafb7d9f.f516f",
"name": "Free memory Donut",
"group": "7a723961.386be",
"order": 9,
"width": 5,
"height": 4,
"gtype": "donut",
"title": "Free memory Donut",
"label": "RAM",
"format": "{{value}}",
"min": 0,
"max": "200",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
2020-07-14 18:27:49 +02:00
],
2020-09-15 17:33:49 +02:00
"seg1": "",
"seg2": "",
"x": 660,
"y": 320,
"wires": []
2020-07-14 18:27:49 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "91eb9ad.4dbb5e8",
2020-07-14 18:22:31 +02:00
"type": "exec",
2020-09-15 17:33:49 +02:00
"z": "aafb7d9f.f516f",
"command": "df -h | grep /dev/root | awk -F ' ' '{print $3}' | tr -d G | tr \"\\n$\" \"\\ \" | sed 's/,/./' | tr -d \" \" ",
"addpay": false,
2020-07-14 18:22:31 +02:00
"append": "",
2020-09-15 17:33:49 +02:00
"useSpawn": "",
2020-07-14 18:22:31 +02:00
"timer": "",
2020-09-15 17:33:49 +02:00
"name": "Disk Usage",
"x": 410,
"y": 420,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"7653ee80.f1f07",
"8ae4d547.d3bb98"
],
[],
2020-07-14 18:22:31 +02:00
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "7653ee80.f1f07",
"type": "ui_gauge",
"z": "aafb7d9f.f516f",
"name": "Disk Usage Donut",
"group": "7a723961.386be",
2020-07-14 18:22:31 +02:00
"order": 3,
2020-09-15 17:33:49 +02:00
"width": 5,
"height": 4,
"gtype": "donut",
"title": "Disk Usage Donut",
"label": "Go",
2020-07-14 18:22:31 +02:00
"format": "{{value}}",
2020-09-15 17:33:49 +02:00
"min": 0,
"max": "256",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
2020-07-14 18:22:31 +02:00
"x": 650,
2020-09-15 17:33:49 +02:00
"y": 400,
"wires": []
2020-07-14 18:22:31 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "84d67d53.6001e",
"type": "ui_chart",
"z": "aafb7d9f.f516f",
"name": "CPU Load Chart",
"group": "7a723961.386be",
"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,
2020-07-14 18:22:31 +02:00
"x": 640,
2020-09-15 17:33:49 +02:00
"y": 280,
2020-07-14 18:22:31 +02:00
"wires": [
2020-09-15 17:33:49 +02:00
[]
2020-07-14 18:22:31 +02:00
]
},
{
2020-09-15 17:33:49 +02:00
"id": "cf879f92.12d6b",
"type": "ui_chart",
"z": "aafb7d9f.f516f",
"name": "Free memory Chart",
"group": "7a723961.386be",
"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,
2020-07-14 18:22:31 +02:00
"wires": [
2020-09-15 17:33:49 +02:00
[]
2020-07-14 18:22:31 +02:00
]
},
{
2020-09-15 17:33:49 +02:00
"id": "22b3544f.b649bc",
"type": "inject",
"z": "aafb7d9f.f516f",
"name": "",
"repeat": "60",
"crontab": "",
"once": false,
"onceDelay": "",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 190,
"y": 420,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"91eb9ad.4dbb5e8"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "8ae4d547.d3bb98",
"type": "ui_chart",
"z": "aafb7d9f.f516f",
"name": "Disk Usage Chart",
"group": "7a723961.386be",
"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,
2020-07-14 18:22:31 +02:00
"x": 650,
2020-09-15 17:33:49 +02:00
"y": 440,
2020-07-14 18:22:31 +02:00
"wires": [
2020-09-15 17:33:49 +02:00
[]
2020-07-14 18:22:31 +02:00
]
},
{
2020-09-15 17:33:49 +02:00
"id": "916264f4.1b31f",
"type": "change",
"z": "aafb7d9f.f516f",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "on",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1120,
"y": 120,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"602add74.9aa2a4"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "a06de215.74a87",
2020-07-14 18:22:31 +02:00
"type": "ui_button",
2020-09-15 17:33:49 +02:00
"z": "3f0fd072.06e2c8",
2020-07-14 18:22:31 +02:00
"name": "",
2020-09-15 17:33:49 +02:00
"group": "3bd8d121.499b96",
"order": 2,
"width": 16,
2020-07-14 18:22:31 +02:00
"height": 1,
2020-01-08 14:32:46 +01:00
"passthru": false,
2020-09-15 17:33:49 +02:00
"label": "Start Acquisition",
2020-01-08 14:32:46 +01:00
"tooltip": "",
2020-09-15 17:33:49 +02:00
"color": "",
"bgcolor": "",
2020-01-08 14:32:46 +01:00
"icon": "",
"payload": "",
"payloadType": "str",
2020-09-15 17:33:49 +02:00
"topic": "actuator/image",
"x": 200,
"y": 100,
2020-01-08 14:32:46 +01:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"d6238ee1.db955"
2020-01-08 14:32:46 +01:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "d6238ee1.db955",
2020-01-08 14:32:46 +01:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "3f0fd072.06e2c8",
"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 nb_frame=nb_frame-1\n \n msg.payload=sleep_before+' '+nb_step+' '+nb_frame;\n}\nreturn msg;",
2020-01-08 14:32:46 +01:00
"outputs": 1,
"noerr": 0,
2020-09-15 17:33:49 +02:00
"x": 360,
"y": 100,
2020-01-08 14:32:46 +01:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"40b06bd3.39ae74"
2020-01-08 14:32:46 +01:00
]
2020-09-15 17:33:49 +02:00
],
"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"
2020-01-08 14:32:46 +01:00
},
{
2020-09-15 17:33:49 +02:00
"id": "40b06bd3.39ae74",
"type": "switch",
"z": "3f0fd072.06e2c8",
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "actuator/image",
"vt": "str"
},
{
"t": "eq",
"v": "Missing entry :",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 510,
"y": 100,
2020-01-08 14:32:46 +01:00
"wires": [
2020-09-15 17:33:49 +02:00
[
"9c6b9e61.7436"
],
[
"f8f02776.e0e178"
]
2020-01-08 14:32:46 +01:00
]
},
{
2020-09-15 17:33:49 +02:00
"id": "f8f02776.e0e178",
"type": "ui_toast",
"z": "3f0fd072.06e2c8",
"position": "dialog",
"displayTime": "3",
"highlight": "",
"sendall": true,
2020-01-08 14:32:46 +01:00
"outputs": 1,
2020-09-15 17:33:49 +02:00
"ok": "OK",
"cancel": "",
"raw": false,
"topic": "",
"name": "",
"x": 690,
"y": 120,
2020-01-08 14:32:46 +01:00
"wires": [
2020-09-15 17:33:49 +02:00
[]
2020-01-08 14:32:46 +01:00
]
},
{
2020-09-15 17:33:49 +02:00
"id": "9c6b9e61.7436",
"type": "mqtt out",
"z": "3f0fd072.06e2c8",
2020-01-08 14:32:46 +01:00
"name": "",
2020-09-15 17:33:49 +02:00
"topic": "",
"qos": "",
"retain": "",
"broker": "e6efd12e.dedae8",
"x": 670,
2020-07-14 18:22:31 +02:00
"y": 80,
2020-09-15 17:33:49 +02:00
"wires": []
},
{
"id": "6ff281cf.69e9e8",
"type": "ui_button",
"z": "3f0fd072.06e2c8",
"name": "Stop Acquisition",
"group": "3bd8d121.499b96",
"order": 1,
"width": 8,
"height": 1,
"passthru": true,
"label": "STOP ACQUISITION",
"tooltip": "",
"color": "",
"bgcolor": "#AD1625",
"icon": "",
"payload": "off",
"payloadType": "str",
"topic": "actuator/wait",
"x": 200,
"y": 140,
2020-01-08 14:32:46 +01:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"c2451eaf.eedc1"
2020-01-08 14:32:46 +01:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "c2451eaf.eedc1",
"type": "mqtt out",
"z": "3f0fd072.06e2c8",
2020-01-08 14:32:46 +01:00
"name": "",
2020-09-15 17:33:49 +02:00
"topic": "",
"qos": "",
"retain": "",
"broker": "e6efd12e.dedae8",
"x": 350,
"y": 140,
"wires": []
},
{
"id": "e972dce3.84be7",
"type": "exec",
"z": "435c6174.e0c8b",
"command": "python3.7 /home/pi/PlanktonScope/script/main.py",
"addpay": false,
"append": "",
"useSpawn": "false",
"timer": "",
"oldrc": false,
"name": "",
"x": 890,
2020-07-14 18:22:31 +02:00
"y": 120,
2020-01-08 14:32:46 +01:00
"wires": [
2020-09-15 17:33:49 +02:00
[],
[],
[]
2020-01-08 14:32:46 +01:00
]
},
{
2020-09-15 17:33:49 +02:00
"id": "fd813497.f44d5",
"type": "file",
"z": "435c6174.e0c8b",
2020-07-14 18:22:31 +02:00
"name": "",
2020-09-15 17:33:49 +02:00
"filename": "/home/pi/PlanktonScope/script/main.py",
"appendNewline": false,
"createDir": true,
"overwriteFile": "true",
"encoding": "none",
"x": 530,
"y": 100,
2020-01-08 14:32:46 +01:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"e972dce3.84be7"
2020-01-08 14:32:46 +01:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "a2e43b6f.3b73a",
"type": "template",
"z": "435c6174.e0c8b",
"name": "main.py",
"field": "payload",
"fieldType": "msg",
"format": "python",
"syntax": "plain",
"template": "#Library to send command over I2C for the light module on the fan and subprocess to run bash command\nimport smbus, subprocess\n################################################################################\n#LEDs Actuation\n################################################################################\n\n#define the bus used to actuate the light module on the fan\nbus = smbus.SMBus(1)\n\ndef rgb(R,G,B):\n #Update LED n1\n bus.write_byte_data(0x0d, 0x00, 0)\n bus.write_byte_data(0x0d, 0x01, R)\n bus.write_byte_data(0x0d, 0x02, G)\n bus.write_byte_data(0x0d, 0x03, B)\n\n #Update LED n2\n bus.write_byte_data(0x0d, 0x00, 1)\n bus.write_byte_data(0x0d, 0x01, R)\n bus.write_byte_data(0x0d, 0x02, G)\n bus.write_byte_data(0x0d, 0x03, B)\n\n #Update LED n3\n bus.write_byte_data(0x0d, 0x00, 2)\n bus.write_byte_data(0x0d, 0x01, R)\n bus.write_byte_data(0x0d, 0x02, G)\n bus.write_byte_data(0x0d, 0x03, B)\n\n #Update the I2C Bus in order to really update the LEDs new values\n cmd=\"i2cdetect -y 1\"\n subprocess.Popen(cmd.split(),stdout=subprocess.PIPE)\n \n#Present the RED color\nrgb(255,0,0)\n\n################################################################################\n#Actuator Libraries\n################################################################################\n\n#Library for exchaning messages with Node-RED\nimport paho.mqtt.client as mqtt\n\n#Library to control the PiCamera\nfrom picamera import PiCamera\n\n#Libraries to control the steppers for focusing and pumping\nfrom adafruit_motor import stepper\nfrom adafruit_motorkit import MotorKit\n\n################################################################################\n#Practical Libraries\n################################################################################\n\n#Library to get date and time for folder name and filename\nfrom datetime import datetime, timedelta\n\n#Library to be able to sleep for a duration\nfrom time import sleep\n\n#Libraries manipulate json format, execute bash commands\nimport json, shutil, os\n\n################################################################################\n#Morphocut Libraries\n################################################################################\n\nfrom skimage.util import img_as_ubyte\nfrom morphocut import Call\nfrom morphocut.contrib.ecotaxa import EcotaxaWriter\nfrom morphocut.contrib.zooprocess import CalculateZooProcessFeatures\nfrom morphocut.core import Pipeline\nfrom morphocut.file import Find\nfrom morphocut.image import (ExtractROI,\n FindRegions,\n ImageReader,\n ImageWriter,\n RescaleIntensity,\n RGB2Gray\n)\nfrom morphocut.stat import RunningMedian\nfrom morphocut.str import Format\nfrom morphocut.stream import TQDM, Enumerate, FilterVariables\n\n################################################################################\n#Other image processing Libraries\n################################################################################\n\nfrom skimage.feature import canny\nfrom skimage.color import rgb2gray, label2rgb\nfrom skimage.morphology import disk\nfrom skimage.morphology import erosion, dilation, closing\nfrom skimage.measure import label, regionprops\nimport cv2\n\n################################################################################\n#Streaming PiCamera over server\n################################################################################\nimport io\nimport picamera\nimport logging\nimport socketserver\nfrom threading import Condition\nfrom http import server\nimport threading\n\n################################################################################\n#Get possibility to generate random numbers\n################################################################################\n# generate random integer values\nfrom random import seed\nfrom random import randint\n\n\n\n################################################################################\n#Creation of the webpage containing the PiCamera Streaming\n#######################################
"output": "str",
"x": 300,
"y": 100,
2020-01-08 14:32:46 +01:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"fd813497.f44d5"
2020-01-08 14:32:46 +01:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "10348484.8ca5b3",
"type": "exec",
"z": "435c6174.e0c8b",
"command": "ps -ax | grep \"python3.7 /home/pi/PlanktonScope/script/main.py\"| head -1 | awk -F \" \" '{print$1}' ",
"addpay": false,
"append": "",
"useSpawn": "false",
"timer": "",
"oldrc": false,
2020-01-08 14:32:46 +01:00
"name": "",
2020-09-15 17:33:49 +02:00
"x": 430,
"y": 40,
2020-01-08 14:32:46 +01:00
"wires": [
2020-07-14 18:22:31 +02:00
[
2020-09-15 17:33:49 +02:00
"b41e729d.a3042"
],
[],
[]
2020-01-08 14:32:46 +01:00
]
},
{
2020-09-15 17:33:49 +02:00
"id": "b41e729d.a3042",
"type": "exec",
"z": "435c6174.e0c8b",
"command": "kill",
"addpay": true,
"append": "",
"useSpawn": "false",
"timer": "",
"oldrc": false,
2020-07-14 18:22:31 +02:00
"name": "",
2020-09-15 17:33:49 +02:00
"x": 870,
"y": 40,
2020-01-08 14:32:46 +01:00
"wires": [
2020-09-15 17:33:49 +02:00
[],
[],
[]
2020-01-08 14:32:46 +01:00
]
},
{
2020-09-15 17:33:49 +02:00
"id": "e49710cf.c4831",
"type": "delay",
"z": "435c6174.e0c8b",
"name": "",
"pauseType": "delay",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 160,
"y": 100,
"wires": [
[
"a2e43b6f.3b73a"
]
]
2020-07-14 18:27:49 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "a105d7c9.07d71",
2020-07-14 18:22:31 +02:00
"type": "ui_text_input",
2020-09-15 17:33:49 +02:00
"z": "4273b9bf.bb07a8",
2020-07-14 18:22:31 +02:00
"name": "custom_nb_step",
"label": "Number of steps in between two images",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "6fdfb3ec.fd451c",
2020-07-14 18:22:31 +02:00
"order": 2,
2020-01-08 14:32:46 +01:00
"width": 0,
"height": 0,
2020-07-14 18:22:31 +02:00
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "custom_nb_step",
"x": 540,
"y": 80,
2020-01-08 14:32:46 +01:00
"wires": [
2020-07-14 18:22:31 +02:00
[]
2020-01-08 14:32:46 +01:00
]
},
{
2020-09-15 17:33:49 +02:00
"id": "530d8426.5c4bec",
2020-07-14 18:22:31 +02:00
"type": "ui_text_input",
2020-09-15 17:33:49 +02:00
"z": "4273b9bf.bb07a8",
2020-07-14 18:22:31 +02:00
"name": "custom_nb_frame",
"label": "Number of images per acquisition",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "6fdfb3ec.fd451c",
2020-07-14 18:22:31 +02:00
"order": 3,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "custom_nb_frame",
"x": 530,
"y": 120,
2020-01-08 14:32:46 +01:00
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "55d70110.127d38",
2020-01-08 14:32:46 +01:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "4273b9bf.bb07a8",
2020-07-14 18:22:31 +02:00
"name": "get custom_nb_step",
"func": "msg.payload = msg.payload.custom_nb_step;\nreturn msg;",
2020-01-08 14:32:46 +01:00
"outputs": 1,
"noerr": 0,
"x": 220,
2020-07-14 18:22:31 +02:00
"y": 80,
"wires": [
[
2020-09-15 17:33:49 +02:00
"a105d7c9.07d71"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "ec5967a.409eb18",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "4273b9bf.bb07a8",
2020-07-14 18:22:31 +02:00
"name": "get custom_nb_frame",
"func": "msg.payload = msg.payload.custom_nb_frame;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 220,
"y": 120,
2020-01-08 14:32:46 +01:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"530d8426.5c4bec"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "4e6a3b73.7472d4",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "4273b9bf.bb07a8",
2020-07-14 18:22:31 +02:00
"name": "get custom_sleep_before",
"func": "msg.payload = msg.payload.custom_sleep_before;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 230,
"y": 40,
"wires": [
[
2020-09-15 17:33:49 +02:00
"816c19e2.f940e"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "816c19e2.f940e",
2020-07-14 18:22:31 +02:00
"type": "ui_text_input",
2020-09-15 17:33:49 +02:00
"z": "4273b9bf.bb07a8",
2020-07-14 18:22:31 +02:00
"name": "custom_sleep_before",
"label": "Duration before the acquisition (s)",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "6fdfb3ec.fd451c",
2020-07-14 18:22:31 +02:00
"order": 1,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "custom_sleep_before",
"x": 520,
"y": 40,
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "7bad3862.c22b5",
2020-07-14 18:22:31 +02:00
"type": "ui_text_input",
2020-09-15 17:33:49 +02:00
"z": "4d3786dd.dd79f",
2020-07-14 18:22:31 +02:00
"name": "process_id",
"label": "Id of the process",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "c32bf44c.3b67a8",
2020-07-14 18:22:31 +02:00
"order": 1,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "process_id",
"x": 550,
"y": 80,
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "7228965.6f65ae8",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "4d3786dd.dd79f",
2020-07-14 18:22:31 +02:00
"name": "get process_id",
"func": "msg.payload = msg.payload.process_id+1;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 200,
"y": 80,
"wires": [
[
2020-09-15 17:33:49 +02:00
"7bad3862.c22b5"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "3b44178c.9bb6c",
2020-07-14 18:22:31 +02:00
"type": "mqtt in",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "",
"topic": "receiver/#",
"qos": "0",
"datatype": "auto",
2020-09-15 17:33:49 +02:00
"broker": "6e9cdee.ac3c2a",
"x": 60,
2020-07-14 18:22:31 +02:00
"y": 40,
"wires": [
[
2020-09-15 17:33:49 +02:00
"3e32282.7051d58"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "3e32282.7051d58",
2020-07-14 18:22:31 +02:00
"type": "switch",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "receiver/pump",
"vt": "str"
},
{
"t": "eq",
"v": "receiver/focus",
"vt": "str"
},
{
"t": "eq",
"v": "receiver/image",
"vt": "str"
},
{
"t": "cont",
"v": "receiver/segmentation",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
2020-09-15 17:33:49 +02:00
"x": 250,
2020-07-14 18:22:31 +02:00
"y": 40,
"wires": [
[
2020-09-15 17:33:49 +02:00
"eb8571ec.dd894"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"f3e7c870.e91ed"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"49534f95.047038"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"48e4e2bb.9bb35c"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "eb8571ec.dd894",
2020-07-14 18:22:31 +02:00
"type": "switch",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Start",
"vt": "str"
},
{
"t": "eq",
"v": "Done",
"vt": "str"
},
{
"t": "eq",
"v": "Interrompted",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
2020-09-15 17:33:49 +02:00
"x": 410,
2020-07-14 18:22:31 +02:00
"y": 40,
"wires": [
[
2020-09-15 17:33:49 +02:00
"2981833a.c8f3f4"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"a9bc22d0.246c98"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"13f11422.180f9c"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "2981833a.c8f3f4",
2020-07-14 18:22:31 +02:00
"type": "change",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "The pump has started",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "The pump has started",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 920,
"y": 40,
"wires": [
[
2020-09-15 17:33:49 +02:00
"1b713e4c.48b6ca"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "a9bc22d0.246c98",
2020-07-14 18:22:31 +02:00
"type": "change",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "The pump has finished.",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "The pump has finished.",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 910,
"y": 80,
"wires": [
[
2020-09-15 17:33:49 +02:00
"1b713e4c.48b6ca"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "13f11422.180f9c",
2020-07-14 18:22:31 +02:00
"type": "change",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "The pump has been stopped.",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "The pump has been stopped.",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 900,
"y": 120,
"wires": [
[
2020-09-15 17:33:49 +02:00
"1b713e4c.48b6ca"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "f3e7c870.e91ed",
2020-07-14 18:22:31 +02:00
"type": "switch",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Start",
"vt": "str"
},
{
"t": "eq",
"v": "Done",
"vt": "str"
},
{
"t": "eq",
"v": "Interrompted",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
2020-09-15 17:33:49 +02:00
"x": 410,
"y": 100,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"d070dadb.1463a"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"4c014eb.3f18a3"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"c31116f4.7e8488"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "d070dadb.1463a",
2020-07-14 18:22:31 +02:00
"type": "change",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "The focus has started",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "The focus has started",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 920,
2020-09-15 17:33:49 +02:00
"y": 180,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"1b713e4c.48b6ca"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "4c014eb.3f18a3",
2020-07-14 18:22:31 +02:00
"type": "change",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "The focus has finished.",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "The focus has finished.",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 910,
2020-09-15 17:33:49 +02:00
"y": 220,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"1b713e4c.48b6ca"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "c31116f4.7e8488",
2020-07-14 18:22:31 +02:00
"type": "change",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "The focus has been stopped.",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "The focus has been stopped.",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 900,
2020-09-15 17:33:49 +02:00
"y": 260,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"1b713e4c.48b6ca"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "49534f95.047038",
2020-07-14 18:22:31 +02:00
"type": "switch",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Start",
"vt": "str"
},
{
"t": "eq",
"v": "Done",
"vt": "str"
},
{
"t": "eq",
"v": "Interrompted",
"vt": "str"
},
{
"t": "cont",
"v": "jpg",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
2020-09-15 17:33:49 +02:00
"x": 410,
"y": 160,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"bf293c7.2c0f14"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"ef3bc36b.edc53"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"8404a654.b21db"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"738a3754.b91708"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "a555d3d.d63e83",
2020-07-14 18:22:31 +02:00
"type": "switch",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Start",
"vt": "str"
},
{
"t": "eq",
"v": "Done",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
2020-09-15 17:33:49 +02:00
"x": 670,
"y": 520,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"8b4cf492.155ee"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"31fa24f3.9545bc"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "ef3bc36b.edc53",
2020-07-14 18:22:31 +02:00
"type": "change",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "The acquisition has finished.",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "The acquisition has finished.",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 900,
2020-09-15 17:33:49 +02:00
"y": 360,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"1b713e4c.48b6ca"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "8404a654.b21db",
2020-07-14 18:22:31 +02:00
"type": "change",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "The acquisition has been stopped.",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "The acquisition has been stopped.",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 880,
2020-09-15 17:33:49 +02:00
"y": 400,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"1b713e4c.48b6ca"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "bf293c7.2c0f14",
2020-07-14 18:22:31 +02:00
"type": "change",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "The acquisition has started",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "The acquisition has started",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 900,
2020-09-15 17:33:49 +02:00
"y": 320,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"1b713e4c.48b6ca"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "738a3754.b91708",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"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,
"x": 780,
2020-09-15 17:33:49 +02:00
"y": 440,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"cec2bb6c.85ec3"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "4aa5af79.20b3c8",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"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": 780,
2020-09-15 17:33:49 +02:00
"y": 580,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"d21603af.53b258"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "cec2bb6c.85ec3",
2020-07-14 18:22:31 +02:00
"type": "ui_chart",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "img_counter",
2020-09-15 17:33:49 +02:00
"group": "1f183a1c.7d2846",
"order": 1,
"width": 24,
2020-07-14 18:22:31 +02:00
"height": 2,
"label": "img_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,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"outputs": 1,
"x": 950,
2020-09-15 17:33:49 +02:00
"y": 440,
2020-07-14 18:22:31 +02:00
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "48e4e2bb.9bb35c",
2020-07-14 18:22:31 +02:00
"type": "switch",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "receiver/segmentation",
"vt": "str"
},
2020-09-15 17:33:49 +02:00
{
"t": "eq",
"v": "receiver/segmentation/name",
"vt": "str"
},
2020-07-14 18:22:31 +02:00
{
"t": "eq",
"v": "receiver/segmentation/object_id",
"vt": "str"
},
{
"t": "eq",
"v": "receiver/segmentation/metric",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
2020-09-15 17:33:49 +02:00
"outputs": 4,
"x": 450,
"y": 540,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"a555d3d.d63e83"
],
[
"dec9dc45.e0709"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"4aa5af79.20b3c8"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"d5a84642.dc7618"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "31fa24f3.9545bc",
2020-07-14 18:22:31 +02:00
"type": "change",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "The segmentation has finished.",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "The segmentation has finished.",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 890,
2020-09-15 17:33:49 +02:00
"y": 540,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"1b713e4c.48b6ca"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "8b4cf492.155ee",
2020-07-14 18:22:31 +02:00
"type": "change",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "The segmentation has started",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "The segmentation has started",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 890,
2020-09-15 17:33:49 +02:00
"y": 500,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"1b713e4c.48b6ca"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "d21603af.53b258",
2020-07-14 18:22:31 +02:00
"type": "ui_chart",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "obj_counter",
2020-09-15 17:33:49 +02:00
"group": "1f183a1c.7d2846",
"order": 2,
"width": 24,
2020-07-14 18:22:31 +02:00
"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": 950,
2020-09-15 17:33:49 +02:00
"y": 580,
2020-07-14 18:22:31 +02:00
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "7f712083.ec5c78",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
"name": "ex : area",
2020-07-14 18:22:31 +02:00
"func": "msg.payload=msg.payload.object_area\nmsg.topic=\"area\"\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
2020-09-15 17:33:49 +02:00
"x": 820,
"y": 640,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"65556e24.4e09c"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "d5a84642.dc7618",
2020-07-14 18:22:31 +02:00
"type": "json",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:22:31 +02:00
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 650,
2020-09-15 17:33:49 +02:00
"y": 640,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"7f712083.ec5c78"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "1b713e4c.48b6ca",
"type": "ui_toast",
"z": "20bc0424.146724",
"position": "top right",
"displayTime": "3",
"highlight": "",
"sendall": true,
"outputs": 0,
"ok": "OK",
"cancel": "",
"raw": false,
2020-07-14 18:22:31 +02:00
"topic": "",
"name": "",
2020-09-15 17:33:49 +02:00
"x": 1260,
"y": 260,
"wires": []
2020-07-14 18:22:31 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "65556e24.4e09c",
2020-07-14 18:22:31 +02:00
"type": "ui_chart",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
"name": "chart area",
"group": "1f183a1c.7d2846",
"order": 3,
"width": 24,
"height": 7,
"label": "chart area",
2020-07-14 18:22:31 +02:00
"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,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"useOldStyle": false,
"outputs": 1,
2020-09-15 17:33:49 +02:00
"x": 960,
"y": 640,
2020-07-14 18:22:31 +02:00
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "dec9dc45.e0709",
2020-07-14 18:27:49 +02:00
"type": "debug",
2020-09-15 17:33:49 +02:00
"z": "20bc0424.146724",
2020-07-14 18:27:49 +02:00
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
2020-09-15 17:33:49 +02:00
"x": 690,
"y": 720,
2020-07-14 18:27:49 +02:00
"wires": []
2020-07-14 18:22:31 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "2c9233f6.a62024",
2020-07-14 18:22:31 +02:00
"type": "ui_button",
2020-09-15 17:33:49 +02:00
"z": "7aea7e49.4a3c88",
2020-07-14 18:22:31 +02:00
"name": "",
2020-09-15 17:33:49 +02:00
"group": "1f044bf8.be704c",
2020-07-14 18:22:31 +02:00
"order": 1,
2020-09-15 17:33:49 +02:00
"width": 12,
"height": 1,
2020-07-14 18:22:31 +02:00
"passthru": false,
"label": "Reboot",
"tooltip": "",
"color": "",
"bgcolor": "#AD1625",
"icon": "",
"payload": "off",
"payloadType": "str",
"topic": "reboot",
2020-09-15 17:33:49 +02:00
"x": 240,
2020-07-14 18:22:31 +02:00
"y": 80,
"wires": [
[
2020-09-15 17:33:49 +02:00
"bb7e6003.313188"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "6e86ac0a.07e534",
2020-07-14 18:22:31 +02:00
"type": "exec",
2020-09-15 17:33:49 +02:00
"z": "7aea7e49.4a3c88",
2020-07-14 18:22:31 +02:00
"command": "sudo",
"addpay": true,
"append": "",
"useSpawn": "false",
"timer": "2",
"oldrc": false,
"name": "cmd",
"x": 530,
"y": 80,
"wires": [
[],
[],
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "2b27e400.5709ac",
2020-07-14 18:22:31 +02:00
"type": "ui_button",
2020-09-15 17:33:49 +02:00
"z": "7aea7e49.4a3c88",
2020-07-14 18:22:31 +02:00
"name": "",
2020-09-15 17:33:49 +02:00
"group": "1f044bf8.be704c",
2020-07-14 18:22:31 +02:00
"order": 2,
2020-09-15 17:33:49 +02:00
"width": 12,
"height": 1,
2020-07-14 18:22:31 +02:00
"passthru": false,
"label": "Shutdown",
"tooltip": "",
"color": "",
"bgcolor": "#AD1625",
"icon": "",
"payload": "off",
"payloadType": "str",
"topic": "shutdown",
2020-09-15 17:33:49 +02:00
"x": 240,
2020-07-14 18:22:31 +02:00
"y": 140,
"wires": [
[
2020-09-15 17:33:49 +02:00
"bb7e6003.313188"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "bb7e6003.313188",
2020-07-14 18:22:31 +02:00
"type": "python3-function",
2020-09-15 17:33:49 +02:00
"z": "7aea7e49.4a3c88",
2020-07-14 18:22:31 +02:00
"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\nmsg[\"payload\"] = str(msg[\"topic\"])+' now'\nreturn msg",
"outputs": 1,
"x": 390,
"y": 100,
"wires": [
[
2020-09-15 17:33:49 +02:00
"91077c4d.e71e48",
"6e86ac0a.07e534"
2020-07-14 18:22:31 +02:00
]
2020-09-15 17:33:49 +02:00
]
},
{
"id": "91077c4d.e71e48",
"type": "exec",
"z": "7aea7e49.4a3c88",
"command": "i2cdetect -y 1",
"addpay": false,
"append": "",
"useSpawn": "false",
"timer": "1",
"oldrc": false,
"name": "i2c update",
"x": 550,
"y": 140,
"wires": [
[],
[],
[]
]
2020-07-14 18:27:49 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "d7ac6b26.75e388",
2020-07-14 18:22:31 +02:00
"type": "ui_numeric",
2020-09-15 17:33:49 +02:00
"z": "672ac548.1a9bac",
2020-07-14 18:22:31 +02:00
"name": "object_depth_min",
"label": "Minimum depth (m)",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "2f95b761.bd818",
2020-07-14 18:22:31 +02:00
"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": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "70dcbf49.4b0e6",
2020-07-14 18:22:31 +02:00
"type": "ui_numeric",
2020-09-15 17:33:49 +02:00
"z": "672ac548.1a9bac",
2020-07-14 18:22:31 +02:00
"name": "object_depth_max",
"label": "Maximum depth (m)",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "2f95b761.bd818",
2020-07-14 18:22:31 +02:00
"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": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "46ef98a.3d3e8e8",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "672ac548.1a9bac",
2020-07-14 18:22:31 +02:00
"name": "get object_depth_min",
"func": "msg.payload = msg.payload.object_depth_min;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 304,
"y": 120,
"wires": [
[
2020-09-15 17:33:49 +02:00
"d7ac6b26.75e388"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "e6b2a290.7593c8",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "672ac548.1a9bac",
2020-07-14 18:22:31 +02:00
"name": "get object_depth_max",
"func": "msg.payload = msg.payload.object_depth_max;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 304,
"y": 160,
"wires": [
[
2020-09-15 17:33:49 +02:00
"70dcbf49.4b0e6"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "8cfa2316.5a9788",
2020-07-14 18:22:31 +02:00
"type": "gpsd",
2020-09-15 17:33:49 +02:00
"z": "672ac548.1a9bac",
2020-07-14 18:22:31 +02:00
"name": "",
"hostname": "localhost",
"port": "2947",
"tpv": true,
"sky": false,
"info": false,
"device": false,
"gst": false,
"att": false,
"x": 90,
"y": 220,
"wires": [
[
2020-09-15 17:33:49 +02:00
"61bc4942.96a3d"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "7d5ce5c2.2cb0f4",
2020-07-14 18:22:31 +02:00
"type": "ui_worldmap",
2020-09-15 17:33:49 +02:00
"z": "672ac548.1a9bac",
2020-07-14 18:22:31 +02:00
"d": true,
2020-09-15 17:33:49 +02:00
"group": "2f95b761.bd818",
2020-07-14 18:22:31 +02:00
"order": 1,
"width": 0,
"height": 0,
"name": "",
"lat": "1.5",
"lon": "1.5",
"zoom": "4",
"layer": "OSM grey",
"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": []
},
{
2020-09-15 17:33:49 +02:00
"id": "61bc4942.96a3d",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "672ac548.1a9bac",
2020-07-14 18:22:31 +02:00
"name": "get object_lat & object_lon",
"func": "\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 320,
"y": 200,
"wires": [
[
2020-09-15 17:33:49 +02:00
"7d5ce5c2.2cb0f4"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "415b9f0c.5f0b48",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "672ac548.1a9bac",
2020-07-14 18:22:31 +02:00
"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,
2020-09-15 17:33:49 +02:00
"x": 620,
2020-07-14 18:22:31 +02:00
"y": 80,
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "3e9ae6e6.35b942",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "672ac548.1a9bac",
2020-07-14 18:22:31 +02:00
"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,
2020-09-15 17:33:49 +02:00
"x": 620,
2020-07-14 18:22:31 +02:00
"y": 40,
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "79923da9.365d7c",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"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": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "cba1919b.aae78",
2020-07-14 18:22:31 +02:00
"type": "ui_dropdown",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "acq_fnumber_objective",
"label": "M12 Lens*",
"tooltip": "",
"place": "Select option",
2020-09-15 17:33:49 +02:00
"group": "14742691.56c8c1",
2020-07-14 18:22:31 +02:00
"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": [
[
2020-09-15 17:33:49 +02:00
"79923da9.365d7c"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "ebcf7cae.9e21c8",
2020-07-14 18:22:31 +02:00
"type": "ui_numeric",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "acq_minimum_mesh",
"label": "Min fraction size (μm)",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "14742691.56c8c1",
2020-07-14 18:22:31 +02:00
"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": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "7291a2a3.c9a974",
2020-07-14 18:22:31 +02:00
"type": "ui_numeric",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "acq_maximum_mesh",
"label": "Max fraction size (μm)",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "14742691.56c8c1",
2020-07-14 18:22:31 +02:00
"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": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "52374b71.714fd4",
2020-07-14 18:22:31 +02:00
"type": "ui_text_input",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "acq_id",
"label": "Acquisition unique ID*",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "14742691.56c8c1",
2020-07-14 18:22:31 +02:00
"order": 1,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "acq_id",
"x": 586,
"y": 40,
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "2cf276d8.880672",
2020-07-14 18:22:31 +02:00
"type": "ui_dropdown",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "acq_celltype",
"label": "Thickness flowcell*",
"tooltip": "",
"place": "Select option",
2020-09-15 17:33:49 +02:00
"group": "14742691.56c8c1",
2020-07-14 18:22:31 +02:00
"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": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "25294db5.4fe722",
2020-07-14 18:22:31 +02:00
"type": "ui_text_input",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "acq_volume",
"label": "Volume to pass (ml)",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "14742691.56c8c1",
2020-07-14 18:22:31 +02:00
"order": 2,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "acq_volume",
"x": 566,
"y": 240,
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "858ed565.0993b8",
2020-07-14 18:22:31 +02:00
"type": "ui_text_input",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "acq_instrument",
"label": "Acquisition instrument",
"tooltip": "PlanktonScope V2.1",
2020-09-15 17:33:49 +02:00
"group": "14742691.56c8c1",
2020-07-14 18:22:31 +02:00
"order": 6,
"width": 0,
"height": 0,
"passthru": true,
"mode": "text",
"delay": 300,
"topic": "acq_instrument",
"x": 556,
"y": 80,
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "7c09012f.b50098",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "get acq_id",
"func": "msg.payload = msg.payload.acq_id+1;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 210,
"y": 40,
"wires": [
[
2020-09-15 17:33:49 +02:00
"52374b71.714fd4"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "3e3b0646.cf9a1a",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "get acq_instrument",
"func": "msg.payload = msg.payload.acq_instrument;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 230,
"y": 80,
"wires": [
[
2020-09-15 17:33:49 +02:00
"858ed565.0993b8"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "2b4282c2.8752ae",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "get acq_celltype",
"func": "msg.payload = msg.payload.acq_celltype;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 220,
"y": 120,
"wires": [
[
2020-09-15 17:33:49 +02:00
"2cf276d8.880672"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "90439ce.e3524e",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "get acq_minimum_mesh",
"func": "msg.payload = msg.payload.acq_minimum_mesh;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 250,
"y": 160,
"wires": [
[
2020-09-15 17:33:49 +02:00
"ebcf7cae.9e21c8"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "7f710823.92974",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "get acq_maximum_mesh",
"func": "msg.payload = msg.payload.acq_maximum_mesh;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 250,
"y": 200,
"wires": [
[
2020-09-15 17:33:49 +02:00
"7291a2a3.c9a974"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "9355d580.a2338",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "get acq_volume",
"func": "msg.payload = msg.payload.acq_volume;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 220,
"y": 240,
"wires": [
[
2020-09-15 17:33:49 +02:00
"25294db5.4fe722"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "218c020a.2b0566",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "get acq_fnumber_objective",
"func": "msg.payload = msg.payload.acq_fnumber_objective;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 260,
"y": 360,
"wires": [
[
2020-09-15 17:33:49 +02:00
"cba1919b.aae78"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "4cfd49e3.3db3c",
2020-07-14 18:22:31 +02:00
"type": "ui_numeric",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "acq_min_esd",
"label": "Minimum size to segment (μm)",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "14742691.56c8c1",
2020-07-14 18:22:31 +02:00
"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": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "7dbb773.926b488",
2020-07-14 18:22:31 +02:00
"type": "ui_numeric",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "acq_max_esd",
"label": "Maximum size to segment (μm)",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "14742691.56c8c1",
2020-07-14 18:22:31 +02:00
"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": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "c8be3f91.8686e",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "get acq_min_esd",
"func": "msg.payload = msg.payload.acq_min_esd;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 230,
"y": 280,
"wires": [
[
2020-09-15 17:33:49 +02:00
"4cfd49e3.3db3c"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "98bb1c89.99c7b8",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "5163a57b.0008b4",
2020-07-14 18:22:31 +02:00
"name": "get acq_max_esd",
"func": "msg.payload = msg.payload.acq_max_esd;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 230,
"y": 320,
"wires": [
[
2020-09-15 17:33:49 +02:00
"7dbb773.926b488"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "1796cf8d.f042",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "b1edcbe7.366f7",
2020-07-14 18:22:31 +02:00
"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 nb_step=volume*507\n msg.volume = volume;\n flowrate = global.get(\"pump_flowrate\");\n duration=(volume*60)/flowrate\n delay=(duration/nb_step)-0.005\n msg.topic = \"actuator/pump\";\n \n if(msg.payload === \"FORWARD\" & state===\"free\"){\n msg.payload='FORWARD '+delay+' '+nb_step;\n }\n if(msg.payload === \"BACKWARD\" & state===\"free\"){\n msg.payload='BACKWARD '+delay+' '+nb_step;\n }\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 640,
"y": 140,
"wires": [
[
2020-09-15 17:33:49 +02:00
"3b3a975.caa1a68"
2020-07-14 18:22:31 +02:00
]
],
"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"
},
{
2020-09-15 17:33:49 +02:00
"id": "3b125ba5.2878ac",
2020-07-14 18:22:31 +02:00
"type": "ui_button",
2020-09-15 17:33:49 +02:00
"z": "b1edcbe7.366f7",
2020-07-14 18:22:31 +02:00
"name": "BACKWARD",
2020-09-15 17:33:49 +02:00
"group": "517b2aa5.93722c",
2020-07-14 18:22:31 +02:00
"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": [
[
2020-09-15 17:33:49 +02:00
"1796cf8d.f042"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "daa07581.f5474",
2020-07-14 18:22:31 +02:00
"type": "ui_button",
2020-09-15 17:33:49 +02:00
"z": "b1edcbe7.366f7",
2020-07-14 18:22:31 +02:00
"name": "FORWARD",
2020-09-15 17:33:49 +02:00
"group": "517b2aa5.93722c",
2020-07-14 18:22:31 +02:00
"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": [
[
2020-09-15 17:33:49 +02:00
"1796cf8d.f042"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "3b3a975.caa1a68",
2020-07-14 18:22:31 +02:00
"type": "switch",
2020-09-15 17:33:49 +02:00
"z": "b1edcbe7.366f7",
2020-07-14 18:22:31 +02:00
"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": [
[
2020-09-15 17:33:49 +02:00
"70b4938.deb706c"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"67845166.ed2bd8"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "67845166.ed2bd8",
2020-07-14 18:22:31 +02:00
"type": "ui_toast",
2020-09-15 17:33:49 +02:00
"z": "b1edcbe7.366f7",
2020-07-14 18:22:31 +02:00
"position": "dialog",
"displayTime": "3",
"highlight": "",
"sendall": true,
"outputs": 1,
"ok": "OK",
"cancel": "",
"raw": false,
"topic": "",
"name": "",
"x": 930,
"y": 160,
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "3bbe77de.da4bc",
2020-07-14 18:22:31 +02:00
"type": "ui_button",
2020-09-15 17:33:49 +02:00
"z": "b1edcbe7.366f7",
2020-07-14 18:22:31 +02:00
"name": "stop pump",
2020-09-15 17:33:49 +02:00
"group": "517b2aa5.93722c",
2020-07-14 18:22:31 +02:00
"order": 5,
"width": 4,
"height": 1,
"passthru": true,
"label": "STOP PUMP",
"tooltip": "",
"color": "",
"bgcolor": "#AD1625",
"icon": "",
"payload": "off",
"payloadType": "str",
"topic": "actuator/wait",
"x": 470,
"y": 200,
"wires": [
[
2020-09-15 17:33:49 +02:00
"e441856c.84eb58"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "70b4938.deb706c",
2020-07-14 18:22:31 +02:00
"type": "mqtt out",
2020-09-15 17:33:49 +02:00
"z": "b1edcbe7.366f7",
2020-07-14 18:22:31 +02:00
"name": "",
"topic": "",
"qos": "",
"retain": "",
2020-09-15 17:33:49 +02:00
"broker": "e6efd12e.dedae8",
2020-07-14 18:22:31 +02:00
"x": 910,
"y": 120,
"wires": []
},
{
2020-09-15 17:33:49 +02:00
"id": "e441856c.84eb58",
2020-07-14 18:22:31 +02:00
"type": "mqtt out",
2020-09-15 17:33:49 +02:00
"z": "b1edcbe7.366f7",
2020-07-14 18:22:31 +02:00
"name": "",
"topic": "",
"qos": "",
"retain": "",
2020-09-15 17:33:49 +02:00
"broker": "e6efd12e.dedae8",
2020-07-14 18:22:31 +02:00
"x": 610,
"y": 200,
"wires": []
},
{
2020-09-15 17:33:49 +02:00
"id": "8cab4571.004668",
2020-07-14 18:22:31 +02:00
"type": "ui_text_input",
2020-09-15 17:33:49 +02:00
"z": "b1edcbe7.366f7",
2020-07-14 18:22:31 +02:00
"name": "pump_manual_volume",
"label": "Volume to pass (ml)",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "517b2aa5.93722c",
2020-07-14 18:22:31 +02:00
"order": 3,
"width": 8,
"height": 1,
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "pump_manual_volume",
"x": 480,
"y": 80,
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "e3472832.6c2cc8",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "b1edcbe7.366f7",
2020-07-14 18:22:31 +02:00
"name": "get pump_manual_volume",
"func": "msg.payload = msg.payload.pump_manual_volume;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 220,
"y": 80,
"wires": [
[
2020-09-15 17:33:49 +02:00
"8cab4571.004668"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "1f1c2de7.b242f2",
2020-07-14 18:22:31 +02:00
"type": "ui_slider",
2020-09-15 17:33:49 +02:00
"z": "b1edcbe7.366f7",
2020-07-14 18:22:31 +02:00
"name": "pump_flowrate",
"label": "Flowrate (ml/min)*",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "517b2aa5.93722c",
2020-07-14 18:22:31 +02:00
"order": 1,
"width": 0,
"height": 0,
"passthru": true,
"outs": "end",
"topic": "pump_flowrate",
"min": 0,
"max": "20",
"step": "0.1",
"x": 500,
"y": 40,
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "66f2533e.b3080c",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "b1edcbe7.366f7",
2020-07-14 18:22:31 +02:00
"name": "get pump_flowrate",
"func": "msg.payload = msg.payload.pump_flowrate;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 190,
"y": 40,
"wires": [
[
2020-09-15 17:33:49 +02:00
"1f1c2de7.b242f2"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "3df51223.81e336",
2020-07-14 18:22:31 +02:00
"type": "ui_text_input",
2020-09-15 17:33:49 +02:00
"z": "3df4e02.36602a",
2020-07-14 18:22:31 +02:00
"name": "focus_nb_step",
"label": "Number of step(s)",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "88613aab.984d18",
2020-07-14 18:22:31 +02:00
"order": 2,
"width": 8,
"height": 1,
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "focus_nb_step",
"x": 540,
"y": 40,
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "ba9fc5ee.19aee8",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "3df4e02.36602a",
2020-07-14 18:22:31 +02:00
"name": "get focus_nb_step",
"func": "msg.payload = msg.payload.focus_nb_step;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 230,
"y": 40,
"wires": [
[
2020-09-15 17:33:49 +02:00
"3df51223.81e336"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "eea8d416.05154",
2020-07-14 18:22:31 +02:00
"type": "ui_button",
2020-09-15 17:33:49 +02:00
"z": "3df4e02.36602a",
2020-07-14 18:22:31 +02:00
"name": "DOWN",
2020-09-15 17:33:49 +02:00
"group": "88613aab.984d18",
2020-07-14 18:22:31 +02:00
"order": 3,
"width": 6,
"height": 1,
"passthru": true,
"label": "",
"tooltip": "",
"color": "",
"bgcolor": "",
"icon": "arrow_downward",
"payload": "DOWN",
"payloadType": "str",
"topic": "actuator/focus",
"x": 520,
"y": 120,
"wires": [
[
2020-09-15 17:33:49 +02:00
"89b8374.e9624c8"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "28579233.6aa0e6",
2020-07-14 18:22:31 +02:00
"type": "ui_button",
2020-09-15 17:33:49 +02:00
"z": "3df4e02.36602a",
2020-07-14 18:22:31 +02:00
"name": "UP",
2020-09-15 17:33:49 +02:00
"group": "88613aab.984d18",
2020-07-14 18:22:31 +02:00
"order": 1,
"width": 6,
"height": 1,
"passthru": false,
"label": "",
"tooltip": "",
"color": "",
"bgcolor": "",
"icon": "arrow_upwards",
"payload": "UP",
"payloadType": "str",
"topic": "actuator/focus",
"x": 530,
"y": 81,
"wires": [
[
2020-09-15 17:33:49 +02:00
"89b8374.e9624c8"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "43bc6030.03b3b8",
2020-07-14 18:22:31 +02:00
"type": "switch",
2020-09-15 17:33:49 +02:00
"z": "3df4e02.36602a",
2020-07-14 18:22:31 +02:00
"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": 810,
"y": 100,
"wires": [
[
2020-09-15 17:33:49 +02:00
"77e14fc9.c1287"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"735be178.b56c28"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "735be178.b56c28",
2020-07-14 18:22:31 +02:00
"type": "ui_toast",
2020-09-15 17:33:49 +02:00
"z": "3df4e02.36602a",
2020-07-14 18:22:31 +02:00
"position": "dialog",
"displayTime": "3",
"highlight": "",
"sendall": true,
"outputs": 1,
"ok": "OK",
"cancel": "",
"raw": false,
"topic": "",
"name": "",
"x": 970,
"y": 140,
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "89b8374.e9624c8",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "3df4e02.36602a",
2020-07-14 18:22:31 +02:00
"name": "focus.js",
"func": "state = global.get(\"state\");\n\nif (state == null){state=\"free\"}\n\nvar nb_step= global.get(\"focus_nb_step\");\n\nif (nb_step === undefined || nb_step === \"\" || nb_step === null) {\n msg.topic = \"Missing entry :\"\n msg.payload = \"Number of steps\";\n \n}else {\n nb_step= global.get(\"focus_nb_step\");\n if(msg.payload === \"UP\" & state===\"free\"){\n msg.payload=\"FORWARD \"+nb_step;\n }\n if(msg.payload === \"DOWN\" & state===\"free\"){\n msg.payload=\"BACKWARD \"+nb_step;\n }\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 660,
"y": 100,
"wires": [
[
2020-09-15 17:33:49 +02:00
"43bc6030.03b3b8"
2020-07-14 18:22:31 +02:00
]
],
"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"
},
{
2020-09-15 17:33:49 +02:00
"id": "c96e9b7a.34961",
2020-07-14 18:22:31 +02:00
"type": "ui_button",
2020-09-15 17:33:49 +02:00
"z": "3df4e02.36602a",
2020-07-14 18:22:31 +02:00
"name": "stop focus",
2020-09-15 17:33:49 +02:00
"group": "88613aab.984d18",
2020-07-14 18:22:31 +02:00
"order": 4,
"width": 4,
"height": 1,
"passthru": true,
"label": "STOP FOCUS",
"tooltip": "",
"color": "",
"bgcolor": "#AD1625",
"icon": "",
"payload": "off",
2020-09-15 17:33:49 +02:00
"payloadType": "str",
"topic": "actuator/wait",
"x": 510,
"y": 160,
"wires": [
[
"f22aeb5d.5a0d2"
]
]
2020-07-14 18:27:49 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "77e14fc9.c1287",
"type": "mqtt out",
"z": "3df4e02.36602a",
"name": "",
"topic": "",
"qos": "",
"retain": "",
"broker": "e6efd12e.dedae8",
"x": 950,
"y": 80,
"wires": []
},
{
"id": "f22aeb5d.5a0d2",
"type": "mqtt out",
"z": "3df4e02.36602a",
"name": "",
"topic": "",
"qos": "",
"retain": "",
"broker": "e6efd12e.dedae8",
"x": 650,
"y": 160,
"wires": []
2020-07-14 18:22:31 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "ccb4ce9e.4f9108",
2020-07-14 18:22:31 +02:00
"type": "ui_text_input",
2020-09-15 17:33:49 +02:00
"z": "6bc47c75.93e24c",
2020-07-14 18:22:31 +02:00
"name": "sample_ship",
"label": "Name of the ship",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "bfdb5a44.4223",
2020-07-14 18:22:31 +02:00
"order": 2,
"width": 0,
"height": 0,
"passthru": true,
"mode": "text",
"delay": 300,
"topic": "sample_ship",
"x": 590,
2020-09-15 17:33:49 +02:00
"y": 160,
2020-07-14 18:22:31 +02:00
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "50431d7c.cc673c",
2020-07-14 18:22:31 +02:00
"type": "ui_dropdown",
2020-09-15 17:33:49 +02:00
"z": "6bc47c75.93e24c",
2020-07-14 18:22:31 +02:00
"name": "sample_sampling_gear",
"label": "Sampling gear",
"tooltip": "",
"place": "Select",
2020-09-15 17:33:49 +02:00
"group": "bfdb5a44.4223",
2020-07-14 18:22:31 +02:00
"order": 4,
"width": 0,
"height": 0,
"passthru": 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,
2020-09-15 17:33:49 +02:00
"y": 240,
2020-07-14 18:22:31 +02:00
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "d76b1790.9ffc2",
2020-07-14 18:22:31 +02:00
"type": "ui_text_input",
2020-09-15 17:33:49 +02:00
"z": "6bc47c75.93e24c",
2020-07-14 18:22:31 +02:00
"name": "sample_operator",
"label": "Name of the operator",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "bfdb5a44.4223",
2020-07-14 18:22:31 +02:00
"order": 3,
"width": 0,
"height": 0,
"passthru": true,
"mode": "text",
"delay": 300,
"topic": "sample_operator",
"x": 570,
2020-09-15 17:33:49 +02:00
"y": 200,
2020-07-14 18:22:31 +02:00
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "412da17d.09c39",
2020-07-14 18:22:31 +02:00
"type": "ui_text_input",
2020-09-15 17:33:49 +02:00
"z": "6bc47c75.93e24c",
2020-07-14 18:22:31 +02:00
"name": "sample_project",
"label": "Name of the project*",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "bfdb5a44.4223",
2020-07-14 18:22:31 +02:00
"order": 1,
"width": 0,
"height": 0,
"passthru": true,
"mode": "text",
"delay": 300,
"topic": "sample_project",
"x": 580,
2020-09-15 17:33:49 +02:00
"y": 80,
2020-07-14 18:22:31 +02:00
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "236eeefd.7d50f2",
2020-07-14 18:22:31 +02:00
"type": "ui_text_input",
2020-09-15 17:33:49 +02:00
"z": "6bc47c75.93e24c",
2020-07-14 18:22:31 +02:00
"name": "sample_id",
"label": "ID of the station*",
"tooltip": "",
2020-09-15 17:33:49 +02:00
"group": "bfdb5a44.4223",
2020-07-14 18:22:31 +02:00
"order": 5,
"width": 0,
"height": 0,
"passthru": true,
"mode": "number",
"delay": 300,
"topic": "sample_id",
"x": 590,
2020-09-15 17:33:49 +02:00
"y": 120,
2020-07-14 18:22:31 +02:00
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "a4b7cb08.270d",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "6bc47c75.93e24c",
2020-07-14 18:22:31 +02:00
"name": "get sample_projet",
"func": "msg.payload = msg.payload.sample_project;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 250,
2020-09-15 17:33:49 +02:00
"y": 80,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"412da17d.09c39"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "acfe2f.33fd31d",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "6bc47c75.93e24c",
2020-07-14 18:22:31 +02:00
"name": "get sample_ship",
"func": "msg.payload = msg.payload.sample_ship;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 240,
2020-09-15 17:33:49 +02:00
"y": 160,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"ccb4ce9e.4f9108"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "d7cff063.331ff8",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "6bc47c75.93e24c",
2020-07-14 18:22:31 +02:00
"name": "get sample_id",
"func": "msg.payload = msg.payload.sample_id+1;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 240,
2020-09-15 17:33:49 +02:00
"y": 120,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"236eeefd.7d50f2"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "cfaa2598.c63ec",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "6bc47c75.93e24c",
2020-07-14 18:22:31 +02:00
"name": "get sample_operator",
"func": "msg.payload = msg.payload.sample_operator;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 260,
2020-09-15 17:33:49 +02:00
"y": 200,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"d76b1790.9ffc2"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "25201379.163e3c",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "6bc47c75.93e24c",
2020-07-14 18:22:31 +02:00
"name": "get sample_sampling_gear",
"func": "msg.payload = msg.payload.sample_sampling_gear;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 280,
2020-09-15 17:33:49 +02:00
"y": 240,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"50431d7c.cc673c"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "80851464.e5fcf",
"type": "ui_template",
"z": "6bc47c75.93e24c",
"group": "bfdb5a44.4223",
"name": "",
"order": 5,
2020-07-14 18:27:49 +02:00
"width": "24",
2020-09-15 17:33:49 +02:00
"height": "2",
"format": "<div ng-bind-html=\"msg.payload\">Fill the different inputs concerning the sample you would to image.</div>",
"storeOutMessages": true,
"fwdInMessages": true,
"templateScope": "local",
"x": 290,
"y": 40,
"wires": [
[]
]
2020-07-14 18:27:49 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "9ee31ce7.88d9c",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "get global",
"func": "msg.payload={\n \n \"sample_project\":global.get(\"sample_project\"),\n \"sample_id\":global.get(\"sample_id\"),\n \"sample_ship\":global.get(\"sample_ship\"),\n \"sample_operator\":global.get(\"sample_operator\"),\n \"sample_sampling_gear\":global.get(\"sample_sampling_gear\"),\n \n \"acq_id\":global.get(\"acq_id\"),\n \"acq_instrument\":global.get(\"acq_instrument\"),\n //\"acq_instrument_id\":global.get(\"acq_instrument_id\"),\n \"acq_celltype\":global.get(\"acq_celltype\"),\n \"acq_minimum_mesh\":global.get(\"acq_minimum_mesh\"),\n \"acq_maximum_mesh\":global.get(\"acq_maximum_mesh\"),\n \"acq_min_esd\":global.get(\"acq_min_esd\"),\n \"acq_max_esd\":global.get(\"acq_max_esd\"),\n \"acq_volume\":global.get(\"acq_volume\"),\n \"acq_magnification\":global.get(\"magnification\"),\n \"acq_fnumber_objective\":global.get(\"acq_fnumber_objective\"),\n \n \"acq_camera_name\":\"Pi Camera V2.1 - 8MP\",\n \n \"object_date\":global.get(\"object_date\"),\n \"object_time\":global.get(\"object_time\"),\n \"object_lat\":global.get(\"object_lat\"),\n \"object_lon\":global.get(\"object_lon\"),\n \"object_depth_min\":global.get(\"object_depth_min\"),\n \"object_depth_max\":global.get(\"object_depth_max\"),\n \n \"custom_nb_frame\":global.get(\"custom_nb_frame\"),\n \"custom_nb_step\":global.get(\"custom_nb_step\"),\n \"custom_segmentation\":global.get(\"custom_segmentation\"),\n \"custom_sleep_before\":global.get(\"custom_sleep_before\"),\n \"focus_nb_step\":global.get(\"focus_nb_step\"),\n \"pump_flowrate\":global.get(\"pump_flowrate\"),\n \"pump_manual_volume\":global.get(\"pump_manual_volume\"),\n \n \"process_pixel\":global.get(\"process_pixel\"),\n \"process_id\":global.get(\"process_id\")\n \n \n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
2020-09-15 17:33:49 +02:00
"x": 1240,
"y": 120,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"3e15ea9d.8a1186"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "6b6db57d.0ac41c",
2020-07-14 18:22:31 +02:00
"type": "file",
2020-09-15 17:33:49 +02:00
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "",
"filename": "/home/pi/PlanktonScope/config.json",
"appendNewline": true,
"createDir": true,
"overwriteFile": "true",
"encoding": "none",
2020-09-15 17:33:49 +02:00
"x": 1660,
"y": 120,
2020-07-14 18:22:31 +02:00
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "3e15ea9d.8a1186",
2020-07-14 18:22:31 +02:00
"type": "json",
2020-09-15 17:33:49 +02:00
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "config.json",
"property": "payload",
"action": "str",
"pretty": true,
"x": 1410,
2020-09-15 17:33:49 +02:00
"y": 120,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"6b6db57d.0ac41c"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "92f32906.e7cb08",
2020-07-14 18:22:31 +02:00
"type": "file in",
2020-09-15 17:33:49 +02:00
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "",
"filename": "/home/pi/PlanktonScope/config.json",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 360,
"y": 80,
"wires": [
[
2020-09-15 17:33:49 +02:00
"11e61823.32d9a8"
2020-07-14 18:22:31 +02:00
]
],
"info": "# PlanktonScope Help\nThis Node will read the content of the file named **config.txt** containing all the input placeholders.\n"
},
{
2020-09-15 17:33:49 +02:00
"id": "233acfba.0fa74",
2020-07-14 18:22:31 +02:00
"type": "inject",
2020-09-15 17:33:49 +02:00
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "on_load",
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
2020-09-15 17:33:49 +02:00
"topic": "",
"payload": "",
"payloadType": "date",
2020-07-14 18:22:31 +02:00
"x": 120,
"y": 80,
"wires": [
[
2020-09-15 17:33:49 +02:00
"92f32906.e7cb08",
"8d581456.eb62f8",
"43ea9a81.af94a4"
2020-07-14 18:22:31 +02:00
]
],
"info": "# PlanktonScope Help\nWhen the **Pi** is booting, **Node-RED** will be initiated and this node will be activated once and execute the following nodes."
},
{
2020-09-15 17:33:49 +02:00
"id": "11e61823.32d9a8",
2020-07-14 18:22:31 +02:00
"type": "json",
2020-09-15 17:33:49 +02:00
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "config.json",
"property": "payload",
"action": "",
"pretty": false,
"x": 610,
"y": 80,
"wires": [
[
2020-09-15 17:33:49 +02:00
"f5241d95.8c94a8",
"f7d7ea16.bcd9d8",
"7f1ce067.e4ae9",
"5c0870d2.949358",
"3687179c.9ab2e8",
"129419c2.cd531e",
"eb940d39.f6b0d"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "d00f18b.a005468",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "set global",
"func": "var value = msg.payload;\nvar key = msg.topic;\n\nglobal.set(key,value);\nreturn msg;",
"outputs": 1,
"noerr": 0,
2020-09-15 17:33:49 +02:00
"x": 1240,
2020-07-14 18:22:31 +02:00
"y": 80,
"wires": [
[
2020-09-15 17:33:49 +02:00
"9ee31ce7.88d9c"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "ab1f24d.d9492d8",
2020-07-14 18:22:31 +02:00
"type": "rpi-gpio out",
2020-09-15 17:33:49 +02:00
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "",
"pin": "40",
"set": "",
"level": "0",
"freq": "",
"out": "out",
"x": 440,
2020-09-15 17:33:49 +02:00
"y": 180,
2020-07-14 18:22:31 +02:00
"wires": []
},
{
2020-09-15 17:33:49 +02:00
"id": "3977f843.8914b8",
2020-07-14 18:22:31 +02:00
"type": "ui_template",
2020-09-15 17:33:49 +02:00
"z": "c4414305.176578",
"group": "6b2a8cdd.9f43cc",
2020-07-14 18:22:31 +02:00
"name": "Stream Pi Camera",
"order": 1,
"width": 24,
2020-09-15 17:33:49 +02:00
"height": 19,
"format": "<center><iframe id=\"inlineFrameExample\"\n title=\"Inline Frame Example\"\n height=\"1000\"\n width=\"1300\"\n frameborder=\"0\"\n src=\"http://planktoscope.local:8000/index.html\">\n</iframe></center>",
2020-07-14 18:22:31 +02:00
"storeOutMessages": true,
"fwdInMessages": true,
2020-09-15 17:33:49 +02:00
"resendOnRefresh": false,
2020-07-14 18:22:31 +02:00
"templateScope": "local",
2020-09-15 17:33:49 +02:00
"x": 930,
"y": 440,
2020-07-14 18:22:31 +02:00
"wires": [
[]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "8d581456.eb62f8",
2020-07-14 18:22:31 +02:00
"type": "function",
2020-09-15 17:33:49 +02:00
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "init LED",
"func": "msg.payload=1;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 280,
2020-09-15 17:33:49 +02:00
"y": 180,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"ab1f24d.d9492d8"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "f5241d95.8c94a8",
"type": "subflow:6bc47c75.93e24c",
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "",
"env": [],
2020-09-15 17:33:49 +02:00
"x": 930,
"y": 140,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"d00f18b.a005468"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "129419c2.cd531e",
"type": "subflow:3df4e02.36602a",
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "",
"env": [],
2020-09-15 17:33:49 +02:00
"x": 920,
"y": 360,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"d00f18b.a005468"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "eb940d39.f6b0d",
"type": "subflow:b1edcbe7.366f7",
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "",
"env": [],
2020-09-15 17:33:49 +02:00
"x": 920,
"y": 400,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"d00f18b.a005468"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "f7d7ea16.bcd9d8",
"type": "subflow:5163a57b.0008b4",
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "",
"env": [],
2020-09-15 17:33:49 +02:00
"x": 940,
"y": 180,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"d00f18b.a005468"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"9ee31ce7.88d9c"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "7f1ce067.e4ae9",
"type": "subflow:672ac548.1a9bac",
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "",
"env": [],
2020-09-15 17:33:49 +02:00
"x": 920,
"y": 220,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"d00f18b.a005468"
2020-07-14 18:22:31 +02:00
],
[
2020-09-15 17:33:49 +02:00
"9ee31ce7.88d9c"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "7dd20df2.204fa4",
"type": "subflow:7aea7e49.4a3c88",
"z": "c4414305.176578",
"name": "RPi commands",
2020-07-14 18:22:31 +02:00
"env": [],
2020-09-15 17:33:49 +02:00
"x": 920,
"y": 680,
2020-07-14 18:22:31 +02:00
"wires": []
},
{
2020-09-15 17:33:49 +02:00
"id": "d207c3d7.bb3c7",
"type": "subflow:20bc0424.146724",
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "",
"env": [],
2020-09-15 17:33:49 +02:00
"x": 320,
"y": 320,
2020-07-14 18:22:31 +02:00
"wires": []
},
{
2020-09-15 17:33:49 +02:00
"id": "5c0870d2.949358",
"type": "subflow:4d3786dd.dd79f",
"z": "c4414305.176578",
"name": "Process metadata",
2020-07-14 18:22:31 +02:00
"env": [],
2020-09-15 17:33:49 +02:00
"x": 930,
"y": 260,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"d00f18b.a005468"
2020-07-14 18:22:31 +02:00
]
]
},
{
2020-09-15 17:33:49 +02:00
"id": "3687179c.9ab2e8",
"type": "subflow:4273b9bf.bb07a8",
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "Acquisition inputs",
"env": [],
2020-09-15 17:33:49 +02:00
"x": 930,
"y": 540,
2020-07-14 18:22:31 +02:00
"wires": [
[
2020-09-15 17:33:49 +02:00
"d00f18b.a005468"
2020-07-14 18:22:31 +02:00
]
],
"icon": "node-red-dashboard/ui_switch.png"
},
{
2020-09-15 17:33:49 +02:00
"id": "43ea9a81.af94a4",
"type": "subflow:435c6174.e0c8b",
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "",
"env": [],
2020-09-15 17:33:49 +02:00
"x": 320,
"y": 280,
2020-07-14 18:22:31 +02:00
"wires": []
},
{
2020-09-15 17:33:49 +02:00
"id": "da33ab49.07225",
"type": "subflow:3f0fd072.06e2c8",
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "",
"env": [],
2020-09-15 17:33:49 +02:00
"x": 930,
"y": 580,
"wires": []
},
{
"id": "d4475439.1b745",
"type": "comment",
"z": "c4414305.176578",
"name": "Inject config.json in GUI inputs",
"info": "",
"x": 660,
"y": 40,
"wires": []
},
{
"id": "ad502db0.d19c3",
"type": "comment",
"z": "c4414305.176578",
"name": "Edit config.json on changes",
"info": "",
"x": 1300,
"y": 40,
2020-07-14 18:22:31 +02:00
"wires": []
},
{
2020-09-15 17:33:49 +02:00
"id": "40d4f54b.baf6d4",
"type": "subflow:aafb7d9f.f516f",
"z": "c4414305.176578",
2020-07-14 18:22:31 +02:00
"name": "",
"env": [],
2020-09-15 17:33:49 +02:00
"x": 920,
"y": 720,
2020-07-14 18:22:31 +02:00
"wires": []
},
{
2020-09-15 17:33:49 +02:00
"id": "3ab2666b.b74962",
"type": "comment",
"z": "c4414305.176578",
"name": "Create and run python code receiving MQTT queries",
"info": "",
"x": 410,
"y": 240,
"wires": []
2020-07-14 18:22:31 +02:00
},
{
2020-09-15 17:33:49 +02:00
"id": "5562e88a.9f16a",
"type": "comment",
"z": "c4414305.176578",
"name": "On Load",
"info": "",
"x": 120,
"y": 40,
"wires": []
},
{
"id": "efcdeb9b.9d257",
"type": "comment",
"z": "c4414305.176578",
"name": "Get metadata from config.json",
"info": "",
"x": 340,
"y": 40,
"wires": []
},
{
"id": "55f198c4.c121d8",
"type": "comment",
"z": "c4414305.176578",
"name": "Turn on the white LED",
"info": "",
"x": 320,
"y": 140,
"wires": []
},
{
"id": "29c52f09.54d1f8",
"type": "comment",
"z": "c4414305.176578",
"name": "Visible on the GUI",
"info": "",
"x": 930,
"y": 40,
"wires": []
},
{
"id": "3308bd4b.d469b2",
"type": "comment",
"z": "c4414305.176578",
"name": "RPi",
"info": "",
"x": 890,
"y": 640,
"wires": []
},
{
"id": "8b58c123.c1ea68",
"type": "comment",
"z": "c4414305.176578",
"name": "Metadata",
"info": "",
"x": 900,
"y": 100,
"wires": []
},
{
"id": "ee4608b3.725f",
"type": "comment",
"z": "c4414305.176578",
"name": "Actuation",
"info": "",
"x": 900,
"y": 320,
"wires": []
},
{
"id": "adcdfe58.613838",
"type": "comment",
"z": "c4414305.176578",
"name": "Acquisition",
"info": "",
"x": 900,
"y": 500,
"wires": []
2020-01-08 14:32:46 +01:00
}
]