Git Product home page Git Product logo

doorbot's People

Contributors

artgodwin avatar ciemon avatar eb4890 avatar fridgehead avatar jasiek avatar jasperwallace avatar jfautley avatar jonty avatar marksteward avatar russss avatar solexious avatar zts avatar zymurgic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

doorbot's Issues

Glados plays wrong wave file

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?

Duplicate invalid messages on broadcast

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.'

acnode.py - accept ID data with tool use reports

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

strike plate didn't strike

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.

Glados queues unplayable sounds

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.

listeners not listening any more

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.

Card reader failure

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.

Process died on hamming

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.

License Query

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?

addcard.sh error

When trying to add a new card on Tesla
"Error importing RFIDIOt: AttributeError("rfidiot instance has no attribute 'readernam'",)

Allow members to choose their own entrance sounds

Something like:

  1. Upload audio to Babbage
  2. Log into website
  3. Select file from list

Or:

  1. Run script with local file
  2. Script uploads file to Babbage
  3. Script updates some file on Babbage with location of file and user ID

acnode.py - do_sync issues

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.

Repeated card entry attempts

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

Move speakers

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)

Check NFC app flow

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?

allow members to authorise cards temporarily

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.

openDoor.py bitrotted

will need to be redone, in particular:

  • will need to cope with different types of relay
  • could do with remote access.
  • some kind of authentication would be nice.
  • might be best to just ditch it, we've not used it for years

probably best to add it to doorbot.py since it will know how to open it's door...

Reduce failure spam

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.

Card table reload failure doesn't recover

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

case sensitivity of card uid's

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.

Make Glados less annoying

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

listener improvements

The listeners needs to demonise and use syslog etc.

Might be better to just run them in threads within one process.

Front Doorbot Raspberry Pi locked up

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?

Acnode lockup

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)

KeyboardInterrupt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.