Community discussions

MikroTik App
 
BobcatGuy
Member Candidate
Member Candidate
Topic Author
Posts: 240
Joined: Thu Apr 19, 2007 7:41 am

Monitor N.C. Door Switch and send email when Opened

Sun Feb 28, 2010 8:41 am

I was wondering, actually more looking for help.......

I would like to use the serial port on a MT board to monitor a normally closed switch, and send an email when it is opened.

The purpose is this: I have a rental property where I use a MT board to share internet access, and in this cabinet, there is other stuff, such as cable, and telephone. The tenants for some reason like to open the cabinet, and start switching stuff around, one idiot took the POE cable and plugged it direct to another cable that connected to his desktop, fried the ether port on his dekstop. I am just woried they will fry some of my stuff.

I think this is possible via the RTS going to high or low? would require a simple script, but I am in lack of knowledge on the script side, hardware I can do no problem.

So if someone is bored and knows how to ake this script, that would be nice, I can modify to fit my setup.

Thanks..
 
xezen
Long time Member
Long time Member
Posts: 628
Joined: Fri May 30, 2008 10:23 am
Location: South Africa

Re: Monitor N.C. Door Switch and send email when Opened

Sun Feb 28, 2010 9:20 am

i would also like a salution to tthis
 
BobcatGuy
Member Candidate
Member Candidate
Topic Author
Posts: 240
Joined: Thu Apr 19, 2007 7:41 am

Re: Monitor N.C. Door Switch and send email when Opened

Sun Feb 28, 2010 10:05 am

Ok Some searching and found that there was this option, but only on X86 platforms, not Router boards.

So I tried fooling around, got pin 2 and 3 connected, and used special login, and it echo's back the character.

Now to just make a script that listens for the echo back, and if pin 2 and 3 are open ( Via a door switch) there will be no echo back, OR Better yet, use a N.O. switch, so that when the door is open, and the contact is made, it will echo the character or string back, and this will tell a script to email. I like this better since there is no configureing of a timeout delay. If it receieves nothing, try again, and when it does, the door is open.

Now to try fooling around with scripts... help.....
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Monitor N.C. Door Switch and send email when Opened

Mon Mar 01, 2010 11:25 pm

unfortunately, you cannot script work with CLI in RouterOS scripting...
 
cdiggity
newbie
Posts: 31
Joined: Fri Oct 31, 2008 12:40 pm

Re: Monitor N.C. Door Switch and send email when Opened

Mon Mar 01, 2010 11:29 pm

get a small PLC with ethernet: http://www.unitronics.com

Who is online

Users browsing this forum: lktompkins, menyarito and 70 guests