Difference between revisions of "Project/DoorSystemV3"

From initLab
Jump to navigation Jump to search
(Copy v2)
 
(change photo)
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
= Basics =
= Basics =


The system has two separate pieces: opening the door, and unlocking the door, controlled by two separate mechanisms. The locking is done by an electro-mechanical door lock, and the opening/closing is done by an electro-magnetic door lock.
The system controls three separate doors:
* a black gate to the yard
* a white door at the back of the building
* the door at the 3rd floor


== Accessing the system(s) ==
The gate is controlled wirelessly, either by an Arduino above spitfire, which sends the appropriate signal, or by a physical remote control, that is wired via a relay, so it can send the signal on demand.


The system can be accessed remotely in two ways: using [[Project/Fauna|fauna]] or by calling +359-24624356. The phone number is routed over VoIP(SIP) from support.bg to spitfire.
The white door system has two separate pieces: opening the door, and unlocking the door, controlled by two separate mechanisms. The locking is done by an electro-mechanical door lock, and the opening/closing is done by an electro-magnetic door lock.
 
The third floor door is controlled by a simple electro-mechanical lock.
 
== Accessing the system ==
 
The system can be accessed in the following ways:
 
* using [[Project/Fauna|fauna]], which has been superseeded by [https://space.initlab.org/ Space]
* by calling [tel:+35924624356 +359 2 462 43 56]. The phone number is routed over VoIP(SIP) from support.bg to spitfire.
* using the payphone at the front gate (see below)
* using the [https://t.me/init_Lab_bot init Lab Telegram bot]
* using the initLabNotifier IRC bot at [ircs://irc.ludost.net/initlab #initlab @ irc.ludost.net]
*


Also, next to the door there are two buttons on the white box - a red and a green one. The red one locks the door, the green one unlocks it. If the door is open and you press the red button, it will lock 3 seconds after the door is closed. If the red button is pressed and then the door is closed for less than 3 seconds, the lock will not activate. But if the door is then closed for more than 3 seconds, the pending lock operation will be activated.
Also, next to the door there are two buttons on the white box - a red and a green one. The red one locks the door, the green one unlocks it. If the door is open and you press the red button, it will lock 3 seconds after the door is closed. If the red button is pressed and then the door is closed for less than 3 seconds, the lock will not activate. But if the door is then closed for more than 3 seconds, the pending lock operation will be activated.
Line 15: Line 31:
When you call the phone:
When you call the phone:


* If the door is locked:
* The system checks if the source phone number is associated to an account, the account has permissions to open at least one door and a PIN has been set previously. If not, the system hangs up.
** The system checks if the source phone number is in the list of allowed-to-unlock people. If not, the system hangs up.
* The system picks up, and using a voice depending on the account's locale asks about their PIN code.
** The system picks up, and using a voice similar to that of Stephen Hawking asks "Enter code".
* It waits for a PIN code of at least 6 digits, followed by #, which is verified in the database if it's the right PIN code for this calling number.
** It waits for a 6-digit pin code, which is verified in the database if it's the right PIN code for this calling number.
* If the entered code is wrong, you have two more tries, if you fail, it hangs up.
** If the entered code is wrong, the voice says "Wrong". You have three tries, if you fail, it says "Fuck off" and hangs up.
* If the code entered is the right one, the voice asks which door to open, or if the user wants to lock all doors instead (currently this means lock the back door).
** If the code entered is the right one, the voice says "Opening door", unlocks the door and opens it.
*** The system then logs the door opening and unlocking, as like in the opening below.
* If the door is not locked:
** The system opens the door
** The system logs the door opening via [https://twitter.com/initlabkeeper twitter] and IRC (#initlab on irc.ludost.net). Using the source phone number, a textual ID is looked up in the [[Project/Fauna|Fauna]] database and logged, if the user has register its phone number.


== Using the bulphone in front of the door ==
== Using the payphone in front of the gate ==


* This phone is next to the front door
* This phone is next to the front door
<gallery>
<gallery>
File:labphone.jpg
File:labphone.jpg
File:labphone1.jpg
File:Photo_2024-04-16_19-17-42.jpg
File:labphone2.jpg
</gallery>
</gallery>


* You have to dial 150 to get into the system
* You have to dial 150 to get into the system
* It'll ask you for you phone number, enter it and # after it
* It'll ask you for your phone number, enter it and # after it
* Next follow the normal phone instructions (asking for a code, etc.)
* Next follow the normal phone instructions (asking for a code, etc.)
= Logging of actions =
The system logs the door opening via [https://twitter.com/initlabkeeper twitter] and IRC (#initlab on irc.ludost.net). The username of the actor is logged, or if they choose to be anonymous, the relevant message is shown instead (Someone who does not wish to be named...). Init Lab board members have access to all actions with the unmasked names, so any abuse of the system can be tracked and accounted for.


= Locking/Unlocking =
= Locking/Unlocking =

Latest revision as of 18:19, 16 April 2024

Door opening system V3

Basics

The system controls three separate doors:

  • a black gate to the yard
  • a white door at the back of the building
  • the door at the 3rd floor

The gate is controlled wirelessly, either by an Arduino above spitfire, which sends the appropriate signal, or by a physical remote control, that is wired via a relay, so it can send the signal on demand.

The white door system has two separate pieces: opening the door, and unlocking the door, controlled by two separate mechanisms. The locking is done by an electro-mechanical door lock, and the opening/closing is done by an electro-magnetic door lock.

The third floor door is controlled by a simple electro-mechanical lock.

Accessing the system

The system can be accessed in the following ways:

Also, next to the door there are two buttons on the white box - a red and a green one. The red one locks the door, the green one unlocks it. If the door is open and you press the red button, it will lock 3 seconds after the door is closed. If the red button is pressed and then the door is closed for less than 3 seconds, the lock will not activate. But if the door is then closed for more than 3 seconds, the pending lock operation will be activated.

Using the phone

When you call the phone:

  • The system checks if the source phone number is associated to an account, the account has permissions to open at least one door and a PIN has been set previously. If not, the system hangs up.
  • The system picks up, and using a voice depending on the account's locale asks about their PIN code.
  • It waits for a PIN code of at least 6 digits, followed by #, which is verified in the database if it's the right PIN code for this calling number.
  • If the entered code is wrong, you have two more tries, if you fail, it hangs up.
  • If the code entered is the right one, the voice asks which door to open, or if the user wants to lock all doors instead (currently this means lock the back door).

Using the payphone in front of the gate

  • This phone is next to the front door
  • You have to dial 150 to get into the system
  • It'll ask you for your phone number, enter it and # after it
  • Next follow the normal phone instructions (asking for a code, etc.)

Logging of actions

The system logs the door opening via twitter and IRC (#initlab on irc.ludost.net). The username of the actor is logged, or if they choose to be anonymous, the relevant message is shown instead (Someone who does not wish to be named...). Init Lab board members have access to all actions with the unmasked names, so any abuse of the system can be tracked and accounted for.

Locking/Unlocking

The door uses a Bulkey BKS300 electro-mechanical lock. It's connected though a NeoMontana NetControl 6R8A and a Bulkey BCP1 controller. There are a set of macros on the NetControl device, which can be triggered using HTTP, SNMP or MQTT. It is recommended to use the macros rather than directly controlling the relays, as this allows temporary disabling the access using NetControl's web interface. There is an option to override the sensor for closed door - use it with care! It may damage the electro-mechanical lock. It is intended to be used if the sensor malfunctions and the door needs to be locked remotely.

Opening

There is a set of scripts on spitfire that send a signal over HTTP to a NeoMontana NetControl 8R2S1A, to close a relay for 2 seconds. This relay supplies power to the electro-magnetic lock on the door, so the mechanism frees up the pin inside, and the door can be opened once. After opening and closing the door, the mechanism inside the electro-magnetic lock prevents future opening, until a power impulse is supplied again.

Settings

BCP1 jumpers: JP1 - open, JP2, JP3, JP4 - closed

6R8A settings

Settings that are not visible, are using their factory defaults.

Connections

  • BCP1 +12V to 6R8A +12V
  • BCP1 GND to 6R8A GND
  • 6R8A GND to 6R8A Line 2 Terminal 1
  • BCP1 BUT ULK to 6R8A Line 2 Terminal 2
  • 6R8A GND to 6R8A Line 3 Terminal 1
  • 6R8A A1 to 6R8A Line 3 Terminal 2
  • BCP1 DQ to 6R8A A1
  • Red button between 8R6A GND and 8R6A A2
  • Green button between 8R6A GND and 8R6A A3
  • Relay that shorts 8R6A GND and 8R6A A4 (dry contact) when voltage between BCP1 GND and BCP1 RED is +5V
  • Relay that shorts 8R6A GND and 8R6A A5 (dry contact) when voltage between BCP1 GND and BCP1 GRN is +5V
  • BKS300 Motor to BCP1 M+ and -M
  • BKS300 Door sensor to BCP1 GND and DQ

Sources/links