Python module, server and utility to control greenscreen.
Project description
A simple module, command line utility and tcp server to headlessly control a GreenScreen installation and a set of Chromecasts. Controls the assignment of GreenScreen channels to Chromecasts using the GreenScreen API, and then can start/stop casting to a particular Chromecast.
Requires a working GreenScreen installation.
AppID
In these instructions, $APPID is the value of your “Application ID” from the Google Cast Developer Console. This will have been setup as part of the GreenScreen installation.
Using the command line utility
Set the CCTV channel on the Kitchen Chromecast:
$ greenscreen_control -c CCTV set-channel Kitchen
Start casting a given AppID on a Chromecast:
$ greenscreen_control -a $APPID cast Kitchen
Stop casting on the Kitchen Chromecast:
$ greenscreen_control stop-cast Kitchen
Available arguments:
usage: greenscreen_control [-h] [-g GREENSCREEN_SERVER] [-a APPID] [-c CHANNEL] [-l {ERROR,WARNING,INFO,DEBUG}] {set-channel,cast,stop-cast} chromecast positional arguments: {set-channel,cast,stop-cast} Command chromecast Chromecast name optional arguments: -h, --help show this help message and exit -g GREENSCREEN_SERVER, --greenscreen_server GREENSCREEN_SERVER GreenScreen server:port -a APPID, --appid APPID Chromecast Greenscreen App ID -c CHANNEL, --channel CHANNEL GreenScreen channel to set -l {ERROR,WARNING,INFO,DEBUG}, --loglevel {ERROR,WARNING,INFO,DEBUG} Logging level
Starting the server
Start a simple TCP server (default port 4995) to control greenscreen and Chromecast casting.
$ greenscreen_control_server $APPID
Available arguments:
usage: greenscreen_control_server [-h] [-g GREENSCREEN_SERVER] [-p PORT] [-l {ERROR,WARNING,INFO,DEBUG}] appid positional arguments: appid Chromecast Greenscreen App ID optional arguments: -h, --help show this help message and exit -g GREENSCREEN_SERVER, --greenscreen_server GREENSCREEN_SERVER GreenScreen server:port -p PORT, --port PORT TCP server port number -l {ERROR,WARNING,INFO,DEBUG}, --loglevel {ERROR,WARNING,INFO,DEBUG} Logging level
Server Protocol
The TCP server uses a simple line-based protocol, easily controlled from scripts, cron or home automation.
Assign the “CCTV” channel to the “Kitchen” chromecast, and start casting it:
chromecast=Kitchen,channel=CCTV,cast=1
Assign the “CCTV” channel to the “Kitchen” chromecast, don’t cast it (either prepares for future casting, or assumes already casted):
chromecast=Kitchen,channel=CCTV
Cast the currently assigned channel (whatever that is):
chromecast=Kitchen,cast=1
Stop casting:
chromecast=Kitchen,cast=0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for greenscreen_control-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d908b152a19ec0934c20d9410c8ca83289d2aa2b4b3c11182d44bcf7d09dffdf |
|
MD5 | c54399669e5b21b0334f136241196ae3 |
|
BLAKE2b-256 | 9da5d5516ac300be27cc1ef937ca1468b67fe54501244cb5bbecf6af294cf38c |
Hashes for greenscreen_control-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7975c94f04e536eca27dc76b297fd65db8986d3931914c0f57a599c3b6db33f8 |
|
MD5 | 5732f70b75551451c703d02cc9c0c1a7 |
|
BLAKE2b-256 | e4c1d77451d645d73feba7cefd72340e38a3221b9090626c9b8b3f162d542a5d |