I am trying to continue the work which started here:
It works with a Raspberry PI as a middleware.
So the HUB sends calls a http request and the middleware sends the required package to power on the Xbox.
I want to add Power_Off feature to this. But I could not figure out the correct package format for power_off.
Here , I found a complete python library for various control of Xbox:
But I really don’t understand python, specially the way the IP package is formatted.
Can anyone help me figure out which package should be sent for power off ?
Here are what I have found out in the code to turn off :
def power_off(self, liveid): """ Power off console Args: liveid (str): Live ID of console Returns: None """ msg = factory.power_off(liveid) self.send_message(msg) factory: CHANNEL_CORE=0 def power_off(liveid, **kwargs): """ Assemble PowerOff message. Args: liveid (str): Live ID of console. Returns: :class:`XStructObj`: Instance of :class:`:class:`XStructObj``. """ return message.struct( header=_message_header( MessageType.PowerOff, CHANNEL_CORE, **kwargs ), protected_payload=message.power_off( liveid=liveid ) ) message: power_off = XStruct( 'liveid' / SGString() )
XSrtuct is found under xbox/sg/utils/
I’d really appreciate if someone can help me to form the correct packet for power off.