Skip to content

5: Watch TV

Shane C Mason edited this page Jan 15, 2025 · 12 revisions

Starting the player

To start the player, change to the top level of the report and activate the python virtual environment

source env/bin/activate

And then run the player with:

python3 field_player.py

It will automatically start playing the scheduled content for the first configured channel.

Note: This will fail if you have not already generated a weekly schedule using station_42.py

Changing the station

The player listens to the file specified by channel_socket in confs/fieldStation42_conf.py for commands to change the channel. The field_player monitors this file and will change to the next station configured in main_config in confs/fieldStation42_conf.py if any content is found there - or you can use the following command to cause the player to change to channel 3:

echo {\"command\": \"direct\", \"channel\": 3} > runtime/channel.socket

You can also open runtime/channel.socket in a text editor and enter the following json snippet (change 3 to whatever number you want to change to)

{"command": "direct", "channel": 3}

Clone this wiki locally