add readme and limit log entry counts displayed
All checks were successful
/ build-container (push) Successful in 8m0s
All checks were successful
/ build-container (push) Successful in 8m0s
This commit is contained in:
parent
01b7750259
commit
4627ae91b3
3 changed files with 20 additions and 2 deletions
18
README.md
Normal file
18
README.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# lockserver
|
||||||
|
|
||||||
|
_better Z-Wave Lock management for Home Assistant_
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
|
This is a work in progress. I have some ideas of where I want it to go, but I'm mostly experimenting with my own needs.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
To add to Home Assistant, add my hassio-addons repo by clicking the button below, then search for and install the "LockServer" addon.
|
||||||
|
|
||||||
|
[![Add to Home Assistant.](https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgit.janky.solutions%2Ffinn%2Fhassio-addons)
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
When you open the addon's web UI, it will show a list of Z-Wave locks. Clicking a lock shows all codes slots for that lock. Clicking edit on each slot allows changing the code, changing the name, enabling or disabling the slot, and seeing a log of recent uses of that code.
|
|
@ -97,7 +97,7 @@ func (q *Queries) GetLogForLock(ctx context.Context, lock int64) ([]LockLog, err
|
||||||
}
|
}
|
||||||
|
|
||||||
const getLogForSlot = `-- name: GetLogForSlot :many
|
const getLogForSlot = `-- name: GetLogForSlot :many
|
||||||
SELECT lock, timestamp, state, code, issued_code FROM lock_log WHERE lock = ? AND code = ? ORDER BY timestamp DESC
|
SELECT lock, timestamp, state, code, issued_code FROM lock_log WHERE lock = ? AND code = ? ORDER BY timestamp DESC LIMIT 100
|
||||||
`
|
`
|
||||||
|
|
||||||
type GetLogForSlotParams struct {
|
type GetLogForSlotParams struct {
|
||||||
|
|
|
@ -5,7 +5,7 @@ INSERT INTO lock_log (lock, state, code) VALUES (?, ?, ?);
|
||||||
SELECT * FROM lock_log WHERE lock = ? ORDER BY timestamp DESC;
|
SELECT * FROM lock_log WHERE lock = ? ORDER BY timestamp DESC;
|
||||||
|
|
||||||
-- name: GetLogForSlot :many
|
-- name: GetLogForSlot :many
|
||||||
SELECT * FROM lock_log WHERE lock = ? AND code = ? ORDER BY timestamp DESC;
|
SELECT * FROM lock_log WHERE lock = ? AND code = ? ORDER BY timestamp DESC LIMIT 100;
|
||||||
|
|
||||||
-- name: GetLastLogForSlot :many
|
-- name: GetLastLogForSlot :many
|
||||||
SELECT * FROM lock_log WHERE lock = ? AND code = ? ORDER BY timestamp DESC LIMIT 1;
|
SELECT * FROM lock_log WHERE lock = ? AND code = ? ORDER BY timestamp DESC LIMIT 1;
|
||||||
|
|
Loading…
Reference in a new issue