Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple doc for issue #26 #30

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 45 additions & 0 deletions docs/README.md
@@ -0,0 +1,45 @@
# Additional documentation

The status of the door is determined if the https query or ssh command returns the strings:

* LOCKED (door closed)
* UNLOCKED (door open)
* or some other output (unknown door state)

The return message is displayed in the App for a short period.

Sample shell script that does not actually control a door/lock but that can be used for testing or as a template:

#!/bin/sh
# Lock demo, suitable for use with ssh mode of https://github.com/mwarning/trigger


COMMAND=$1

case ${COMMAND} in
lock | close | shut)
# issue lock command
# assume it was successful and report locked
echo LOCKED
;;

open | unlock)
# issue unlock command
# assume it was successful and report locked
echo UNLOCKED
;;

status | *)
# issue status command
# assume it was successful and default/report locked
echo LOCKED
;;

esac

# Trigger 1.7.1 will show correct image assuming the above is clean
# debug or additional information can then be displayed below
# it shows up in a Toast style message
# Date/time is a useful addition
#echo debug test
date