grzegorz914 / homebridge-xbox-tv

Homebridge plugin for Microsoft Game Console, publish as independent external platform accessory.
MIT License
166 stars 15 forks source link

Power On does not work reliably #134

Closed vordenken closed 2 years ago

vordenken commented 2 years ago

Unfortunately the power on command does not work reliably. I can power off the xbox with HomeKit, switch inputs and also power it on shortly after it ran but not after I come home and the console being off for a few hours.

Has this something to do with the xbox being connected via wifi? Or some sort of "deeper" sleep mode?

This is the home bridge log where I tried to power on the console after it was off for maybe 24 hours. The bold text is where the power on command got send. The console did not turn on.

EDIT: Even if the console is turned off for a couple of minutes, I cannot turn it back on using Homebridge.

Thanks for your help :) Cheers

[1/14/2022, 11:18:53 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Power state successful: OFF [1/14/2022, 11:18:53 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Input successful, input: Screensaver, reference: Xbox.IdleScreen_8wekyb3d8bbwe!Xbox.IdleScreen.Application, product Id: Screensaver [1/14/2022, 11:18:53 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Current Media state successful: STOP [1/14/2022, 11:18:53 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Target Media state successful: STOP [1/14/2022, 11:18:53 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Mute successful: OFF [1/14/2022, 11:18:53 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Volume successful: 0 [1/14/2022, 11:19:12 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Input successful, input: Screensaver, reference: Xbox.IdleScreen_8wekyb3d8bbwe!Xbox.IdleScreen.Application, product Id: Screensaver [1/14/2022, 11:19:12 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Power state successful: OFF [1/14/2022, 11:19:14 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Power state successful: OFF [1/14/2022, 11:19:14 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Input successful, input: Screensaver, reference: Xbox.IdleScreen_8wekyb3d8bbwe!Xbox.IdleScreen.Application, product Id: Screensaver [1/14/2022, 11:19:18 AM] [XboxTv] Device: 192.168.178.64 Xbox, Send power On. [1/14/2022, 11:19:22 AM] [XboxTv] Device: 192.168.178.64 Xbox, set Power successful, ON [1/14/2022, 11:19:28 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Power state successful: OFF [1/14/2022, 11:19:28 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Input successful, input: Screensaver, reference: Xbox.IdleScreen_8wekyb3d8bbwe!Xbox.IdleScreen.Application, product Id: Screensaver [1/14/2022, 11:19:28 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Current Media state successful: STOP [1/14/2022, 11:19:28 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Target Media state successful: STOP [1/14/2022, 11:19:28 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Mute successful: OFF [1/14/2022, 11:19:28 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Volume successful: 0 [1/14/2022, 11:19:28 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Power state successful: OFF [1/14/2022, 11:19:28 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Input successful, input: Screensaver, reference: Xbox.IdleScreen_8wekyb3d8bbwe!Xbox.IdleScreen.Application, product Id: Screensaver [1/14/2022, 11:19:28 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Current Media state successful: STOP [1/14/2022, 11:19:28 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Target Media state successful: STOP [1/14/2022, 11:19:28 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Mute successful: OFF [1/14/2022, 11:19:28 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Volume successful: 0 [1/14/2022, 11:19:31 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Power state successful: OFF [1/14/2022, 11:19:31 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Input successful, input: Screensaver, reference: Xbox.IdleScreen_8wekyb3d8bbwe!Xbox.IdleScreen.Application, product Id: Screensaver [1/14/2022, 11:19:31 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Current Media state successful: STOP [1/14/2022, 11:19:31 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Target Media state successful: STOP [1/14/2022, 11:19:31 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Mute successful: OFF [1/14/2022, 11:19:31 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Volume successful: 0 [1/14/2022, 11:19:54 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Power state successful: OFF [1/14/2022, 11:19:54 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Input successful, input: Screensaver, reference: Xbox.IdleScreen_8wekyb3d8bbwe!Xbox.IdleScreen.Application, product Id: Screensaver [1/14/2022, 11:19:54 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Current Media state successful: STOP [1/14/2022, 11:19:54 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Target Media state successful: STOP [1/14/2022, 11:19:54 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Mute successful: OFF [1/14/2022, 11:19:54 AM] [XboxTv] Device: 192.168.178.64 Xbox, get Volume successful: 0

grzegorz914 commented 2 years ago

Can You ping Your console after power off? Probably lose its connection to the WiFi network.

vordenken commented 2 years ago

I tested it and you're right, I can't ping the console... That's a bummer, so the "power on" feature probably only works if the console is connected via an ethernet cable. That's a bummer.

One question tho: I activated the debug mode of your plugin to see what's going on and I see a lot of

Socket send 74 bytes.

What does that mean? Is homebridge sending something to the xbox without a reply? Or is the xbox sending something?

grzegorz914 commented 2 years ago

The plugin try to send 74bytes - command powerOn but cannot be realized because Xbox in not available on the network.

grzegorz914 commented 2 years ago

I close this because is not any plugin issue, I think the xbox do not have Wake On WLAN.

vordenken commented 2 years ago

FYI: This problem was resolved after I changed the power mode of the xbox to Instant-On (I did this initially but for some reason it changed). I can now control the xbox over wifi reliably.