luisiam / homebridge-cmdswitch2

CMD Plugin for HomeBridge (API 2.0): https://github.com/nfarina/homebridge
Apache License 2.0
176 stars 29 forks source link

turn xbox-one-x on/off? #44

Open mreassassin opened 6 years ago

mreassassin commented 6 years ago

I'm trying to figure out how to use this for my xbox-one-x.

{ "name" : "XBOXONE-X", "on_cmd": "wakeonlan XX:XX:XX:XX:XX:XX", "off_cmd": "net rpc shutdown -I XXX.XXX.XXX.XXX -U user%password", "state_cmd": "ping -c 2 -W 1 XXX.XXX.XXX.XXX | grep -i '2 received'" },

Doesn't work for me.

is it possible?

SmoothMC commented 5 years ago

you have to install https://pypi.org/project/xbox-smartglass-core/

an the switch have to look like this.

{ "name": "XBOX", "on_cmd": "xbox-poweron XXXXXXXXXXX", "off_cmd": "xbox-poweroff --liveid XXXXXXXXXXX", "state_cmd": "ping -c 2 -W 1 192.168.x.x | grep -i '2 received'", "timeout": 200, "manufacturer": "Microsoft", "model": "XBOX ONE", "serial": "XXXXXXXXXXX" },

mreassassin commented 4 years ago

Sometimes HomeKit reports the Xbox as on when it’s off. Is there a way to poll the status (on/off) of the Xbox every time HomeKit opens or refreshes?