Commit Graph

407 Commits

Author SHA1 Message Date
Thomas e7955cab59 update nuki state handling
update state handling so that manual state changes of the nuki (key or
button press) are reflected to the internal doorlock state. Refactor
general state handling to support this

Signed-off-by: Thomas Schmid <tom@lfence.de>
2024-01-03 21:56:09 +01:00
Thomas 03e27930ce update nuki state handling
update state handling so that manual state changes of the nuki (key or
button press) are reflected to the internal doorlock state. Refactor
general state handling to support this

Signed-off-by: Thomas Schmid <tom@lfence.de>
2024-01-03 21:32:22 +01:00
Thomas 5fd4a5c8c1 new python dependency: requests
We depend on requests for handling the http requests for the nuki
backend.

Signed-off-by: Thomas Schmid <tom@lfence.de>
2022-11-17 19:23:43 +01:00
Thomas f89c9a86c9 layout.html: Wrap content in container
Bootstrap requires us to wrap the content in a container any time the
grid system is used. Wrapping the content with a <div class="container">
fixes some padding issues we have with the frontend on small screens.

Signed-off-by: Thomas Schmid <tom@lfence.de>
2022-11-17 19:10:53 +01:00
Thomas 4aac66d8e0 Doorlock Backends: Add license header
Signed-off-by: Thomas Schmid <tom@lfence.de>
2022-11-17 18:58:57 +01:00
Thomas 530b324602 NukiBridge.py, Doorlock.py: Remove print statements
Remove some debug print statements or convert it to log.debug()
Signed-off-by: Thomas Schmid <tom@lfence.de>
2022-11-17 18:58:57 +01:00
Thomas e6e5c271db etc/doorlock.cfg: Remove unused keys and fix format
Signed-off-by: Thomas Schmid <tom@lfence.de>
2022-11-17 18:58:57 +01:00
Thomas e3f19ce0b1 DoorlockBackend.py: Fix newline
Signed-off-by: Thomas Schmid <tom@lfence.de>
2022-11-17 18:39:49 +01:00
Thomas 08c9fd9697 Sort Imports
Sort imports for AvrDoorlock.py, DoorlockBackend.py, NukiBridge.py,
SimulationBackend.py

Signed-off-by: Thomas Schmid <tom@lfence.de>
2022-11-17 18:38:26 +01:00
Thomas 94b95c04a7 Add nuki bridge backend
Add a backend to support nuki bridges

Signed-off-by: Thomas Schmid <tom@lfence.de>
2022-11-16 21:09:26 +01:00
Thomas 4825c7346e Refactor pydoorlock to support multiple backends
Signed-off-by: Thomas Schmid <tom@lfence.de>
2022-11-16 21:03:55 +01:00
Thomas b189fe7982 Config.py: Add topic support
Add support to parse keys under different topics

Signed-off-by: Thomas Schmid <tom@lfence.de>
2022-11-16 21:03:52 +01:00
Markus 18264b0449 Makefile: use setup.py instead of pip
Abandons the strange 'dependency_links.txt'-bug.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2021-11-22 22:07:34 +01:00
Markus b086696879 setup: specify requirements 2021-11-22 22:06:12 +01:00
Ralf Ramsauer 5419d4587a setup.py: remove pending newline
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2021-11-22 22:05:30 +01:00
Markus 15ff2c0293 WebApp: remove duplicate function definition 2021-11-22 21:45:11 +01:00
Markus ebb0ea0527 Config: reformat whitespace according to PEP8 2021-11-22 21:45:11 +01:00
Markus 94ee9de2ee Authenticator: reformat whitespace accoring to PEP8 2021-11-22 21:45:11 +01:00
Markus aa5999203c WebApp: reformat whitespace according to PEP8 2021-11-22 21:45:11 +01:00
Markus 1f27ebafdb WebApp: remove unused import 2021-11-22 21:45:11 +01:00
Markus b7000388bc Door: mark from_string as static method 2021-10-18 18:06:51 +02:00
Thomas ed239fb284 Remove socket.io dependency and use http server sent events instead
Signed-off-by: Thomas Schmid <tom@binary-kitchen.de>
2020-11-13 00:05:07 +01:00
Ralf Ramsauer f1c267dc94 doorstate: systemd: auto-restart failed doorstate
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2020-06-06 21:44:18 +02:00
Ralf Ramsauer 8c0ba51e9b doorstate: publish state on startup
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2020-06-06 21:26:59 +02:00
Ralf Ramsauer 58e93f4e15 systemd: add network-online target
Prevents crashes during bootup.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2020-01-09 01:12:08 +01:00
Ralf Ramsauer 8b49c2f332 doorstate: automatically reconnect if mqtt broker fails
We had a bug: doorstate didn't reconnect to the broker if it temporarily
disappeared.

Fix this by using start_loop() (which starts a thread that observes the
broker and automatically reconnects) instead of the synchronous loop()
method.

Thomas Basler <github.thomas@familie-basler.net>
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-07-07 23:16:18 +02:00
Ralf Ramsauer 71e55ec523 doorstate: reduce logging output
Remove unnecessary output

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-07-07 23:03:24 +02:00
Ralf Ramsauer c8503f46e8 VERSION: open 2.1 development cycle
Better late than never: open the 2.1 development cycle

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-23 23:41:29 +02:00
Ralf Ramsauer 7500a16fc1 gitignore: remove gpio-wait
gpio-wait is not existing any longer.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-23 23:40:29 +02:00
Ralf Ramsauer 07a0ac5307 doorstate: reimplement doorstate in python
Furthermore, add initial support for the alarm topic.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-23 23:17:31 +02:00
Thomas 8bc75bc0f6 PKGBUILD: add missing dependency pyserial
Signed-off-by: Thomas Schmid <tom@binary-kitchen.de>
2019-06-19 00:26:51 +02:00
Ralf Ramsauer 9828534eae Config: Move SYSCONFDIR and PREFIX to Config
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-15 22:42:01 +02:00
Ralf Ramsauer 1e5f7c3ec4 Config: allow multiple config topics
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-15 22:42:01 +02:00
Ralf Ramsauer 6fc923a371 doorstate: Use variable instead of constant value
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-15 22:42:01 +02:00
Ralf Ramsauer caab43f4d3 Introduce etc directory
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-15 22:41:59 +02:00
Ralf Ramsauer 95b6550e49 Makefile: introduce more variables
Instead of repeating things.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-15 22:33:31 +02:00
Ralf Ramsauer a774262a3c pydoorlock: Config: Only use one config file
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-14 22:49:40 +02:00
Thomas bdfcf29075 move Config class to pydoorlock module
Signed-off-by: Thomas Schmid <tom@binary-kitchen.de>
2019-06-14 22:01:33 +02:00
Ralf Ramsauer 263fc0c687 pydoorlock: use definitions in Protocol.py
We now share definitions. Use them.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-14 21:37:48 +02:00
Ralf Ramsauer e27f6d02da pydoorlock: autogenerate Protocol.py
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-14 21:37:47 +02:00
Ralf Ramsauer becb21bbbc Makefile: Add a proper clean rule
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-14 21:37:38 +02:00
Ralf Ramsauer 6725555af6 avr: use a own header to define constants
We will soon share them with python

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-14 21:30:54 +02:00
Ralf Ramsauer b5154faecd Makefile: Add a proper package rule
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-14 21:30:53 +02:00
Ralf Ramsauer e69c314f97 pydoorlock: Doorlock: use run instead of Popen
Popen created an object that we need to wait for, run won't. Use a
pseudo-shell, and spawn the process in the background.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-06-14 00:49:53 +02:00
Thomas 0511fac330 improve authentication log messages
Signed-off-by: Thomas Schmid <tom@binary-kitchen.de>
2019-06-14 00:29:03 +02:00
Ralf Ramsauer 5645ba22c9 Release v2.0
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-02-22 20:15:22 +01:00
Ralf Ramsauer 209ccb3ba3 doorlockd: update copyright
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-02-22 20:13:32 +01:00
Ralf Ramsauer f264fe803b doorlockd.cfg: move comment
It's at the wrong place...

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-02-22 20:11:36 +01:00
Ralf Ramsauer a942d2a71c certs: remove BKCA
We now have LE certificates.

Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
2019-02-22 20:07:15 +01:00
Ralf Ramsauer eaf2537d83 Authenticator: automatically choose authentication backend
and test other backends, if one fails.

Written-by: Rudolf Mayerhofer <rm@eightyfive.net>
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
[ralf: also remove the authentication method from any other code path]
2018-12-08 01:29:51 +01:00