Sleepmode Tap Missing in the Device Portal

I wanted to change the sleep mode from 5 to 30 minutes or turn it off at the Device Portal, but the sleep mode tab is missing. Where is it now? How can I change it to at least 30 minutes?

I tested it on 3 hololenses. No Device Portal shows the sleep mode tab anymore.
I used developer und commercial hololenses.

I already tried https://www.tattichan.work/entry/2017/07/17/
I used the unity script. But it doesn't seem to work.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;

public class Sleepmode : MonoBehaviour
{

[Tooltip("DevicePortal URL")]
public string url = "127.0.0.1:10080";
[Tooltip("DevicePortal UserName")]
public string usr = "username";
[Tooltip("DevicePortal Password")]
public string pass = "pass";

void Update()
{
    if (Input.GetKeyDown(KeyCode.S))
    {
        StartCoroutine(OnSetVideoIdle());
        StartCoroutine(OnSetStanbyIdle());
    }
}


//ValueAC = 0 & ValueDC = 0 " , 
IEnumerator OnSetVideoIdle()
{
    WWWForm form = new WWWForm();
    var req = UnityWebRequest.Post(" http://" + url + "/api/power/cfg/SCHEME_CURRENT/SUB_SLEEP/VIDEOIDLE?ValueAC=0&ValueDC=0", form);
    req.SetRequestHeader("AUTHORIZATION", Authenticate(usr, pass));
    yield return req.SendWebRequest();
}

IEnumerator OnSetStanbyIdle()
{
    WWWForm form = new WWWForm();
    var req = UnityWebRequest.Post("http://" + url + "/api/power/cfg/SCHEME_CURRENT/SUB_SLEEP/STANDBYIDLE?ValueAC=0&ValueDC=0", form);
    req.SetRequestHeader("AUTHORIZATION", Authenticate(usr, pass));
    yield return req.SendWebRequest();
}
string Authenticate(string username, string password)
{
    string auth = username + ":" + password;
    auth = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes(auth));
    auth = "Basic" + auth;
    return auth;
}

}

Would be good to add the sleep mode to the hololens menu and not always use the device potal to change it.

What else can I Do? Thanks in advance.

Sophiena

Sign In or Register to comment.