OpenDuino

From syn2cat - HackerSpace.lu
(Difference between revisions)
Jump to: navigation, search
(Usage)
 
(54 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 
{{Project
 
{{Project
|what=OpenDuino
 
 
|type=misc
 
|type=misc
|intro=OpenDuino is a hard- and software solution to notify site visitors of the hackerspace occupation status
+
|intro=OpenDuino was a hard- and software solution in use at the old space in strassen to notify site visitors of the hackerspace occupation status
|who=All members
+
|logo=Openduino.png
|status=running
+
|status=cancelled
|contact=Gunstick
+
|repository=git clone git://source.hacker.lu/openduino.git
 +
|tracker=https://source.hacker.lu/projects/openduino/issues
 
|meetings=none
 
|meetings=none
|members=Tschew, Kwisatz
+
|contact=Gunstick
 +
|members=Tschew, Kwisatz, sim0n
 +
|what=OpenDuino
 +
|who=All members
 
}}
 
}}
 +
[[Category:IT_Infrastructure]]
 +
 
{{TOCright}}
 
{{TOCright}}
  
[[Image:P1100023.jpg|thumb|none|240px]]
+
[[Image:P1110988.JPG|thumb|none|300px]]
 +
 
 +
OpendDuino was a solution based on the arduino platform to manage the alarm system and access to our now defunct facilities in strassen.
 +
Understanding it's working and quirks is important for every member who wished to enter and leave the space on it's own.
 +
 
 +
Please read the usage section thoroughly and the abnormal situations part is also worth a look.
 +
Before using openduino on your own, please let it show to you from someone else, try to leave with others together and watch what they do. Don't be afraid to ask questions. If you don't get satisfactory answers, ask those questions on the mailing list.
  
 
== Usage ==
 
== Usage ==
* There is a webserver running on OpenDuino at http://openduino.lan/. It shows the status of the LEDs. Red=closed, green=open.
+
You have 3 means of accessing openduino
* If the hackerspace status is set to closed, the webpage also displays the current alarm status and a link to change it. Just follow the prompts to do this. You will need your wiki password and be a member of syn<sub>2</sub>cat. The moment openduino says something like "sweeping badge" just wait and see. After some seconds the alarm LED will switch to your desired state. It's obvious that this is meant to be used from in front of the locked doors with your favorite wifi device. The URL is protected by the firewall so that the only access to the openduino webpage is from the hackerspace itself and not from somewhere on the Internet.
+
* Log in to WiFi and go to http://openduino.lan/. It shows the open/closed status of the space. You need your password
* The two doors inside the space are checked to automatically set the space to open or close. You don't need to do any button pushing.
+
* Use a smartphone app, search for syn2cat in the store
* When entering you will notice the green LED blinking for 30 seconds. If you push the button during that time, the automatic opening will be stopped.
+
* Use the iButton (you get one via deposit of 5€): iButton is red: access refused. green: read correctly. amber: please wait
* When closing, turn the key twice (internal doors), else the detection will not work. There is also a small delay of 10 seconds before the status is effectively changed to closed.
+
* In case the automatism does not work, there is a button you can find near the two LEDs. To set the space to open, push it so that the green LED is on. To set the status to closed, push it so that the red LED is on. This will then change the status on the webpage.
+
  
* After reboot or reset of OpenDuino it will recover the currently active open/close status shown on the webpage.
+
=== Entering ===
 +
# Before doing anything, first check the state of alarm and space. Normal state is: red led on door is on, all others are off
 +
# trigger openduino with one of the 3 means listed above
 +
# wait for the red/green leds to blink and turn the knob until the door unlocks
 +
# if alarm is correctly disabled, the green LED is on and red is off. You can enter. Do *not* enter if red or blue LEDs are on.
 +
# inside, use your key to unlock the lab and chill doors. The space will change state to open after 30 seconds (orange LED on front door is on)
 +
 
 +
=== Leaving ===
 +
# close the chill and lab doors until the LEDs above the chill door are both lit
 +
# check that nobody is in one of the non syn2cat rooms, else you will lock them in and ring the alarm siren
 +
# go outside, the yellow LED should be off (it's not perfect, bad switches). If not, one of the 4 doors is not locked. Please check again that nobody is inside the building.
 +
# the space will change it's state to closed after 4 seconds (orange LED on the front door goes off)
 +
# trigger openduino with one of the 3 means listed above
 +
# wait for the red/green leds to blink and turn the knob until the door locks
 +
# check that the alarm is on (blue LED is on). The badge reader (below the doorbell) will have a steady red light and emit regular beeping sounds
 +
 
 +
== Abnormal situations ==
 +
=== Space state is closed but front door is open and alarm is off ===
 +
Usually this shows that there are people in one of the non syn2cat rooms: all LEDs are off except green and yellow
 +
# do *not* use openduino !!! else you will sound the alarm siren
 +
# simply enter the hallway
 +
# use your key to open chill and lab rooms
 +
# in the doorway of the chill, openduino shows a red light. push the button to set the space to open
 +
 
 +
=== Space state is closed but front door is closed and alarm is off ===
 +
There my be people inside doing courses in the classrooms. Check the yellow LED, if it's lit, then there may be someone in the building.
 +
Just trigger openduino as usual, the alarm won't get activated.
 +
 
 +
=== Space state is open but door is locked ===
 +
This is often the case during the night when members lock the front door for safety: orange, yellow and red LEDs are on
 +
# use openduino
 +
# when red/green flashes, turn the knob to unlock the door
 +
 
 +
=== Front door is unlocked but alarm is on ===
 +
Very bad situation. Someone switched on the alarm but forgot to lock the door: bright blue LED is on. Also on the badge reader below the door bell, the red LED is on.
 +
# do *not* enter!
 +
# use openduino to switch alarm off (no need to turn the knob of the door, it's already open)
 +
 
 +
=== Space state is open and alarm is on and door is locked ===
 +
This should never happen. If it is, then someone screwed up :-)
 +
 
 +
Triggering openduino should disable the alarm as usual.
 +
<br>
 +
 
 +
== Other details ==
 +
=== LEDs ===
 +
* Front door LEDs (from left to right)
 +
** Blue on: alarm is on, do NOT enter
 +
** Yellow on: shows that at least one inner door is not locked
 +
** Orange on: space state is open
 +
** Red on: you cannot enter because door is locked or the alarm is still on
 +
** Green on: all fine, door unlocked come in
 +
* Front panel LEDs
 +
** iButton red: your iButton is not accepted
 +
** iButton green: your iButton is valid
 +
** iButton amber: space is changing to closed state, wait until LED is off, then use your iButton
 +
** badge reader red: if on, the alarm system is on. If the badge reader beeps, the alarm is transitioning to on. You have 1 minute to leave the hallway.
 +
* Chill LEDs
 +
** doorway red: space state is closed
 +
** doorway green: space state is open (same as orange LED on front door)
 +
** arduino blinking yellow LED: shows correct operation of openduino
 +
** arduino blue LED: alarm system is on, you are doomed if you see that :-)
 +
 
 +
=== other behaviour ===
 +
* After reboot or reset of OpenDuino it will recover the currently active open/close status shown on the web-page. To do a reset, push the black button on the PCB.  
 
* Following a more general power loss, OpenDuino will go into the close state (red LED is on). If you don't put it into green mode, the closed status will be published to the website after 5 minutes.
 
* Following a more general power loss, OpenDuino will go into the close state (red LED is on). If you don't put it into green mode, the closed status will be published to the website after 5 minutes.
* If there is no network connectivity and you try to put the status to open it will go back to closed after a short delay. Repair the network problem and then try again. Connect a PC to the HUB on top of the fridge to test the connectivity.
+
* If there is no network connectivity and you try to put the status to open it will go back to closed after a short delay. Repair the network problem and then try again. Connect a PC to the HUB in the computer museum to test the connectivity. In general: without network, openduino's watchdog will kick in and do a reset.
* The little blinking LED is a status indicator. If it's stopping blinking then something is wrong. Some short pauses are normal when OpenDuino is busy doing fancy stuff.
+
* The blinking yellow LED is a status indicator. If it's stopping blinking then something is wrong. Some short pauses are normal when OpenDuino is busy doing fancy stuff e.g. updating the web page. If the LED is pausing for several seconds, that's a sign of network problems.
 +
* The openduino URL is protected by the firewall so that the only access to the openduino webpage is from the hackerspace itself and not from somewhere on the Internet.
 +
* If the space is open and you want to close the front door from inside, simply use the knob on the inside. It always locks the door, no need to ask openduino for that. This won't lock out outside members to come in. They can use openduino to unlock the door. The alarm will not activate. NEVER lock the front door and also set the space to closed while you are inside.
 +
* If for some reason, openduino cannot activate the alarm, the big light in the round window will blink for 1 minute. So when leaving, look back at the space if it's all dark.
 +
* If the alarm is off and front door is locked, but you cannot unlock it because the battery is empty, call an office member for assistance.
 +
 
 +
== Related Workshops ==
 +
{{#ask:
 +
[[Category:Workshop]] [[Has keyword::openduino]]
 +
| ?StartDate=On
 +
| format=ul
 +
}}
  
 
== Features ==
 
== Features ==
 
* MW extension
 
* MW extension
 
* Set space status at the push of a button
 
* Set space status at the push of a button
* Supports plugins with a set of hooks
+
* Supports plugins with a set of [https://source.hacker.lu/projects/openduino/wiki/Available_Hooks hooks].
** Currently one plugin sends SMS on status change
+
** '''Notification plugin''' sends SMS on status change
** Another plugin could tweet, but we use [[Tweet2cat]]
+
** '''Garbage plugin''' sends SMS when a garbage can needs to be taken outside or brought back in.
* Drive a servo to control the alarm system
+
** '''BubbleUp''' propagates status changes to remote servers
* detect locks on the 2 rooms
+
* Drive reed relays to control the alarm system and front door electronic lock
 +
* detect locks on the 2 rooms and front door
 
* detect state of alarm system
 
* detect state of alarm system
 
* link with membership management tool, only members can use it
 
* link with membership management tool, only members can use it
  
== Source ==
+
== Querying ==
You can check out both the arduino and php parts of the source code by using
+
There are three more of less sophisticated ways of querying the space status.
  
svn co svn://hackerspace.lu/openduino
+
# By using the MW extension running on our [[Syn2cat|Main Page]].
 +
# By using the Wordpress plugin running on our [http://www.hackerspace.lu blog].
 +
# By pointing your (mobile) browser to http://open.hackerspace.lu (SpaceApi support)
 +
# By simply querying http://www.hackerspace.lu/od/status (1 is open, 0 is closed)
 +
 
 +
=== Apps using the OpenDuino- or Space-API ===
 +
* [http://status.syn2cat.lu status.syn2cat.lu]
 +
* [http://github.com/slopjong/OpenSpace Firefox add-on]
 +
 
 +
== Issue tracking ==
 +
An issue and feature request tracker can be found on our [https://source.hacker.lu/projects/openduino/ Redmine] installation.
  
 
=== Todo ===
 
=== Todo ===
 +
* automatic light switching and blinds moving
 +
* improve logic by using external mini-PC running the program (e.g. raspberry pi)
 
* Integrate rrdtool occupancy statistics
 
* Integrate rrdtool occupancy statistics
 
* Create notification messages dictionary file
 
* Create notification messages dictionary file
* Add Pamela™ support
+
 
 +
DONE:
 +
* make the solution autonomous ans resilient against power and internet outage. DONE: UPS fitted on lusitania and openduino
 +
* Add Pamela™ support (see status.syn2cat.lu)
  
 
== Similar implementations ==
 
== Similar implementations ==
 +
* [http://das-labor.org/wiki/Status-Bot Das Labor Status-Bot]
 
* [http://hspbp.org/HackSense Hackerspace Budapest Hacksense]
 
* [http://hspbp.org/HackSense Hackerspace Budapest Hacksense]
 
* [http://www.gumbolabs.org/2010/02/05/rfid-ethernet-shield-client-rails/ GumboLabs in New Orleans]
 
* [http://www.gumbolabs.org/2010/02/05/rfid-ethernet-shield-client-rails/ GumboLabs in New Orleans]
 
* [http://hackerspace.be/Pamela Pamela in Brussels]
 
* [http://hackerspace.be/Pamela Pamela in Brussels]
 +
* [http://maschinenraum.subsignal.org/blog/index.php/2009/11/11/mr_door/ Mr. Door @ Maschinenraum]
 +
* [http://metalab.at/wiki/Metalock Metalock] & [http://metalab.at/wiki/MetaSense MetaSense] @ Metalab
 +
* [http://lists.hackerspaces.org/pipermail/discuss/2010-April/002074.html Discussion on hackerspaces.org]
 +
* [http://0x20.be/Gatekeeper Gatekeeper @ Whitespace]
 +
* [https://revspace.nl/RevelationSpace/ProjectSpaceAccessControl SpaceAccessControl @ RevSpace]
 +
* [http://wiki.nottinghack.org.uk/wiki/HackSpace_Instrumentation HackSpace Instrumentation @ HSNOTTS]
 +
As a summary, see [http://www.hackcess.org/doku.php Hackcess.org].
 +
 +
== Brainstorming on extension  ==
 +
Assuming that there is a user who wants to come to the space, checks the website an sees that it is open. After a while the user stands in front of the door, but the other person already left. Our user doesn't have a key. --> Unpleasant situation. To avoid such scenarios in the future, we thought about a system that could solve the problem with the help of our coming member cards. The member cards will be suited up with a bar code and a magnetic tape. The usernames of the cardholders should be saved on these and every time when they enter the space, they should scan their cards and enter with the help of a numpad the time until they'll stay approximately.
  
 
== Photo Gallery ==
 
== Photo Gallery ==
Line 76: Line 187:
 
   File:P1100023.jpg|new button, leds, transistors and new code inside
 
   File:P1100023.jpg|new button, leds, transistors and new code inside
 
</gallery>
 
</gallery>
 +
 +
 +
 +
=== Version 5 ===
 +
<gallery>
 +
  File:OpenduinoWall.jpg|bye bye fridge, mount on board which holds with magnets on doorframe
 +
</gallery>
 +
 +
=== Version 6 ===
 +
[[Image:P1110988.JPG|left|320px|Servo replaced by relays]]
 +
The big moment has come. It was inevitable. We are all sad that the servo had to go. It had become old and unreliable to the point that people hat to turn around at the door step because they were not granted entry. So now it's all done with reed relays. To compensate, some new lights have also been added on the outside door.

Latest revision as of 22:56, 18 July 2014

Add your Project
Crystal Project package graphics.png
OpenDuino
OpenDuino was a hard- and software solution in use at the old space in strassen to notify site visitors of the hackerspace occupation status
Openduino.png
Meetings: none
Type: misc
Repository: git clone git://source.hacker.lu/openduino.git
Tracker: https://source.hacker.lu/projects/openduino/issues
Status: cancelled
Members: Tschew, Kwisatz, sim0n
Contact Person: Gunstick (mail)
Tools
QrCode: QR-813ebf5c3f7efafd8aa71f27d04ef890.png

Contents


P1110988.JPG

OpendDuino was a solution based on the arduino platform to manage the alarm system and access to our now defunct facilities in strassen. Understanding it's working and quirks is important for every member who wished to enter and leave the space on it's own.

Please read the usage section thoroughly and the abnormal situations part is also worth a look. Before using openduino on your own, please let it show to you from someone else, try to leave with others together and watch what they do. Don't be afraid to ask questions. If you don't get satisfactory answers, ask those questions on the mailing list.

[edit] Usage

You have 3 means of accessing openduino

  • Log in to WiFi and go to http://openduino.lan/. It shows the open/closed status of the space. You need your password
  • Use a smartphone app, search for syn2cat in the store
  • Use the iButton (you get one via deposit of 5€): iButton is red: access refused. green: read correctly. amber: please wait

[edit] Entering

  1. Before doing anything, first check the state of alarm and space. Normal state is: red led on door is on, all others are off
  2. trigger openduino with one of the 3 means listed above
  3. wait for the red/green leds to blink and turn the knob until the door unlocks
  4. if alarm is correctly disabled, the green LED is on and red is off. You can enter. Do *not* enter if red or blue LEDs are on.
  5. inside, use your key to unlock the lab and chill doors. The space will change state to open after 30 seconds (orange LED on front door is on)

[edit] Leaving

  1. close the chill and lab doors until the LEDs above the chill door are both lit
  2. check that nobody is in one of the non syn2cat rooms, else you will lock them in and ring the alarm siren
  3. go outside, the yellow LED should be off (it's not perfect, bad switches). If not, one of the 4 doors is not locked. Please check again that nobody is inside the building.
  4. the space will change it's state to closed after 4 seconds (orange LED on the front door goes off)
  5. trigger openduino with one of the 3 means listed above
  6. wait for the red/green leds to blink and turn the knob until the door locks
  7. check that the alarm is on (blue LED is on). The badge reader (below the doorbell) will have a steady red light and emit regular beeping sounds

[edit] Abnormal situations

[edit] Space state is closed but front door is open and alarm is off

Usually this shows that there are people in one of the non syn2cat rooms: all LEDs are off except green and yellow

  1. do *not* use openduino !!! else you will sound the alarm siren
  2. simply enter the hallway
  3. use your key to open chill and lab rooms
  4. in the doorway of the chill, openduino shows a red light. push the button to set the space to open

[edit] Space state is closed but front door is closed and alarm is off

There my be people inside doing courses in the classrooms. Check the yellow LED, if it's lit, then there may be someone in the building. Just trigger openduino as usual, the alarm won't get activated.

[edit] Space state is open but door is locked

This is often the case during the night when members lock the front door for safety: orange, yellow and red LEDs are on

  1. use openduino
  2. when red/green flashes, turn the knob to unlock the door

[edit] Front door is unlocked but alarm is on

Very bad situation. Someone switched on the alarm but forgot to lock the door: bright blue LED is on. Also on the badge reader below the door bell, the red LED is on.

  1. do *not* enter!
  2. use openduino to switch alarm off (no need to turn the knob of the door, it's already open)

[edit] Space state is open and alarm is on and door is locked

This should never happen. If it is, then someone screwed up :-)

Triggering openduino should disable the alarm as usual.

[edit] Other details

[edit] LEDs

  • Front door LEDs (from left to right)
    • Blue on: alarm is on, do NOT enter
    • Yellow on: shows that at least one inner door is not locked
    • Orange on: space state is open
    • Red on: you cannot enter because door is locked or the alarm is still on
    • Green on: all fine, door unlocked come in
  • Front panel LEDs
    • iButton red: your iButton is not accepted
    • iButton green: your iButton is valid
    • iButton amber: space is changing to closed state, wait until LED is off, then use your iButton
    • badge reader red: if on, the alarm system is on. If the badge reader beeps, the alarm is transitioning to on. You have 1 minute to leave the hallway.
  • Chill LEDs
    • doorway red: space state is closed
    • doorway green: space state is open (same as orange LED on front door)
    • arduino blinking yellow LED: shows correct operation of openduino
    • arduino blue LED: alarm system is on, you are doomed if you see that :-)

[edit] other behaviour

  • After reboot or reset of OpenDuino it will recover the currently active open/close status shown on the web-page. To do a reset, push the black button on the PCB.
  • Following a more general power loss, OpenDuino will go into the close state (red LED is on). If you don't put it into green mode, the closed status will be published to the website after 5 minutes.
  • If there is no network connectivity and you try to put the status to open it will go back to closed after a short delay. Repair the network problem and then try again. Connect a PC to the HUB in the computer museum to test the connectivity. In general: without network, openduino's watchdog will kick in and do a reset.
  • The blinking yellow LED is a status indicator. If it's stopping blinking then something is wrong. Some short pauses are normal when OpenDuino is busy doing fancy stuff e.g. updating the web page. If the LED is pausing for several seconds, that's a sign of network problems.
  • The openduino URL is protected by the firewall so that the only access to the openduino webpage is from the hackerspace itself and not from somewhere on the Internet.
  • If the space is open and you want to close the front door from inside, simply use the knob on the inside. It always locks the door, no need to ask openduino for that. This won't lock out outside members to come in. They can use openduino to unlock the door. The alarm will not activate. NEVER lock the front door and also set the space to closed while you are inside.
  • If for some reason, openduino cannot activate the alarm, the big light in the round window will blink for 1 minute. So when leaving, look back at the space if it's all dark.
  • If the alarm is off and front door is locked, but you cannot unlock it because the battery is empty, call an office member for assistance.

[edit] Related Workshops


[edit] Features

  • MW extension
  • Set space status at the push of a button
  • Supports plugins with a set of hooks.
    • Notification plugin sends SMS on status change
    • Garbage plugin sends SMS when a garbage can needs to be taken outside or brought back in.
    • BubbleUp propagates status changes to remote servers
  • Drive reed relays to control the alarm system and front door electronic lock
  • detect locks on the 2 rooms and front door
  • detect state of alarm system
  • link with membership management tool, only members can use it

[edit] Querying

There are three more of less sophisticated ways of querying the space status.

  1. By using the MW extension running on our Main Page.
  2. By using the Wordpress plugin running on our blog.
  3. By pointing your (mobile) browser to http://open.hackerspace.lu (SpaceApi support)
  4. By simply querying http://www.hackerspace.lu/od/status (1 is open, 0 is closed)

[edit] Apps using the OpenDuino- or Space-API

[edit] Issue tracking

An issue and feature request tracker can be found on our Redmine installation.

[edit] Todo

  • automatic light switching and blinds moving
  • improve logic by using external mini-PC running the program (e.g. raspberry pi)
  • Integrate rrdtool occupancy statistics
  • Create notification messages dictionary file

DONE:

  • make the solution autonomous ans resilient against power and internet outage. DONE: UPS fitted on lusitania and openduino
  • Add Pamela™ support (see status.syn2cat.lu)

[edit] Similar implementations

As a summary, see Hackcess.org.

[edit] Brainstorming on extension

Assuming that there is a user who wants to come to the space, checks the website an sees that it is open. After a while the user stands in front of the door, but the other person already left. Our user doesn't have a key. --> Unpleasant situation. To avoid such scenarios in the future, we thought about a system that could solve the problem with the help of our coming member cards. The member cards will be suited up with a bar code and a magnetic tape. The usernames of the cardholders should be saved on these and every time when they enter the space, they should scan their cards and enter with the help of a numpad the time until they'll stay approximately.

[edit] Photo Gallery

[edit] Version 1

first version

[edit] Version 2

[edit] Version 3

[edit] Version 4


[edit] Version 5

[edit] Version 6

Servo replaced by relays

The big moment has come. It was inevitable. We are all sad that the servo had to go. It had become old and unreliable to the point that people hat to turn around at the door step because they were not granted entry. So now it's all done with reed relays. To compensate, some new lights have also been added on the outside door.

Personal tools
Namespaces

Variants
Actions
Navigation
syn2cat
Hackerspace
Activities
Initiatives
Community
Tools
Tools