Launch Netflix Windows App on a windows computer via MQTT

Here’s the setup I use to launch the Netflix windows 10 application via mqtt.
(you need java on the PC and an MQTT server)
I used Winthing to handle MQTT request in windows

I won’t go in the details, but here’s the process

  • Download winthing jar to c:\Winthing
  • Create a Winthing.bat file to launch Winthing with the correct parameters (MQTT Server IP,username and Password)
  • We need to create a shortcut to the Netflix App and put it in c:\Winthing
  • Create a StartWinthingInBackground.vbs file to lauch Winthing at each startup
  • Create a Item PCControl in Openhab to receive the command we will send to the PC
  • Create a rule that will sent the MQTT request (Need the MQTT Action installed in openhab)
  • Create a Sitemap to test if it’s working

On the Windows PC

Here’s the batch to launch Winthing change the IP, username and password to your MQTT server


cd C:\Winthing\
java  -Dwinthing.brokerUrl=tcp:// -Dwinthing.brokerUsername=openhabian -Dwinthing.brokerPassword=mypassword -jar winthing-1.1.0.jar

To create the Netflix.lnk shortcut paste this in windows explorer, right-click create shortcut and move it to C:\Winthing\Netflix.lnk

`%windir%\explorer.exe shell:::{4234d49b-0245-4df3-b780-3893943456e1}`

Here’s StartWinthingInBackground.vbs tu be created in %appdata%\Roaming\Microsoft\Windows\Start Menu\Programs\Startup


Set WshShell = CreateObject("WScript.Shell")
WshShell.Run """" & "C:\Winthing\winthing.bat" & """" & sargs, 0, False
Set WshShell = Nothing

Now for Openhab


String PCControl "PC Action" <switch> { autoupdate="false" }


rule "rPCControl"
	Item PCControl received command
    logInfo("rule rPCControl", "command "+receivedCommand)
	switch (receivedCommand) {
		case "reboot" : 
			publish("broker", "winthing/system/commands/reboot", "") 
  		case "shutdown" :
			publish("broker", "winthing/system/commands/shutdown", "")
		case "netflix" : {
			publish("broker", "winthing/system/commands/run", "[\"Netflix.lnk\",\"\",\"\"]")
                        // Wait 5 seconds and send WIN+SHIFT+ENTER to go Fullscreen
                        publish("broker", "winthing/keyboard/commands/press_keys", "[\"LWIN\",\"LSHIFT\",\"ENTER\"]")

And finally the sitemap


sitemap PCControl label="PCControl" {
Switch item=PCControl mappings=[reboot="Reboot PC", shutdown="Shutdown PC", netflix="Launch Netflix"]

Hope this help and I didn’t make to many typos … Aymeric

Simulate WIN+SHIFT+ENTER keypress to go fullscreen
Change 1 to 0 to hide the console in StartWinthingInBackground.vbs


Thats great, but why did you build that. I am sitting usually in front of my PC …

I have a small PC connected to my TV with HDMI.
It’s part of my home cinema setup.

Now I have added Kodi on a RPi3, but Sadly Netflix is not supported (or stable) yet.

More over, always convenient to have a PC connected to the big screen.

Edit: I don’t use the keyboard or mouse most of the time. I use Unified Remote.

So the less click is needed the better.

Small Edit: Simulate WIN+SHIFT+ENTER keypress to go fullscreen

        publish("broker", "winthing/keyboard/commands/press_keys", "[\"LWIN\",\"LSHIFT\",\"ENTER\"]")

And also hide the Winthing console in StartWinthingInBackground.vbs


WshShell.Run """" & "C:\Winthing\winthing.bat" & """" & sargs, 1, False


WshShell.Run """" & "C:\Winthing\winthing.bat" & """" & sargs, 0, False
1 Like

I am from Homeseer. I tried in the past to make this run. THis time i Followed your instruction and it works!!!

i think moving the -jar from the begining to the end was the key…

Some time ago, but how I get the jar file?

Hello I hope you found it by now, but you’ll find it here


Hi. I have just successfully set up WinThings and I thought I would add some further information if anyone else is taking this route.

Firstly, the WinThing version and parameters have changed slightly, so if you are using the code examples above, please check against the updated documentation on GitHub.

Secondly, I tried to get this to run as a service (rather than requiring a Start Menu shortcut) using NSSM. After a lot of playing around, I concluded that it does not work (I could get it to sucessfully start, but any applications that were launched would not be visible, despite setting the “allow to interact with desktop” or changing service account to my own.) If anyone has been successful at this, it would be good to know how.

Thirdly, it seems odd that there isn’t an easier way to trigger automated actions on a PC, given the move towards automation in both home and business. Microsoft have Power Automate, but you have to pay for the development capability. If there is some kind of OpenHab way of doing this, please let me know!

FYI, the scenarios I have are primarily for videconferencing via headless computers (so I can say “Hey Google Skype Mum from Living Room”, but I would have thought there are many many other things that can be done with this kind of automation.

see here also if interested.
Not tested

I use AssistantComputerControl. The upside is that it’s easy to get it going. The downside is that it requires IFTTT. I haven’t been able to get it to work locally.

Thanks both. IFTTT is a non-starter for me, so I will check out IOTlink.