Workorder
Application running in Kubernetes
Table of contents:
Requirements
How it works
-
Your phone (Tasker) monitors whether you arrive at work 🏢 based on the WiFi signal that your phone receives and stores the date and start time locally in a tasker variable, the same happens when you leave work, an end time will be stored. A notification with the saved time appears after a trigger
-
If new data is stored in Tasker the saved times will be sent to the API and stored in a database only if the phone is connected to the home 🏠 WiFi network because the API can only be accessed from the locale network. This will be executed at fixed time 04:00 in the morning, the time can be changed in the Tasker XML or in the Tasker App.
-
At 07:00 data is retrieved from the same database, entered into the workorder and sent. A python script take care of this part. (Docker Worker container)
Setup
Docker host
- Clone this repository to your docker host.
git clone https://github.com/theautomation/workorder.git
- Change "prd-workorder-app.env.example to "prd-workorder-app.env".
mv ./prd-workorder-app.env.example ./prd-workorder-app.env
- Fill in the environment variables in the "prd-workorder-app.env" file.
# URL to open
WEB_URL="https://example.com"
# Credentials for login
WEB_USERNAME="username"
WEB_PASSWORD="password"
# To find and fill in the correct workorder, make a comma separated list of words to search for.
# The words may be part of text for e.g. if the word "dienst" is in the list it will find "Weekenddienst", "Avonddienst" and "Dagdienst"
WORKORDER_WORDS="dienst, Operator, motorkap"
# Save a .png image of the workorder with filled in time
# Set true to save a image otherwise set false or empty
# The path where images will be saved in the 'worker' docker container is '/app/log'
SAVE_IMAGE=true
- Bring up the containers with
docker-compose up -d
Android
- Install Tasker.
- Download or copy the Tasker project XML on your device Link
- Change wifi SSID's in the XML or later in the Tasker app after importing the XML
- Import the XML in Tasker.
- Make sure that Tasker is allowed to run in background. More info at dontkillmyapp.com