Bug: Windows Away-Mode not supported (breaks CEC functionality)

I’ve just tried OpenPHT for the first time on my Windows machine (8.1 x64 with an Pulse Eight CEC-adapter).

Unfortunately, OpenPHT doesn’t seem to properly support the Windows Away-Mode. And this basically breaks the CEC functionality on my system.

Any chance to add this to OpenPHT?

So more additional information:

Away-Mode has been a feature of Windows since Windows XP.

OpenPHT needs to register to receive away-mode status:

RegisterPowerSettingNotification(m_hWnd, &GUID_SYSTEM_AWAYMODE, DEVICE_NOTIFY_WINDOW_HANDLE);

The powermanager then needs to check for the Away-Mode call like this:

case PBT_POWERSETTINGCHANGE:
{
POWERBROADCAST_SETTING* s = (POWERBROADCAST_SETTING*)nEventData;
if( s != NULL && IsEqualGUID( s->PowerSetting, GUID_SYSTEM_AWAYMODE ) )
// The computer is entering “away” mode.

Further technical documentation is available in the attached documents or over on MSDN:

You’ll want to file this at the github issues site.

Filed this issue as a github ticked:

github.com/RasPlex/OpenPHT/issues/124

Still problem is still present in the newest release :frowning: It makes the CEC-Adapter I’ve bought specifically for my NUC pretty much useless.

Windows Away-Mode is a basic feature of Windows since the old XP days. Wonder why nobody has considered adding this to Kodi/OpenPHT yet…

@TOMillr said:
Still problem is still present in the newest release :frowning: It makes the CEC-Adapter I’ve bought specifically for my NUC pretty much useless.

Windows Away-Mode is a basic feature of Windows since the old XP days. Wonder why nobody has considered adding this to Kodi/OpenPHT yet…

It might need to be added upstream in Kodi before it shows up here. If you need the feature badly, you could also open an issue with the Kodi or OpenElec team.

Thanks for the that idea. But I’ve already opened up a ticket with Kodi almost two years ago and nobody (of the Linux heavy devs) really seems to care for or understand the problem.