Launch Netflix Windows App on a windows computer via MQTT

Tags: #<Tag:0x00007f6170281dc8> #<Tag:0x00007f6170281aa8> #<Tag:0x00007f6170281878>

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