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 :
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 ?