Tidbyt Status Monitor
I'm excited to share a cool integration I put together. Here's the documentation for creating a Tidbyt status monitor using Python and a strange mysterious language called Starlark. Tidbyts are these small, wall-powered displays that can be used to show information on your desk or anywhere else you want to keep track of cool stuff.
π€Find the REPO here on GitHubπͺ
Overviewβ
This application connects a Tidbyt display device to the Shotgrid API, allowing you to view real-time data from your Shotgrid instance directly on your Tidbyt device. The app specifically tracks and displays the count of Versions with "cnv" (check new version) status in active projects.
Featuresβ
- Real-time monitoring of status items in Shotgrid
- Automatic updates by set interval (default 30s)
- Classic Tidbyt visualization with Shotgrid icon
- Log management to prevent excessive logs on logs on logs
Requirementsβ
- Tidbyt device
- Shotgrid account with API access
- Python 3.11+
- pixlet CLI tool
- shotgun_api3 Python module
Setup Instructionsβ
1. Installationβ
-
Clone this repository:
git clone https://github.com/BakedStudios/baked-tidbyt-app.git
cd baked-tidbyt-app -
Ensure Python 3.11 is installed at:
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3
-
Install required Python modules:
pip3 install shotgun_api3
-
Install pixlet CLI tool:
brew install tidbyt/tidbyt/pixlet
[!NOTE] You will need to authenticate pixlet with your Tidbyt account.
-
Create the Tidbyt application directory:
mkdir -p /Applications/Tidbyt
-
Copy all files to the Tidbyt application directory:
cp SG_Data.py generated_script.star com.Tidbyt.SG_Data.plist /Applications/Tidbyt/
2. Configurationβ
-
Edit the
com.Tidbyt.SG_Data.plist
file to configure your environment variables:TIDBYT_SG_API_KEY
: Your Shotgrid API keySHOTGUN_URL
: Your Shotgrid instance URLTIDBYT_DEVICE_NAME
: Your Tidbyt device ID
-
Start the launchd service:
launchctl bootstrap gui/$(id -u) /Applications/Tidbyt/com.Tidbyt.SG_Data.plist
-
Stop the launchd service:
launchctl bootout gui/$(id -u) /Applications/Tidbyt/com.Tidbyt.SG_Data.plist
How It Worksβ
- The Python script
SG_Data.py
connects to Shotgrid via the API - It queries for all Versions with "cnv" status in active projects
- The count is embedded into a Starlark template file
- pixlet renders the Starlark code to a WebP image
- The image is pushed to your Tidbyt device
- The launchd service repeats this process every 30 seconds
Customizationβ
Modifying the Queryβ
To track different items, edit the filters
variable in SG_Data.py
:
# Example: Find all tasks with status "in_progress"
filters = [['sg_status_list', 'is', "ip"], ['project.Project.sg_status', 'is', 'Active']]
result = sg.find('Task', filters)
Changing the Displayβ
Modify the Starlark template in SG_Data.py
to change the visualization - refer to Tidbyt documentation.
Troubleshootingβ
Check the log files for errors:
/Applications/Tidbyt/com.Tidbyt.SG_Data.out
- Standard output/Applications/Tidbyt/com.Tidbyt.SG_Data.err
- Error messages
Common issues:
- API key incorrect or expired
- Tidbyt device ID not found
- Network connectivity problems
Licenseβ
This project is licensed under the MIT License - see the LICENSE file for details.