### Start All Timers Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Sends a command to start all active timers simultaneously. This is useful for synchronizing multiple countdowns or elapsed timers. ```python from proApiV1_pb2 import NetworkAPI_v1 from proApiV1Timer_pb2 import ( API_v1_Timer_Request, API_v1_Timer, API_v1_TimerOperation ) # Start all timers def start_all_timers(): msg = NetworkAPI_v1() req = API_v1_Timer_Request() req.all_timers_operation.operation = API_v1_TimerOperation.Value("start") msg.action.timer_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Decode ProPresenter Files with protoc Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Use the protoc compiler with .proto definitions to decode ProPresenter binary files into a human-readable text format. Ensure protoc is installed and navigate to the directory containing the .proto files. ```bash # 1. Install protoc (https://github.com/protocolbuffers/protobuf/releases) # 2. Clone/download the Proto7.16.2 folder and cd into it # Decode a presentation document (.pro file) protoc --decode rv.data.Presentation ./presentation.proto \ < "/path/to/ProPresenter/Documents/MyMessage.pro" # Decode a playlist document protoc --decode rv.data.PlaylistDocument ./propresenter.proto \ < "/path/to/ProPresenter/Playlists/SundayService.pro7pl" # Decode a workspace file protoc --decode rv.data.ProPresenterWorkspace ./proworkspace.proto \ < "/path/to/ProPresenter/Workspace.pro7ws" # Decode screen configuration protoc --decode rv.data.Screen ./screens.proto \ < "/path/to/ProPresenter/Screens/MainScreen.pro7scr" # Expected output (text proto format): # application_info { # applicationIdentifier: "com.renewedvision.propresenter" # applicationVersion: "7.16.2" # } # uuid { string: "A1B2C3D4-E5F6-..." } # name: "Amazing Grace" # category: "Hymns" # ccli { # song_title: "Amazing Grace" # author: "John Newton" # song_number: 4755 # copyright_year: 1779 # } ``` -------------------------------- ### Decode ProPresenter Presentation Document with protoc Source: https://github.com/greyshirtguy/propresenter7-proto/blob/master/README.md Use the protoc command-line tool to decode a ProPresenter presentation document into a JSON-like text representation. Ensure you have protoc installed and the .proto files in the same directory. ```bash protoc --decode rv.data.Presentation ./propresenter.proto < /Path/To/ProPresenter/PresentationFile ``` -------------------------------- ### Read ProPresenter Presentation File in Python Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Example of reading a ProPresenter `.pro` file using generated Python classes. Ensure the Python protobuf classes are generated and accessible in the sys.path. This snippet demonstrates how to parse the binary data and access top-level presentation fields. ```python # Python example: read a .pro file and inspect the Presentation message # After running: protoc --python_out=. presentation.proto (and its imports) import sys sys.path.insert(0, './generated/python') from presentation_pb2 import Presentation with open("/path/to/MyMessage.pro", "rb") as f: pres = Presentation() pres.ParseFromString(f.read()) print(f"Name: {pres.name}") print(f"Category: {pres.category}") print(f"Notes: {pres.notes}") print(f"UUID: {pres.uuid.string}") # CCLI info if pres.HasField("ccli"): print(f"Song Title: {pres.ccli.song_title}") print(f"Author: {pres.ccli.author}") print(f"Song #: {pres.ccli.song_number}") print(f"Copyright Year: {pres.ccli.copyright_year}") # Bible reference if pres.HasField("bible_reference"): br = pres.bible_reference print(f"Bible Book: {br.book_name}") print(f"Translation: {br.translation_name}") ``` -------------------------------- ### Decode ProPresenter Playlist File with protoc Source: https://github.com/greyshirtguy/propresenter7-proto/blob/master/README.md Use the protoc command-line tool to decode a ProPresenter playlist file into a JSON-like text representation. Ensure you have protoc installed and the .proto files in the same directory. ```bash protoc --decode rv.data.PlaylistDocument ./propresenter.proto < /Path/To/ProPresenter/PlaylistFile ``` -------------------------------- ### Get Media Playlist Items Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Constructs a network request to retrieve items from a specific media playlist, with optional start index. Requires NetworkAPI_v1 and API_v1_Media_Request. ```python def get_media_playlist_items(playlist_id: str, start: int = 0): msg = NetworkAPI_v1() req = API_v1_Media_Request() req.get_playlist.id = playlist_id req.get_playlist.start = start msg.action.media_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Get Layers Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Retrieves the current visibility status of all layers in ProPresenter. ```APIDOC ## get_layers ### Description Retrieves the current visibility status of all layers in ProPresenter. ### Method Signature `get_layers()` ### Returns Serialized network message to request layer visibility status. ``` -------------------------------- ### NetworkAPI_v1 WebSocket API Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Details on using the `NetworkAPI_v1` WebSocket interface for remote control, including message serialization and connection setup. ```APIDOC ## `NetworkAPI_v1` — Remote Control Network API `NetworkAPI_v1` (in `proApiV1.proto`) is the top-level wrapper for ProPresenter's built-in WebSocket network API. All remote control requests and responses are serialized as `NetworkAPI_v1` binary protobuf messages. The `Action` sub-message uses `oneof` fields for both request and response sides across all 24 API domains. ```python # Constructing a NetworkAPI_v1 request message in Python from proApiV1_pb2 import NetworkAPI_v1 from proApiV1Presentation_pb2 import API_v1_Presentation_Request # Request: trigger a specific slide cue by index api_msg = NetworkAPI_v1() trigger = API_v1_Presentation_Request.TriggerMessage() # Trigger the focused presentation, cue at index 2 trigger.focused.CopyFrom(API_v1_Presentation_Request.EmptyMessage()) trigger.index.value = 2 req = API_v1_Presentation_Request() req.trigger.CopyFrom(trigger) api_msg.action.presentation_request.CopyFrom(req) payload = api_msg.SerializeToString() # Send over WebSocket to ProPresenter import websocket ws = websocket.WebSocket() ws.connect("ws://192.168.1.100:50001/") # ProPresenter network API port ws.send_binary(payload) # Receive and parse response raw_response = ws.recv() response_msg = NetworkAPI_v1() response_msg.ParseFromString(raw_response) resp_type = response_msg.action.WhichOneof("Response") print(f"Response type: {resp_type}") ws.close() ``` ``` -------------------------------- ### API_v1_Timer_Request / API_v1_Timer_Response — Timer Remote Control Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Provides control over ProPresenter timers, including creation, starting, stopping, resetting, and incrementing. ```APIDOC ## `create_countdown_timer` ### Description Creates a new countdown timer with a specified name and duration. ### Parameters #### Arguments - **name** (str) - Required - The name of the timer. - **duration_seconds** (int) - Required - The duration of the countdown in seconds. ### Method ```python def create_countdown_timer(name: str, duration_seconds: int): msg = NetworkAPI_v1() req = API_v1_Timer_Request() req.create_timer.name = name req.create_timer.allows_overrun = False req.create_timer.countdown.duration = duration_seconds msg.action.timer_request.CopyFrom(req) return msg.SerializeToString() ``` ``` ```APIDOC ## `create_countdown_to_time` ### Description Creates a countdown timer that counts down to a specific time of day. ### Parameters #### Arguments - **name** (str) - Required - The name of the timer. - **hour** (int) - Required - The hour (0-23) to count down to. - **minute** (int) - Required - The minute (0-59) to count down to. ### Method ```python def create_countdown_to_time(name: str, hour: int, minute: int): msg = NetworkAPI_v1() req = API_v1_Timer_Request() req.create_timer.name = name req.create_timer.count_down_to_time.time_of_day = hour * 3600 + minute * 60 req.create_timer.count_down_to_time.period = API_v1_Timer.API_v1_TimePeriod.Value("am") msg.action.timer_request.CopyFrom(req) return msg.SerializeToString() ``` ``` ```APIDOC ## `start_all_timers` ### Description Starts all active timers simultaneously. ### Method ```python def start_all_timers(): msg = NetworkAPI_v1() req = API_v1_Timer_Request() req.all_timers_operation.operation = API_v1_TimerOperation.Value("start") msg.action.timer_request.CopyFrom(req) return msg.SerializeToString() ``` ``` -------------------------------- ### Get Layer Visibility Status Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Requests the current visibility status for all layers in ProPresenter. Used to check which layers are currently active. ```python from proApiV1_pb2 import NetworkAPI_v1 from proApiV1Status_pb2 import API_v1_Status_Request # Get current layer visibility status def get_layers(): msg = NetworkAPI_v1() req = API_v1_Status_Request() req.get_layers.CopyFrom(API_v1_Status_Request.GetLayers()) msg.action.status_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Load and Inspect ProPresenter Workspace Configuration Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Parse a ProPresenter workspace file (.pro7ws) to access settings for screens, audience looks, masks, video inputs, and audio configurations. This code demonstrates how to retrieve various workspace parameters. ```python from proworkspace_pb2 import ProPresenterWorkspace with open("/path/to/Workspace.pro7ws", "rb") as f: ws = ProPresenterWorkspace() ws.ParseFromString(f.read()) for screen in ws.pro_screens: print(f"Screen: {screen.name}") for look in ws.audience_looks: print(f"Look: {look.name}") if ws.HasField("live_audience_look"): print(f"Live Look: {ws.live_audience_look.name}") for mask in ws.masks: print(f"Mask UUID: {mask.uuid.string}") for vi in ws.videoInputs: print(f"Video Input: {vi.name}") print(f"Selected Library: {ws.selected_library_name}") print(f"Audio Input Transition: {ws.audio_input_transition_time}s") ``` -------------------------------- ### Inspect ProPresenter Screen and Output Display Settings Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Examine the configuration of a ProPresenter screen, including its associated output display, color adjustments, alpha keying settings, and edge blending parameters. This code snippet illustrates how to access these detailed display properties. ```python from screens_pb2 import Screen, OutputDisplay, EdgeBlend screen = Screen() display_types = {0:"UNKNOWN",1:"SCREEN",2:"CARD",3:"NDI",4:"SYPHON",5:"CUSTOM"} display = OutputDisplay() print(f"Display: {display.name}, Type: {display_types[display.type]}") print(f"Model: {display.model}, Serial: {display.serial}") print(f"Bounds: {display.bounds.x},{display.bounds.y} {display.bounds.width}x{display.bounds.height}") if screen.HasField("color_adjustment"): ca = screen.color_adjustment print(f"Gamma: {ca.gamma}, Brightness: {ca.brightness}, Contrast: {ca.contrast}") print(f"RGB: R={ca.red_level} G={ca.green_level} B={ca.blue_level}") alpha_modes = {0:"UNKNOWN",1:"DISABLED",2:"PREMULTIPLIED",3:"STRAIGHT"} if screen.HasField("alpha_settings"): print(f"Alpha Mode: {alpha_modes[screen.alpha_settings.mode]}") eb = EdgeBlend() blend_modes = {0:"LINEAR",1:"CUBIC",2:"QUADRATIC"} print(f"Blend Mode: {blend_modes[eb.mode]}, Radius: {eb.radius}, Intensity: {eb.intensity}") ``` -------------------------------- ### Generate Code with protoc for Various Languages Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Utilize protoc with language-specific plugins to auto-generate strongly-typed classes for ProPresenter 7 binary files. Specify the proto path and output directory for each language. ```bash # Python: generate Python classes from the Proto7.16.2 definitions protoc --proto_path=./Proto7.16.2 \ --python_out=./generated/python \ ./Proto7.16.2/*.proto # JavaScript / Node.js (using grpc-tools or protoc-gen-js) protoc --proto_path=./Proto7.16.2 \ --js_out=import_style=commonjs,binary:./generated/js \ ./Proto7.16.2/*.proto # C# (namespace: Pro.SerializationInterop.RVProtoData) protoc --proto_path=./Proto7.16.2 \ --csharp_out=./generated/csharp \ ./Proto7.16.2/*.proto # Swift (prefix: RVData_) protoc --proto_path=./Proto7.16.2 \ --swift_out=./generated/swift \ ./Proto7.16.2/*.proto # Go protoc --proto_path=./Proto7.16.2 \ --go_out=./generated/go \ ./Proto7.16.2/*.proto ``` -------------------------------- ### Construct and Send NetworkAPI_v1 Request in Python Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Shows how to build a NetworkAPI_v1 protobuf message to trigger a specific slide cue by index using the Presentation API. Includes sending the binary payload over WebSocket and parsing the response. Requires proApiV1_pb2 and proApiV1Presentation_pb2 modules. ```python # Constructing a NetworkAPI_v1 request message in Python from proApiV1_pb2 import NetworkAPI_v1 from proApiV1Presentation_pb2 import API_v1_Presentation_Request # Request: trigger a specific slide cue by index api_msg = NetworkAPI_v1() trigger = API_v1_Presentation_Request.TriggerMessage() # Trigger the focused presentation, cue at index 2 trigger.focused.CopyFrom(API_v1_Presentation_Request.EmptyMessage()) trigger.index.value = 2 req = API_v1_Presentation_Request() req.trigger.CopyFrom(trigger) api_msg.action.presentation_request.CopyFrom(req) payload = api_msg.SerializeToString() # Send over WebSocket to ProPresenter import websocket ws = websocket.WebSocket() ws.connect("ws://192.168.1.100:50001/") # ProPresenter network API port ws.send_binary(payload) # Receive and parse response raw_response = ws.recv() response_msg = NetworkAPI_v1() response_msg.ParseFromString(raw_response) resp_type = response_msg.action.WhichOneof("Response") print(f"Response type: {resp_type}") ws.close() ``` -------------------------------- ### Create New Playlist Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Creates a new playlist with a specified name and type. The type can be a group or a standard playlist. ```python from proApiV1_pb2 import NetworkAPI_v1 from proApiV1Playlist_pb2 import ( API_v1_Playlist_Request, API_v1_Playlist_Response, API_v1_Playlist ) # Create a new playlist group def create_playlist(name: str, playlist_type=API_v1_Playlist.playlist): msg = NetworkAPI_v1() req = API_v1_Playlist_Request() req.create_playlist.name = name req.create_playlist.type = playlist_type msg.action.playlist_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### List Media Playlists Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Constructs a network request to list all media playlists. Requires NetworkAPI_v1 and API_v1_Media_Request. ```python def get_media_playlists(): msg = NetworkAPI_v1() req = API_v1_Media_Request() req.playlists.CopyFrom(API_v1_Media_Request.Playlists()) msg.action.media_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Parse and Traverse ProPresenter Playlist Document Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Load a ProPresenter playlist file (.pro7pl) and recursively traverse its nodes to print information about playlists, groups, and items. This snippet shows how to access playlist types and item details. ```python from propresenter_pb2 import PlaylistDocument from playlist_pb2 import Playlist with open("/path/to/SundayService.pro7pl", "rb") as f: doc = PlaylistDocument() doc.ParseFromString(f.read()) type_names = {0: "Unknown", 1: "Presentation", 2: "Media", 3: "Audio"} print(f"Playlist type: {type_names[doc.type]}") def walk_playlist(node, indent=0): prefix = " " * indent type_map = {0: "UNKNOWN", 1: "PLAYLIST", 2: "GROUP", 3: "SMART", 4: "ROOT"} print(f"{prefix}[{type_map[node.type]}] {node.name}") if node.HasField("items"): for item in node.items.items: item_type = item.WhichOneof("ItemType") print(f"{prefix} - Item: {item.name} (type={item_type})") if item_type == "presentation": print(f"{prefix} path: {item.presentation.document_path.path}") if node.HasField("playlists"): for child in node.playlists.playlists: walk_playlist(child, indent + 1) for child in node.children: walk_playlist(child, indent + 1) walk_playlist(doc.root_node) for tag in doc.tags: print(f"Tag: {tag.name} (uuid={tag.uuid.string})") ``` -------------------------------- ### Create Count-Down-To-Time Timer Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Creates a timer that counts down to a specific time of day. Requires hour, minute, and AM/PM period. ```python from proApiV1_pb2 import NetworkAPI_v1 from proApiV1Timer_pb2 import ( API_v1_Timer_Request, API_v1_Timer, API_v1_TimerOperation ) # Create a count-down-to-time timer (e.g. 10:30 AM) def create_countdown_to_time(name: str, hour: int, minute: int): msg = NetworkAPI_v1() req = API_v1_Timer_Request() req.create_timer.name = name req.create_timer.count_down_to_time.time_of_day = hour * 3600 + minute * 60 req.create_timer.count_down_to_time.period = API_v1_Timer.API_v1_TimePeriod.Value("am") msg.action.timer_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Read ProPresenter 7 Presentation Data Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Iterate through cue groups, arrangements, and timeline cues in a ProPresenter presentation file. This code also demonstrates how to modify presentation properties and write the updated data back to a file. ```python for group in pres.cue_groups: print(f" Group: {group.group.name}") print(f" Cue count: {len(group.cue_identifiers)}") for arr in pres.arrangements: print(f" Arrangement: {arr.name}") print(f" Group order: {[uid.string for uid in arr.group_identifiers]}") if pres.HasField("timeline"): tl = pres.timeline print(f"Duration: {tl.duration}s, Loop: {tl.loop}") for cue in tl.cues_v2: print(f" Timeline cue at {cue.trigger_time}s: {cue.name}") pres.name = "Updated Song Title" pres.category = "Worship" with open("/path/to/MyMessage_updated.pro", "wb") as f: f.write(pres.SerializeToString()) ``` -------------------------------- ### Direct Trigger Shortcuts Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Functions for directly triggering various ProPresenter elements using API_v1_Trigger_Request. ```APIDOC ## Trigger a cue at a specific index ### Description Triggers a cue at a specified index within the current presentation. ### Method `trigger_cue(index: int)` ### Parameters - **index** (int) - Required - The 0-based index of the cue to trigger. ### Request Example ```python trigger_cue(5) ``` ### Response Serialized `NetworkAPI_v1` message containing the trigger cue action. ``` ```APIDOC ## Trigger next slide ### Description Advances to the next slide in the current presentation. ### Method `trigger_next()` ### Parameters None ### Request Example ```python trigger_next() ``` ### Response Serialized `NetworkAPI_v1` message containing the trigger next slide action. ``` ```APIDOC ## Trigger previous slide ### Description Reverts to the previous slide in the current presentation. ### Method `trigger_previous()` ### Parameters None ### Request Example ```python trigger_previous() ``` ### Response Serialized `NetworkAPI_v1` message containing the trigger previous slide action. ``` ```APIDOC ## Trigger a playlist by id ### Description Triggers a specific playlist identified by its ID. ### Method `trigger_playlist(playlist_id: str)` ### Parameters - **playlist_id** (str) - Required - The ID of the playlist to trigger. ### Request Example ```python trigger_playlist('presentation_playlist_id') ``` ### Response Serialized `NetworkAPI_v1` message containing the trigger playlist action. ``` ```APIDOC ## Trigger a video input by id ### Description Triggers a specific video input identified by its ID. ### Method `trigger_video_input(input_id: str)` ### Parameters - **input_id** (str) - Required - The ID of the video input to trigger. ### Request Example ```python trigger_video_input('video_input_uuid') ``` ### Response Serialized `NetworkAPI_v1` message containing the trigger video input action. ``` ```APIDOC ## Trigger next media ### Description Advances to the next media item. ### Method `trigger_media_next()` ### Parameters None ### Request Example ```python trigger_media_next() ``` ### Response Serialized `NetworkAPI_v1` message containing the trigger next media action. ``` -------------------------------- ### Create Custom Clear Group Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Creates a custom clear group that can clear multiple layers simultaneously. Requires a name for the group. ```python from proApiV1_pb2 import NetworkAPI_v1 from proApiV1Clear_pb2 import API_v1_Clear_Request, API_v1_ClearGroup from proApiV1LayerType_pb2 import API_v1_LayerType # Create a custom clear group that clears slide + audio simultaneously def create_clear_group(name: str): msg = NetworkAPI_v1() req = API_v1_Clear_Request() group = API_v1_ClearGroup() group.id.name = name group.layers.append(API_v1_ClearGroup.API_v1_ClearGroupLayerType.Value("presentation")) group.layers.append(API_v1_ClearGroup.API_v1_ClearGroupLayerType.Value("music")) group.stop_timeline_presentation = True req.create_group.group.CopyFrom(group) msg.action.clearing_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Create Presentation Request Helper Function in Python Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt A Python helper function to construct a NetworkAPI_v1 message with a Presentation Request payload. Useful for abstracting the message construction process. Requires proApiV1_pb2 and proApiV1Presentation_pb2 modules. ```python from proApiV1_pb2 import NetworkAPI_v1 from proApiV1Presentation_pb2 import ( API_v1_Presentation_Request, API_v1_Presentation_Response ) def make_request(req: API_v1_Presentation_Request) -> bytes: msg = NetworkAPI_v1() msg.action.presentation_request.CopyFrom(req) return msg.SerializeToString() # Get active presentation info req = API_v1_Presentation_Request() req.active.CopyFrom(API_v1_Presentation_Request.Active()) payload = make_request(req) # ... send and receive ... ``` -------------------------------- ### Parse and Inspect Slide Message in Python Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Demonstrates how to parse a Slide protobuf message and access its properties like UUID, size, background color, elements, build animations, data links, and text scrollers. Requires the slide_pb2 module. ```python from slide_pb2 import Slide # DataLink property types available on a slide element: # ticker, alternate_text, timer_text, clock_text, chord_chart, # output_screen, pco_live, visibility_link, slide_text, stage_message, # video_countdown, slide_image, ccli_text, group_name, playback_marker_text, # capture_status_text, slide_count, rss_feed, file_feed, timecode_text, ... slide = Slide() # slide.ParseFromString(raw_bytes) # from cue data print(f"Slide UUID: {slide.uuid.string}") print(f"Size: {slide.size.width}x{slide.size.height}") print(f"Background color enabled: {slide.draws_background_color}") for elem in slide.elements: print(f" Element UUID: {elem.element.uuid.string}") # Build animation build_start_map = {0:"ON_CLICK",1:"WITH_PREVIOUS",2:"AFTER_PREVIOUS",3:"WITH_SLIDE"} if elem.HasField("build_in"): print(f" Build In: {build_start_map[elem.build_in.start]}, delay={elem.build_in.delayTime}s") # Data links (dynamic content bindings) for dl in elem.data_links: prop = dl.WhichOneof("PropertyType") print(f" DataLink: {prop}") if prop == "timer_text": print(f" Timer UUID: {dl.timer_text.timer_uuid.string}") elif prop == "ticker": print(f" Ticker loops: {dl.ticker.should_loop}, rate: {dl.ticker.play_rate}") elif prop == "visibility_link": crit = {0:"ALL",1:"ANY",2:"NONE"} print(f" Visibility: {crit[dl.visibility_link.visibility_criterion]}") # Text scroller if elem.HasField("text_scroller") and elem.text_scroller.should_scroll: directions = {0:"LEFT",1:"RIGHT",2:"UP",3:"DOWN"} ts = elem.text_scroller print(f" Scroller: {directions[ts.scrolling_direction]}, rate={ts.scroll_rate}") ``` -------------------------------- ### List All Playlists Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Generates a network API message to request a list of all available playlists. This is the first step in managing playlists remotely. ```python from proApiV1_pb2 import NetworkAPI_v1 from proApiV1Playlist_pb2 import ( API_v1_Playlist_Request, API_v1_Playlist_Response, API_v1_Playlist ) # List all playlists def get_playlists(): msg = NetworkAPI_v1() req = API_v1_Playlist_Request() req.playlists.CopyFrom(API_v1_Playlist_Request.Playlists()) msg.action.playlist_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Trigger Next Presentation Cue Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Constructs a request to trigger the next cue in the current presentation. This is useful for advancing through slides or other presentation elements. ```python req2 = API_v1_Presentation_Request() trigger = API_v1_Presentation_Request.TriggerMessage() trigger.focused.CopyFrom(API_v1_Presentation_Request.EmptyMessage()) trigger.next.CopyFrom(API_v1_Presentation_Request.EmptyMessage()) req2.trigger.CopyFrom(trigger) ``` -------------------------------- ### Media Operations Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Functions for interacting with media playlists and items. ```APIDOC ## List all media playlists ### Description Retrieves a list of all available media playlists. ### Method `get_media_playlists()` ### Parameters None ### Request Example ```python get_media_playlists() ``` ### Response Serialized `NetworkAPI_v1` message containing media playlist information. ``` ```APIDOC ## Get items in a specific media playlist ### Description Retrieves items within a specified media playlist, with optional pagination. ### Method `get_media_playlist_items(playlist_id: str, start: int = 0)` ### Parameters - **playlist_id** (str) - Required - The ID of the media playlist. - **start** (int) - Optional - The starting index for retrieving items (defaults to 0). ### Request Example ```python get_media_playlist_items('my_playlist_id', 10) ``` ### Response Serialized `NetworkAPI_v1` message containing items for the specified playlist. ``` ```APIDOC ## Trigger a specific media item by id ### Description Triggers a specific media item using its ID. ### Method `trigger_media(media_id: str)` ### Parameters - **media_id** (str) - Required - The ID of the media item to trigger. ### Request Example ```python trigger_media('media_item_uuid') ``` ### Response Serialized `NetworkAPI_v1` message confirming the media trigger action. ``` ```APIDOC ## Parse media response ### Description Parses the raw byte response from media-related API calls. ### Method `parse_media_response(raw: bytes)` ### Parameters - **raw** (bytes) - Required - The raw byte string received from the API. ### Request Example ```python response_data = get_media_playlists() parse_media_response(response_data) ``` ### Response Prints information about the parsed media response, such as playlist details or thumbnail data. ``` -------------------------------- ### Trigger Cue by Index Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Triggers a cue at a specific index in the current presentation using API_v1_Trigger_Request. Requires NetworkAPI_v1 and API_v1_Trigger_Request. ```python def trigger_cue(index: int): msg = NetworkAPI_v1() req = API_v1_Trigger_Request() req.cue.index = index msg.action.trigger_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Set Audience Screens Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Enables or disables the audience screens in ProPresenter. ```APIDOC ## set_audience_screens ### Description Enables or disables the audience screens in ProPresenter. ### Method Signature `set_audience_screens(enabled: bool)` ### Parameters - **enabled** (bool) - `True` to enable audience screens, `False` to disable. ### Returns Serialized network message to set the audience screen status. ``` -------------------------------- ### Create Countdown Timer Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Creates a countdown timer with a specified name and duration in seconds. The `allows_overrun` parameter controls whether the timer can continue past zero. ```python from proApiV1_pb2 import NetworkAPI_v1 from proApiV1Timer_pb2 import ( API_v1_Timer_Request, API_v1_Timer, API_v1_TimerOperation ) # Create a 5-minute countdown timer def create_countdown_timer(name: str, duration_seconds: int): msg = NetworkAPI_v1() req = API_v1_Timer_Request() req.create_timer.name = name req.create_timer.allows_overrun = False req.create_timer.countdown.duration = duration_seconds msg.action.timer_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Enable/Disable Audience Screens Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Enables or disables the audience screens in ProPresenter. Set the 'enabled' parameter to True or False. ```python from proApiV1_pb2 import NetworkAPI_v1 from proApiV1Status_pb2 import API_v1_Status_Request # Enable audience screens def set_audience_screens(enabled: bool): msg = NetworkAPI_v1() req = API_v1_Status_Request() req.put_audience_screens.enabled = enabled msg.action.status_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Trigger Next Media Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Triggers the next media item using API_v1_Trigger_Request. Requires NetworkAPI_v1 and API_v1_Trigger_Request. ```python def trigger_media_next(): msg = NetworkAPI_v1() req = API_v1_Trigger_Request() req.media_next.CopyFrom(API_v1_Trigger_Request.MediaNext()) msg.action.trigger_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Slide Element Structure Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Demonstrates how to access and interpret the structure of slide elements, including their UUID, size, background color, build animations, data links, and text scroller properties. ```APIDOC ## `Slide` / `Slide.Element` Messages — Slide Content Structure The `Slide` message (in `slide.proto`) represents a single presentation slide. Each slide contains a list of `Element` objects that each wrap a `Graphics.Element` (visual content) plus optional `DataLink` configurations for dynamic data, build animations, and text scrollers. ```python from slide_pb2 import Slide # DataLink property types available on a slide element: # ticker, alternate_text, timer_text, clock_text, chord_chart, # output_screen, pco_live, visibility_link, slide_text, stage_message, # video_countdown, slide_image, ccli_text, group_name, playback_marker_text, # capture_status_text, slide_count, rss_feed, file_feed, timecode_text, ... slide = Slide() # slide.ParseFromString(raw_bytes) # from cue data print(f"Slide UUID: {slide.uuid.string}") print(f"Size: {slide.size.width}x{slide.size.height}") print(f"Background color enabled: {slide.draws_background_color}") for elem in slide.elements: print(f" Element UUID: {elem.element.uuid.string}") # Build animation build_start_map = {0:"ON_CLICK",1:"WITH_PREVIOUS",2:"AFTER_PREVIOUS",3:"WITH_SLIDE"} if elem.HasField("build_in"): print(f" Build In: {build_start_map[elem.build_in.start]}, delay={elem.build_in.delayTime}s") # Data links (dynamic content bindings) for dl in elem.data_links: prop = dl.WhichOneof("PropertyType") print(f" DataLink: {prop}") if prop == "timer_text": print(f" Timer UUID: {dl.timer_text.timer_uuid.string}") elif prop == "ticker": print(f" Ticker loops: {dl.ticker.should_loop}, rate: {dl.ticker.play_rate}") elif prop == "visibility_link": crit = {0:"ALL",1:"ANY",2:"NONE"} print(f" Visibility: {crit[dl.visibility_link.visibility_criterion]}") # Text scroller if elem.HasField("text_scroller") and elem.text_scroller.should_scroll: directions = {0:"LEFT",1:"RIGHT",2:"UP",3:"DOWN"} ts = elem.text_scroller print(f" Scroller: {directions[ts.scrolling_direction]}, rate={ts.scroll_rate}") ``` ``` -------------------------------- ### Trigger Media Item Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Constructs a network request to trigger a specific media item by its ID. Requires NetworkAPI_v1 and API_v1_Media_Request. ```python def trigger_media(media_id: str): msg = NetworkAPI_v1() req = API_v1_Media_Request() trigger = API_v1_Media_Request.TriggerMessage() trigger.media_id.value = media_id trigger.start.CopyFrom(API_v1_Media_Request.EmptyMessage()) req.trigger.CopyFrom(trigger) msg.action.media_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Focus Playlist by ID Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Sets the focus to a specific playlist using its unique ID. This action is often a prerequisite for other playlist operations. ```python from proApiV1_pb2 import NetworkAPI_v1 from proApiV1Playlist_pb2 import ( API_v1_Playlist_Request, API_v1_Playlist_Response, API_v1_Playlist ) # Focus a specific playlist by id def focus_playlist_by_id(playlist_id: str): msg = NetworkAPI_v1() req = API_v1_Playlist_Request() req.id_focus.id = playlist_id msg.action.playlist_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Trigger Video Input by ID Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Triggers a specific video input by its ID using API_v1_Trigger_Request. Requires NetworkAPI_v1 and API_v1_Trigger_Request. ```python def trigger_video_input(input_id: str): msg = NetworkAPI_v1() req = API_v1_Trigger_Request() req.video_input.id = input_id msg.action.trigger_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Trigger Next Slide Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Triggers the next slide in the presentation using API_v1_Trigger_Request. Requires NetworkAPI_v1 and API_v1_Trigger_Request. ```python def trigger_next(): msg = NetworkAPI_v1() req = API_v1_Trigger_Request() req.next.CopyFrom(API_v1_Trigger_Request.Next()) msg.action.trigger_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Presentation Remote Control Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Provides methods for controlling and monitoring the active presentation, including triggering slides, navigating focus, and retrieving information. ```APIDOC ## `API_v1_Presentation_Request` / `API_v1_Presentation_Response` — Presentation Remote Control These messages (in `proApiV1Presentation.proto`) control and monitor the active/focused presentation: trigger slides, navigate focus, delete presentations, operate timelines, and retrieve thumbnails. ```python from proApiV1_pb2 import NetworkAPI_v1 from proApiV1Presentation_pb2 import ( API_v1_Presentation_Request, API_v1_Presentation_Response ) def make_request(req: API_v1_Presentation_Request) -> bytes: msg = NetworkAPI_v1() msg.action.presentation_request.CopyFrom(req) return msg.SerializeToString() # Get active presentation info req = API_v1_Presentation_Request() req.active.CopyFrom(API_v1_Presentation_Request.Active()) payload = make_request(req) # ... send and receive ... ``` -------------------------------- ### Create Clear Group Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Creates a custom clear group that can clear multiple layers simultaneously. ```APIDOC ## create_clear_group ### Description Creates a custom clear group that can clear multiple layers simultaneously. ### Method Signature `create_clear_group(name: str)` ### Parameters - **name** (str) - The name for the custom clear group. ### Returns Serialized network message for creating a clear group. ``` -------------------------------- ### Parse Current Timer Values Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Parses raw byte data to retrieve and print the current state and time of timers. Handles different timer states. ```python def parse_timer_current_times(raw: bytes): msg = NetworkAPI_v1() msg.ParseFromString(raw) resp = msg.action.timer_response if resp.WhichOneof("Response") == "current_times": state_names = {0:"stopped",1:"running",2:"complete",3:"overrunning",4:"overran"} for tv in resp.current_times.timers: print(f"Timer {tv.id.name}: {tv.time} [{state_names[tv.state]}]") ``` -------------------------------- ### Trigger Previous Slide Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Triggers the previous slide in the presentation using API_v1_Trigger_Request. Requires NetworkAPI_v1 and API_v1_Trigger_Request. ```python def trigger_previous(): msg = NetworkAPI_v1() req = API_v1_Trigger_Request() req.previous.CopyFrom(API_v1_Trigger_Request.Previous()) msg.action.trigger_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Trigger Playlist by ID Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Triggers a specific playlist by its ID using API_v1_Trigger_Request. Requires NetworkAPI_v1 and API_v1_Trigger_Request. ```python def trigger_playlist(playlist_id: str): msg = NetworkAPI_v1() req = API_v1_Trigger_Request() req.playlist.id = playlist_id msg.action.trigger_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Parse Media Response Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Parses a raw byte response from the media API, handling playlists, playlist items, and thumbnails. Requires NetworkAPI_v1. ```python def parse_media_response(raw: bytes): msg = NetworkAPI_v1() msg.ParseFromString(raw) resp = msg.action.media_response kind = resp.WhichOneof("Response") if kind == "playlists": for pl in resp.playlists.playlists: print(f"Media Playlist: {pl.id.name}") elif kind == "get_playlist": gp = resp.get_playlist print(f"Playlist ID: {gp.id.name}") for item in gp.items: print(f" Media: {item.name}") elif kind == "get_thumbnail": gt = resp.get_thumbnail print(f"Thumbnail for {gt.uuid.string}: {len(gt.thumbnail_data)} bytes") ``` -------------------------------- ### Increment Timer by Amount Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Increments a specific timer by a given amount. Requires a timer ID and the amount to add. ```python def increment_timer(timer_id: str, amount: float): msg = NetworkAPI_v1() req = API_v1_Timer_Request() req.timer_increment.id = timer_id req.timer_increment.amount = amount msg.action.timer_request.CopyFrom(req) return msg.SerializeToString() ``` -------------------------------- ### Clear Layer Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Clears a specific layer within ProPresenter. ```APIDOC ## clear_layer ### Description Clears a specific layer within ProPresenter. ### Method Signature `clear_layer(layer_type)` ### Parameters - **layer_type** (API_v1_LayerType) - The type of layer to clear. Possible values include: `video`, `slide`, `announcements`, `props`, `messages`, `audio`. ### Returns Serialized network message for the clear layer action. ``` -------------------------------- ### Parse Timer Current Times Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Parses the raw byte string to retrieve and display current timer values and their states. ```APIDOC ## parse_timer_current_times ### Description Parses the raw byte string to retrieve and display current timer values and their states. ### Method Signature `parse_timer_current_times(raw: bytes)` ### Parameters - **raw** (bytes) - The raw byte string containing timer data. ### Returns Prints the ID, time, and state of each timer to the console. ``` -------------------------------- ### API_v1_Playlist_Request / API_v1_Playlist_Response — Playlist Remote Control Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt These messages allow for full playlist management over the network API, including listing, creating, updating, focusing, and triggering playlist items. ```APIDOC ## `get_playlists` ### Description Lists all available playlists. ### Method ```python def get_playlists(): msg = NetworkAPI_v1() req = API_v1_Playlist_Request() req.playlists.CopyFrom(API_v1_Playlist_Request.Playlists()) msg.action.playlist_request.CopyFrom(req) return msg.SerializeToString() ``` ``` ```APIDOC ## `create_playlist` ### Description Creates a new playlist group with a specified name and type. ### Parameters #### Arguments - **name** (str) - Required - The name of the new playlist. - **playlist_type** (API_v1_Playlist.PlaylistType) - Optional - The type of the playlist (default is 'playlist'). ### Method ```python def create_playlist(name: str, playlist_type=API_v1_Playlist.playlist): msg = NetworkAPI_v1() req = API_v1_Playlist_Request() req.create_playlist.name = name req.create_playlist.type = playlist_type msg.action.playlist_request.CopyFrom(req) return msg.SerializeToString() ``` ``` ```APIDOC ## `focus_playlist_by_id` ### Description Sets the focus to a specific playlist using its ID. ### Parameters #### Arguments - **playlist_id** (str) - Required - The ID of the playlist to focus. ### Method ```python def focus_playlist_by_id(playlist_id: str): msg = NetworkAPI_v1() req = API_v1_Playlist_Request() req.id_focus.id = playlist_id msg.action.playlist_request.CopyFrom(req) return msg.SerializeToString() ``` ``` ```APIDOC ## `parse_playlists_response` ### Description Parses the response from playlist-related API calls, handling different response types like playlist lists or specific playlist details. ### Method ```python def parse_playlists_response(raw: bytes): msg = NetworkAPI_v1() msg.ParseFromString(raw) resp = msg.action.playlist_response kind = resp.WhichOneof("Response") if kind == "playlists": type_names = {0: "group", 1: "playlist"} for pl in resp.playlists.playlists: print(f"Playlist: {pl.id.name} (type={type_names[pl.type]})") for child in pl.children: print(f" Child: {child.id.name}") elif kind == "get_playlist": gp = resp.get_playlist item_types = {0:"presentation",1:"placeholder",2:"header",3:"media",4:"audio",5:"livevideo"} print(f"Playlist ID: {gp.id.name}") for item in gp.items: print(f" [{item_types[item.type]}] {item.id.name} hidden={item.is_hidden}") ``` ``` -------------------------------- ### Parse Playlist List Response Source: https://context7.com/greyshirtguy/propresenter7-proto/llms.txt Parses a raw byte response containing playlist information. It distinguishes between playlist groups and individual playlists, and lists their children or items. ```python from proApiV1_pb2 import NetworkAPI_v1 from proApiV1Playlist_pb2 import ( API_v1_Playlist_Request, API_v1_Playlist_Response, API_v1_Playlist ) # Parse playlist list response def parse_playlists_response(raw: bytes): msg = NetworkAPI_v1() msg.ParseFromString(raw) resp = msg.action.playlist_response kind = resp.WhichOneof("Response") if kind == "playlists": type_names = {0: "group", 1: "playlist"} for pl in resp.playlists.playlists: print(f"Playlist: {pl.id.name} (type={type_names[pl.type]})") for child in pl.children: print(f" Child: {child.id.name}") elif kind == "get_playlist": gp = resp.get_playlist item_types = {0:"presentation",1:"placeholder",2:"header",3:"media",4:"audio",5:"livevideo"} print(f"Playlist ID: {gp.id.name}") for item in gp.items: print(f" [{item_types[item.type]}] {item.id.name} hidden={item.is_hidden}") ```