The Zulip Status Watcher automatically monitors your Google Calendar and updates your Zulip status based on:
- Current meetings
- Working location (office/home)
- Vacation and out-of-office events
- Lunch breaks
Configure Zulip and Google API credentials in /data/appconfig_static/zulip/zulip.properties:
[zulip_status_watcher]
# Zulip configuration
zulip_user_api_token = YOUR_ZULIP_API_TOKEN
zulip_server_url = https://your-zulip-server.com
zulip_user_email = your.email@example.com
# Google Calendar configuration
# Guide: https://www.youtube.com/watch?v=B2E82UPUnOY&t=758s
google_creds = "/data/credentials.json"
google_token_file = "/data/token.json"- Follow this guide to create Google Calendar API credentials
- Download your
credentials.jsonfile - On first run, you'll need to authenticate via browser to generate
token.json
Ensure your configuration and credentials are in place:
/data/appconfig_static/zulip/zulip.properties- Zulip and Google API configuration- Paths in
zulip.propertiesshould point to files within/data/(e.g.,/data/credentials.json,/data/token.json)
Simply run the provided script:
./run_docker.shThis script will:
- Build the Docker image
- Run the container in detached mode with
/datamounted - Automatically restart the container on system reboot (
--restart unless-stopped)
The container will now start automatically when your system boots!
Build the Docker image:
docker build -t zulip-status-watcher .Run the container in detached mode:
docker run -d \
--name zulip-watcher \
-v /data:/data \
zulip-status-watcherThis mounts the entire /data directory, giving the container access to:
- Configuration:
/data/appconfig_static/zulip/zulip.properties - Logs:
/data/logs/ - Google credentials: wherever you specified in
zulip.properties
For the initial Google authentication, run interactively:
docker run -it \
--name zulip-watcher \
-v /data:/data \
zulip-status-watcherFollow the authentication link in the output, authorize the application, and the token will be saved. Then you can run in detached mode.
docker logs -f zulip-watcherdocker stop zulip-watcherdocker rm zulip-watcherOr stop and remove in one command:
docker stop zulip-watcher && docker rm zulip-watcherOr force remove a running container:
docker rm -f zulip-watcherdocker start zulip-watcherpip install -r requirements.txtpython3 -m watcher.watcherOn first launch, follow the authentication link in the logs, copy your token, and paste it into the terminal. The token will be cached for subsequent runs.
The watcher runs every minute and:
- Checks your Google Calendar for current events
- Determines your working location
- Checks for vacation/out-of-office events
- Updates your Zulip status accordingly
- Vacation/Out of Office
- Current Meeting
- Lunch Break
- Working Location (Office/Remote)
- Authentication errors: Ensure your
zulip.propertiescredentials are correct - Google API errors: Verify
credentials.jsonis valid and you've completed OAuth flow - Network issues: Check connectivity to both Zulip server and Google APIs
- Logs: Check
/data/logs/zulip_status_controller.logfor detailed error messages - Docker issues: Ensure volumes are properly mounted and paths are correct