Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

HL2 set sleep settings fails #308

Open
artsouflMS opened this issue May 20, 2020 · 1 comment
Open

HL2 set sleep settings fails #308

artsouflMS opened this issue May 20, 2020 · 1 comment

Comments

@artsouflMS
Copy link
Contributor

Hello,

I am building a tool for HL2.

I am using the command below to set the sleep settings in HL2 through my tool.

"https://127.0.0.1:10443/api/power/cfg/SCHEME_CURRENT/SUB_SLEEP/STANDBYIDLE?ValueAC=1800&ValueDC=1800";

After running the above command, in the device portal, I can see that both on battery and plugged in values are set to 30 min, as expected.
Though my device goes to sleep after few min, maybe 3 or 5 minutes.
So all the leds are switched off, near the power button.

If I set the settings manually through the device portal, then everything works as expected, the device goes to sleep after 30 min.
Is there sth in the command that I am using wrong?
In HL1 it seems like it is working, but not in HL2.

Any advice?

@chris03
Copy link

chris03 commented Jul 17, 2020

Hi, when you want to reproduce what the device portal's web interface does, it's a good idea to look at the http calls that are made in the developer tools of your browser. You would have seen that when changing the sleep settings, there are 3 POST calls.

$"/api/power/cfg/SCHEME_CURRENT/SUB_SLEEP/STANDBYIDLE?ValueAC={pluggedinTimeout}&ValueDC={batteryTimeout}"
$"/api/power/cfg/SCHEME_CURRENT/SUB_VIDEO/VIDEOIDLE?ValueAC={pluggedinTimeout}&ValueDC={batteryTimeout}"
"/api/power/activecfg?scheme=SCHEME_CURRENT"

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants