HA WinKiosk - Windows webpage kiosk app with MQTT and gestures

Hi all,

I’d like to present my latest project, a Windows kiosk app that’s designed for use with Home Assistant. This app was inspired by frustration at the lack of Windows kiosk apps, and since then I’ve just added more and more features!

HA WinKiosk

An open-source Windows webpage kiosk designed for integration with Home Assistant

Quick summary…

  • Pin lock to prevent unintended guests visiting your settings
  • Starts on boot and automatically downloads the latest release
  • Gestures such as triple tap, swipe, and pinch that can trigger page reloads, MQTT messages, and more
  • MQTT for integration with Home Assistant!

HA sensors and commands..

Type Entities
Button Shutdown, Restart, System sleep, Monitor sleep, Monitor wake, Refresh kiosk, Clear kiosk cache, Open settings, Close settings, Run Windows updates, PowerShell command
Sensor Battery level, Last Active
Number Updates pending, Monitor brightness

Gestures…

Type Options
Tap Double tap, Triple tap, Quadruple tap, Quintuple tap
Swipe Swipe, Swipe and hold, Two-finger swipe, Two-finger swipe and hold
Other Pinch, Zoom

Credit where credit is due…

HASS.Agent 2.0 (hass-agent, forked from LAB02-Research) was heavily leaned on for implementation of sensors and commands, and in the case of monitor wake/sleep, directly mirrored. Amazing!

Can’t believe I forgot to include a link to my own repo. Have now updated the post!

Now includes beta support for HA voice assist via Wyoming services!

Voice activation via OpenWakeWord, and your choice of software for TTS, STT, and conversation agent as sent in HA voice agent settings.

Also upgraded themes :wink:


While I previously attempted to add native openwakeword and wyoming services support with releases v3.9.3-beta to v3.10.9-beta I have discovered a wonderful intergration that does this just as well, if not better, with a lot less work.

Instead of continuing, I’ve optimised this kiosk app to work with voice-satellite-card-integration by jxlarrea.

Mic access, input device, output device, and volume can be changed from the config section of settings. If you want to customise the Voice Assist appearance to match this app better, you can follow the intergration instructions for skins and extra css. I have prewritten some css styles below if you wish to use them.

Styles
/* --- GLOBAL BAR STYLING --- */
#voice-satellite-ui .vs-activity-bar {
  height: 4px !important;
  border-radius: 4px !important;
  transition: all 0.3s ease !important;
}

/* --- LIGHT THEME --- */
#voice-satellite-ui.vs-light {
  --vs-text-user-color: #000000;
  --vs-text-assistant-color: #29b6f6;
}

#voice-satellite-ui.vs-light .vs-text-user {
  color: var(--vs-text-user-color) !important;
}

#voice-satellite-ui.vs-light .vs-text-assistant {
  color: var(--vs-text-assistant-color) !important;
}

#voice-satellite-ui.vs-light .vs-activity-bar {
  background: #ffffff !important;
  box-shadow: 0 0 15px 4px rgba(79, 195, 247, 0.8) !important;
}

/* --- DARK THEME --- */
#voice-satellite-ui.vs-dark {
  --vs-text-user-color: #ffffff;
  --vs-text-assistant-color: #03a9f4;
}

  color: var(--vs-text-user-color) !important;
}

#voice-satellite-ui.vs-dark .vs-text-assistant {
  color: var(--vs-text-assistant-color) !important;
}

#voice-satellite-ui.vs-dark .vs-activity-bar {
  background: #222222 !important;
  box-shadow: 0 0 20px 6px rgba(3, 169, 244, 0.7) !important;
}

If you’re having issues with your mic, I recommend going to Windows settings and turning up the mic volume. Solved it for me!

Latest release: Releases · kattcrazy/HA-WinKiosk · GitHub

Some things I’m wanting help on:

Suggestions / PRs welcome!

Solved :tada: HA Win-Kiosk now opens within 5-10 seconds instead of up to 3 minutes!

New updates!

The last two releases have been a bit exciting. Here's the combined list.
My favourites are the navigate feature and breaking changes pop.

Features

  • MQTT navigate: change HA page (much like browser mod)
  • Update sensors button
  • Allow 0% brightness toggle
  • CPU usage sensor
  • Memory usage sensor
  • Monitor state sensor
  • Release info sensor (current version + any breaking changes that came with that version)
  • Breaking changes popup if any (auto-dismisses after 24 hours or if dismissed)

Fixes

  • Pin and reset question/answer now stored in encoded file
  • Navigation issues
  • Mask PIN/password fields with show/hide icon (marked as a fix because this really should have been there from the start)
  • Gestures on error pages: made sure that gestures still work even if the page fails to load
  • Battery sensor hidden on PCs without a battery

Hello,

thank you for your great app. :+1: Everything is fine. Actually i found no error with the newest release. You publish on mqtt the current url of the app. It is in future possible to change the current url and the app goes to the new url?

Background:

I want to use the app on a monitor without a keyboard or mouse. At specific times i would display a different dashboard or a different page within the dashboard.

Is this already possible, or do you have other ideas for implementing this?

Yes, you can do that! It’s one of the newer features. Check out the readme for the MQTT topic path :slight_smile:

That’s amazing. It’s work. It is also propably to play a video or a tts with this app on the kiosk per mqtt or something else? Also control the audio volume level or mute?

Currently volume can only be set on-device but if you’d like to open a issue/feature request I can definitely make it configurable over MQTT. You can turn the device into a media player and/or voice assistant using voice satellite card :slight_smile:

Thank you, that’s show complicated. I show me the satellite card soon. Nice Weekend :wink:

Can you give ne a litte workaround to Play a video on the kiosk win server. The satelitte show me only voices to work and not videos. I would like to show only a mp4 video per url

Sorry, that’s beyond me! You may have to ask the creator of that intergration if video casting is possible, or put the video in a panel dashboard card and navigate to that dashboard.

Ok :thinking:

I come from ioBroker and there is a instance named “wio-browser”. There is possible to play a video with a command:

d:/mpc/mpc-hc64.exe <video_url> /fullscreen /play /close

I think that’s a create option.

I have put a video in my dashboard:

type: markdown
content: |
  <center>
    <video id="Movie" src='{{ states('sensor.tagesschau_100s_mp4_url_1920p') }}' width='800' height='450' autobuffer autoplay controls><div>Sorry, not available!</div></video>
  </center>
grid_options:
  columns: full
  rows: auto

The sound is on and the video starts automatically on every PC. I only get no sound on the HA WinKiosk. Could it be that your app cannot access the WinKiosk PC’s audio or isn’t outputting sound through it? When using other software with the command mentioned in the last post, the sound plays normally.

It is possible with the powershell command use a dynamically command with a entity state?

Check the settings in HA WinKiosk to make sure the correct sound output is selected and that the volume is correct. It should work :slight_smile:

To test if it’s HA WinKiosk or the device itself, you could try opening the dashboard in a normal browser, like Chrome or Edge.

And no, you can’t change the powershell command dynamically, sorry.

With a normal browser it works. In the settings from HA WinKiosk i select by audio “default”.

Audio works on my setup so I feel this is likely due to your settings…