xbox.stump.manager module¶
StumpManager - Handling TV Streaming / IR control commands
-
class
xbox.stump.manager.StumpManager(console)¶ Bases:
xbox.sg.manager.Manager-
__init__(console)¶ Title Manager (ServiceChannel.SystemInputTVRemote)
- Parameters
console – Console object
-
property
msg_id¶ Internal method for generating message IDs.
- Returns
A new message ID.
- Return type
-
generate_stream_url(source: xbox.stump.enum.Source, xuid: str = None, quality: xbox.stump.enum.Quality = <Quality.BEST: 'best'>) → str¶ Generate TV Streaming URL (Dvb-USB tuner, not hdmi-in)
- Parameters
source – Streaming source
xuid – optional, XUID
quality – Streaming quality
Returns: HTTP URL
-
_on_json(data: dict, channel: int) → None¶ Internal handler for JSON messages received by the core protocol.
- Parameters
data – The JSON object that was received.
channel – The channel this message was received on.
- Returns
None.
-
_on_response(message_type: Union[xbox.stump.enum.Message, str], data: xbox.stump.json_model.StumpResponse) → None¶ Internal response handler. For logging purposes.
- Parameters
message_type – The message type.
data – The raw message.
-
_on_notification(notification: Union[xbox.stump.enum.Notification, str], data: xbox.stump.json_model.StumpNotification) → None¶ Internal notification handler. For logging purposes.
- Parameters
notification – The notification type.
data – The raw message.
-
_on_error(data: xbox.stump.json_model.StumpError) → None¶ Internal error handler.
- Parameters
data – The error dictionary from the Message.
-
async
_send_stump_message(name, params=None, msgid=None, timeout=3)¶ Internal method for sending JSON messages over the core protocol.
Handles message IDs as well as waiting for results.
-
async
request_stump_configuration() → dict¶ Request device configuration from console.
The configuration holds info about configured, by Xbox controlable devices (TV, AV, STB).
- Returns
The received result.
- Return type
-
async
request_headend_info() → dict¶ Request available headend information from console.
Returns: The received result.
-
async
request_live_tv_info() → dict¶ Request LiveTV information from console.
Holds information about currently tuned channel, streaming-port etc.
Returns: The received result.
-
async
request_program_info() → dict¶ Request program information.
NOTE: Not working?!
Returns: The received result.
-
async
request_tuner_lineups() → dict¶ Request Tuner Lineups from console.
Tuner lineups hold information about scanned / found channels.
Returns: The received result.
-
async
request_app_channel_lineups() → dict¶ Request AppChannel Lineups.
Returns: The received result.
-
async
request_app_channel_data(provider_id: str, channel_id: str) → dict¶ Request AppChannel Data.
- Parameters
provider_id – Provider ID.
channel_id – Channel ID.
Returns: The received result.
-
async
request_app_channel_program_data(provider_id: str, program_id: str) → dict¶ Request AppChannel Program Data.
- Parameters
provider_id – Provider ID.
program_id – Program Id.
Returns: The received result.
-
async
set_stump_channel_by_id(channel_id: str, lineup_id: str) → dict¶ Switch to channel by providing channel ID and lineup ID.
- Parameters
channel_id – Channel ID.
lineup_id – Lineup ID.
Returns: The received result.
-
async
set_stump_channel_by_name(channel_name: str) → dict¶ Switch to channel by providing channel name.
- Parameters
channel_name – Channel name to switch to.
Returns: The received result.
-
async
request_recent_channels(first: int, count: int) → dict¶ Request a list of recently watched channels.
- Parameters
first – Where to start enumeration.
count – Number of channels to request.
Returns: The received result.
-
async
send_stump_key(button: str, device_id: str = None, **kwargs) → dict¶ Send a remote control button to configured device via Xbox’s IR Blaster / Kinect / whatev.
- Parameters
button – Button to send.
device_id – Device ID of device to control.
Returns: The received result.
-
async
request_ensure_stump_streaming_started(source: xbox.stump.enum.Source) → dict¶ Ensure that streaming started on desired tuner type
- Parameters
source – Tuner Source to check for.
Returns: The received result.
-
property
headend_locale¶
-
property
streaming_port¶
-
property
is_hdmi_mode¶
-
property
current_tunerchannel_type¶
-