45 lines
1.1 KiB
Plaintext
45 lines
1.1 KiB
Plaintext
Installation
|
|
============
|
|
|
|
1. Install curl and jq.
|
|
2. Go to http://iot.waw.hackerspace.pl, login with "Trusted Network", then go
|
|
to "admin" (in lower left), scroll to the very bottom and in the section
|
|
"Long-Lived Access Tokens" click "Create token". Go through token creation
|
|
flow and copy thit token to TOKEN= in `fan` script.
|
|
3. Copy (or symlink) everything apart from this README to /usr/local/bin or any
|
|
directory in $PATH
|
|
|
|
Usage
|
|
=====
|
|
|
|
fan [query]
|
|
fan-query
|
|
Check fan status. Will output "on" or "off".
|
|
|
|
fan on
|
|
fan-on
|
|
fan off
|
|
fan-off
|
|
Toggle fan
|
|
|
|
laser [query]
|
|
laser-query
|
|
Check who uses the laser. Will not output anything if laser is not taken.
|
|
|
|
laser take [<username>]
|
|
laser-take [<username>]
|
|
Take the laser for 60 min. Works if no-one else uses laser. If you don't
|
|
specify username, will use $USER environment variable.
|
|
|
|
laser release
|
|
laser-release
|
|
Release the laser from usage. Works only if taken by you.
|
|
|
|
laser force
|
|
laser-force
|
|
Force release the laser. Works whether you took the laser or someone else.
|
|
This is for use only if you took the laser, then disconnected and got
|
|
another IP address from DHCP.
|
|
|
|
|