@E1cid: thanks for the code and the link. I'll study the JSONata and .hold some more. As I understand the .hold already is the file I was going to create to store the data...
As I understand you trigger the msg.hold [{...}] and msg.payload {...} with your inject node and use the $append()-command to add the msg.payload{} to the msg.hold[{...}]
I tried now to use two inject nodes, doing the same... I hoped so... the first one creates the empty msg.hold [{}] and the other inject node creates the msg.payload {"mmsi":211...etc}, which then shall be added to the empty .hold... but my debug-node msg.hold says undefined. Is it an array-problem or debug-node error?
[{"id":"129a88e7.1187ef","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"7d53955a.c1917c","type":"inject","z":"129a88e7.1187ef","name":"newArray msg.hold","props":[{"p":"hold","v":"[{\"mmsi\":0}]","vt":"json"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":210,"y":440,"wires":[["a83b645b.e0946"]]},{"id":"a83b645b.e0946","type":"debug","z":"129a88e7.1187ef","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"hold","targetType":"msg","statusVal":"","statusType":"auto","x":720,"y":440,"wires":[]},{"id":"4887d836.e6ed8","type":"inject","z":"129a88e7.1187ef","name":"newShip211667760","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"mmsi\":211667760,\"navigationStatus\":\"Under way using engine\",\"rateOfTurn\":0,\"speedOverGround\":0,\"longitude\":9.920658333333334,\"latitude\":53.54305333333333,\"courseOverGround\":290,\"trueHeading\":268,\"timeStampSeconds\":14,\"date\":1621533253342,\"isoDate\":\"2021-05-20 17:54:13\",\"source\":\"!AIVDM,1,1,,A,139o;<0000PeJLFN`kR;E8HL0@7h,0*7A\\r\\n\"}","payloadType":"json","x":210,"y":500,"wires":[["2eb876b6.f89f7a"]]},{"id":"2eb876b6.f89f7a","type":"change","z":"129a88e7.1187ef","name":"append...","rules":[{"t":"set","p":"payload","pt":"msg","to":"$append([$.payload],$.hold[mmsi != $$.payload.mmsi])","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":500,"wires":[["58ea85fd.648084"]]},{"id":"58ea85fd.648084","type":"debug","z":"129a88e7.1187ef","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"hold","targetType":"msg","statusVal":"","statusType":"auto","x":720,"y":500,"wires":[]}]
@dceejay: Jep, that's right. Working on a tug boat in the port of Hamburg (on the "Bugsier 2" to be precise). I want to install a "head up display" using a RaspberryPi 3B+ mirroring in the rear Window. When we approach a vessel to establish or release the line connection, the vsl should not be faster than 10kn. We don't have much power left to manoeuver and rescue from a possible danger situation. Attached you can find my Dashboard so far. The Inject node just triggers a sample AIS signal, which unfortunately contains the speed of 79.3, but that's just for testing purposes.
[{"id":"e45173f3.bfc09","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"68d4e1d1.cc628","type":"tcp in","z":"e45173f3.bfc09","name":"","server":"client","host":"localhost","port":"10110","datamode":"stream","datatype":"utf8","newline":"","topic":"","base64":false,"x":130,"y":180,"wires":[["a66029ed.f9fd88","7d3e5f4.508bea"]]},{"id":"a66029ed.f9fd88","type":"ais","z":"e45173f3.bfc09","name":"","x":430,"y":180,"wires":[["4f61f2eb.d0ce7c","46ddc68a.d0a188","2e0fa682.322dfa"]]},{"id":"4f61f2eb.d0ce7c","type":"debug","z":"e45173f3.bfc09","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":630,"y":20,"wires":[]},{"id":"7d3e5f4.508bea","type":"debug","z":"e45173f3.bfc09","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":350,"y":80,"wires":[]},{"id":"2e0fa682.322dfa","type":"ui_gauge","z":"e45173f3.bfc09","name":"","group":"5a1af3bc.7cd31c","order":1,"width":0,"height":0,"gtype":"gage","title":"","label":"kn","format":"{{msg.payload.speedOverGround}}","min":0,"max":"160","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":870,"y":180,"wires":[]},{"id":"46ddc68a.d0a188","type":"debug","z":"e45173f3.bfc09","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.speedOverGround","targetType":"msg","statusVal":"","statusType":"auto","x":690,"y":80,"wires":[]},{"id":"83bb7be6.8ea92","type":"inject","z":"e45173f3.bfc09","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"!AIVDM,2,1,8,A,53P7AsD2<Iu=a4u7:21<B0tl4LR22222222222150pD2574g061PDk0C,0*3D !AIVDM,1,1,,B,13MARih000wbAbJP0kr23aSV0<0g,0*73","payloadType":"str","x":170,"y":240,"wires":[["a66029ed.f9fd88"]]},{"id":"928d686.a2e5598","type":"change","z":"e45173f3.bfc09","name":"","rules":[{"t":"set","p":"ui_control.options.minLabelMinFontSize","pt":"msg","to":"0","tot":"num"},{"t":"set","p":"ui_control.options.maxLabelMinFontSize","pt":"msg","to":"0","tot":"num"},{"t":"set","p":"ui_control.options.labelMinFontSize","pt":"msg","to":"8","tot":"str"},{"t":"set","p":"ui_control.options.valueMinFontSize","pt":"msg","to":"150","tot":"str"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":320,"wires":[["2e0fa682.322dfa"]]},{"id":"71267751.ade568","type":"ui_ui_control","z":"e45173f3.bfc09","name":"","x":260,"y":320,"wires":[["b9fe6ae1.35dc28"]]},{"id":"22f605b1.a034aa","type":"comment","z":"e45173f3.bfc09","name":"To send options when dashboard connects","info":"","x":160,"y":360,"wires":[]},{"id":"b9fe6ae1.35dc28","type":"delay","z":"e45173f3.bfc09","name":"","pauseType":"delay","timeout":"40","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":470,"y":320,"wires":[["928d686.a2e5598"]]},{"id":"c0a3c82e.b5fae","type":"comment","z":"e45173f3.bfc09","name":"Let gauge to be initialized before change any options","info":"There will be browser errors otherwise ","x":470,"y":400,"wires":[]},{"id":"956b6db1.656f88","type":"comment","z":"e45173f3.bfc09","name":"Change the options","info":"gauge scales according to predefined card size\ndefined font sizes are not absolute values but minimum values\nFor example if you make your gauge smaller, the changed font sizes may happen to be too large and will overlap.\n\nminLabelMinFontSize - minimum size of min field // number\nmaxLabelMinFontSize - minimum size of max field // number\nlabelMinFontSize - minimum size of units field // numbert\n\ndelete msg.payload cos it does not contain proper value","x":750,"y":360,"wires":[]},{"id":"5a1af3bc.7cd31c","type":"ui_group","name":"Standard","tab":"24a7075b.b1d0b8","order":1,"disp":false,"width":"8","collapse":false},{"id":"24a7075b.b1d0b8","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
PS: thank you very much for the hint of justgage options you postet in the thread "'gauge' options suggestion"!