1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-12-22 18:34:25 +01:00
Commit Graph

404 Commits

Author SHA1 Message Date
2ee9457908 doorlockd: scripts: mqtt: send present status
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-08 23:15:42 +02:00
3df6515808 schematics: board: move RJ45 jack to the left
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-08 23:07:49 +02:00
e0fd93a700 schematics: add door state jumper
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-08 23:07:49 +02:00
ce3d4911ec schematics: board: rearrange LEDs
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-08 22:45:27 +02:00
c70bd29b61 schematics: decouple optocoupler
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-08 22:45:27 +02:00
9b47b260f3 schematics: Update Resistor values
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-08 21:06:11 +02:00
4c7886dc61 Add PKGBUILD for Arch linux
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-08 03:22:38 +02:00
03648bf821 Add Makefile
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-08 03:22:29 +02:00
f857fffac6 doorlockd: remove nasty flask-bootstrap dependency
Package is no longer officially maintainer, remove the dependency.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-08 02:55:14 +02:00
f226f44190 doorlockd: fix logic bug
We don't want to continue if we actually want to close.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-08 00:59:01 +02:00
f7725bba54 doorlockd: hooks: simplify hooks
and add present state

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-08 00:41:21 +02:00
4f95021fcf doorlockd: minor simplification
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-08 00:41:21 +02:00
d5215ea0fc schematics: improve schematics
- Use RJ45 instead for buttons/LEDs
  - Use SMD capacitor

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-08 00:20:06 +02:00
e3491aaa45 doorlockd: Flask: disable use_reloader
This spawns the process twice which duplicates the UART thread, which,
of course, leads to silly races.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-07 22:04:24 +02:00
d5a41a596d avr: choose our own programmer
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-07 22:02:41 +02:00
9f3062340c doorlockd, avr: Don't respond on commands
No need to read back the AVR.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-07 22:02:41 +02:00
95c35e7c06 Let scriptdir depend on PREFIX
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-05 22:31:37 +00:00
179180dc4e Improve systemd unit script
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-05 22:31:37 +00:00
60633bbc49 Flask: specify correct root_path
We need that for package installation.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-05 22:31:37 +00:00
e5fb445287 move sound specification from config to source
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-05 22:18:59 +00:00
c2c6e00651 Rename config.cfg -> doorlockd.cfg
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-05 20:22:16 +00:00
3e8d8a98e3 Rename doorlockd.py -> doorlockd
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-05 18:44:07 +00:00
31afb91f8d Add proper debugging mode
For production, only listen on localhost, in Debug mode,
allow anything from 0.0.0.0

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-05 18:44:07 +00:00
da08f768a1 Design a button case
Signed-off-by: Thomas Schmid <tom@binary-kitchen.de>
2018-09-04 01:21:41 +02:00
9567ca938f doorlockd.py: implement emergency unlock
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 23:05:46 +00:00
5fd19def77 avr: support emergency unlock
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 23:04:58 +00:00
698a96e46b avr: surpress compiler warning
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 22:15:38 +00:00
29d722453d avr: improve logic
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 22:13:41 +00:00
25595f18f2 avr: add accessors for emergency buttons
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:57:03 +00:00
0f6c837eb8 avr: remove superfluous function
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:29:27 +00:00
2307df2a0b Update gitignore
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:28:41 +00:00
174c498b22 Remove superfluous files
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:28:41 +00:00
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
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
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
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
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
9a29f02449 Prepare doorlock for new states
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-09-03 21:28:41 +00:00
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
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
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
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
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
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
0ae60848cf doorlockd.py: improve startup scripts
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-26 20:50:49 +00:00
04ef5219d3 doorlockd.py: improve front end conversion
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2018-03-23 22:52:36 +00:00