hass-browser_mod icon indicating copy to clipboard operation
hass-browser_mod copied to clipboard

Integrate with Kiosker iOS app

Open John5373 opened this issue 4 years ago • 3 comments

Could you add a service to integrate with the Kiosker iOS app? Specifically, I am trying to enable/disable the screensaver through the app's javascript functionality:

Thanks!

John5373 avatar Aug 19 '21 19:08 John5373

Closed because of Browser Mod 2.0 release. Please see #354.

thomasloven avatar Sep 03 '22 11:09 thomasloven

+1 for this! This feature is really heplful for people who use iPad as a dashboard. Can you please add support for Kiosker? Kiosker.io has all the javascript related documents https://docs.kiosker.io/#/javascript Big thanks!

xiaohuim avatar Sep 21 '23 04:09 xiaohuim

@maniscalcojohn I figured out a easy (or temporarily) way to do it with Kiosker. So I have an iPad as dashboard with the screen on 24/7, and I want the screen to light up (like 60% the full brightness) when motion detected and brightness to 0 when no one is around. This is how I did it: 截屏2023-09-22 21 38 38

Kiosk website has this function on their doc:

function kioskerIntegration(data) {
    const string = JSON.stringify(data)
    try {
      window.webkit.messageHandlers.callback.postMessage(string);
    } catch(err) {
      console.log("Can't reach Kiosker");
    }
  }

Basically what we need do is just stringify the JSON data and pass that to the window.webkit.messageHandlers.callback.postMessage() function.

Hope this can help.

xiaohuim avatar Sep 22 '23 14:09 xiaohuim