Microsoft Media Center Plugin (WMC or MCE) for Vera Control

Has anyone found a command to open a PIP window with MCE Controller? Or is this something specific to VMC Server?

What do you want to do, switching to another app or web page typically leaves the current playing video in PIP.

I use this to go to a web page that has my security camera image refresh every second.

I’m trying to do the exact same thing as you. Ever since I read your original couple of posts it’s been my end game. My wife is about to start putting my 4 month old daughter in her room to sleep. I got the technicals with motion and sound worked out in blue iris and how to make it trigger a scene. And after much frustration how to get Vera to send commands to mce controller but not specifically how to call up the camera, I have it in extra galley. I just need a little direction as how to get wmc to pull it up in pip and a command to close it.

Also I was wondering what the vox commando commands are for in your examples.

And lastly thanks for sharing such a useful idea/ programming with the community!

This is the code I use in PLEG

--Open specific camera HTML page
GoToUrl(ENT-CAM)

--WMC Functions
function GoToUrl(GoToUrl)
     local socket = require("socket")
     tcp = assert(socket.connect(ttsHost, 40500))
     tcp:send("GOTO ExtensibilityUrl C\:\\ProgramData\\Microsoft\\Windows\\StartM~1\\Programs\\Accessories\\MediaC~1\\MediaC~1\\" .. GoToUrl .. ".htm \r\n")
     tcp:close()
     --Switch back from camera view back to full screen media view after 15 seconds
     luup.call_delay("delayFullScreen",15)
end
function delayFullScreen()
     local wmcCmd = "fullscreen"
     local socket = require("socket")
     tcp = assert(socket.connect(ttsHost, 40500))
     tcp:send("button-back" .. "\r\n")
     luup.sleep(500)
     tcp:send("fullscreen" .. "\r\n")
end     

Note - Sound not supported with web pages. For my baby monitor, I just have my camera server (iSpy) on my WMC too…so it can easily play over the HTPC speakers.

As for Vox, I use it for TTS or a play a particular alert (any macro in vox), i use alerts to play wav files by name.

--TTS Funtions
function ttsAlert(ttsAlertName)
     local socket = require("socket")
     local udp = socket.try(socket.udp())
     socket.try(udp:sendto("VC.TriggerEvent&&" .. ttsAlertName, ttsHost, 33000))
end
function ttsMsg(ttsMsg)
     local socket = require("socket")
     local udp = socket.try(socket.udp())
     socket.try(udp:sendto("tts.speak&&" .. ttsMsg, ttsHost, 33000))
end

--Bonus - Send Message Box to Media Center
function tvMsgBox(wmcTitle,wmcMsg)
     local socket = require("socket")
     tcp = assert(socket.connect(ttsHost, 40500))
     tcp:send("msgbox \"" .. wmcTitle .. "\" \"" .. wmcMsg .. "\" 5")
     tcp:close()
end

Also, have some more info here:

Still having issues.

right now I’m trying all this from a telnet connection:

GOTO ExtensibilityUrl C:\ProgramData\Microsoft\Windows\StartM~1\Programs\Accessories\MediaC~1\MediaC~1\" … GoToUrl … ".htm \r\n
returns 204 success

but nothing happens on tv

i try goto webaddin blue iris (what i named my camera short cut)
204 success

but wmc says programs stopped responding

i put goto extensibilityurl
and it says bad proxy settings


Im sure thats hard to read. Sorry.

I guess my question is

GOTO ExtensibilityUrl C:\ProgramData\Microsoft\Windows\StartM~1\Programs\Accessories\MediaC~1\MediaC~1\" … GoToUrl … ".htm

pointing to an object in your “extras library” or to an actual webpage from your camera software?

I’ve looked around the registry for an extensibility GUID or anything really that would have to do with my blue iris .mcl file but I did not find anything. I am using 7mc.

I’m assuming you have VMCController working.

I uploaded the html file this is pointing to a few posts back. You’ll need to update the path to where you put the htm file.

GOTO ExtensibilityUrl C:\ProgramData\Microsoft\Windows\StartM~1\Programs\Accessories\MediaC~1\MediaC~1\" … GoToUrl … ".htm

In my case, I put the file in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Media Center\Media Center Programs[b]Cam-Ent[/b].htm

And call it using “GoToUrl(ENT-CAM)”

this has got to be the biggest headache I’ve ever given myself.

I edited cam-ent to reflect a webpage I can pull up in IE at the wmc host.

when i click net-cam.htm it loads a page but I never get an image. I changed refresh to “3” and it does not help. when i sent the

GOTO ExtensibilityUrl C:\ProgramData\Microsoft\Windows\StartM~1\Programs\Accessories\MediaC~1\MediaC~1\ent-cam.htm

I get a your computer must be connected to the internet to use that feature
error window. Obviously it is connected to the internet. Im downloading IE 11 to see if that may help.

in case anyones following here is my proof-of-concept for my own use:

local host, port = “”, 40500
local socket = require(“socket”)
local tcp = assert(socket.tcp())
tcp:connect(host, port)
tcp:send(“GOTO ExtensibilityUrl http:///cell.htm \r\n”) --cell.htm is the only way i can actually get video
tcp:close()
luup.sleep(15000)
local socket = require(“socket”)
tcp = assert(socket.tcp())
tcp:connect(host,port)
tcp:send(“button-back” … “\r\n”)
luup.sleep(500)
tcp:send(“fullscreen” … “\r\n”)
tcp:close()

its ugly, but its my first time playing in the LUUP tab. Cell.htm brings up all camera feeds, i need to create/modify a webpage to only display the camera i want to call up. But hey it works and its an awesome feature sure to impress with a lot of practicality on top of that. Thanks Agile for all the help!!!

Don’t luup.sleep that long…you’ll occasional reboot Vera. The luup.call_delay puts in the proper delay (15 seconds) but doesn’t lock the system for 15 seconds where nothing can process.

Nice tip I believe I tried that variation but forgot to save it and ended up using my own hack job(using a scene for now, pleg after everything else is good).

Any advise on creating a webpage with a single camera feed. Is that why you use iSpy and if i remember correctly Blue Iris as well? I might be getting confused i read the whole thread a couple of times but it was in between ten others as well.

The sample I provided should work as a framework. It’s up to you to figure out the URL’s for your JPEG snapshot feed in the html file. Sorry I’m not familiar with Blue Iris.

Thanks. Just figured it out. Hope I have time to do a proper write up!

I am curious do you use any other media platforms with camera call up functionality i.e. XBMC or Apple TV?

I’m looking to do the same thing do you have that write-up. I’m using blue iris.

this sounds great…any news on a write up? Thanks

PM your email… i can send htm files you need in the www directory of blue iris… works with BI4 and 7MC. You’ll also need veraBItools plug in with wget in that directory.