Difference between revisions of "Project:Door sensor"

From London Hackspace Wiki
Jump to navigation Jump to search
(First effort)
 
 
(4 intermediate revisions by 4 users not shown)
Line 10: Line 10:
 
* By opening and closing one pair you can bring a network interface up/down
 
* By opening and closing one pair you can bring a network interface up/down
 
* A micro switch has been mounted into the door frame at the top and brown/white cable run to choc blocks, and then a network cable run back to Cisco2 switch, port 42
 
* A micro switch has been mounted into the door frame at the top and brown/white cable run to choc blocks, and then a network cable run back to Cisco2 switch, port 42
 +
 +
Cisco port need some configuring:
 +
<code>
 +
interface GigabitEthernet1/42
 +
no keepalive
 +
speed 100
 +
duplex full
 +
</code>
  
 
=== Things it doesn't interact with ===
 
=== Things it doesn't interact with ===
Line 22: Line 30:
 
?doorstatus on IRC will responsd with  
 
?doorstatus on IRC will responsd with  
 
"Door closed" or "Door open"
 
"Door closed" or "Door open"
 +
 +
?doorsnmp will do a more advanced check, with SNMP polling and respond thusly:
 +
Door is closed (last movement was on 18/11/2012 at 20:29:29)
 +
 +
The ?doorsnmp (/usr/share/irccat/doorsnmp.py on babbage) code isn't the greatest, I'm sure someone can improve it.
  
 
=== What next? ===
 
=== What next? ===
Line 28: Line 41:
 
* Add more doors! - Build a complete building management system that has the status of all infrastructure
 
* Add more doors! - Build a complete building management system that has the status of all infrastructure
 
* Log/graph it in Cacti?
 
* Log/graph it in Cacti?
 +
 +
[[Category:Projects]]
 +
[[Category:Infrastructure]]
 +
[[Category:Space_Infrastructure_Projects]]

Latest revision as of 19:48, 3 June 2013

Door Sensor

Aim

To tell the state of the (front) door without having to physically be there/see it. More generically, a binary input that is on the network.

How it works

  • You can create Ethernet loop back devices by shorting a couple of pairs on Ethernet cables as per http://erikugel.wordpress.com/2011/09/14/making-an-ethernet-loopback-adapder/
  • By opening and closing one pair you can bring a network interface up/down
  • A micro switch has been mounted into the door frame at the top and brown/white cable run to choc blocks, and then a network cable run back to Cisco2 switch, port 42

Cisco port need some configuring:

interface GigabitEthernet1/42
no keepalive
speed 100
duplex full

Things it doesn't interact with

This has nothing to do with:

  • Doorbot
  • Spacecensus
  • Alarm Cabling

How do I interact with this?

?doorstatus on IRC will responsd with "Door closed" or "Door open"

?doorsnmp will do a more advanced check, with SNMP polling and respond thusly: Door is closed (last movement was on 18/11/2012 at 20:29:29)

The ?doorsnmp (/usr/share/irccat/doorsnmp.py on babbage) code isn't the greatest, I'm sure someone can improve it.

What next?

  • Tidy up the script that tells IRC the status. At the moment it is the quickest dirtiest python you will ever see
  • Add more doors! - Build a complete building management system that has the status of all infrastructure
  • Log/graph it in Cacti?