Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
2.3 kB
7
Indexable
Never
[{"id":"2c581ab92732431d","type":"tab","label":"UI","disabled":false,"info":"","env":[]},{"id":"a9687cee6cb32508","type":"file in","z":"2c581ab92732431d","name":"Read IP addresses","filename":"/kodin_tietoliikenneverkko/ip_osoitteet.txt","format":"utf8","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":310,"y":180,"wires":[["2792feebaa000227"]]},{"id":"f3e7f70956d0b9df","type":"inject","z":"2c581ab92732431d","name":"Timer","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"3600","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":180,"wires":[["a9687cee6cb32508"]]},{"id":"2792feebaa000227","type":"csv","z":"2c581ab92732431d","name":"CSV to Array","sep":",","hdrin":true,"hdrout":"none","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":530,"y":180,"wires":[["c9bf9d7cac2dc291"]]},{"id":"b769af3218a66daa","type":"ui_table","z":"2c581ab92732431d","group":"5fd24ab3ba18baef","name":"Network addressing","order":0,"width":"18","height":"36","columns":[],"outputs":1,"cts":true,"x":1020,"y":180,"wires":[[]]},{"id":"c9bf9d7cac2dc291","type":"function","z":"2c581ab92732431d","name":"timestamp converter","func":"var i;\nfor (i = 0; i <msg.payload.length; i++) {\n    var now = new Date(msg.payload[i].expire * 1000).toLocaleString(\"fi-FI\");\n    msg.payload[i].expire = now ;\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":760,"y":180,"wires":[["b769af3218a66daa"]]},{"id":"f91ff426d9ae4ca0","type":"comment","z":"2c581ab92732431d","name":"dnsmasq dhcp leases format for input","info":"# file in the following format for the \"read file\" -node\n# Used some sed magic on the sender host to fill in the comma separators\nexpire,mac,ip,hostname,other\n1649433138,60:f6:77:xx:xx:xx,1.2.3.4,host1,*\n1649433398,08:71:90:xx:xx:xx,2.3.4.5,host2,*\n1649436042,98:cd:ac:xx:xx:xx,6.7.8.9,host3,*","x":170,"y":140,"wires":[]},{"id":"5fd24ab3ba18baef","type":"ui_group","name":"Home","tab":"c9093f651c875dd2","order":1,"disp":true,"width":"18","collapse":false,"className":""},{"id":"c9093f651c875dd2","type":"ui_tab","name":"Network addressing","icon":"dashboard","disabled":false,"hidden":false}]