I have a TM-Mikrotik temp logger ( papouch.com ) connected to the serial console of a RB2011.
it also can sens for a open/close sensor like a door sensor for example.
it creates an tm.dat file on the RB2011 with this contents :
+025.5C;H;
+025.5C;H;
+025.5C;H;
etc. etc.
where 25.5C is the temperature and H is the contact ( is L when pins are shortened )
Now i want to read this file by script and send me an alarm message when either the temperature is above 35C, and/or the contact is L
I have some experience with the Voltage / Temp alarms script here on the web, but now i am ran out of knowledge how to parse the data from this file.
can someone give me a little light on how to get the latest data line from this file with a script ?
Alright with help of a friend ( Aalte Zuidema ), this works to get the last results from file.
now i only have to add a script to do something with the results, which can be found all over the internet.
i did connect it to the console port of Mikrotik ( disable console function in menu, and set routerboard to silent boot )
i used these to connect the Mikrotik console port to the db9 connector , in my case i had to remove the rj45 connector and put on a new one as the pinouts were mirrored.