2020-01-08 14:32:46 +01:00
[
{
2020-07-14 18:27:49 +02:00
"id" : "97600dff.93378" ,
"type" : "subflow" ,
"name" : "Acquisition actuation" ,
"info" : "" ,
"category" : "" ,
"in" : [ ] ,
"out" : [ ] ,
"env" : [ ] ,
"color" : "#A6BBCF"
2020-01-08 14:32:46 +01:00
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "604c996b.1a8428" ,
2020-01-08 14:32:46 +01:00
"type" : "ui_button" ,
2020-07-14 18:27:49 +02:00
"z" : "97600dff.93378" ,
2020-01-08 14:32:46 +01:00
"name" : "" ,
2020-07-14 18:22:31 +02:00
"group" : "cdb72118.692578" ,
2020-01-08 14:32:46 +01:00
"order" : 1 ,
2020-07-14 18:22:31 +02:00
"width" : 0 ,
"height" : 0 ,
2020-01-08 14:32:46 +01:00
"passthru" : false ,
2020-07-14 18:22:31 +02:00
"label" : "Start Acquisition" ,
2020-01-08 14:32:46 +01:00
"tooltip" : "" ,
"color" : "" ,
"bgcolor" : "" ,
"icon" : "" ,
"payload" : "" ,
"payloadType" : "str" ,
2020-07-14 18:22:31 +02:00
"topic" : "actuator/image" ,
"x" : 200 ,
"y" : 100 ,
2020-01-08 14:32:46 +01:00
"wires" : [
[
2020-07-14 18:27:49 +02:00
"b854ad48.5869e8"
2020-01-08 14:32:46 +01:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "b854ad48.5869e8" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "97600dff.93378" ,
2020-07-14 18:22:31 +02:00
"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\");\nvar segmentation= global.get(\"custom_segmentation\");\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 if (segmentation === undefined || segmentation === \"\" || segmentation === null) {\n msg.topic = \"Missing entry :\"\n msg.payload = \"Realize or not the segmentation\";\n \n}else {\n nb_frame=nb_frame-1\n \n msg.payload=sleep_before+' '+nb_step+' '+nb_frame+' '+segmentation;\n}\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"x" : 360 ,
"y" : 100 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"84505b75.883a48"
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-07-14 18:27:49 +02:00
"id" : "84505b75.883a48" ,
2020-07-14 18:22:31 +02:00
"type" : "switch" ,
2020-07-14 18:27:49 +02:00
"z" : "97600dff.93378" ,
2020-07-14 18:22:31 +02:00
"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 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"715a8f15.dc211"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"3173806b.bb0c7"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "3173806b.bb0c7" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_toast" ,
2020-07-14 18:27:49 +02:00
"z" : "97600dff.93378" ,
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" : 690 ,
"y" : 120 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "715a8f15.dc211" ,
2020-07-14 18:22:31 +02:00
"type" : "mqtt out" ,
2020-07-14 18:27:49 +02:00
"z" : "97600dff.93378" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"topic" : "" ,
"qos" : "" ,
"retain" : "" ,
"broker" : "e8ab36cc.74d77" ,
"x" : 670 ,
"y" : 80 ,
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "ed689faa.3a3e08" ,
2020-01-08 14:32:46 +01:00
"type" : "ui_button" ,
2020-07-14 18:27:49 +02:00
"z" : "97600dff.93378" ,
2020-07-14 18:22:31 +02:00
"name" : "Stop Acquisition" ,
"group" : "cdb72118.692578" ,
"order" : 2 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : true ,
"label" : "STOP ACQUISITION" ,
"tooltip" : "" ,
"color" : "" ,
"bgcolor" : "#AD1625" ,
"icon" : "" ,
"payload" : "off" ,
"payloadType" : "str" ,
"topic" : "actuator/wait" ,
"x" : 200 ,
"y" : 140 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"f6bd3440.60d5a"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "f6bd3440.60d5a" ,
2020-07-14 18:22:31 +02:00
"type" : "mqtt out" ,
2020-07-14 18:27:49 +02:00
"z" : "97600dff.93378" ,
2020-01-08 14:32:46 +01:00
"name" : "" ,
2020-07-14 18:22:31 +02:00
"topic" : "" ,
"qos" : "" ,
"retain" : "" ,
"broker" : "e8ab36cc.74d77" ,
"x" : 350 ,
"y" : 140 ,
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "3b827bf5.c7bc64" ,
2020-07-14 18:22:31 +02:00
"type" : "mqtt out" ,
2020-07-14 18:27:49 +02:00
"z" : "97600dff.93378" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"topic" : "" ,
"qos" : "" ,
"retain" : "" ,
"broker" : "e8ab36cc.74d77" ,
"x" : 350 ,
"y" : 180 ,
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "cdb72118.692578" ,
"type" : "ui_group" ,
"z" : "" ,
"name" : "Acquisition actuation" ,
"tab" : "2b97fe34.a699fa" ,
"order" : 10 ,
"disp" : true ,
"width" : 24 ,
"collapse" : false
} ,
{
"id" : "e8320d42.9a3ad8" ,
"type" : "subflow" ,
"name" : "MQQT Cmds" ,
"info" : "" ,
"category" : "" ,
"in" : [
{
"x" : 40 ,
"y" : 40 ,
"wires" : [
{
"id" : "cf9e02a2.3feff"
} ,
{
"id" : "18da28e6.7b000f"
}
]
}
] ,
"out" : [ ] ,
"env" : [ ] ,
"color" : "#DDAA99"
} ,
{
"id" : "a7301ba5.d56d48" ,
2020-07-14 18:22:31 +02:00
"type" : "exec" ,
2020-07-14 18:27:49 +02:00
"z" : "e8320d42.9a3ad8" ,
2020-07-14 18:22:31 +02:00
"command" : "python3.7 /home/pi/PlanktonScope/script/main.py" ,
"addpay" : false ,
"append" : "" ,
"useSpawn" : "false" ,
"timer" : "" ,
"oldrc" : false ,
"name" : "" ,
"x" : 910 ,
"y" : 140 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"87558394.4e589" ,
"a11158b1.b7649"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"87558394.4e589" ,
"a11158b1.b7649"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"87558394.4e589" ,
"a11158b1.b7649"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "62b9a3b1.74dbc4" ,
2020-07-14 18:22:31 +02:00
"type" : "exec" ,
2020-07-14 18:27:49 +02:00
"z" : "e8320d42.9a3ad8" ,
2020-07-14 18:22:31 +02:00
"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 ,
"name" : "" ,
"x" : 610 ,
"y" : 200 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"66fb9ed2.8ecd3"
2020-07-14 18:22:31 +02:00
] ,
[ ] ,
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "66fb9ed2.8ecd3" ,
2020-07-14 18:22:31 +02:00
"type" : "exec" ,
2020-07-14 18:27:49 +02:00
"z" : "e8320d42.9a3ad8" ,
2020-07-14 18:22:31 +02:00
"command" : "kill" ,
"addpay" : true ,
"append" : "" ,
"useSpawn" : "false" ,
"timer" : "" ,
"oldrc" : false ,
"name" : "" ,
"x" : 1050 ,
"y" : 200 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"87558394.4e589" ,
"a11158b1.b7649"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"87558394.4e589" ,
"a11158b1.b7649"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"87558394.4e589" ,
"a11158b1.b7649"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "5df162d7.08eb34" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_button" ,
2020-07-14 18:27:49 +02:00
"z" : "e8320d42.9a3ad8" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"group" : "9c86b3b7.54841" ,
"order" : 9 ,
2020-01-08 14:32:46 +01:00
"width" : 12 ,
2020-07-14 18:22:31 +02:00
"height" : 1 ,
2020-01-08 14:32:46 +01:00
"passthru" : false ,
2020-07-14 18:22:31 +02:00
"label" : "Kill MQTT" ,
2020-01-08 14:32:46 +01:00
"tooltip" : "" ,
"color" : "" ,
"bgcolor" : "" ,
"icon" : "" ,
"payload" : "" ,
"payloadType" : "str" ,
2020-07-14 18:22:31 +02:00
"topic" : "" ,
"x" : 80 ,
"y" : 200 ,
2020-01-08 14:32:46 +01:00
"wires" : [
[
2020-07-14 18:27:49 +02:00
"62b9a3b1.74dbc4"
2020-01-08 14:32:46 +01:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "d16389e5.3bc67" ,
2020-01-08 14:32:46 +01:00
"type" : "ui_button" ,
2020-07-14 18:27:49 +02:00
"z" : "e8320d42.9a3ad8" ,
2020-01-08 14:32:46 +01:00
"name" : "" ,
2020-07-14 18:22:31 +02:00
"group" : "9c86b3b7.54841" ,
"order" : 10 ,
2020-01-08 14:32:46 +01:00
"width" : 12 ,
2020-07-14 18:22:31 +02:00
"height" : 1 ,
2020-01-08 14:32:46 +01:00
"passthru" : false ,
2020-07-14 18:22:31 +02:00
"label" : "Restart MQTT" ,
2020-01-08 14:32:46 +01:00
"tooltip" : "" ,
"color" : "" ,
"bgcolor" : "" ,
"icon" : "" ,
"payload" : "" ,
"payloadType" : "str" ,
2020-07-14 18:22:31 +02:00
"topic" : "" ,
"x" : 100 ,
"y" : 140 ,
2020-01-08 14:32:46 +01:00
"wires" : [
[
2020-07-14 18:27:49 +02:00
"a7301ba5.d56d48"
2020-01-08 14:32:46 +01:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "87558394.4e589" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_toast" ,
2020-07-14 18:27:49 +02:00
"z" : "e8320d42.9a3ad8" ,
2020-07-14 18:22:31 +02:00
"position" : "top right" ,
"displayTime" : "3" ,
"highlight" : "" ,
"sendall" : true ,
"outputs" : 0 ,
"ok" : "OK" ,
"cancel" : "" ,
"raw" : false ,
"topic" : "" ,
2020-01-08 14:32:46 +01:00
"name" : "" ,
2020-07-14 18:22:31 +02:00
"x" : 1260 ,
"y" : 140 ,
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "500abffa.c7a788" ,
"type" : "file" ,
"z" : "e8320d42.9a3ad8" ,
"name" : "" ,
"filename" : "/home/pi/PlanktonScope/script/main.py" ,
"appendNewline" : false ,
"createDir" : true ,
"overwriteFile" : "true" ,
"encoding" : "none" ,
"x" : 530 ,
"y" : 100 ,
"wires" : [
[
"a7301ba5.d56d48"
]
]
} ,
{
"id" : "985c65de.0801b" ,
"type" : "template" ,
"z" : "e8320d42.9a3ad8" ,
"name" : "main.py" ,
"field" : "payload" ,
"fieldType" : "msg" ,
"format" : "python" ,
"syntax" : "plain" ,
"template" : "################################################################################\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#Library to send command over I2C for the light module on the fan\nimport smbus\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, subprocess\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#Creation of the webpage containing the PiCamera Streaming\n################################################################################\n\nPAGE=\"\"\"\\\n<html>\n<head>\n<title>PlanktonScope v2 | PiCamera Streaming</title>\n</head>\n<body>\n<img src=\"stream.mjpg\" width=\"640\" height=\"480\" />\n</body>\n</html>\n\"\"\" \ n \ n # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # \ n # C l a s s e s f o r t h e P i C a m e r a S t r e a m i n g \ n # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # \ n \ n c l a s s S t r e a m i n g O u t p u t ( o b j e c t ) : \ n d e f _ _ i n i t _ _ ( s e l f ) : \ n s e l f . f r a m e = N o n e \ n s e l f . b u f f e r = i o . B y t e s I O ( ) \ n s e l f . c o n d i t i o n = C o n d i t i o n ( ) \ n \ n d e f w r i t e ( s e l f , b u f ) : \ n i f b u f . s t a r t s w i t h ( b ' \ \ x f f \ \ x d 8 ' ) : \ n # N e w f r a m e , c o p y t h e e x i s t i n g b u f f e r ' s c o n t e n t a n d n o t i f y a l l \ n # c l i e n t s i t ' s a v a i l a b l e \ n s e l f . b u f f e r . t r u n c a t e ( ) \ n w i t h s e l f . c o n d i t i o n : \ n s e l f . f r a m e = s e l f . b u f f e r . g e t v a l u e ( ) \ n s e l f . c o n d i t i o n . n o t i f y _ a l l ( ) \ n s e l f . b u f f e r . s e e k ( 0 ) \ n r e t u r n s e l f . b u f f e r . w r i t e ( b u f ) \ n \ n c l a s s S t r e a m i n g H a n d l e r ( s e r v e r . B a s e H T T P R e q u e s t H a n d l e r ) : \ n d e f d o _ G E T ( s e l f ) : \ n i f s e l f . p a t h = = ' / ' : \ n s e l f . s e n d _ r e s p o n s e ( 301 ) \ n s e l f . s e n d _ h e a d e r ( ' L o c a t i o n ' , ' / i n d e x . h t m l ' ) \ n s e l f . e n d _ h e a d e r s ( ) \ n e l i f s e l f . p a t h = = ' / i n d e x . h t m l ' : \ n c o n t e n t = P A G E . e n c o d e ( ' u t f -8 ' ) \ n s e l f . s e n d _ r e s p
"output" : "str" ,
"x" : 300 ,
"y" : 100 ,
"wires" : [
[
"500abffa.c7a788"
]
]
} ,
{
"id" : "a11158b1.b7649" ,
"type" : "debug" ,
"z" : "e8320d42.9a3ad8" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "true" ,
"targetType" : "full" ,
"x" : 1230 ,
"y" : 200 ,
"wires" : [ ]
} ,
{
"id" : "cf9e02a2.3feff" ,
"type" : "exec" ,
"z" : "e8320d42.9a3ad8" ,
"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 ,
"name" : "" ,
"x" : 430 ,
"y" : 40 ,
"wires" : [
[
"945415c5.01217"
] ,
[ ] ,
[ ]
]
} ,
{
"id" : "945415c5.01217" ,
"type" : "exec" ,
"z" : "e8320d42.9a3ad8" ,
"command" : "kill" ,
"addpay" : true ,
"append" : "" ,
"useSpawn" : "false" ,
"timer" : "" ,
"oldrc" : false ,
"name" : "" ,
"x" : 910 ,
"y" : 40 ,
"wires" : [
[ ] ,
[ ] ,
[ ]
]
} ,
{
"id" : "18da28e6.7b000f" ,
"type" : "delay" ,
"z" : "e8320d42.9a3ad8" ,
"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" : [
[
"985c65de.0801b"
]
]
} ,
{
"id" : "6384a5e.e34465c" ,
"type" : "subflow" ,
"name" : "Datetime update" ,
"info" : "" ,
"category" : "" ,
"in" : [
{
"x" : 140 ,
"y" : 80 ,
"wires" : [
{
"id" : "42ffcda3.49c30c"
}
]
}
] ,
"out" : [ ] ,
"env" : [ ] ,
"color" : "#DDAA99" ,
"icon" : "font-awesome/fa-clock-o"
} ,
{
"id" : "e3824a97.8f2c3" ,
2020-07-14 18:22:31 +02:00
"type" : "exec" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"command" : "sudo date -s" ,
"addpay" : true ,
"append" : "" ,
"useSpawn" : "false" ,
"timer" : "" ,
"oldrc" : false ,
"name" : "" ,
"x" : 1010 ,
"y" : 240 ,
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-07-14 18:27:49 +02:00
"id" : "a5a13db6.4c6958" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"func" : "d = new Date();\n//get weekday\nvar weekday = new Array(7);\nweekday[0] = \"Sun\";\nweekday[1] = \"Mon\";\nweekday[2] = \"Tue\";\nweekday[3] = \"Wed\";\nweekday[4] = \"Thu\";\nweekday[5] = \"Fri\";\nweekday[6] = \"Sat\";\nvar w = weekday[d.getUTCDay()];\n//get Month\nvar month = new Array(12);\nmonth[0] = \"Jan\";\nmonth[1] = \"Feb\";\nmonth[2] = \"Mar\";\nmonth[3] = \"Apr\";\nmonth[4] = \"May\";\nmonth[5] = \"Jun\";\nmonth[6] = \"Jul\";\nmonth[7] = \"Aug\";\nmonth[8] = \"Sep\";\nmonth[9] = \"Oct\";\nmonth[10] = \"Nov\";\nmonth[11] = \"Dec\";\nvar n = month[d.getUTCMonth()];\n \n//get day\nvar day = d.getUTCDay()\n\n//get Hours\nvar Hours = d.getUTCHours();\n//get Minutes\nvar Minutes = d.getUTCMinutes();\n//get Seconds\nvar Seconds = d.getUTCSeconds();\n//get FullYear\nvar FullYear = d.getUTCFullYear();\n\n//Thu Aug 09 2012 23:34:04 GMT+0200 (GMT+02:00)\n\n//Thu Aug 9 21:31:26 UTC 2012\n\n//msg.payload = \"Thu Aug 9 21:31:26 UTC 2012\"\n\nmsg.payload = '\"'+w+\" \"+n+\" \"+day+\" \"+Hours+\":\"+Minutes+\":\"+Seconds+\" UTC \"+FullYear+'\"';\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"x" : 490 ,
"y" : 40 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"bafb69f.a42ea18"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "bafb69f.a42ea18" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_template" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"group" : "9c86b3b7.54841" ,
2020-01-08 14:32:46 +01:00
"name" : "" ,
2020-07-14 18:22:31 +02:00
"order" : 1 ,
2020-01-08 14:32:46 +01:00
"width" : 0 ,
"height" : 0 ,
2020-07-14 18:22:31 +02:00
"format" : "<div ng-bind-html=\"msg.payload\"></div>" ,
"storeOutMessages" : true ,
"fwdInMessages" : true ,
"templateScope" : "local" ,
"x" : 640 ,
"y" : 40 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "81f9cd4c.8540b" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_numeric" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"name" : "tmp_year" ,
"label" : "Year" ,
"tooltip" : "" ,
"group" : "9c86b3b7.54841" ,
"order" : 2 ,
"width" : 5 ,
"height" : 1 ,
"wrap" : false ,
"passthru" : true ,
"topic" : "tmp_year" ,
"format" : "{{value}}" ,
"min" : "2020" ,
"max" : "2030" ,
"step" : 1 ,
"x" : 640 ,
"y" : 80 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"8f5a74df.0663f"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "274f25fc.9e61ba" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_numeric" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"name" : "tmp_month" ,
"label" : "Month" ,
"tooltip" : "" ,
"group" : "9c86b3b7.54841" ,
"order" : 3 ,
"width" : 3 ,
"height" : 1 ,
"wrap" : false ,
"passthru" : true ,
"topic" : "tmp_month" ,
"format" : "{{value}}" ,
"min" : "1" ,
"max" : "12" ,
"step" : 1 ,
"x" : 650 ,
"y" : 120 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"8f5a74df.0663f"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "4ddcb673.905a" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_numeric" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"name" : "tmp_day" ,
"label" : "Day" ,
"tooltip" : "" ,
"group" : "9c86b3b7.54841" ,
"order" : 4 ,
"width" : 3 ,
"height" : 1 ,
"wrap" : false ,
"passthru" : true ,
"topic" : "tmp_day" ,
"format" : "{{value}}" ,
"min" : "1" ,
"max" : "31" ,
"step" : 1 ,
"x" : 640 ,
"y" : 160 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"8f5a74df.0663f"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "248eee4c.238282" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_numeric" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"name" : "tmp_hour" ,
"label" : "Hour" ,
"tooltip" : "" ,
"group" : "9c86b3b7.54841" ,
"order" : 5 ,
"width" : 3 ,
"height" : 1 ,
"wrap" : false ,
"passthru" : true ,
"topic" : "tmp_hour" ,
"format" : "{{value}}" ,
"min" : "0" ,
"max" : "23" ,
"step" : 1 ,
"x" : 640 ,
"y" : 200 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"8f5a74df.0663f"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "a368c4b7.2dc4b8" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_numeric" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"name" : "tmp_minute" ,
"label" : "Minute" ,
"tooltip" : "" ,
"group" : "9c86b3b7.54841" ,
"order" : 6 ,
"width" : 3 ,
"height" : 1 ,
"wrap" : false ,
"passthru" : true ,
"topic" : "tmp_minute" ,
"format" : "{{value}}" ,
"min" : "0" ,
"max" : "59" ,
"step" : 1 ,
"x" : 650 ,
"y" : 240 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"8f5a74df.0663f"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "96cc9953.9496c8" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_numeric" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"name" : "tmp_second" ,
"label" : "Second" ,
"tooltip" : "" ,
"group" : "9c86b3b7.54841" ,
"order" : 7 ,
"width" : 3 ,
"height" : 1 ,
"wrap" : false ,
"passthru" : true ,
"topic" : "tmp_second" ,
"format" : "{{value}}" ,
"min" : "0" ,
"max" : "59" ,
"step" : 1 ,
"x" : 650 ,
"y" : 280 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"8f5a74df.0663f"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "d6240495.8429c" ,
2020-07-14 18:22:31 +02:00
"type" : "interval" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"name" : "interval" ,
"interval" : "1" ,
"onstart" : false ,
"msg" : "ping" ,
"showstatus" : true ,
"unit" : "seconds" ,
"statusformat" : "YYYY-MM-D HH:mm:ss" ,
"x" : 310 ,
"y" : 40 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"a5a13db6.4c6958"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "e8d38dc0.c7e84" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_button" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"group" : "9c86b3b7.54841" ,
"order" : 8 ,
"width" : 4 ,
"height" : 1 ,
2020-01-08 14:32:46 +01:00
"passthru" : false ,
2020-07-14 18:22:31 +02:00
"label" : "Update" ,
2020-01-08 14:32:46 +01:00
"tooltip" : "" ,
2020-07-14 18:22:31 +02:00
"color" : "black" ,
"bgcolor" : "white" ,
2020-01-08 14:32:46 +01:00
"icon" : "" ,
"payload" : "" ,
"payloadType" : "str" ,
2020-07-14 18:22:31 +02:00
"topic" : "" ,
"x" : 640 ,
"y" : 320 ,
2020-01-08 14:32:46 +01:00
"wires" : [
[
2020-07-14 18:27:49 +02:00
"581f71d3.bde458"
2020-01-08 14:32:46 +01:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "581f71d3.bde458" ,
2020-01-08 14:32:46 +01:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"name" : "update datetime" ,
"func" : "var FullYear= global.get(\"year\");\nvar Month= global.get(\"month\");\nvar day= global.get(\"day\");\nvar Hours= global.get(\"hour\");\nvar Minutes= global.get(\"minute\");\nvar Seconds= global.get(\"second\");\n\nmsg.payload = new Date();\n//get Month\nvar month = new Array(12);\nmonth[1] = \"Jan\";\nmonth[2] = \"Feb\";\nmonth[3] = \"Mar\";\nmonth[4] = \"Apr\";\nmonth[5] = \"May\";\nmonth[6] = \"Jun\";\nmonth[7] = \"Jul\";\nmonth[8] = \"Aug\";\nmonth[9] = \"Sep\";\nmonth[10] = \"Oct\";\nmonth[11] = \"Nov\";\nmonth[12] = \"Dec\";\nvar n = month[Month];\n \nmsg.payload = '\"'+day+\" \"+n+\" \"+FullYear+\" \"+Hours+\":\"+Minutes+\":\"+Seconds+'\"';\n\n\nreturn msg;" ,
2020-01-08 14:32:46 +01:00
"outputs" : 1 ,
"noerr" : 0 ,
2020-07-14 18:22:31 +02:00
"x" : 800 ,
"y" : 320 ,
2020-01-08 14:32:46 +01:00
"wires" : [
[
2020-07-14 18:27:49 +02:00
"6b023a67.faa104" ,
"e3824a97.8f2c3"
2020-01-08 14:32:46 +01:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "8f5a74df.0663f" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
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 ,
"x" : 840 ,
"y" : 60 ,
2020-01-08 14:32:46 +01:00
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "6b023a67.faa104" ,
2020-07-14 18:22:31 +02:00
"type" : "debug" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "false" ,
"x" : 1010 ,
"y" : 300 ,
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "4ab089b9.1098" ,
2020-01-08 14:32:46 +01:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"func" : "d = msg.payload;\n\nvar val = d.getUTCFullYear();\n\nmsg.payload = val;\nreturn msg;" ,
2020-01-08 14:32:46 +01:00
"outputs" : 1 ,
"noerr" : 0 ,
2020-07-14 18:22:31 +02:00
"x" : 490 ,
"y" : 80 ,
2020-01-08 14:32:46 +01:00
"wires" : [
[
2020-07-14 18:27:49 +02:00
"81f9cd4c.8540b"
2020-01-08 14:32:46 +01:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "42ffcda3.49c30c" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-01-08 14:32:46 +01:00
"name" : "" ,
2020-07-14 18:22:31 +02:00
"func" : "d = new Date();\nmsg.payload = d\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"x" : 310 ,
"y" : 80 ,
2020-01-08 14:32:46 +01:00
"wires" : [
[
2020-07-14 18:27:49 +02:00
"4ab089b9.1098" ,
"13529b2c.cb9d9d" ,
"c09bb768.0e7518" ,
"967b4488.670f08" ,
"3e3732d.273a04e" ,
"327729f0.afe466"
2020-01-08 14:32:46 +01:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "13529b2c.cb9d9d" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-01-08 14:32:46 +01:00
"name" : "" ,
2020-07-14 18:22:31 +02:00
"func" : "d = msg.payload;\n\nvar val = d.getUTCMonth();\n\nmsg.payload = val+1;\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"x" : 490 ,
"y" : 120 ,
2020-01-08 14:32:46 +01:00
"wires" : [
2020-07-14 18:22:31 +02:00
[
2020-07-14 18:27:49 +02:00
"274f25fc.9e61ba"
2020-07-14 18:22:31 +02:00
]
2020-01-08 14:32:46 +01:00
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "c09bb768.0e7518" ,
2020-01-08 14:32:46 +01:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"func" : "d = msg.payload;\n\nvar val = d.getUTCDay();\n\nmsg.payload = val;\nreturn msg;" ,
2020-01-08 14:32:46 +01:00
"outputs" : 1 ,
"noerr" : 0 ,
2020-07-14 18:22:31 +02:00
"x" : 490 ,
"y" : 160 ,
2020-01-08 14:32:46 +01:00
"wires" : [
[
2020-07-14 18:27:49 +02:00
"4ddcb673.905a"
2020-01-08 14:32:46 +01:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "967b4488.670f08" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-01-08 14:32:46 +01:00
"name" : "" ,
2020-07-14 18:22:31 +02:00
"func" : "d = msg.payload;\n\nvar val = d.getUTCHours();\n\nmsg.payload = val;\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"x" : 490 ,
"y" : 200 ,
2020-01-08 14:32:46 +01:00
"wires" : [
[
2020-07-14 18:27:49 +02:00
"248eee4c.238282"
2020-01-08 14:32:46 +01:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "3e3732d.273a04e" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-01-08 14:32:46 +01:00
"name" : "" ,
2020-07-14 18:22:31 +02:00
"func" : "d = msg.payload;\n\nvar val = d.getUTCMinutes();\n\nmsg.payload = val;\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"x" : 490 ,
"y" : 240 ,
2020-01-08 14:32:46 +01:00
"wires" : [
2020-07-14 18:22:31 +02:00
[
2020-07-14 18:27:49 +02:00
"a368c4b7.2dc4b8"
2020-07-14 18:22:31 +02:00
]
2020-01-08 14:32:46 +01:00
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "327729f0.afe466" ,
2020-01-08 14:32:46 +01:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "6384a5e.e34465c" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"func" : "d = msg.payload;\n\nvar val = d.getUTCSeconds();\n\nmsg.payload = val;\nreturn msg;" ,
2020-01-08 14:32:46 +01:00
"outputs" : 1 ,
"noerr" : 0 ,
2020-07-14 18:22:31 +02:00
"x" : 490 ,
"y" : 280 ,
2020-01-08 14:32:46 +01:00
"wires" : [
[
2020-07-14 18:27:49 +02:00
"96cc9953.9496c8"
2020-01-08 14:32:46 +01:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "9c86b3b7.54841" ,
"type" : "ui_group" ,
"z" : "" ,
"name" : "Datetime" ,
"tab" : "2b97fe34.a699fa" ,
"order" : 1 ,
"disp" : true ,
"width" : "24" ,
"collapse" : false
} ,
{
"id" : "a156df1e.d37178" ,
"type" : "subflow" ,
"name" : "Acquisition inputs" ,
"info" : "" ,
"category" : "" ,
"in" : [
{
"x" : 40 ,
"y" : 40 ,
"wires" : [
{
"id" : "2dd27be1.476eac"
} ,
{
"id" : "3883d084.feb708"
} ,
{
"id" : "4bf1038f.d36f9c"
} ,
{
"id" : "ae15c276.ec8c68"
}
]
}
] ,
"out" : [
{
"x" : 740 ,
"y" : 40 ,
"wires" : [
{
"id" : "b996437b.1a45b8" ,
"port" : 0
} ,
{
"id" : "d56a51c1.60023" ,
"port" : 0
} ,
{
"id" : "229ade87.b1656a" ,
"port" : 0
} ,
{
"id" : "5e093b67.a32f9c" ,
"port" : 0
}
]
}
] ,
"env" : [ ] ,
"color" : "#A6BBCF" ,
"icon" : "node-red-contrib-camerapi/photo.png"
} ,
{
"id" : "b996437b.1a45b8" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_text_input" ,
2020-07-14 18:27:49 +02:00
"z" : "a156df1e.d37178" ,
2020-07-14 18:22:31 +02:00
"name" : "custom_nb_step" ,
"label" : "Number of steps in between two images" ,
"tooltip" : "" ,
"group" : "48649115.fcd01" ,
"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-07-14 18:27:49 +02:00
"id" : "229ade87.b1656a" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_text_input" ,
2020-07-14 18:27:49 +02:00
"z" : "a156df1e.d37178" ,
2020-07-14 18:22:31 +02:00
"name" : "custom_nb_frame" ,
"label" : "Number of images per acquisition" ,
"tooltip" : "" ,
"group" : "48649115.fcd01" ,
"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-07-14 18:27:49 +02:00
"id" : "2dd27be1.476eac" ,
2020-01-08 14:32:46 +01:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "a156df1e.d37178" ,
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-07-14 18:27:49 +02:00
"b996437b.1a45b8"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "4bf1038f.d36f9c" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "a156df1e.d37178" ,
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-07-14 18:27:49 +02:00
"229ade87.b1656a"
2020-01-08 14:32:46 +01:00
]
]
2020-07-14 18:22:31 +02:00
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "ae15c276.ec8c68" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "a156df1e.d37178" ,
2020-07-14 18:22:31 +02:00
"name" : "get custom_segmentation" ,
"func" : "msg.payload = msg.payload.custom_segmentation;\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"x" : 230 ,
"y" : 160 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"5e093b67.a32f9c"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "3883d084.feb708" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "a156df1e.d37178" ,
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-07-14 18:27:49 +02:00
"d56a51c1.60023"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "d56a51c1.60023" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_text_input" ,
2020-07-14 18:27:49 +02:00
"z" : "a156df1e.d37178" ,
2020-07-14 18:22:31 +02:00
"name" : "custom_sleep_before" ,
"label" : "Duration before the acquisition (s)" ,
"tooltip" : "" ,
"group" : "48649115.fcd01" ,
"order" : 1 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : true ,
"mode" : "number" ,
"delay" : 300 ,
"topic" : "custom_sleep_before" ,
"x" : 520 ,
"y" : 40 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "5e093b67.a32f9c" ,
"type" : "ui_switch" ,
"z" : "a156df1e.d37178" ,
"name" : "custom_segmentation" ,
"label" : "Realize the segmentation" ,
"tooltip" : "" ,
"group" : "48649115.fcd01" ,
"order" : 6 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : true ,
"decouple" : "false" ,
"topic" : "custom_segmentation" ,
"style" : "" ,
"onvalue" : "True" ,
"onvalueType" : "str" ,
"onicon" : "" ,
"oncolor" : "" ,
"offvalue" : "False" ,
"offvalueType" : "str" ,
"officon" : "" ,
"offcolor" : "" ,
"x" : 520 ,
"y" : 160 ,
"wires" : [
[ ]
]
} ,
{
"id" : "48649115.fcd01" ,
"type" : "ui_group" ,
"z" : "" ,
"name" : "Acquisition inputs" ,
"tab" : "2b97fe34.a699fa" ,
"order" : 9 ,
"disp" : true ,
"width" : "24" ,
"collapse" : false
} ,
{
"id" : "99798a85.e62408" ,
"type" : "subflow" ,
"name" : "Process metadata" ,
"info" : "" ,
"category" : "" ,
"in" : [
{
"x" : 40 ,
"y" : 80 ,
"wires" : [
{
"id" : "20414296.54837e"
}
]
}
] ,
"out" : [
{
"x" : 700 ,
"y" : 80 ,
"wires" : [
{
"id" : "d5ab9061.b06a9" ,
"port" : 0
}
]
}
] ,
"env" : [ ] ,
"color" : "#DDAA99"
} ,
{
"id" : "d5ab9061.b06a9" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_text_input" ,
2020-07-14 18:27:49 +02:00
"z" : "99798a85.e62408" ,
2020-07-14 18:22:31 +02:00
"name" : "process_id" ,
"label" : "Id of the process" ,
"tooltip" : "" ,
"group" : "beeb994e.b67688" ,
"order" : 1 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : true ,
"mode" : "number" ,
"delay" : 300 ,
"topic" : "process_id" ,
"x" : 550 ,
"y" : 80 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "20414296.54837e" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "99798a85.e62408" ,
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-07-14 18:27:49 +02:00
"d5ab9061.b06a9"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "beeb994e.b67688" ,
"type" : "ui_group" ,
"z" : "" ,
"name" : "Process metadata" ,
"tab" : "2b97fe34.a699fa" ,
"order" : 8 ,
"disp" : true ,
"width" : 24 ,
"collapse" : false
} ,
{
"id" : "246abd43.838a5a" ,
"type" : "subflow" ,
"name" : "MQTT Receive & Plot" ,
"info" : "" ,
"category" : "" ,
"in" : [ ] ,
"out" : [ ] ,
"env" : [ ] ,
"color" : "#F3B567" ,
"icon" : "node-red/bridge.svg"
} ,
{
"id" : "1aeca49c.10b893" ,
2020-07-14 18:22:31 +02:00
"type" : "mqtt in" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"topic" : "receiver/#" ,
"qos" : "0" ,
"datatype" : "auto" ,
"broker" : "84801dc0.193d88" ,
"x" : 80 ,
"y" : 40 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"be5de01e.45d56" ,
"613bee5b.042fe"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "be5de01e.45d56" ,
2020-07-14 18:22:31 +02:00
"type" : "switch" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"x" : 230 ,
"y" : 40 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"d39289fb.9f759"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"e2ab3af3.e61a8"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"e43e94c.c297968"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"b06c80f3.f1642"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "d39289fb.9f759" ,
2020-07-14 18:22:31 +02:00
"type" : "switch" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"x" : 470 ,
"y" : 40 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"267bd959.17b856"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"265e58c6.06de38"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"a433c901.2abd48"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "267bd959.17b856" ,
2020-07-14 18:22:31 +02:00
"type" : "change" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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-07-14 18:27:49 +02:00
"3b6b4fd4.8c3368"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "265e58c6.06de38" ,
2020-07-14 18:22:31 +02:00
"type" : "change" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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-07-14 18:27:49 +02:00
"3b6b4fd4.8c3368"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "a433c901.2abd48" ,
2020-07-14 18:22:31 +02:00
"type" : "change" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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-07-14 18:27:49 +02:00
"3b6b4fd4.8c3368"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "e2ab3af3.e61a8" ,
2020-07-14 18:22:31 +02:00
"type" : "switch" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"x" : 470 ,
"y" : 200 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"bd89c468.5a4f4"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"762ab12c.cc7e88"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"ecb1efe6.7cb968"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "bd89c468.5a4f4" ,
2020-07-14 18:22:31 +02:00
"type" : "change" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"y" : 200 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"3b6b4fd4.8c3368"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "762ab12c.cc7e88" ,
2020-07-14 18:22:31 +02:00
"type" : "change" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"y" : 240 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"3b6b4fd4.8c3368"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "ecb1efe6.7cb968" ,
2020-07-14 18:22:31 +02:00
"type" : "change" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"y" : 280 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"3b6b4fd4.8c3368"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "e43e94c.c297968" ,
2020-07-14 18:22:31 +02:00
"type" : "switch" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"x" : 470 ,
"y" : 360 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"87a2aa4d.3590c8"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"da9f9e9b.7c9f5"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"1143b916.5047b7"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"fa7f2eaf.0e6f1" ,
"3b6b4fd4.8c3368"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "30c9c4c9.d46e3c" ,
2020-07-14 18:22:31 +02:00
"type" : "switch" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"x" : 650 ,
"y" : 560 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"23e5c77c.4f63f"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"5491334a.93cbfc"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "da9f9e9b.7c9f5" ,
2020-07-14 18:22:31 +02:00
"type" : "change" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"y" : 400 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"3b6b4fd4.8c3368"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "1143b916.5047b7" ,
2020-07-14 18:22:31 +02:00
"type" : "change" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"y" : 440 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"3b6b4fd4.8c3368"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "87a2aa4d.3590c8" ,
2020-07-14 18:22:31 +02:00
"type" : "change" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"y" : 360 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"3b6b4fd4.8c3368"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "fa7f2eaf.0e6f1" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"y" : 480 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"582d7204.ec89fc"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "498b3d58.58b1a4" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"y" : 640 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"67618ae5.b74864"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "582d7204.ec89fc" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_chart" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
2020-07-14 18:22:31 +02:00
"name" : "img_counter" ,
"group" : "eb610eb9.84fae8" ,
"order" : 2 ,
"width" : 23 ,
"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 ,
"y" : 480 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "b06c80f3.f1642" ,
2020-07-14 18:22:31 +02:00
"type" : "switch" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
2020-07-14 18:22:31 +02:00
"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" : 470 ,
"y" : 560 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"30c9c4c9.d46e3c"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"498b3d58.58b1a4"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"33094026.f6e8c"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "5491334a.93cbfc" ,
2020-07-14 18:22:31 +02:00
"type" : "change" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"y" : 600 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"3b6b4fd4.8c3368"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "23e5c77c.4f63f" ,
2020-07-14 18:22:31 +02:00
"type" : "change" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
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 ,
"y" : 560 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"3b6b4fd4.8c3368"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "67618ae5.b74864" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_chart" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
2020-07-14 18:22:31 +02:00
"name" : "obj_counter" ,
"group" : "eb610eb9.84fae8" ,
"order" : 5 ,
"width" : 23 ,
"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 ,
"y" : 640 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "3c29eb4.e570414" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"func" : "msg.payload=msg.payload.object_area\nmsg.topic=\"area\"\n\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"x" : 810 ,
"y" : 700 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"84dfe51a.0e9fd"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "33094026.f6e8c" ,
2020-07-14 18:22:31 +02:00
"type" : "json" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"property" : "payload" ,
"action" : "" ,
"pretty" : false ,
"x" : 650 ,
"y" : 700 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"3c29eb4.e570414"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "9b672325.568a18" ,
2020-07-14 18:22:31 +02:00
"type" : "exec" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
2020-07-14 18:22:31 +02:00
"command" : "free -m | grep \"Mem\" | awk -F ' ' '{print $3}'" ,
"addpay" : false ,
"append" : "" ,
"useSpawn" : "" ,
"timer" : "" ,
"name" : "Get memory used" ,
"x" : 750 ,
"y" : 780 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"76a7ddb6.fbde64"
2020-07-14 18:22:31 +02:00
] ,
[ ] ,
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "7c9eaef6.142a4" ,
2020-07-14 18:22:31 +02:00
"type" : "inject" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"topic" : "" ,
"payload" : "" ,
"payloadType" : "num" ,
"repeat" : "1" ,
"crontab" : "" ,
"once" : false ,
"onceDelay" : "" ,
"x" : 570 ,
"y" : 780 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"9b672325.568a18"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "76a7ddb6.fbde64" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_chart" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"group" : "eb610eb9.84fae8" ,
"order" : 1 ,
"width" : 0 ,
"height" : 0 ,
"label" : "Memory load" ,
"chartType" : "line" ,
"legend" : "false" ,
"xformat" : "auto" ,
"interpolate" : "linear" ,
"nodata" : "" ,
"dot" : true ,
"ymin" : "" ,
"ymax" : "" ,
"removeOlder" : 1 ,
"removeOlderPoints" : "200" ,
"removeOlderUnit" : "3600" ,
"cutout" : 0 ,
"useOneColor" : false ,
"colors" : [
"#1f77b4" ,
"#aec7e8" ,
"#ff7f0e" ,
"#2ca02c" ,
"#98df8a" ,
"#d62728" ,
"#ff9896" ,
"#9467bd" ,
"#c5b0d5"
] ,
"useOldStyle" : false ,
"outputs" : 1 ,
"x" : 950 ,
"y" : 760 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "84dfe51a.0e9fd" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_chart" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"group" : "eb610eb9.84fae8" ,
"order" : 8 ,
"width" : 0 ,
"height" : 0 ,
"label" : "chart" ,
"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 ,
"x" : 970 ,
"y" : 700 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "3b6b4fd4.8c3368" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_toast" ,
2020-07-14 18:27:49 +02:00
"z" : "246abd43.838a5a" ,
2020-07-14 18:22:31 +02:00
"position" : "top right" ,
"displayTime" : "3" ,
"highlight" : "" ,
"sendall" : true ,
"outputs" : 0 ,
"ok" : "OK" ,
"cancel" : "" ,
"raw" : false ,
"topic" : "" ,
"name" : "" ,
"x" : 1220 ,
"y" : 360 ,
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "613bee5b.042fe" ,
"type" : "debug" ,
"z" : "246abd43.838a5a" ,
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "true" ,
"targetType" : "full" ,
"x" : 240 ,
"y" : 140 ,
"wires" : [ ]
2020-07-14 18:22:31 +02:00
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "84801dc0.193d88" ,
"type" : "mqtt-broker" ,
"z" : "" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
2020-07-14 18:27: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" : ""
2020-07-14 18:22:31 +02:00
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "eb610eb9.84fae8" ,
"type" : "ui_group" ,
"z" : "" ,
"name" : "MQTT Plots" ,
"tab" : "2b97fe34.a699fa" ,
"order" : 11 ,
"disp" : true ,
"width" : "24" ,
"collapse" : false
} ,
{
"id" : "1273b673.4a35ea" ,
"type" : "subflow" ,
"name" : "System Commands" ,
"info" : "" ,
"category" : "" ,
"in" : [ ] ,
"out" : [ ] ,
"env" : [ ] ,
"color" : "#FFCC66" ,
"icon" : "node-red-dashboard/ui_button.png"
2020-07-14 18:22:31 +02:00
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "44a78834.e8f8b8" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_button" ,
2020-07-14 18:27:49 +02:00
"z" : "1273b673.4a35ea" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"group" : "82b3caaa.0518" ,
"order" : 1 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : false ,
"label" : "Reboot" ,
"tooltip" : "" ,
"color" : "" ,
"bgcolor" : "#AD1625" ,
"icon" : "" ,
"payload" : "off" ,
"payloadType" : "str" ,
"topic" : "reboot" ,
"x" : 220 ,
"y" : 80 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"aba9aac1.c2d198"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "a32bfa65.bc6b9" ,
2020-07-14 18:22:31 +02:00
"type" : "exec" ,
2020-07-14 18:27:49 +02:00
"z" : "1273b673.4a35ea" ,
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-07-14 18:27:49 +02:00
"id" : "825c8791.c0bfb" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_button" ,
2020-07-14 18:27:49 +02:00
"z" : "1273b673.4a35ea" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"group" : "82b3caaa.0518" ,
"order" : 2 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : false ,
"label" : "Shutdown" ,
"tooltip" : "" ,
"color" : "" ,
"bgcolor" : "#AD1625" ,
"icon" : "" ,
"payload" : "off" ,
"payloadType" : "str" ,
"topic" : "shutdown" ,
"x" : 220 ,
"y" : 140 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"aba9aac1.c2d198"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "aba9aac1.c2d198" ,
2020-07-14 18:22:31 +02:00
"type" : "python3-function" ,
2020-07-14 18:27:49 +02:00
"z" : "1273b673.4a35ea" ,
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-07-14 18:27:49 +02:00
"72b7368a.abad3" ,
"a32bfa65.bc6b9"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "72b7368a.abad3" ,
2020-07-14 18:22:31 +02:00
"type" : "exec" ,
2020-07-14 18:27:49 +02:00
"z" : "1273b673.4a35ea" ,
2020-07-14 18:22:31 +02:00
"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
"id" : "82b3caaa.0518" ,
"type" : "ui_group" ,
"z" : "" ,
"name" : "Commands" ,
"tab" : "2b97fe34.a699fa" ,
"order" : 12 ,
"disp" : true ,
"width" : 24 ,
"collapse" : false
} ,
{
"id" : "506e9090.6e905" ,
"type" : "subflow" ,
"name" : "Object metadata" ,
"info" : "" ,
"category" : "" ,
"in" : [
{
"x" : 40 ,
"y" : 40 ,
"wires" : [
{
"id" : "4ab4976c.eee488"
} ,
{
"id" : "581c8a23.83fa8c"
} ,
{
"id" : "52052007.b3d0e"
}
]
}
] ,
"out" : [
{
"x" : 1060 ,
"y" : 159 ,
"wires" : [
{
"id" : "26b33a5c.0ef82e" ,
"port" : 0
} ,
{
"id" : "9ee0935a.415808" ,
"port" : 0
}
]
} ,
{
"x" : 1060 ,
"y" : 59 ,
"wires" : [
{
"id" : "d3875217.e3b668" ,
"port" : 0
} ,
{
"id" : "82fef572.49b5f" ,
"port" : 0
}
]
}
] ,
"env" : [ ] ,
"color" : "#DDAA99"
} ,
{
"id" : "26b33a5c.0ef82e" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_numeric" ,
2020-07-14 18:27:49 +02:00
"z" : "506e9090.6e905" ,
2020-07-14 18:22:31 +02:00
"name" : "object_depth_min" ,
"label" : "Minimum depth (m)" ,
"tooltip" : "" ,
"group" : "f377d75b.32d27" ,
"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-07-14 18:27:49 +02:00
"id" : "9ee0935a.415808" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_numeric" ,
2020-07-14 18:27:49 +02:00
"z" : "506e9090.6e905" ,
2020-07-14 18:22:31 +02:00
"name" : "object_depth_max" ,
"label" : "Maximum depth (m)" ,
"tooltip" : "" ,
"group" : "f377d75b.32d27" ,
"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-07-14 18:27:49 +02:00
"id" : "4ab4976c.eee488" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "506e9090.6e905" ,
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-07-14 18:27:49 +02:00
"26b33a5c.0ef82e"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "581c8a23.83fa8c" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "506e9090.6e905" ,
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-07-14 18:27:49 +02:00
"9ee0935a.415808"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "472998cd.45f588" ,
2020-07-14 18:22:31 +02:00
"type" : "gpsd" ,
2020-07-14 18:27:49 +02:00
"z" : "506e9090.6e905" ,
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-07-14 18:27:49 +02:00
"52052007.b3d0e" ,
"ab40705d.43a5d"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "7d5701.1e1981" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_worldmap" ,
2020-07-14 18:27:49 +02:00
"z" : "506e9090.6e905" ,
2020-07-14 18:22:31 +02:00
"d" : true ,
"group" : "f377d75b.32d27" ,
"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-07-14 18:27:49 +02:00
"id" : "52052007.b3d0e" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "506e9090.6e905" ,
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-07-14 18:27:49 +02:00
"7d5701.1e1981"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "d3875217.e3b668" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "506e9090.6e905" ,
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 ,
"x" : 804 ,
"y" : 80 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "82fef572.49b5f" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "506e9090.6e905" ,
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 ,
"x" : 804 ,
"y" : 40 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "ab40705d.43a5d" ,
2020-07-14 18:22:31 +02:00
"type" : "debug" ,
2020-07-14 18:27:49 +02:00
"z" : "506e9090.6e905" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"active" : true ,
"tosidebar" : true ,
"console" : false ,
"tostatus" : false ,
"complete" : "true" ,
"targetType" : "full" ,
"x" : 280 ,
"y" : 360 ,
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "f377d75b.32d27" ,
"type" : "ui_group" ,
"z" : "" ,
"name" : "Object metadata" ,
"tab" : "2b97fe34.a699fa" ,
"order" : 6 ,
"disp" : true ,
"width" : "24" ,
"collapse" : false
} ,
{
"id" : "97d77aeb.75afd8" ,
"type" : "subflow" ,
"name" : "Acquisition metadata" ,
"info" : "" ,
"category" : "" ,
"in" : [
{
"x" : 50 ,
"y" : 30 ,
"wires" : [
{
"id" : "282cae65.749e9a"
} ,
{
"id" : "cc899daf.a8d5d8"
} ,
{
"id" : "9873f1c8.6cb608"
} ,
{
"id" : "e53df171.eed68"
} ,
{
"id" : "5f728563.cf6214"
} ,
{
"id" : "c1a5eaf5.8691c"
} ,
{
"id" : "86c63d98.eb21"
} ,
{
"id" : "3707a612.b8619a"
} ,
{
"id" : "b2d20d5d.fd9e38"
}
]
}
] ,
"out" : [
{
"x" : 740 ,
"y" : 40 ,
"wires" : [
{
"id" : "3b267291.1eee26" ,
"port" : 0
} ,
{
"id" : "435a2dcf.a1a60c" ,
"port" : 0
} ,
{
"id" : "cc6cb58d.b2dbe8" ,
"port" : 0
} ,
{
"id" : "8b306bbc.914" ,
"port" : 0
} ,
{
"id" : "2a5a2b7a.f218d4" ,
"port" : 0
} ,
{
"id" : "28df07d8.d71ba8" ,
"port" : 0
} ,
{
"id" : "6cf2c1ac.a0fea8" ,
"port" : 0
} ,
{
"id" : "e7c4132f.f4417" ,
"port" : 0
}
]
} ,
{
"x" : 900 ,
"y" : 360 ,
"wires" : [
{
"id" : "1e688c91.1b805b" ,
"port" : 0
}
]
}
] ,
"env" : [ ] ,
"color" : "#DDAA99"
} ,
{
"id" : "1e688c91.1b805b" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
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-07-14 18:27:49 +02:00
"id" : "2877f2f.211cc8e" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_dropdown" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
2020-07-14 18:22:31 +02:00
"name" : "acq_fnumber_objective" ,
"label" : "M12 Lens*" ,
"tooltip" : "" ,
"place" : "Select option" ,
"group" : "60b93a5.a032344" ,
"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-07-14 18:27:49 +02:00
"1e688c91.1b805b"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "8b306bbc.914" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_numeric" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
2020-07-14 18:22:31 +02:00
"name" : "acq_minimum_mesh" ,
"label" : "Min fraction size (μm)" ,
"tooltip" : "" ,
"group" : "60b93a5.a032344" ,
"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-07-14 18:27:49 +02:00
"id" : "2a5a2b7a.f218d4" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_numeric" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
2020-07-14 18:22:31 +02:00
"name" : "acq_maximum_mesh" ,
"label" : "Max fraction size (μm)" ,
"tooltip" : "" ,
"group" : "60b93a5.a032344" ,
"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-07-14 18:27:49 +02:00
"id" : "3b267291.1eee26" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_text_input" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
2020-07-14 18:22:31 +02:00
"name" : "acq_id" ,
"label" : "Acquisition unique ID*" ,
"tooltip" : "" ,
"group" : "60b93a5.a032344" ,
"order" : 1 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : true ,
"mode" : "number" ,
"delay" : 300 ,
"topic" : "acq_id" ,
"x" : 586 ,
"y" : 40 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "cc6cb58d.b2dbe8" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_dropdown" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
2020-07-14 18:22:31 +02:00
"name" : "acq_celltype" ,
"label" : "Thickness flowcell*" ,
"tooltip" : "" ,
"place" : "Select option" ,
"group" : "60b93a5.a032344" ,
"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-07-14 18:27:49 +02:00
"id" : "28df07d8.d71ba8" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_text_input" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
2020-07-14 18:22:31 +02:00
"name" : "acq_volume" ,
"label" : "Volume to pass (ml)" ,
"tooltip" : "" ,
"group" : "60b93a5.a032344" ,
"order" : 2 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : true ,
"mode" : "number" ,
"delay" : 300 ,
"topic" : "acq_volume" ,
"x" : 566 ,
"y" : 240 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "435a2dcf.a1a60c" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_text_input" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
2020-07-14 18:22:31 +02:00
"name" : "acq_instrument" ,
"label" : "Acquisition instrument" ,
"tooltip" : "PlanktonScope V2.1" ,
"group" : "60b93a5.a032344" ,
"order" : 6 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : true ,
"mode" : "text" ,
"delay" : 300 ,
"topic" : "acq_instrument" ,
"x" : 556 ,
"y" : 80 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "282cae65.749e9a" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
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-07-14 18:27:49 +02:00
"3b267291.1eee26"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "cc899daf.a8d5d8" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
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-07-14 18:27:49 +02:00
"435a2dcf.a1a60c"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "9873f1c8.6cb608" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
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-07-14 18:27:49 +02:00
"cc6cb58d.b2dbe8"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "e53df171.eed68" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
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-07-14 18:27:49 +02:00
"8b306bbc.914"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "5f728563.cf6214" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
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-07-14 18:27:49 +02:00
"2a5a2b7a.f218d4"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "c1a5eaf5.8691c" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
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-07-14 18:27:49 +02:00
"28df07d8.d71ba8"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "b2d20d5d.fd9e38" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
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-07-14 18:27:49 +02:00
"2877f2f.211cc8e"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "6cf2c1ac.a0fea8" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_numeric" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
2020-07-14 18:22:31 +02:00
"name" : "acq_min_esd" ,
"label" : "Minimum size to segment (μm)" ,
"tooltip" : "" ,
"group" : "60b93a5.a032344" ,
"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-07-14 18:27:49 +02:00
"id" : "e7c4132f.f4417" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_numeric" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
2020-07-14 18:22:31 +02:00
"name" : "acq_max_esd" ,
"label" : "Maximum size to segment (μm)" ,
"tooltip" : "" ,
"group" : "60b93a5.a032344" ,
"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-07-14 18:27:49 +02:00
"id" : "86c63d98.eb21" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
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-07-14 18:27:49 +02:00
"6cf2c1ac.a0fea8"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "3707a612.b8619a" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "97d77aeb.75afd8" ,
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-07-14 18:27:49 +02:00
"e7c4132f.f4417"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "60b93a5.a032344" ,
"type" : "ui_group" ,
"z" : "" ,
"name" : "Acquisition metadata" ,
"tab" : "2b97fe34.a699fa" ,
"order" : 7 ,
"disp" : true ,
"width" : "24" ,
"collapse" : false
} ,
{
"id" : "9a45991b.365bc8" ,
"type" : "subflow" ,
"name" : "Pump actuation" ,
"info" : "" ,
"category" : "" ,
"in" : [
{
"x" : 40 ,
"y" : 40 ,
"wires" : [
{
"id" : "eb7c01ae.d00358"
} ,
{
"id" : "642ae1f3.cf7d28"
}
]
}
] ,
"out" : [
{
"x" : 700 ,
"y" : 40 ,
"wires" : [
{
"id" : "4485759b.52ee74" ,
"port" : 0
} ,
{
"id" : "3283f063.31c548" ,
"port" : 0
}
]
}
] ,
"env" : [ ] ,
"color" : "#A6BBCF" ,
"icon" : "font-awesome/fa-recycle"
} ,
{
"id" : "6246d9ef.156bd" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "9a45991b.365bc8" ,
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-07-14 18:27:49 +02:00
"53bef09a.8102e"
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-07-14 18:27:49 +02:00
"id" : "2374d55d.a3e3a2" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_button" ,
2020-07-14 18:27:49 +02:00
"z" : "9a45991b.365bc8" ,
2020-07-14 18:22:31 +02:00
"name" : "BACKWARD" ,
"group" : "4153382f.45437" ,
"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-07-14 18:27:49 +02:00
"6246d9ef.156bd"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "c8aa9753.f51c08" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_button" ,
2020-07-14 18:27:49 +02:00
"z" : "9a45991b.365bc8" ,
2020-07-14 18:22:31 +02:00
"name" : "FORWARD" ,
"group" : "4153382f.45437" ,
"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-07-14 18:27:49 +02:00
"6246d9ef.156bd"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "53bef09a.8102e" ,
2020-07-14 18:22:31 +02:00
"type" : "switch" ,
2020-07-14 18:27:49 +02:00
"z" : "9a45991b.365bc8" ,
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-07-14 18:27:49 +02:00
"4d3bf3c2.6a380c"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"d943e58a.e85fc"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "d943e58a.e85fc" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_toast" ,
2020-07-14 18:27:49 +02:00
"z" : "9a45991b.365bc8" ,
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-07-14 18:27:49 +02:00
"id" : "eaa22490.6843d" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_button" ,
2020-07-14 18:27:49 +02:00
"z" : "9a45991b.365bc8" ,
2020-07-14 18:22:31 +02:00
"name" : "stop pump" ,
"group" : "4153382f.45437" ,
"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-07-14 18:27:49 +02:00
"9e71b7a5.28dff8"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "4d3bf3c2.6a380c" ,
2020-07-14 18:22:31 +02:00
"type" : "mqtt out" ,
2020-07-14 18:27:49 +02:00
"z" : "9a45991b.365bc8" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"topic" : "" ,
"qos" : "" ,
"retain" : "" ,
"broker" : "e8ab36cc.74d77" ,
"x" : 910 ,
"y" : 120 ,
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "9e71b7a5.28dff8" ,
2020-07-14 18:22:31 +02:00
"type" : "mqtt out" ,
2020-07-14 18:27:49 +02:00
"z" : "9a45991b.365bc8" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"topic" : "" ,
"qos" : "" ,
"retain" : "" ,
"broker" : "e8ab36cc.74d77" ,
"x" : 610 ,
"y" : 200 ,
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "3283f063.31c548" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_text_input" ,
2020-07-14 18:27:49 +02:00
"z" : "9a45991b.365bc8" ,
2020-07-14 18:22:31 +02:00
"name" : "pump_manual_volume" ,
"label" : "Volume to pass (ml)" ,
"tooltip" : "" ,
"group" : "4153382f.45437" ,
"order" : 3 ,
"width" : 8 ,
"height" : 1 ,
"passthru" : true ,
"mode" : "number" ,
"delay" : 300 ,
"topic" : "pump_manual_volume" ,
"x" : 480 ,
"y" : 80 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "642ae1f3.cf7d28" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "9a45991b.365bc8" ,
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-07-14 18:27:49 +02:00
"3283f063.31c548"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "4485759b.52ee74" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_slider" ,
2020-07-14 18:27:49 +02:00
"z" : "9a45991b.365bc8" ,
2020-07-14 18:22:31 +02:00
"name" : "pump_flowrate" ,
"label" : "Flowrate (ml/min)*" ,
"tooltip" : "" ,
"group" : "4153382f.45437" ,
"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-07-14 18:27:49 +02:00
"id" : "eb7c01ae.d00358" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "9a45991b.365bc8" ,
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-07-14 18:27:49 +02:00
"4485759b.52ee74"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "4153382f.45437" ,
"type" : "ui_group" ,
"z" : "" ,
"name" : "Pump actuation" ,
"tab" : "2b97fe34.a699fa" ,
"order" : 5 ,
"disp" : true ,
"width" : "24" ,
"collapse" : false
} ,
{
"id" : "ac806d39.1682a8" ,
"type" : "subflow" ,
"name" : "Focus actuation" ,
"info" : "" ,
"category" : "" ,
"in" : [
{
"x" : 40 ,
"y" : 40 ,
"wires" : [
{
"id" : "c631467a.569ba"
}
]
}
] ,
"out" : [
{
"x" : 800 ,
"y" : 200 ,
"wires" : [
{
"id" : "97bf666e.4d3ad" ,
"port" : 0
}
]
}
] ,
"env" : [ ] ,
"color" : "#A6BBCF" ,
"icon" : "node-red/sort.svg"
} ,
{
"id" : "97bf666e.4d3ad" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_text_input" ,
2020-07-14 18:27:49 +02:00
"z" : "ac806d39.1682a8" ,
2020-07-14 18:22:31 +02:00
"name" : "focus_nb_step" ,
"label" : "Number of step(s)" ,
"tooltip" : "" ,
"group" : "69433259.f306fc" ,
"order" : 2 ,
"width" : 8 ,
"height" : 1 ,
"passthru" : true ,
"mode" : "number" ,
"delay" : 300 ,
"topic" : "focus_nb_step" ,
"x" : 540 ,
"y" : 40 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "c631467a.569ba" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "ac806d39.1682a8" ,
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-07-14 18:27:49 +02:00
"97bf666e.4d3ad"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "8346f4af.5c0978" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_button" ,
2020-07-14 18:27:49 +02:00
"z" : "ac806d39.1682a8" ,
2020-07-14 18:22:31 +02:00
"name" : "DOWN" ,
"group" : "69433259.f306fc" ,
"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-07-14 18:27:49 +02:00
"350c388d.12cd28"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "7ee30e1c.691bd" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_button" ,
2020-07-14 18:27:49 +02:00
"z" : "ac806d39.1682a8" ,
2020-07-14 18:22:31 +02:00
"name" : "UP" ,
"group" : "69433259.f306fc" ,
"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-07-14 18:27:49 +02:00
"350c388d.12cd28"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "a2f04fac.5a338" ,
2020-07-14 18:22:31 +02:00
"type" : "switch" ,
2020-07-14 18:27:49 +02:00
"z" : "ac806d39.1682a8" ,
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-07-14 18:27:49 +02:00
"9fd904e.d1cbcf8"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"ccd4fa1e.152"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "ccd4fa1e.152" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_toast" ,
2020-07-14 18:27:49 +02:00
"z" : "ac806d39.1682a8" ,
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-07-14 18:27:49 +02:00
"id" : "350c388d.12cd28" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "ac806d39.1682a8" ,
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-07-14 18:27:49 +02:00
"a2f04fac.5a338"
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-07-14 18:27:49 +02:00
"id" : "da904b2b.4a1d68" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_button" ,
2020-07-14 18:27:49 +02:00
"z" : "ac806d39.1682a8" ,
2020-07-14 18:22:31 +02:00
"name" : "stop focus" ,
"group" : "69433259.f306fc" ,
"order" : 4 ,
"width" : 4 ,
"height" : 1 ,
"passthru" : true ,
"label" : "STOP FOCUS" ,
"tooltip" : "" ,
"color" : "" ,
"bgcolor" : "#AD1625" ,
"icon" : "" ,
"payload" : "off" ,
"payloadType" : "str" ,
"topic" : "actuator/wait" ,
"x" : 510 ,
"y" : 160 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"8bb9c09d.bc8178"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "9fd904e.d1cbcf8" ,
2020-07-14 18:22:31 +02:00
"type" : "mqtt out" ,
2020-07-14 18:27:49 +02:00
"z" : "ac806d39.1682a8" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"topic" : "" ,
"qos" : "" ,
"retain" : "" ,
"broker" : "e8ab36cc.74d77" ,
"x" : 950 ,
"y" : 80 ,
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "8bb9c09d.bc8178" ,
"type" : "mqtt out" ,
"z" : "ac806d39.1682a8" ,
"name" : "" ,
"topic" : "" ,
"qos" : "" ,
"retain" : "" ,
"broker" : "e8ab36cc.74d77" ,
"x" : 650 ,
"y" : 160 ,
"wires" : [ ]
} ,
{
"id" : "69433259.f306fc" ,
"type" : "ui_group" ,
"z" : "" ,
"name" : "Focus actuation" ,
"tab" : "2b97fe34.a699fa" ,
"order" : 4 ,
"disp" : true ,
"width" : "24" ,
"collapse" : false
} ,
{
"id" : "e8ab36cc.74d77" ,
"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" : "5c6dd7ee.546fa8" ,
"type" : "subflow" ,
"name" : "Sample metadata" ,
"info" : "" ,
"category" : "" ,
"in" : [
{
"x" : 40 ,
"y" : 40 ,
"wires" : [
{
"id" : "730e3aa0.75f6dc"
} ,
{
"id" : "b49441ee.07b358"
} ,
{
"id" : "77454044.f47e88"
} ,
{
"id" : "203e3416.6c480c"
} ,
{
"id" : "3555467a.6ba1ea"
}
]
}
] ,
"out" : [
{
"x" : 840 ,
"y" : 40 ,
"wires" : [
{
"id" : "419967b7.b9b5f" ,
"port" : 0
} ,
{
"id" : "9b3f7b46.107718" ,
"port" : 0
} ,
{
"id" : "6f24740b.fbae5c" ,
"port" : 0
} ,
{
"id" : "bf7a47c8.a960b8" ,
"port" : 0
} ,
{
"id" : "327afe96.262122" ,
"port" : 0
}
]
}
] ,
"env" : [ ] ,
"color" : "#DDAA99"
2020-07-14 18:22:31 +02:00
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "6f24740b.fbae5c" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_text_input" ,
2020-07-14 18:27:49 +02:00
"z" : "5c6dd7ee.546fa8" ,
2020-07-14 18:22:31 +02:00
"name" : "sample_ship" ,
"label" : "Name of the ship" ,
"tooltip" : "" ,
"group" : "417f91c9.193ab" ,
"order" : 2 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : true ,
"mode" : "text" ,
"delay" : 300 ,
"topic" : "sample_ship" ,
"x" : 590 ,
"y" : 120 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "327afe96.262122" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_dropdown" ,
2020-07-14 18:27:49 +02:00
"z" : "5c6dd7ee.546fa8" ,
2020-07-14 18:22:31 +02:00
"name" : "sample_sampling_gear" ,
"label" : "Sampling gear" ,
"tooltip" : "" ,
"place" : "Select" ,
"group" : "417f91c9.193ab" ,
"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 ,
"y" : 200 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "bf7a47c8.a960b8" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_text_input" ,
2020-07-14 18:27:49 +02:00
"z" : "5c6dd7ee.546fa8" ,
2020-07-14 18:22:31 +02:00
"name" : "sample_operator" ,
"label" : "Name of the operator" ,
"tooltip" : "" ,
"group" : "417f91c9.193ab" ,
"order" : 3 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : true ,
"mode" : "text" ,
"delay" : 300 ,
"topic" : "sample_operator" ,
"x" : 570 ,
"y" : 160 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "419967b7.b9b5f" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_text_input" ,
2020-07-14 18:27:49 +02:00
"z" : "5c6dd7ee.546fa8" ,
2020-07-14 18:22:31 +02:00
"name" : "sample_project" ,
"label" : "Name of the project*" ,
"tooltip" : "" ,
"group" : "417f91c9.193ab" ,
"order" : 1 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : true ,
"mode" : "text" ,
"delay" : 300 ,
"topic" : "sample_project" ,
"x" : 580 ,
"y" : 40 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "9b3f7b46.107718" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_text_input" ,
2020-07-14 18:27:49 +02:00
"z" : "5c6dd7ee.546fa8" ,
2020-07-14 18:22:31 +02:00
"name" : "sample_id" ,
"label" : "ID of the station*" ,
"tooltip" : "" ,
"group" : "417f91c9.193ab" ,
"order" : 5 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : true ,
"mode" : "number" ,
"delay" : 300 ,
"topic" : "sample_id" ,
"x" : 590 ,
"y" : 80 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "730e3aa0.75f6dc" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "5c6dd7ee.546fa8" ,
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 ,
"y" : 40 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"419967b7.b9b5f"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "77454044.f47e88" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "5c6dd7ee.546fa8" ,
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 ,
"y" : 120 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"6f24740b.fbae5c"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "b49441ee.07b358" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "5c6dd7ee.546fa8" ,
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 ,
"y" : 80 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"9b3f7b46.107718"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "203e3416.6c480c" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "5c6dd7ee.546fa8" ,
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 ,
"y" : 160 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"bf7a47c8.a960b8"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "3555467a.6ba1ea" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "5c6dd7ee.546fa8" ,
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 ,
"y" : 200 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"327afe96.262122"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "417f91c9.193ab" ,
"type" : "ui_group" ,
"z" : "" ,
"name" : "Sample metadata" ,
"tab" : "2b97fe34.a699fa" ,
"order" : 2 ,
"disp" : true ,
"width" : "24" ,
"collapse" : false
} ,
{
"id" : "2b97fe34.a699fa" ,
"type" : "ui_tab" ,
"z" : "" ,
"name" : "GUI" ,
"icon" : "fa-eyedropper" ,
"order" : 2 ,
"disabled" : false ,
"hidden" : false
} ,
{
"id" : "bb8dbe68.7e20a" ,
"type" : "tab" ,
"label" : "Main" ,
"disabled" : false ,
"info" : ""
} ,
{
"id" : "20340bb6.5f923c" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "bb8dbe68.7e20a" ,
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 ,
"x" : 1260 ,
"y" : 160 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"d69f0eb1.d514d"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "aed82ae1.3a7558" ,
2020-07-14 18:22:31 +02:00
"type" : "file" ,
2020-07-14 18:27:49 +02:00
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"filename" : "/home/pi/PlanktonScope/config.json" ,
"appendNewline" : true ,
"createDir" : true ,
"overwriteFile" : "true" ,
"encoding" : "none" ,
"x" : 1640 ,
"y" : 160 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "d69f0eb1.d514d" ,
2020-07-14 18:22:31 +02:00
"type" : "json" ,
2020-07-14 18:27:49 +02:00
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "config.json" ,
"property" : "payload" ,
"action" : "str" ,
"pretty" : true ,
"x" : 1410 ,
"y" : 160 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"aed82ae1.3a7558"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "b57ab8b0.7bfc4" ,
2020-07-14 18:22:31 +02:00
"type" : "file in" ,
2020-07-14 18:27:49 +02:00
"z" : "bb8dbe68.7e20a" ,
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-07-14 18:27:49 +02:00
"5b6059c3.8d4fa8"
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-07-14 18:27:49 +02:00
"id" : "7880a269.4817ac" ,
2020-07-14 18:22:31 +02:00
"type" : "inject" ,
2020-07-14 18:27:49 +02:00
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "on_load" ,
"topic" : "" ,
"payload" : "" ,
"payloadType" : "date" ,
"repeat" : "" ,
"crontab" : "" ,
"once" : true ,
"onceDelay" : 0.1 ,
"x" : 120 ,
"y" : 80 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"b57ab8b0.7bfc4" ,
"10d8393.60498c7" ,
"dba45961.85d67" ,
"8231cfcc.0c5dd8"
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-07-14 18:27:49 +02:00
"id" : "5b6059c3.8d4fa8" ,
2020-07-14 18:22:31 +02:00
"type" : "json" ,
2020-07-14 18:27:49 +02:00
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "config.json" ,
"property" : "payload" ,
"action" : "" ,
"pretty" : false ,
"x" : 610 ,
"y" : 80 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"9b872b59.667ee" ,
"67bab5e1.2c7dcc" ,
"8e5a1fb0.dc878" ,
"bfc59fc4.be21a8" ,
"80434aac.22226" ,
"a3453d30.ca9a28" ,
"e25e094c.60fb1"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "1b45a311.c993ed" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "bb8dbe68.7e20a" ,
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 ,
"x" : 1080 ,
"y" : 80 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"20340bb6.5f923c"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "1d54c0bf.fbcf07" ,
2020-07-14 18:22:31 +02:00
"type" : "rpi-gpio out" ,
2020-07-14 18:27:49 +02:00
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"pin" : "40" ,
"set" : "" ,
"level" : "0" ,
"freq" : "" ,
"out" : "out" ,
"x" : 440 ,
"y" : 120 ,
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "7da863d0.f7d41c" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_template" ,
2020-07-14 18:27:49 +02:00
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"group" : "dc721eb.9ef51e" ,
"name" : "Stream Pi Camera" ,
"order" : 1 ,
"width" : 24 ,
"height" : 11 ,
"format" : "<center><iframe id=\"inlineFrameExample\"\n title=\"Inline Frame Example\"\n height=\"600\"\n width=\"800\"\n frameborder=\"0\"\n src=\"http://192.168.4.1:8000/index.html\">\n</iframe></center>" ,
"storeOutMessages" : true ,
"fwdInMessages" : true ,
"templateScope" : "local" ,
2020-07-14 18:27:49 +02:00
"x" : 830 ,
2020-07-14 18:22:31 +02:00
"y" : 320 ,
"wires" : [
[ ]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "10d8393.60498c7" ,
2020-07-14 18:22:31 +02:00
"type" : "function" ,
2020-07-14 18:27:49 +02:00
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "init LED" ,
"func" : "msg.payload=1;\nreturn msg;" ,
"outputs" : 1 ,
"noerr" : 0 ,
"x" : 280 ,
"y" : 120 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"1d54c0bf.fbcf07"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "9b872b59.667ee" ,
"type" : "subflow:5c6dd7ee.546fa8" ,
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"env" : [ ] ,
"x" : 830 ,
"y" : 80 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"1b45a311.c993ed"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "a3453d30.ca9a28" ,
"type" : "subflow:ac806d39.1682a8" ,
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"env" : [ ] ,
2020-07-14 18:27:49 +02:00
"x" : 820 ,
"y" : 240 ,
2020-07-14 18:22:31 +02:00
"wires" : [
[
2020-07-14 18:27:49 +02:00
"1b45a311.c993ed"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "e25e094c.60fb1" ,
"type" : "subflow:9a45991b.365bc8" ,
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"env" : [ ] ,
2020-07-14 18:27:49 +02:00
"x" : 820 ,
"y" : 280 ,
2020-07-14 18:22:31 +02:00
"wires" : [
[
2020-07-14 18:27:49 +02:00
"1b45a311.c993ed"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "67bab5e1.2c7dcc" ,
"type" : "subflow:97d77aeb.75afd8" ,
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"env" : [ ] ,
"x" : 840 ,
"y" : 120 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"1b45a311.c993ed"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"20340bb6.5f923c"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "8e5a1fb0.dc878" ,
"type" : "subflow:506e9090.6e905" ,
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"env" : [ ] ,
"x" : 820 ,
"y" : 160 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"1b45a311.c993ed"
2020-07-14 18:22:31 +02:00
] ,
[
2020-07-14 18:27:49 +02:00
"20340bb6.5f923c"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "14b78383.7457bc" ,
"type" : "subflow:1273b673.4a35ea" ,
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "System commands" ,
"env" : [ ] ,
2020-07-14 18:27:49 +02:00
"x" : 830 ,
"y" : 480 ,
2020-07-14 18:22:31 +02:00
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "e6403eaf.54f7e" ,
"type" : "subflow:246abd43.838a5a" ,
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"env" : [ ] ,
2020-07-14 18:27:49 +02:00
"x" : 840 ,
"y" : 400 ,
2020-07-14 18:22:31 +02:00
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "bfc59fc4.be21a8" ,
"type" : "subflow:99798a85.e62408" ,
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "process metadata" ,
"env" : [ ] ,
"x" : 830 ,
"y" : 200 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"1b45a311.c993ed"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "80434aac.22226" ,
"type" : "subflow:a156df1e.d37178" ,
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "Acquisition inputs" ,
"env" : [ ] ,
2020-07-14 18:27:49 +02:00
"x" : 830 ,
"y" : 360 ,
2020-07-14 18:22:31 +02:00
"wires" : [
[
2020-07-14 18:27:49 +02:00
"1b45a311.c993ed"
2020-07-14 18:22:31 +02:00
]
] ,
"icon" : "node-red-dashboard/ui_switch.png"
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "dba45961.85d67" ,
"type" : "subflow:6384a5e.e34465c" ,
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"env" : [ ] ,
"x" : 300 ,
"y" : 200 ,
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "8231cfcc.0c5dd8" ,
"type" : "subflow:e8320d42.9a3ad8" ,
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"env" : [ ] ,
"x" : 290 ,
"y" : 240 ,
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "557afe0d.33d97" ,
"type" : "subflow:97600dff.93378" ,
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"env" : [ ] ,
2020-07-14 18:27:49 +02:00
"x" : 830 ,
"y" : 440 ,
2020-07-14 18:22:31 +02:00
"wires" : [ ]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "af4f780b.068368" ,
2020-07-14 18:22:31 +02:00
"type" : "ui_switch" ,
2020-07-14 18:27:49 +02:00
"z" : "bb8dbe68.7e20a" ,
2020-07-14 18:22:31 +02:00
"name" : "" ,
"label" : "LED" ,
"tooltip" : "" ,
"group" : "9c86b3b7.54841" ,
"order" : 10 ,
"width" : 0 ,
"height" : 0 ,
"passthru" : true ,
"decouple" : "false" ,
"topic" : "" ,
"style" : "" ,
"onvalue" : "true" ,
"onvalueType" : "bool" ,
"onicon" : "" ,
"oncolor" : "" ,
"offvalue" : "false" ,
"offvalueType" : "bool" ,
"officon" : "" ,
"offcolor" : "" ,
"x" : 270 ,
"y" : 160 ,
"wires" : [
[
2020-07-14 18:27:49 +02:00
"1d54c0bf.fbcf07"
2020-07-14 18:22:31 +02:00
]
]
} ,
{
2020-07-14 18:27:49 +02:00
"id" : "dc721eb.9ef51e" ,
"type" : "ui_group" ,
"z" : "" ,
"name" : "Streaming camera" ,
"tab" : "2b97fe34.a699fa" ,
"order" : 3 ,
"disp" : true ,
"width" : 24 ,
"collapse" : false
2020-01-08 14:32:46 +01:00
}
2020-01-28 01:29:58 +01:00
]