Commit Graph

281 Commits

Author SHA1 Message Date
Thomas da08f768a1 Design a button case
Signed-off-by: Thomas Schmid <tom@binary-kitchen.de>
2018-09-04 01:21:41 +02:00
Ralf Ramsauer 9567ca938f doorlockd.py: implement emergency unlock
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 23:05:46 +00:00
Ralf Ramsauer 5fd19def77 avr: support emergency unlock
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 23:04:58 +00:00
Ralf Ramsauer 698a96e46b avr: surpress compiler warning
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 22:15:38 +00:00
Ralf Ramsauer 29d722453d avr: improve logic
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 22:13:41 +00:00
Ralf Ramsauer 25595f18f2 avr: add accessors for emergency buttons
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:57:03 +00:00
Ralf Ramsauer 0f6c837eb8 avr: remove superfluous function
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:29:27 +00:00
Ralf Ramsauer 2307df2a0b Update gitignore
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:28:41 +00:00
Ralf Ramsauer 174c498b22 Remove superfluous files
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:28:41 +00:00
Ralf Ramsauer 8face4bccc Remove ISP adapter
Let's flash the device with the Raspberry Pi :-)
... But add an Jumper for the reset line.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:28:41 +00:00
Ralf Ramsauer 4f034def73 avr: use linuxspi as programmer
Yes, that's pretty cool :-)

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:28:41 +00:00
Ralf Ramsauer 23166516f1 Rework AlreadyLocked and AlreadyUnlocked
Better use the AlreadyActive semantics, which signalises that a state,
no matter which state in particular, is already active.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:28:41 +00:00
Ralf Ramsauer 6977c46c5c Add the current state to the response
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:28:41 +00:00
Ralf Ramsauer 20c86eb659 Factor out string to DoorState conversion, and support present command
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:28:41 +00:00
Ralf Ramsauer 9a29f02449 Prepare doorlock for new states
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:28:41 +00:00
Ralf Ramsauer bd63a57d31 Cleanup AVR project, add new empty stubs
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:28:41 +00:00
Ralf Ramsauer af7b71304b First steps towards Raspberry Pi doorlock hat
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-02 06:03:06 +02:00
Ralf Ramsauer 201cc2ef9b Split up simulation of LDAP and serial
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-02 06:03:06 +02:00
Ralf Ramsauer d52de425ca Remove deprecated API
We have a new app -- let's remove this.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-08-28 23:20:15 +02:00
Ralf Ramsauer e56622128e Provide addition 'open' field in JSON response
Better than parsing german words.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-08-28 23:16:40 +02:00
Ralf Ramsauer 201411a65f doorlockd: Implement doorlock API
This will be used in the future Android App.

/api only allows POST requests. POST variables:
  - user
  - pass
  - command

Supported commands: "status", "lock", "unlock"

Only valid API requests (i.e., an API request that has all POST variables set)
will respons a valid JSON response. Otherwise, an html error will be thrown.

JSON response format:

err: Integer, Error code, as defined in LogicResponse
msg: Message
status: Current kitchen status. Only set in case of success.

The LogicResponse stati "Success", "AlreadyLocked" and "AlreadyUnlocked" are
considered successful.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-08-23 20:17:50 +02:00
Thomas Basler 8f0589cbf2 Added Apple specific meta tag
This meta tag leads to a real full screen app.
See https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html
2018-06-05 22:49:25 +02:00
Thomas Basler 8058fda326 Send lock/unlock messages using retain flag 2018-05-21 22:45:59 +02:00
Thomas Schmid 84d61c04db Change minimum length of username string from 4 to 3
because of some users with 3 character usenames

Signed-off-by: Thomas Schmid <thomas.schmid@oth-regensburg.de>
2018-04-12 10:45:02 +02:00
Thomas Schmid 6a018b7290 changed socketio async mode from None to 'threading'
in order to function correctly with python threads
2018-04-03 23:47:09 +02:00
Ralf Ramsauer 0ae60848cf doorlockd.py: improve startup scripts
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-26 20:50:49 +00:00
Ralf Ramsauer 04ef5219d3 doorlockd.py: improve front end conversion
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-23 22:52:36 +00:00
Ralf Ramsauer 47adac2e0f display: increase font size
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-23 22:51:42 +00:00
Ralf Ramsauer 71bc36a557 remove old code
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-23 22:22:50 +00:00
Ralf Ramsauer dc724b4abb doorlockd.py: add systemd service file
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-23 22:22:47 +00:00
Ralf Ramsauer b0f4e82914 doorlockd: display: add autorefresh interval
10 minutes sounds reasonable

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-23 22:13:32 +00:00
Ralf Ramsauer 010563dab4 doorlockd.py: add doorlock sounds
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-23 22:01:02 +00:00
Ralf Ramsauer 8f8db8950b Remove TODO entry
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-22 23:37:14 +00:00
Ralf Ramsauer f72f731b59 doorlockd.py: Add LDAP authentication support
Shamelessly copied from moep's DSS tool.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
Cc: Markus Hauschild <moepman@binary-kitchen.de>
2018-03-22 23:36:46 +00:00
Ralf Ramsauer d82272f53a config: don't run hooks
For the moment, don't run hooks

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-22 23:36:46 +00:00
Ralf Ramsauer c0e89c1be9 Add Binary Kitchen CA
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-22 23:36:46 +00:00
Ralf Ramsauer 910ec8ba5b Add more TODOs
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-22 01:40:54 +01:00
Ralf Ramsauer 4d1682d1bd doorlockd.py: Add config parameter for hooks
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-21 00:58:30 +01:00
Ralf Ramsauer 6e2655e6e5 doorlockd.py: Add compatibility layer for old doorlockd-app
This commit will be reverted once everyone has updated their app.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-21 00:40:56 +01:00
Ralf Ramsauer 82d09ddede static: add dummy token image
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-21 00:28:57 +01:00
Ralf Ramsauer 96de37d27d doorlockd.py: remove Markup import statement
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-20 23:49:11 +01:00
Ralf Ramsauer 153f066ef7 doorlockd.py: avoid encoding warnings
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-20 00:54:52 +01:00
Ralf Ramsauer be0ab6b58a doorlockd.py: Add schnapper support
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-20 00:18:46 +01:00
Ralf Ramsauer d17f5c964a correct path
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-19 18:54:18 +01:00
Ralf Ramsauer 90528bb7d9 doorlockd.py: Add RS232 logic
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-19 18:47:04 +01:00
Ralf Ramsauer 6961821c04 re-add scripts
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-19 18:42:34 +01:00
Ralf Ramsauer 79599e2a45 doorlockd.py: Add lock/unlock scripts
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-18 22:04:14 +01:00
Ralf Ramsauer 8cdf528032 update TODOs
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-18 18:36:05 +01:00
Ralf Ramsauer 67879a659d doorlockd: add simulation mode
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-18 18:32:15 +01:00
Ralf Ramsauer bccd9432af Add TODOs 2018-03-18 18:32:11 +01:00