londonhackspace / doorbot Goto Github PK
View Code? Open in Web Editor NEWold RFID door entry bot, now mostly just door announcers
old RFID door entry bot, now mostly just door announcers
Glados should pick one at random to play.
Bit of a mystery. Surely only the random ones should be played randomly?
{"nick":"alexmuller","gladosfile":null,"perms":[],"cards":["CB..."]},
...
{"nick":"chrismear","gladosfile":"broken.wav","perms":[],"cards":["0421..."]}
2012-04-07 13:05:32,916 INFO 0421... authorised as chrismear
2012-04-07 13:20:52,181 INFO CB... authorised as alexmuller
2012-04-07 14:48:18,532 INFO 0421... authorised as chrismear
2012-04-07 13:05:33,086 INFO Playing aoss bplay glados-wavefiles/members/broken.wav
2012-04-07 13:20:52,352 INFO Playing aoss bplay glados-wavefiles/members/broken.wav
2012-04-07 14:48:18,703 INFO Playing aoss bplay glados-wavefiles/members/broken.wav
Perhaps we're not initialising gladosfile to null when parsing the DB?
Allow admins to add cards for users without knowing the secret URL. Make sure the secret URL is documented, but not linked to reduce abuse.
No current provisions exist server side for the collection of tooluse time reports
Back:
refreshing
u'(Person 1) opened the hackspace back door. (Last seen 12 hours ago)'
u'(Person 1) opened the hackspace back door. (Last seen 12 hours ago)'
Exception in handler ValueError('insecure string pickle',)
Exception in handler ValueError('insecure string pickle',)
u'(Person 1) opened the hackspace back door.'
u'(Person 1) opened the hackspace back door.'
Exception in handler EOFError()
u'(Person 1) opened the hackspace back door.'
u'(Person 1) opened the hackspace back door.'
Exception in handler ValueError('insecure string pickle',)
u'(Person 1) opened the hackspace back door.'
u'(Person 1) opened the hackspace back door.'
Exception in handler EOFError()
u'(Person 1) opened the hackspace back door.'
u'(Person 1) opened the hackspace back door.'
Exception in handler ValueError('insecure string pickle',)
u'(Person 1) opened the hackspace back door.'
u'(Person 1) opened the hackspace back door.'
Front:
refreshing
u'(Person 2) opened the hackspace front door. (Last seen 1 hour ago)'
u'(Person 2) opened the hackspace front door. (Last seen 1 hour ago)'
u'(Person 2) opened the hackspace front door. (Last seen 1 hour ago)'
u'(Person 2) opened the hackspace front door.'
u'(Person 2) opened the hackspace front door.'
Exception in handler EOFError()
u'(Person 2) opened the hackspace front door.'
u'(Person 2) opened the hackspace front door.'
Exception in handler EOFError()
u'(Person 2) opened the hackspace front door.'
And to determine whether they're a member. Possibly also the last card used on Doorbot
Sending data with a "PUT /1/tooluse/" request that includes both the status and the ID of the card causing the status change is not accepted.
It should process this information along with the status of the node
You could hear the relay click, but no buzz from the strike plate, it started working again on it's own.
Oiled the strike plate a bit to see if it helps.
This has been suggested a lot. For some small fee, you can change someone's entrance music as a joke.
In the last couple of weeks it's happened 3 times.
Babbage was down for a while: when it came back up, Bell played all the greetings in the intervening time in one go. That's gotta be annoying.
acnode.py - Add the ability for cards to have supervisor status and return this for /card/ GET requests
The server should check that the ID of the card sent as the supervisor adding the users card does in fact have supervisor permissions.
somewhere (new python version in Debian 7?) along the line the broadcast sending/receiving stuff has stoped working - this got partially fixed in some recent commits. Work out what actually went wrong and make sure it's all fixed properly.
2013-05-08 16:39:58,377 DEBUG Loading card table, mtime 1368027542
2013-05-08 16:39:58,675 INFO Loaded 650 cards
2013-05-08 16:39:58,690 INFO <...> authorised as charduff
2013-05-08 16:39:58,693 DEBUG Triggering door relay
2013-05-08 16:39:59,196 DEBUG Announcing to network
2013-05-08 16:39:59,198 DEBUG Broadcasting RFID to network
2013-05-08 16:40:04,115 DEBUG Loading card table, mtime 1368027602
2013-05-08 16:40:04,414 INFO Loaded 650 cards
2013-05-08 16:40:04,428 INFO <...> authorised as charduff
2013-05-08 16:40:04,431 DEBUG Triggering door relay
2013-05-08 16:40:04,935 DEBUG Announcing to network
2013-05-08 16:40:04,937 DEBUG Broadcasting RFID to network
2013-05-08 16:40:10,324 INFO <...> authorised as charduff
2013-05-08 16:40:10,326 DEBUG Triggering door relay
2013-05-08 16:40:10,830 DEBUG Announcing to network
2013-05-08 16:40:10,832 DEBUG Broadcasting RFID to network
2013-05-08 16:40:13,398 INFO <...> authorised as charduff
2013-05-08 16:40:13,400 DEBUG Triggering door relay
2013-05-08 16:40:13,904 DEBUG Announcing to network
2013-05-08 16:40:13,906 DEBUG Broadcasting RFID to network
2013-05-08 16:40:16,455 INFO <...> authorised as charduff
2013-05-08 16:40:16,457 DEBUG Triggering door relay
2013-05-08 16:40:16,961 DEBUG Announcing to network
2013-05-08 16:40:16,963 DEBUG Broadcasting RFID to network
...
2013-05-08 17:05:46,099 INFO <...> authorised as Hipster
2013-05-08 17:05:46,102 DEBUG Triggering door relay
2013-05-08 17:05:46,605 DEBUG Announcing to network
2013-05-08 17:05:46,608 DEBUG Broadcasting RFID to network
2013-05-08 17:07:35,200 CRITICAL Unexpected error during poll: Error 6300 selecting card
2013-05-08 17:07:40,216 DEBUG Starting main loop
2013-05-08 17:07:42,663 CRITICAL Unexpected error during poll: Error 6300 selecting card
2013-05-08 17:07:47,671 DEBUG Starting main loop
2013-05-08 17:07:47,687 CRITICAL Unexpected error during poll: Error PC01 selecting card
2013-05-08 17:07:52,695 DEBUG Starting main loop
...
Starting doorbot...
...
2013-05-08 17:10:14,566 DEBUG Starting main loop
2013-05-08 17:10:14,789 CRITICAL Unexpected error during poll: Error PC01 selecting card
...
2013-05-08 17:16:04,393 DEBUG Starting main loop
2013-05-08 17:16:04,438 DEBUG Starting main loop
2013-05-08 17:16:04,624 CRITICAL Unexpected error during poll: Error PC01 selecting card
2013-05-08 17:16:04,629 CRITICAL Unexpected error during poll: Error PC01 selecting card
...
2013-05-08 17:17:45,743 CRITICAL Unexpected error during poll: Error PC01 selecting card
...
2013-05-08 17:21:33,602 DEBUG Starting main loop
...
2013-05-08 17:30:28,885 INFO <...> authorised as TimRTerrible
May 8 17:14:08 wilson pcscd: ccid_usb.c:660:WriteUSB() write failed (1/4): -4 No such device
May 8 17:14:11 wilson kernel: [107795.543984] usb 1-1.2: new full-speed USB device number 6 using dwc_otg
May 8 17:14:11 wilson kernel: [107795.648568] usb 1-1.2: New USB device found, idVendor=072f, idProduct=90cc
May 8 17:14:11 wilson kernel: [107795.648598] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
May 8 17:14:11 wilson kernel: [107795.648617] usb 1-1.2: Product: CCID USB Reader
May 8 17:14:11 wilson kernel: [107795.648647] usb 1-1.2: Manufacturer:
May 8 17:14:45 wilson 6>
May 8 17:15:01 wilson /USR/SBIN/CRON[10310]: (root) CMD (/root/Doorbot/getcards.sh)
pscsd restarted a couple of times with no luck, and then a second copy of doorbot was started simultaneously. After killing both, replugging the USB and restarting pcscd in foreground mode (after a 5 minute or so wait), it worked again.
It's probably replugging the USB that fixes it, and therefore either Linux or the reader getting into a persistently broken state. Unfortunately, killing pcscd while doorbot's running also triggers the PC01 error, so we need better diagnostics.
After another reader failure (#23), but monit didn't notice.
Feb 12 20:41:54 hamming Doorbot[1483]: INFO Response from serial: 'Opening door\r\n'
Feb 12 20:41:54 hamming Doorbot[1483]: INFO Extra from serial: 'Door opened\r\n'
Feb 12 21:42:33 hamming Doorbot[1483]: CRITICAL Unexpected error during poll: Unable to connect with protocol: T0 or T1. Card is unresponsive.
Feb 12 21:49:34 hamming Doorbot[13981]: INFO Daemonised doorbot
While:
ms7821@hamming:~$ sudo service doorbot restart
[....] Stopping Door entry control daemon: doorbotstart-stop-daemon: warning: failed to kill 1483: No such process
No process in pidfile '/var/run/doorbot.pid' found running; none killed.
failed!
[ ok ] Starting Door entry control daemon: doorbot.
Many people have inquired on the mailing list and in person (when that was possible) to be able to use the ac node/doorbot system for their own hackspace or other office. Would be helpful to have a license so it's clear what reuse is allowed for the code and hardware associated to the project.
May also encourage people to make fixes, new feature improvements and contribute back with pull requests.
Can anyone advise on what the license of this repository and the associated repositories?
When trying to add a new card on Tesla
"Error importing RFIDIOt: AttributeError("rfidiot instance has no attribute 'readernam'",)
Something like:
Or:
It should only ever return the next card, not multiple cards, and there seems to be an error in listing the next card if added over the network.
After adding a card via the network, GET /1/sync/ correctly retrieves the first card, but then sending GET/1/sync/12345678 gives you both cards "12345679,12345678" sending a further GET /1/sync/12345679 gives a card not found error.
Not sure whether this is lack of feedback or a bug:
1 2013-05-23 18:37:18,932 Will Brooks
1 2013-05-23 19:05:48,279 William Gubbins
10 2013-05-23 19:19:07,218 Will Brooks
3 2013-05-23 19:22:56,430 Inspector Sands
5 2013-05-23 19:24:04,524 Will Brooks
6 2013-05-23 19:38:09,333 Michael Trew
10 2013-05-23 20:20:23,667 Stefans
2 2013-05-23 20:23:41,111 albie higgins
1 2013-05-23 20:24:28,406 Stefans
From #27: the front door speaker should be moved into the lobby room (so the person hearing it is the person who tapped in), and the external speaker should be outside the back door (same reason)
People have previously entered the number on the back of the card. Does it actually read NFC? Does it validate the card number before trying to submit?
Like Doorbot itself (for CaptainTerrible)
It should be possible for a member to add a card to doorbot temporarily, valid within a given pair of dates (nominally now, now+ 24 hours)
The rationale is that it formalises the process of lending your card to someone so they can get in and out. As well as ad-hoc access for visitors and guests, temporary passes will be useful for workshops and events too.
Unlike lending a card, adding a temporary card would allow doorbot to report better information: GuestName opened the backspace door (via: MemberName), and it would be easier to revoke access too.
acnode.py - Can the server return a 400 error (or else anything other than 200) should the card id be in an incorrect format, i.e. "1234567b" instead of "1234567B"
will need to be redone, in particular:
probably best to add it to doorbot.py since it will know how to open it's door...
If the USB connection or card reader fails, doorbot currently spams the channel unrelentingly, which is pretty annoying.
Use something sensible to monitor the status of Doorbot, and only announce an alert state ("broken for 5 mins", etc.) to the channel. This could be on Babbage, and could also then send the same message in SMSes.
After the arduino is power cycled it works fine for a while and then stops.
Maybe the pin on the arduino is getting flakey?
python-crypto curl
At least, until the carddb is downloaded again.
2013-04-08 22:12:48,249 INFO <...> authorised as martind
2013-04-08 22:12:48,250 DEBUG Triggering door relay
2013-04-08 22:12:48,250 DEBUG Announcing to network
2013-04-08 22:12:48,252 DEBUG Broadcasting RFID to network
2013-04-08 22:12:50,460 DEBUG Response from serial: 'Opening door\r\n'
2013-04-08 23:04:01,870 DEBUG Loading card table, mtime 1365458641
2013-04-08 23:04:02,137 CRITICAL Unexpected error during poll: Unterminated string starting at: line 1 column 37886 (char 37886)
2013-04-08 23:04:07,143 DEBUG Starting main loop
2013-04-08 23:04:07,432 WARNING <...> not authorised
...
2013-04-08 23:16:11,051 DEBUG Loading card table, mtime 1365459362
2013-04-08 23:16:11,606 INFO Loaded 652 cards
2013-04-08 23:16:11,615 INFO <...> authorised as martind
I manually added 2 cards directly to the database and neither worked, probably cos the uid was in lower case.
Doorbot converts the uid read from the reader to upper case before comparing it with the one in the json.
Hi all,
Had idea and spoke to few people about it and they like the idea.
Basically have a check on the card sounds, as we now have the yard and people will be coming in and out to get stuff. Can we add a line of code that when you tap in it checks if the audio has been played in the last hour, if it has been played, do not play again, if not, play audio.
Regards
Chris
Hipster
And make this part of the set-up instructions
The listeners needs to demonise and use syslog etc.
Might be better to just run them in threads within one process.
14:47:05< robonaut> <...> opened the hackspace back door. (Last seen 20 hours ago)
14:48:23< robonaut> This is front doorbot
...
16:17:57 <@jasperw> ms7821 : wilkeds died again and had to be power cycled.
Wasn't picked up by monit?
To get rid of web polling.
The required volume varies a lot between a Tuesday evening and a quiet afternoon. It can get annoying quickly.
While a terminal is l33t and all, it would be nice to have a proper UI or web interface on Lovelace for adding cards.
Been running an acnode on my home network for ~4days just pinging to check its status. Came in this morning to find it had gone into "no network/server mode" trying to make http requests to the server via a browser timed out and doing a ctrl+c managed to bring it back to life with a trace route spat out. (this also brought the acnode back to life)
192.168.5.13 - - [01/May/2012 12:45:57] "GET /1/status/ HTTP/1.0" 200 -
2012-05-01 12:45:57,070 DEBUG Time taken: 0.737 ms
^C----------------------------------------
Exception happened during processing of request from ('192.168.5.13', 1915)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 310, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 639, in init
self.handle()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 343, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 313, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
File "/usr/lib/python2.7/socket.py", line 476, in readline
data = self._sock.recv(self._rbufsize)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.