Webuntis alarm
This is a small little "middleware" / web server intended to connect to a webuntis timetable used in german schools which i wrote when i was bored in class.
Its purpose is to retrieve the next day's first lesson to automatically set my alarm accordingly.
Requirements
- Rust (nightly)
- Preferably an open port for remote use
- Common sense
Usage
Getting the server to run
- Clone or download this project using
git clone github.com/iraizo/webuntis-alarm
- run
cargo build
inside the directory - create an
.env
file in the root of the project like belowUSER="USERNAME_TO_LOGIN" PASSWORD="PASSWORD_TO_LOGIN" URL="https://mese.webuntis.com/WebUntis/?school=WHATEVER" HOST="127.0.0.1:8080" CERT="PATH_TO_SSL_PEMFILE" KEY="PATH_TO_SSL_KEY_PEMFILE"
school?=*
being different.
Username and password should be the one you use with untis
HOST is in theIP:PORT
format and is where the middleware is hosted (127.0.0.1:8080) would be running local only. - run
cargo run --release
Accessing the data
You can either manually get the data by accessing the routes listed below
GET /tomorrow => returns the first class for tomorrow (date, start, end)
GET /week => returns an array of the current classes for the current week (date, start, end)
or use my already done shortcut for iOS, you will be asked for the URL which would be YOUR_HOST_HERE/tomorrow
If you need any help setting it up or feature suggestions / bugs feel free to contact me / create an issue.