diff --git a/scripts/mqtt_nodered.json b/scripts/mqtt_nodered.json index a21b696..d77d728 100644 --- a/scripts/mqtt_nodered.json +++ b/scripts/mqtt_nodered.json @@ -1,98 +1,2464 @@ [ { - "id": "389a2c4b.cdee1c", - "type": "inject", - "z": "3b5c4e18.844442", - "name": "pump forward 1 3", - "topic": "actuator/pump", - "payload": "forward 10 1", - "payloadType": "str", - "repeat": "", - "crontab": "", - "once": false, - "onceDelay": 0.1, - "x": 200, - "y": 460, + "id": "259c8713.b50e28", + "type": "tab", + "label": "Main", + "disabled": false, + "info": "" + }, + { + "id": "6d0d6fc7.d30bb", + "type": "ui_text_input", + "z": "259c8713.b50e28", + "name": "sample_ship", + "label": "Name of the ship", + "tooltip": "", + "group": "3e1ba03d.f01d8", + "order": 3, + "width": 12, + "height": 1, + "passthru": true, + "mode": "text", + "delay": 300, + "topic": "sample_ship", + "x": 1370, + "y": 140, "wires": [ [ - "61943522.ba3944" + "de9708c2.d00068" ] ] }, { - "id": "61943522.ba3944", - "type": "mqtt out", - "z": "3b5c4e18.844442", - "name": "", + "id": "43b12fe4.c5aa3", + "type": "ui_dropdown", + "z": "259c8713.b50e28", + "name": "sample_sampling_gear", + "label": "Sampling gear", + "tooltip": "", + "place": "Select", + "group": "3e1ba03d.f01d8", + "order": 5, + "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" + } + ], + "payload": "", + "topic": "sample_sampling_gear", + "x": 1330, + "y": 220, + "wires": [ + [ + "3c6a723.145778e" + ] + ] + }, + { + "id": "458408d7.2b3b68", + "type": "ui_text_input", + "z": "259c8713.b50e28", + "name": "sample_operator", + "label": "Name of the operator", + "tooltip": "", + "group": "3e1ba03d.f01d8", + "order": 4, + "width": 12, + "height": 1, + "passthru": true, + "mode": "text", + "delay": 300, + "topic": "sample_operator", + "x": 1350, + "y": 180, + "wires": [ + [ + "a2ae6c99.188f2" + ] + ] + }, + { + "id": "a163194f.0b17c8", + "type": "ui_text_input", + "z": "259c8713.b50e28", + "name": "sample_project", + "label": "Name of the project*", + "tooltip": "", + "group": "3e1ba03d.f01d8", + "order": 1, + "width": 12, + "height": 1, + "passthru": true, + "mode": "text", + "delay": 300, + "topic": "sample_project", + "x": 1360, + "y": 60, + "wires": [ + [ + "1c2c7439.47115c" + ] + ] + }, + { + "id": "914752eb.af1b", + "type": "ui_text_input", + "z": "259c8713.b50e28", + "name": "sample_id", + "label": "ID of the station*", + "tooltip": "", + "group": "3e1ba03d.f01d8", + "order": 2, + "width": 12, + "height": 1, + "passthru": true, + "mode": "number", + "delay": 300, + "topic": "sample_id", + "x": 1370, + "y": 100, + "wires": [ + [ + "30648de6.8ebc52" + ] + ] + }, + { + "id": "8a735175.23927", + "type": "ui_date_picker", + "z": "259c8713.b50e28", + "name": "acq_date", + "label": "Date :", + "group": "52159161.72187", + "order": 2, + "width": 12, + "height": 1, + "passthru": true, "topic": "", - "qos": "", - "retain": "", - "broker": "acc679a.89c4888", - "x": 390, - "y": 500, + "x": 1380, + "y": 1141, + "wires": [ + [ + "86aa9817.45a2e8" + ] + ] + }, + { + "id": "16d7de1c.b0c892", + "type": "ui_text_input", + "z": "259c8713.b50e28", + "name": "acq_time", + "label": "Time :", + "tooltip": "", + "group": "52159161.72187", + "order": 3, + "width": 12, + "height": 1, + "passthru": true, + "mode": "time", + "delay": 300, + "topic": "", + "x": 1380, + "y": 1181, + "wires": [ + [ + "9b1b260f.e4b338" + ] + ] + }, + { + "id": "9b1b260f.e4b338", + "type": "function", + "z": "259c8713.b50e28", + "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+\"00\";\nglobal.set('object_time',time_UTC);\nreturn msg;", + "outputs": 1, + "noerr": 0, + "x": 1544, + "y": 1181, + "wires": [ + [ + "829cc940.327648" + ] + ] + }, + { + "id": "86aa9817.45a2e8", + "type": "function", + "z": "259c8713.b50e28", + "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, + "x": 1544, + "y": 1141, + "wires": [ + [ + "c93577b9.a1e438" + ] + ] + }, + { + "id": "e001a28.555566", + "type": "function", + "z": "259c8713.b50e28", + "name": "get global", + "func": "msg.payload={\n \n \"generic_nb_step\":global.get(\"generic_nb_step\"),\n \"generic_flowrate\":global.get(\"generic_flowrate\"),\n \"generic_manual_volume\":global.get(\"generic_manual_volume\"),\n \"generic_sleep_before\":global.get(\"generic_sleep_before\"),\n \"generic_volume_before\":global.get(\"generic_volume_before\"),\n \"generic_path\":global.get(\"generic_path\"),\n \"generic_nb_frame\":global.get(\"generic_nb_frame\"),\n \"generic_sleep_during\":global.get(\"generic_sleep_during\"),\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 \"process_pixel\":global.get(\"process_pixel\"),\n \"process_id\":global.get(\"process_id\")\n \n};\nreturn msg;", + "outputs": 1, + "noerr": 0, + "x": 1880, + "y": 60, + "wires": [ + [ + "76a6e6bb.a08b98" + ] + ] + }, + { + "id": "f25890f5.f2549", + "type": "file", + "z": "259c8713.b50e28", + "name": "", + "filename": "/home/pi/PlanktonScope/config.txt", + "appendNewline": true, + "createDir": true, + "overwriteFile": "true", + "encoding": "none", + "x": 2233, + "y": 60, + "wires": [ + [] + ] + }, + { + "id": "f5c1aa13.3cfbf8", + "type": "function", + "z": "259c8713.b50e28", + "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(\"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(\"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(\"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(\"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(\"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": 1550, + "y": 1041, + "wires": [ + [ + "72e1e23b.a8a67c" + ] + ] + }, + { + "id": "eb9181d8.25e01", + "type": "ui_dropdown", + "z": "259c8713.b50e28", + "name": "acq_fnumber_objective", + "label": "M12 Lens*", + "tooltip": "", + "place": "Select option", + "group": "52159161.72187", + "order": 7, + "width": 12, + "height": 1, + "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": 1326, + "y": 1041, + "wires": [ + [ + "f5c1aa13.3cfbf8" + ] + ] + }, + { + "id": "5aba848a.7a861c", + "type": "ui_numeric", + "z": "259c8713.b50e28", + "name": "acq_minimum_mesh", + "label": "Min fraction size (μm)", + "tooltip": "", + "group": "52159161.72187", + "order": 8, + "width": 12, + "height": 1, + "wrap": false, + "passthru": true, + "topic": "acq_minimum_mesh", + "format": "{{value}}", + "min": 0, + "max": "300", + "step": "10", + "x": 1336, + "y": 841, + "wires": [ + [ + "510bd72a.b42ea8" + ] + ] + }, + { + "id": "7cea16e.c42ace8", + "type": "ui_numeric", + "z": "259c8713.b50e28", + "name": "acq_maximum_mesh", + "label": "Max fraction size (μm)", + "tooltip": "", + "group": "52159161.72187", + "order": 9, + "width": 12, + "height": 1, + "wrap": false, + "passthru": true, + "topic": "acq_maximum_mesh", + "format": "{{value}}", + "min": "200", + "max": "2000", + "step": "100", + "x": 1336, + "y": 881, + "wires": [ + [ + "a3f18257.8a55e" + ] + ] + }, + { + "id": "6ecc9468.0271dc", + "type": "ui_text_input", + "z": "259c8713.b50e28", + "name": "acq_id", + "label": "Acquisition unique ID*", + "tooltip": "", + "group": "52159161.72187", + "order": 1, + "width": 0, + "height": 0, + "passthru": true, + "mode": "number", + "delay": 300, + "topic": "acq_id", + "x": 1386, + "y": 721, + "wires": [ + [ + "b26183bf.aa217" + ] + ] + }, + { + "id": "259fd49a.160a3c", + "type": "ui_dropdown", + "z": "259c8713.b50e28", + "name": "acq_celltype", + "label": "Thickness flowcell*", + "tooltip": "", + "place": "Select option", + "group": "52159161.72187", + "order": 6, + "width": 12, + "height": 1, + "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": 1366, + "y": 801, + "wires": [ + [ + "d96d32ec.f88b9" + ] + ] + }, + { + "id": "66a3425c.79aabc", + "type": "ui_text_input", + "z": "259c8713.b50e28", + "name": "acq_volume", + "label": "Volume to pass (ml)", + "tooltip": "", + "group": "52159161.72187", + "order": 5, + "width": 12, + "height": 1, + "passthru": true, + "mode": "number", + "delay": 300, + "topic": "acq_volume", + "x": 1366, + "y": 921, + "wires": [ + [ + "a3ec68a2.889ca8" + ] + ] + }, + { + "id": "6722bc48.d4f354", + "type": "comment", + "z": "259c8713.b50e28", + "name": "sample", + "info": "SAMPLE: a collection event\n\n sample_id [t] : unique identifier\n sample_*** [f] or [t] : other fields relative to the sample\n", + "x": 810, + "y": 60, "wires": [] }, { - "id": "40a5838d.ad561c", + "id": "f93037f1.6a6238", + "type": "comment", + "z": "259c8713.b50e28", + "name": "acquisition", + "info": "ACQUISITION: metadata relative to the image acquisition\n\n acq_id [t] : unique identifier. If your acquisition differ for each sample you must have different identifier.\n acq_instrument [t] : name of the instrument (UVP, ZOOSCAN, FLOWCAM, etc.)\n acq_*** [f] or [t] : other fields relative to the acquisition\n", + "x": 800, + "y": 720, + "wires": [] + }, + { + "id": "734ba3db.3f82fc", + "type": "comment", + "z": "259c8713.b50e28", + "name": "object", + "info": "OBJECT: one object to be classified, usually one organism. One object can be represented by several images. In this tsv file, there is one line per image which means the object data gets repeated on several lines.\n\n object_id [t] : unique object name (will be displayed in Ecotaxa object page)\n object_link [f] : URL of an associated website\n object_lat [f] : latitude, decimal degrees\n object_lon [f] : longitude, decimal degrees\n object_date [f] : ISO8601 YYYYMMJJ UTC\n object_time [f] : ISO8601 HHMMSS UTC\n object_depth_min [f] : minimum depth of object, meters\n object_depth_max [f] : maximum depth of object, meters\n\nAnd, for already classified objects\n\n object_annotation_date [t] : ISO8601 YYYYMMJJ UTC\n object_annotation_time [t] : ISO8601 YYYYMMJJ UTC\n object_annotation_category [t] : class of the object with optionnaly its direct parent following separated by left angle bracket without whitespace \"Cnidaria", + "storeOutMessages": true, + "fwdInMessages": true, + "templateScope": "local", + "x": 1210, + "y": 300, + "wires": [ + [] + ] + }, + { + "id": "b7d9455c.026588", + "type": "switch", + "z": "259c8713.b50e28", + "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": 1670, + "y": 400, + "wires": [ + [ + "fdb3b132.8b341" + ], + [ + "b9d996d6.37c2f8" + ] + ] + }, + { + "id": "b9d996d6.37c2f8", + "type": "ui_toast", + "z": "259c8713.b50e28", + "position": "dialog", + "displayTime": "3", + "highlight": "", + "sendall": true, + "outputs": 1, + "ok": "OK", + "cancel": "", + "raw": false, + "topic": "", + "name": "", + "x": 1830, + "y": 420, + "wires": [ + [] + ] + }, + { + "id": "ca38a11d.0ee54", + "type": "function", + "z": "259c8713.b50e28", + "name": "init LED", + "func": "msg.payload=1;\nreturn msg;", + "outputs": 1, + "noerr": 0, + "x": 240, + "y": 161, + "wires": [ + [ + "1d58e86f.a3a9e8" + ] + ] + }, + { + "id": "75701b99.c6e974", + "type": "exec", + "z": "259c8713.b50e28", + "command": "vcgencmd measure_temp | tr -d \"temp=\" | tr -d \"'C\" | tr -d \"\\n\"", + "addpay": false, + "append": "", + "useSpawn": "", + "timer": "", + "name": "RPi Temp.", + "x": 2750, + "y": 180, + "wires": [ + [ + "aac61390.c13c6" + ], + [], + [] + ] + }, + { + "id": "1780384d.718198", + "type": "inject", + "z": "259c8713.b50e28", + "name": "", + "topic": "", + "payload": "", + "payloadType": "date", + "repeat": "10", + "crontab": "", + "once": false, + "onceDelay": "", + "x": 2590, + "y": 180, + "wires": [ + [ + "75701b99.c6e974" + ] + ] + }, + { + "id": "aac61390.c13c6", + "type": "python3-function", + "z": "259c8713.b50e28", + "name": "fan.py", + "func": "#!/usr/bin/python\nimport smbus\nimport sys\n\ntemp = msg[\"payload\"]\n\ntemp = int(temp.split('.',1)[0])\n\nbus = smbus.SMBus(1)\n\nDEVICE_ADDRESS = 0x0d\n\nif temp < 38:\n bus.write_byte_data(DEVICE_ADDRESS, 0x08, 0x00)\n bus.write_byte_data(DEVICE_ADDRESS, 0x08, 0x00)\nif temp > 42:\n bus.write_byte_data(DEVICE_ADDRESS, 0x08, 0x01)\n bus.write_byte_data(DEVICE_ADDRESS, 0x08, 0x01)", + "outputs": 1, + "x": 2930, + "y": 180, + "wires": [ + [] + ] + }, + { + "id": "603d5fab.08f56", + "type": "comment", + "z": "259c8713.b50e28", + "name": "save config.txt", + "info": "", + "x": 1690, + "y": 20, + "wires": [] + }, + { + "id": "72e1e23b.a8a67c", + "type": "link out", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "7532db82.1dcf04", + "d473399b.081ae8" + ], + "x": 1675, + "y": 1040, + "wires": [] + }, + { + "id": "d473399b.081ae8", + "type": "link in", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "72e1e23b.a8a67c", + "c93577b9.a1e438", + "829cc940.327648" + ], + "x": 1635, + "y": 100, + "wires": [ + [ + "e001a28.555566" + ] + ] + }, + { + "id": "c93577b9.a1e438", + "type": "link out", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "7532db82.1dcf04", + "d473399b.081ae8" + ], + "x": 1675, + "y": 1140, + "wires": [] + }, + { + "id": "829cc940.327648", + "type": "link out", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "7532db82.1dcf04", + "d473399b.081ae8" + ], + "x": 1675, + "y": 1180, + "wires": [] + }, + { + "id": "98e2e9e0.fb7418", + "type": "switch", + "z": "259c8713.b50e28", + "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": 1670, + "y": 600, + "wires": [ + [ + "61fb057d.3c251c" + ], + [ + "46a536f0.c83138" + ] + ] + }, + { + "id": "46a536f0.c83138", + "type": "ui_toast", + "z": "259c8713.b50e28", + "position": "dialog", + "displayTime": "3", + "highlight": "", + "sendall": true, + "outputs": 1, + "ok": "OK", + "cancel": "", + "raw": false, + "topic": "", + "name": "", + "x": 1830, + "y": 620, + "wires": [ + [] + ] + }, + { + "id": "24ffcf03.2a51b", + "type": "ui_button", + "z": "259c8713.b50e28", + "name": "stop pump", + "group": "707d9797.c8e798", + "order": 5, + "width": 4, + "height": 1, + "passthru": true, + "label": "STOP PUMP", + "tooltip": "", + "color": "", + "bgcolor": "", + "icon": "", "payload": "off", "payloadType": "str", - "repeat": "", - "crontab": "", - "once": false, - "onceDelay": 0.1, - "x": 170, - "y": 540, + "topic": "actuator/wait", + "x": 1370, + "y": 660, "wires": [ [ - "61943522.ba3944" + "e2a7220a.09d43" ] ] }, { - "id": "3383d89a.499038", - "type": "inject", - "z": "3b5c4e18.844442", - "name": "focus on", - "topic": "actuator/focus", - "payload": "up 1000", + "id": "7eb16c3b.294e54", + "type": "comment", + "z": "259c8713.b50e28", + "name": "turn ON the LED", + "info": "", + "x": 260, + "y": 121, + "wires": [] + }, + { + "id": "4f74f017.00a58", + "type": "function", + "z": "259c8713.b50e28", + "name": "focus.js", + "func": "state = global.get(\"state\");\n\nif (state == null){state=\"free\"}\n\nvar nb_step= global.get(\"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(\"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": 1520, + "y": 400, + "wires": [ + [ + "b7d9455c.026588" + ] + ], + "info": "### Focusing\n##### focus.py `nb_step` `orientation`\n\n- `nb_step` : **integer** (from 1 to 100000) - number of step to perform by the stage (about 31um/step)\n- `orientation` : **string** - orientation of the focus either `up` or `down`\n\nExample:\n\n python3.7 $HOME/PlanktonScope/scripts/focus.py 650 up\n" + }, + { + "id": "52cc1de5.b78e84", + "type": "ui_button", + "z": "259c8713.b50e28", + "name": "stop focus", + "group": "fbd92986.1028c8", + "order": 5, + "width": 4, + "height": 1, + "passthru": true, + "label": "STOP FOCUS", + "tooltip": "", + "color": "", + "bgcolor": "", + "icon": "", + "payload": "off", "payloadType": "str", - "repeat": "", - "crontab": "", - "once": false, - "onceDelay": 0.1, - "x": 180, - "y": 500, + "topic": "actuator/wait", + "x": 1370, + "y": 460, "wires": [ [ - "61943522.ba3944" + "e46763fe.7fc83" ] ] }, { - "id": "53aecd27.a78c64", + "id": "39cad6fb.1503ca", + "type": "ui_button", + "z": "259c8713.b50e28", + "name": "", + "group": "8cfadfab.327d7", + "order": 9, + "width": 11, + "height": 1, + "passthru": false, + "label": "Reboot", + "tooltip": "", + "color": "", + "bgcolor": "#AD1625", + "icon": "", + "payload": "off", + "payloadType": "str", + "topic": "reboot", + "x": 2620, + "y": 60, + "wires": [ + [ + "95b876d4.07c708", + "99d61fbe.b244b" + ] + ] + }, + { + "id": "1f53f29b.feee4d", + "type": "exec", + "z": "259c8713.b50e28", + "command": "sudo", + "addpay": true, + "append": "", + "useSpawn": "false", + "timer": "2", + "oldrc": false, + "name": "cmd", + "x": 2930, + "y": 60, + "wires": [ + [], + [], + [] + ] + }, + { + "id": "e325458b.95bff8", + "type": "ui_button", + "z": "259c8713.b50e28", + "name": "", + "group": "8cfadfab.327d7", + "order": 10, + "width": 13, + "height": 1, + "passthru": false, + "label": "Shutdown", + "tooltip": "", + "color": "", + "bgcolor": "#AD1625", + "icon": "", + "payload": "off", + "payloadType": "str", + "topic": "shutdown", + "x": 2620, + "y": 120, + "wires": [ + [ + "95b876d4.07c708", + "99d61fbe.b244b" + ] + ] + }, + { + "id": "95b876d4.07c708", + "type": "python3-function", + "z": "259c8713.b50e28", + "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": 2790, + "y": 80, + "wires": [ + [ + "d348474b.d756a8", + "1f53f29b.feee4d" + ] + ] + }, + { + "id": "d348474b.d756a8", + "type": "exec", + "z": "259c8713.b50e28", + "command": "i2cdetect -y 1", + "addpay": false, + "append": "", + "useSpawn": "false", + "timer": "1", + "oldrc": false, + "name": "i2c update", + "x": 2950, + "y": 120, + "wires": [ + [], + [], + [] + ] + }, + { + "id": "99d61fbe.b244b", + "type": "link out", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "3517d063.27073" + ], + "x": 2735, + "y": 20, + "wires": [] + }, + { + "id": "cdd1b550.da18e8", "type": "mqtt in", - "z": "3b5c4e18.844442", + "z": "259c8713.b50e28", "name": "", "topic": "receiver/#", "qos": "0", "datatype": "auto", - "broker": "acc679a.89c4888", - "x": 160, - "y": 760, + "broker": "b77ffa1b.942258", + "x": 720, + "y": 2000, "wires": [ [ - "de0c5ae0.cb23b8" + "6920281d.dc9b48" ] ] }, { - "id": "de0c5ae0.cb23b8", + "id": "6920281d.dc9b48", "type": "switch", - "z": "3b5c4e18.844442", + "z": "259c8713.b50e28", "name": "", "property": "topic", "propertyType": "msg", @@ -106,26 +2472,42 @@ "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": 2, - "x": 310, - "y": 760, + "outputs": 4, + "x": 870, + "y": 2000, "wires": [ [ - "e34ae39c.6095f8" + "2f66e917.fee586" ], [ - "7cdd4869.c2a4c8" + "363ee47e.ed522c" + ], + [ + "45a52868.fe37c8" + ], + [ + "469cc189.903d" ] ] }, { - "id": "e34ae39c.6095f8", + "id": "2f66e917.fee586", "type": "switch", - "z": "3b5c4e18.844442", + "z": "259c8713.b50e28", "name": "", "property": "payload", "propertyType": "msg", @@ -149,25 +2531,25 @@ "checkall": "true", "repair": false, "outputs": 3, - "x": 470, - "y": 680, + "x": 1050, + "y": 1800, "wires": [ [ - "1dc47b9a.e29d5c" + "5c0d0c35.3bcf14" ], [ - "f3c1e4cb.18352" + "cd01157d.0892d8" ], [ - "34ae84d2.cd9864" + "68e02bf4.7013e4" ] ] }, { - "id": "1dc47b9a.e29d5c", + "id": "5c0d0c35.3bcf14", "type": "change", - "z": "3b5c4e18.844442", - "name": "", + "z": "259c8713.b50e28", + "name": "The pump has started", "rules": [ { "t": "set", @@ -182,19 +2564,17 @@ "from": "", "to": "", "reg": false, - "x": 640, - "y": 640, + "x": 1440, + "y": 1760, "wires": [ - [ - "6fe70459.267634" - ] + [] ] }, { - "id": "f3c1e4cb.18352", + "id": "cd01157d.0892d8", "type": "change", - "z": "3b5c4e18.844442", - "name": "", + "z": "259c8713.b50e28", + "name": "The pump has finished.", "rules": [ { "t": "set", @@ -209,19 +2589,17 @@ "from": "", "to": "", "reg": false, - "x": 640, - "y": 680, + "x": 1430, + "y": 1800, "wires": [ - [ - "6fe70459.267634" - ] + [] ] }, { - "id": "34ae84d2.cd9864", + "id": "68e02bf4.7013e4", "type": "change", - "z": "3b5c4e18.844442", - "name": "", + "z": "259c8713.b50e28", + "name": "The pump has been stopped.", "rules": [ { "t": "set", @@ -236,33 +2614,16 @@ "from": "", "to": "", "reg": false, - "x": 640, - "y": 720, + "x": 1420, + "y": 1840, "wires": [ - [ - "6fe70459.267634" - ] + [] ] }, { - "id": "6fe70459.267634", - "type": "debug", - "z": "3b5c4e18.844442", - "name": "", - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "payload", - "targetType": "msg", - "x": 850, - "y": 680, - "wires": [] - }, - { - "id": "7cdd4869.c2a4c8", + "id": "363ee47e.ed522c", "type": "switch", - "z": "3b5c4e18.844442", + "z": "259c8713.b50e28", "name": "", "property": "payload", "propertyType": "msg", @@ -286,25 +2647,25 @@ "checkall": "true", "repair": false, "outputs": 3, - "x": 470, - "y": 820, + "x": 1050, + "y": 1920, "wires": [ [ - "6a11637a.1abcb4" + "c088b72f.326d98" ], [ - "2a9d2128.1c4d56" + "36934381.14442c" ], [ - "53ed8d7.37b9bf4" + "89329cfe.c8f4" ] ] }, { - "id": "6a11637a.1abcb4", + "id": "c088b72f.326d98", "type": "change", - "z": "3b5c4e18.844442", - "name": "", + "z": "259c8713.b50e28", + "name": "The focus has started", "rules": [ { "t": "set", @@ -319,19 +2680,17 @@ "from": "", "to": "", "reg": false, - "x": 640, - "y": 780, + "x": 1440, + "y": 1880, "wires": [ - [ - "3e0dea7a.524f96" - ] + [] ] }, { - "id": "2a9d2128.1c4d56", + "id": "36934381.14442c", "type": "change", - "z": "3b5c4e18.844442", - "name": "", + "z": "259c8713.b50e28", + "name": "The focus has finished.", "rules": [ { "t": "set", @@ -346,19 +2705,17 @@ "from": "", "to": "", "reg": false, - "x": 640, - "y": 820, + "x": 1430, + "y": 1920, "wires": [ - [ - "3e0dea7a.524f96" - ] + [] ] }, { - "id": "53ed8d7.37b9bf4", + "id": "89329cfe.c8f4", "type": "change", - "z": "3b5c4e18.844442", - "name": "", + "z": "259c8713.b50e28", + "name": "The focus has been stopped.", "rules": [ { "t": "set", @@ -373,31 +2730,1257 @@ "from": "", "to": "", "reg": false, - "x": 640, - "y": 860, + "x": 1420, + "y": 1960, + "wires": [ + [] + ] + }, + { + "id": "fdb3b132.8b341", + "type": "mqtt out", + "z": "259c8713.b50e28", + "name": "", + "topic": "", + "qos": "", + "retain": "", + "broker": "cb2f36fe.1c7038", + "x": 1810, + "y": 380, + "wires": [] + }, + { + "id": "e46763fe.7fc83", + "type": "mqtt out", + "z": "259c8713.b50e28", + "name": "", + "topic": "", + "qos": "", + "retain": "", + "broker": "cb2f36fe.1c7038", + "x": 1510, + "y": 460, + "wires": [] + }, + { + "id": "61fb057d.3c251c", + "type": "mqtt out", + "z": "259c8713.b50e28", + "name": "", + "topic": "", + "qos": "", + "retain": "", + "broker": "cb2f36fe.1c7038", + "x": 1810, + "y": 580, + "wires": [] + }, + { + "id": "e2a7220a.09d43", + "type": "mqtt out", + "z": "259c8713.b50e28", + "name": "", + "topic": "", + "qos": "", + "retain": "", + "broker": "cb2f36fe.1c7038", + "x": 1510, + "y": 660, + "wires": [] + }, + { + "id": "577f7f72.6b68b", + "type": "ui_button", + "z": "259c8713.b50e28", + "name": "", + "group": "8cfadfab.327d7", + "order": 7, + "width": 0, + "height": 0, + "passthru": false, + "label": "Start Acquisition", + "tooltip": "", + "color": "", + "bgcolor": "", + "icon": "", + "payload": "", + "payloadType": "str", + "topic": "actuator/image", + "x": 1360, + "y": 1560, "wires": [ [ - "3e0dea7a.524f96" + "5218ba30.bbe844" ] ] }, { - "id": "3e0dea7a.524f96", + "id": "d5111b87.2a64a8", + "type": "ui_text_input", + "z": "259c8713.b50e28", + "name": "generic_sleep_before", + "label": "Sleep duration before acquisition (s)", + "tooltip": "", + "group": "8cfadfab.327d7", + "order": 1, + "width": 12, + "height": 1, + "passthru": true, + "mode": "number", + "delay": 300, + "topic": "generic_sleep_before", + "x": 1340, + "y": 1360, + "wires": [ + [ + "3d141631.d548ba" + ] + ] + }, + { + "id": "3d141631.d548ba", + "type": "link out", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "7532db82.1dcf04" + ], + "x": 1475, + "y": 1360, + "wires": [] + }, + { + "id": "74c89905.79d968", + "type": "ui_text_input", + "z": "259c8713.b50e28", + "name": "generic_sleep_during", + "label": "Sleep duration between acquisition (s)", + "tooltip": "", + "group": "8cfadfab.327d7", + "order": 2, + "width": 12, + "height": 1, + "passthru": true, + "mode": "number", + "delay": 300, + "topic": "generic_sleep_during", + "x": 1340, + "y": 1520, + "wires": [ + [ + "644e95b9.04b7ac" + ] + ] + }, + { + "id": "644e95b9.04b7ac", + "type": "link out", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "7532db82.1dcf04" + ], + "x": 1475, + "y": 1520, + "wires": [] + }, + { + "id": "b50cf2f4.bfb84", + "type": "link out", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "7532db82.1dcf04" + ], + "x": 1475, + "y": 501, + "wires": [] + }, + { + "id": "1e75fd6c.234753", + "type": "ui_slider", + "z": "259c8713.b50e28", + "name": "flowrate", + "label": "Flowrate (ml/min)*", + "tooltip": "", + "group": "707d9797.c8e798", + "order": 1, + "width": 0, + "height": 0, + "passthru": true, + "outs": "end", + "topic": "flowrate", + "min": 0, + "max": "20", + "step": "0.1", + "x": 1380, + "y": 501, + "wires": [ + [ + "b50cf2f4.bfb84" + ] + ] + }, + { + "id": "3345fc41.8341b4", + "type": "function", + "z": "259c8713.b50e28", + "name": "get generic.flowrate", + "func": "msg.payload = msg.payload.generic_flowrate;\nreturn msg;", + "outputs": 1, + "noerr": 0, + "x": 1030, + "y": 501, + "wires": [ + [ + "1e75fd6c.234753" + ] + ] + }, + { + "id": "32510458.f42f9c", + "type": "link in", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "b368cae7.dd66b8" + ], + "x": 895, + "y": 501, + "wires": [ + [ + "3345fc41.8341b4" + ] + ] + }, + { + "id": "3cd0a17b.0cc42e", + "type": "link out", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "7532db82.1dcf04" + ], + "x": 1475, + "y": 1440, + "wires": [] + }, + { + "id": "62fea790.2840a8", + "type": "ui_text_input", + "z": "259c8713.b50e28", + "name": "generic_path", + "label": "DIrectory to store the images", + "tooltip": "", + "group": "8cfadfab.327d7", + "order": 3, + "width": 12, + "height": 1, + "passthru": true, + "mode": "text", + "delay": 300, + "topic": "generic_path", + "x": 1370, + "y": 1440, + "wires": [ + [ + "3cd0a17b.0cc42e" + ] + ] + }, + { + "id": "73e051a8.5875e", + "type": "ui_text_input", + "z": "259c8713.b50e28", + "name": "generic_volume_before", + "label": "Volume to pass before to begin", + "tooltip": "", + "group": "8cfadfab.327d7", + "order": 5, + "width": 12, + "height": 1, + "passthru": true, + "mode": "number", + "delay": 300, + "topic": "generic_volume_before", + "x": 1330, + "y": 1400, + "wires": [ + [ + "5ea01613.8cc9d8" + ] + ] + }, + { + "id": "5ea01613.8cc9d8", + "type": "link out", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "7532db82.1dcf04" + ], + "x": 1475, + "y": 1400, + "wires": [] + }, + { + "id": "26549e4b.5dbf72", + "type": "ui_text_input", + "z": "259c8713.b50e28", + "name": "generic_nb_frame", + "label": "Number of frame per acquisition", + "tooltip": "", + "group": "8cfadfab.327d7", + "order": 4, + "width": 12, + "height": 1, + "passthru": true, + "mode": "number", + "delay": 300, + "topic": "generic_nb_frame", + "x": 1350, + "y": 1480, + "wires": [ + [ + "61382d0b.60c534" + ] + ] + }, + { + "id": "61382d0b.60c534", + "type": "link out", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "7532db82.1dcf04" + ], + "x": 1475, + "y": 1480, + "wires": [] + }, + { + "id": "d5df5489.6523e8", + "type": "function", + "z": "259c8713.b50e28", + "name": "get generic_sleep_before", + "func": "msg.payload = msg.payload.generic_sleep_before;\nreturn msg;", + "outputs": 1, + "noerr": 0, + "x": 1050, + "y": 1360, + "wires": [ + [ + "d5111b87.2a64a8" + ] + ] + }, + { + "id": "835c262e.00b468", + "type": "link in", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "b368cae7.dd66b8" + ], + "x": 895, + "y": 1360, + "wires": [ + [ + "d5df5489.6523e8" + ] + ] + }, + { + "id": "9b2fe59b.be48c8", + "type": "function", + "z": "259c8713.b50e28", + "name": "get generic_volume_before", + "func": "msg.payload = msg.payload.generic_volume_before;\nreturn msg;", + "outputs": 1, + "noerr": 0, + "x": 1060, + "y": 1400, + "wires": [ + [ + "73e051a8.5875e" + ] + ] + }, + { + "id": "a07dad70.7c48", + "type": "link in", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "b368cae7.dd66b8" + ], + "x": 895, + "y": 1400, + "wires": [ + [ + "9b2fe59b.be48c8" + ] + ] + }, + { + "id": "54dfe4df.c6837c", + "type": "function", + "z": "259c8713.b50e28", + "name": "get generic_path", + "func": "msg.payload = msg.payload.generic_path;\nreturn msg;", + "outputs": 1, + "noerr": 0, + "x": 1030, + "y": 1440, + "wires": [ + [ + "62fea790.2840a8" + ] + ] + }, + { + "id": "9fb166d6.86f908", + "type": "link in", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "b368cae7.dd66b8" + ], + "x": 895, + "y": 1440, + "wires": [ + [ + "54dfe4df.c6837c" + ] + ] + }, + { + "id": "1aa409a4.7b3866", + "type": "function", + "z": "259c8713.b50e28", + "name": "get generic_nb_frame", + "func": "msg.payload = msg.payload.generic_nb_frame;\nreturn msg;", + "outputs": 1, + "noerr": 0, + "x": 1040, + "y": 1480, + "wires": [ + [ + "26549e4b.5dbf72" + ] + ] + }, + { + "id": "51e769aa.92a138", + "type": "link in", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "b368cae7.dd66b8" + ], + "x": 895, + "y": 1480, + "wires": [ + [ + "1aa409a4.7b3866" + ] + ] + }, + { + "id": "ce6ded0a.8ee37", + "type": "function", + "z": "259c8713.b50e28", + "name": "get generic_sleep_during", + "func": "msg.payload = msg.payload.generic_sleep_during;\nreturn msg;", + "outputs": 1, + "noerr": 0, + "x": 1050, + "y": 1520, + "wires": [ + [ + "74c89905.79d968" + ] + ] + }, + { + "id": "3fa20f41.11e61", + "type": "link in", + "z": "259c8713.b50e28", + "name": "", + "links": [ + "b368cae7.dd66b8" + ], + "x": 895, + "y": 1520, + "wires": [ + [ + "ce6ded0a.8ee37" + ] + ] + }, + { + "id": "5218ba30.bbe844", + "type": "function", + "z": "259c8713.b50e28", + "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 generic_sleep_before= global.get(\"generic_sleep_before\");\nvar generic_volume_before= global.get(\"generic_volume_before\");\nvar generic_path= global.get(\"generic_path\");\nvar generic_nb_frame= global.get(\"generic_nb_frame\");\nvar generic_sleep_during= global.get(\"generic_sleep_during\");\n\nif (generic_sleep_before === undefined || generic_sleep_before === \"\" || generic_sleep_before === null) {\n msg.topic = \"Missing entry :\"\n msg.payload = \"Duration before start the acquisition\";\n \n}else if (generic_volume_before === undefined || generic_volume_before === \"\" || generic_volume_before === null) {\n msg.topic = \"Missing entry :\"\n msg.payload = \"Volume before acquisition\";\n \n}else if (generic_path === undefined || generic_path === \"\" || generic_path === null) {\n msg.topic = \"Missing entry :\"\n msg.payload = \"Directory to store the images\";\n \n}else if (generic_nb_frame === undefined || generic_nb_frame === \"\" || generic_nb_frame === null) {\n msg.topic = \"Missing entry :\"\n msg.payload = \"Number of frames per acquisition\";\n \n}else if (generic_sleep_during === undefined || generic_sleep_during === \"\" || generic_sleep_during === null) {\n msg.topic = \"Missing entry :\"\n msg.payload = \"Duration in between each acquisition\";\n \n}else {\n generic_nb_step = 507*generic_volume_before\n generic_nb_frame=generic_nb_frame-1\n msg.payload=generic_sleep_before+' '+generic_nb_step+' '+generic_path+' '+generic_nb_frame+' '+generic_sleep_during;\n}\nreturn msg;", + "outputs": 1, + "noerr": 0, + "x": 1520, + "y": 1560, + "wires": [ + [ + "8142bee4.882c2" + ] + ], + "info": "### Focusing\n##### focus.py `nb_step` `orientation`\n\n- `nb_step` : **integer** (from 1 to 100000) - number of step to perform by the stage (about 31um/step)\n- `orientation` : **string** - orientation of the focus either `up` or `down`\n\nExample:\n\n python3.7 $HOME/PlanktonScope/scripts/focus.py 650 up\n" + }, + { + "id": "8142bee4.882c2", + "type": "switch", + "z": "259c8713.b50e28", + "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": 1670, + "y": 1560, + "wires": [ + [ + "a4b8aae3.cc3ad8" + ], + [ + "54420752.4a4ab8" + ] + ] + }, + { + "id": "54420752.4a4ab8", + "type": "ui_toast", + "z": "259c8713.b50e28", + "position": "dialog", + "displayTime": "3", + "highlight": "", + "sendall": true, + "outputs": 1, + "ok": "OK", + "cancel": "", + "raw": false, + "topic": "", + "name": "", + "x": 1830, + "y": 1580, + "wires": [ + [] + ] + }, + { + "id": "a4b8aae3.cc3ad8", + "type": "mqtt out", + "z": "259c8713.b50e28", + "name": "", + "topic": "", + "qos": "", + "retain": "", + "broker": "cb2f36fe.1c7038", + "x": 1810, + "y": 1540, + "wires": [] + }, + { + "id": "ca843dd8.d1c62", + "type": "exec", + "z": "259c8713.b50e28", + "command": "python3.7 /home/pi/PlanktonScope/script/mqtt_pump_focus_image.py", + "addpay": true, + "append": "", + "useSpawn": "false", + "timer": "", + "oldrc": false, + "name": "", + "x": 440, + "y": 280, + "wires": [ + [], + [], + [] + ] + }, + { + "id": "45a52868.fe37c8", + "type": "switch", + "z": "259c8713.b50e28", + "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, + "x": 1050, + "y": 2080, + "wires": [ + [ + "113c9b93.455814" + ], + [ + "29a7c6de.6ac2ea" + ], + [ + "f1b07b24.b85718" + ], + [ + "446a811b.25e4b" + ] + ] + }, + { + "id": "177a91d4.f1016e", + "type": "switch", + "z": "259c8713.b50e28", + "name": "", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "Start", + "vt": "str" + }, + { + "t": "eq", + "v": "Done", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 1190, + "y": 2200, + "wires": [ + [ + "5d717a25.3437e4" + ], + [ + "7d713b16.235164" + ] + ] + }, + { + "id": "29a7c6de.6ac2ea", + "type": "change", + "z": "259c8713.b50e28", + "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": 1420, + "y": 2080, + "wires": [ + [] + ] + }, + { + "id": "f1b07b24.b85718", + "type": "change", + "z": "259c8713.b50e28", + "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": 1400, + "y": 2120, + "wires": [ + [] + ] + }, + { + "id": "113c9b93.455814", + "type": "change", + "z": "259c8713.b50e28", + "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": 1420, + "y": 2040, + "wires": [ + [] + ] + }, + { + "id": "446a811b.25e4b", + "type": "function", + "z": "259c8713.b50e28", + "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": 1300, + "y": 2160, + "wires": [ + [ + "57014db.1bbe0b4", + "95f4a476.261718" + ] + ] + }, + { + "id": "803b507f.9e38c", + "type": "function", + "z": "259c8713.b50e28", + "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": 1300, + "y": 2280, + "wires": [ + [ + "6ad4ae5e.62f4a", + "95f4a476.261718" + ] + ] + }, + { + "id": "57014db.1bbe0b4", + "type": "ui_chart", + "z": "259c8713.b50e28", + "name": "img_counter", + "group": "8cfadfab.327d7", + "order": 12, + "width": 24, + "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": 1470, + "y": 2160, + "wires": [ + [] + ] + }, + { + "id": "469cc189.903d", + "type": "switch", + "z": "259c8713.b50e28", + "name": "", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "receiver/segmentation", + "vt": "str" + }, + { + "t": "eq", + "v": "receiver/segmentation/object_id", + "vt": "str" + }, + { + "t": "eq", + "v": "receiver/segmentation/metric", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 3, + "x": 1050, + "y": 2240, + "wires": [ + [ + "177a91d4.f1016e" + ], + [ + "803b507f.9e38c" + ], + [ + "73f0f4b.8dd430c" + ] + ] + }, + { + "id": "7d713b16.235164", + "type": "change", + "z": "259c8713.b50e28", + "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": 1410, + "y": 2240, + "wires": [ + [] + ] + }, + { + "id": "5d717a25.3437e4", + "type": "change", + "z": "259c8713.b50e28", + "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": 1410, + "y": 2200, + "wires": [ + [] + ] + }, + { + "id": "6ad4ae5e.62f4a", + "type": "ui_chart", + "z": "259c8713.b50e28", + "name": "obj_counter", + "group": "8cfadfab.327d7", + "order": 13, + "width": 24, + "height": "2", + "label": "obj_counter", + "chartType": "horizontalBar", + "legend": "false", + "xformat": "HH:mm:ss", + "interpolate": "linear", + "nodata": "", + "dot": false, + "ymin": "", + "ymax": "", + "removeOlder": 1, + "removeOlderPoints": "", + "removeOlderUnit": "3600", + "cutout": 0, + "useOneColor": true, + "colors": [ + "#1f77b4", + "#aec7e8", + "#ff7f0e", + "#2ca02c", + "#98df8a", + "#d62728", + "#ff9896", + "#9467bd", + "#c5b0d5" + ], + "useOldStyle": false, + "outputs": 1, + "x": 1470, + "y": 2280, + "wires": [ + [] + ] + }, + { + "id": "95f4a476.261718", + "type": "ui_chart", + "z": "259c8713.b50e28", + "name": "", + "group": "8cfadfab.327d7", + "order": 11, + "width": 24, + "height": 5, + "label": "chart", + "chartType": "line", + "legend": "false", + "xformat": "HH:mm:ss", + "interpolate": "linear", + "nodata": "", + "dot": false, + "ymin": "", + "ymax": "", + "removeOlder": 1, + "removeOlderPoints": "500", + "removeOlderUnit": "3600", + "cutout": 0, + "useOneColor": false, + "colors": [ + "#1f77b4", + "#aec7e8", + "#ff7f0e", + "#2ca02c", + "#98df8a", + "#d62728", + "#ff9896", + "#9467bd", + "#c5b0d5" + ], + "useOldStyle": false, + "outputs": 1, + "x": 1670, + "y": 2220, + "wires": [ + [] + ] + }, + { + "id": "32b535dc.2d85ea", + "type": "function", + "z": "259c8713.b50e28", + "name": "", + "func": "msg.payload=msg.payload.object_area\nmsg.topic=\"area\"\n\nreturn msg;", + "outputs": 1, + "noerr": 0, + "x": 1290, + "y": 2380, + "wires": [ + [ + "1624f1bf.604bfe" + ] + ] + }, + { + "id": "73f0f4b.8dd430c", + "type": "json", + "z": "259c8713.b50e28", + "name": "", + "property": "payload", + "action": "", + "pretty": false, + "x": 1120, + "y": 2380, + "wires": [ + [ + "32b535dc.2d85ea" + ] + ] + }, + { + "id": "6fc7332f.89431c", + "type": "exec", + "z": "259c8713.b50e28", + "command": "free -m | grep \"Mem\" | awk -F ' ' '{print $3}'", + "addpay": false, + "append": "", + "useSpawn": "", + "timer": "", + "name": "Get memory used", + "x": 1350, + "y": 2560, + "wires": [ + [ + "42781732.a6ab58" + ], + [], + [] + ] + }, + { + "id": "7cdef10d.cb2f2", + "type": "inject", + "z": "259c8713.b50e28", + "name": "", + "topic": "", + "payload": "", + "payloadType": "num", + "repeat": "1", + "crontab": "", + "once": false, + "onceDelay": "", + "x": 1150, + "y": 2560, + "wires": [ + [ + "6fc7332f.89431c" + ] + ] + }, + { + "id": "42781732.a6ab58", + "type": "ui_chart", + "z": "259c8713.b50e28", + "name": "", + "group": "8cfadfab.327d7", + "order": 11, + "width": 24, + "height": 5, + "label": "Memory load", + "chartType": "line", + "legend": "false", + "xformat": "HH:mm:ss", + "interpolate": "linear", + "nodata": "", + "dot": false, + "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, + "x": 1690, + "y": 2260, + "wires": [ + [] + ] + }, + { + "id": "957a161c.f76038", + "type": "mqtt in", + "z": "259c8713.b50e28", + "name": "", + "topic": "receiver/#", + "qos": "0", + "datatype": "auto", + "broker": "b77ffa1b.942258", + "x": 560, + "y": 1640, + "wires": [ + [ + "676a23fa.d442ac" + ] + ] + }, + { + "id": "676a23fa.d442ac", "type": "debug", - "z": "3b5c4e18.844442", + "z": "259c8713.b50e28", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, - "complete": "payload", - "targetType": "msg", - "x": 850, - "y": 820, + "complete": "false", + "x": 680, + "y": 1700, "wires": [] }, { - "id": "acc679a.89c4888", + "id": "1624f1bf.604bfe", + "type": "ui_chart", + "z": "259c8713.b50e28", + "name": "", + "group": "8cfadfab.327d7", + "order": 14, + "width": "24", + "height": "3", + "label": "chart", + "chartType": "line", + "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": 1300, + "y": 2440, + "wires": [ + [] + ] + }, + { + "id": "3e1ba03d.f01d8", + "type": "ui_group", + "z": "", + "name": "Sample Identification", + "tab": "737ec584.2eea2c", + "order": 1, + "disp": true, + "width": 24, + "collapse": false + }, + { + "id": "52159161.72187", + "type": "ui_group", + "name": "Group 1", + "tab": "737ec584.2eea2c", + "order": 5, + "disp": true, + "width": 24 + }, + { + "id": "8cfadfab.327d7", + "type": "ui_group", + "z": "", + "name": "Commad", + "tab": "737ec584.2eea2c", + "order": 6, + "disp": true, + "width": 24, + "collapse": false + }, + { + "id": "cef1e703.bcf3c8", + "type": "ui_group", + "z": "", + "name": "Spatio Temporal", + "tab": "737ec584.2eea2c", + "order": 4, + "disp": true, + "width": 24, + "collapse": false + }, + { + "id": "fbd92986.1028c8", + "type": "ui_group", + "z": "", + "name": "Focus Adjustment", + "tab": "737ec584.2eea2c", + "order": 2, + "disp": true, + "width": 24, + "collapse": false + }, + { + "id": "707d9797.c8e798", + "type": "ui_group", + "z": "", + "name": "Fluidic Manual Manipulation", + "tab": "737ec584.2eea2c", + "order": 3, + "disp": true, + "width": 24, + "collapse": false + }, + { + "id": "b77ffa1b.942258", "type": "mqtt-broker", "z": "", "name": "", @@ -417,5 +4000,37 @@ "willTopic": "", "willQos": "0", "willPayload": "" + }, + { + "id": "cb2f36fe.1c7038", + "type": "mqtt-broker", + "z": "", + "name": "", + "broker": "0.0.0.0", + "port": "1883", + "clientid": "Client_node", + "usetls": false, + "compatmode": false, + "keepalive": "60", + "cleansession": true, + "birthTopic": "", + "birthQos": "0", + "birthPayload": "", + "closeTopic": "", + "closeQos": "0", + "closePayload": "", + "willTopic": "", + "willQos": "0", + "willPayload": "" + }, + { + "id": "737ec584.2eea2c", + "type": "ui_tab", + "z": "", + "name": "Sample", + "icon": "fa-eyedropper", + "order": 2, + "disabled": false, + "hidden": false } ]