Initial commit

Connects to zwave-js, syncs all locks and codeslots with database, and records an event log. No support for updating code slots.
This commit is contained in:
Finn 2024-04-08 21:25:36 -07:00
commit 054008eb1f
20 changed files with 1165 additions and 0 deletions

5
db/queries/lock_log.sql Normal file
View file

@ -0,0 +1,5 @@
-- name: AddLogEntry :exec
INSERT INTO lock_log (lock, state, code) VALUES (?, ?, ?);
-- name: GetLogForLock :many
SELECT * FROM lock_log WHERE lock = ? ORDER BY timestamp DESC;