Skip to content

gierens/fitstar-utilization

Repository files navigation

Fit Star Utilization

Python script for pulling utilization data from the Fit Star website, paired with Grafana dashboard for visualization.

Fit Star Utilization Dashboard

Demo

Instead of setting this up yourself, you can also simply access an instance of the dashboard I host myself here. I also intend make the InfluxDB that feeds this publicly accessible when I find the time.

Python Script

The script uses Selenium to automatically retrieve the utilization data from the Fit Star studio websites (e.g. https://www.fit-star.de/fitnessstudio/muenchen-neuhausen). This has certain implications for its dependencies and usage.

Dependencies

Selenium requires a compatible browser together with the corresponding driver. A good choice is Chromium, which can be installed with the driver by:

sudo apt install -y chromium chromium-driver

The required Python modules are listed in the requirements.txt file. To install them execute:

sudo python3 -m pip install -r requirements.txt

Usage

To fetch the data for all studios in Munich and insert them into a given InfluxDB the script is used as follows:

./fitstar-utilization.py --host influxdb.example.net --port 8086 --ssl --verify-ssl --username admin --password supersecretpassword --filter muenchen

For further information refer to the -h/--help option.

Note that because of Selenium requiring a browser, the script needs to run in the presence of the graphical session. In case you run this over SSH or as cron job, you need to set the DISPLAY variable. You can use the w command to list active X sessions.

I myself run the script on a Raspberry Pi 4 Model B in an XRDP session.

Grafana Dashboard

The Grafana dashboard can be directly imported into Grafana with its ID 17200, the corresponding webpage is: https://grafana.com/grafana/dashboards/17200

License

This project is distributed under MIT license.

About

Python script for pulling utilization data from the Fit Star website and Grafana dashboard for visualization.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages