jachin99 82 Posted May 16, 2019 Share Posted May 16, 2019 (edited) I have a working program that feeds windows media center events on TCP port 40400, and controls WMC via http on port 40510. It is also said to control Media Center Extenders but I haven't tested that. Its a fork of VMC controller that has been updated to run windows 7, and excludes some EPG functionality because the EPG API was changed in the move from Vista to Win 7. This program includes assemblies to to receive events from WMC over TCP, and control WMC over TCP & HTTP. I have not been able to get the TCP Control part to work but the same task can be accomplished via HTTP, and the TCP event feed does work. I didn't write this myself but I think it is a good starting point because I can use this software to both receive events from WMC, and control it. I have been testing the event stream for around two weeks, and I haven't had any issues with connection losses, or loss of remote control like I did with other versions of VMC controller. I get events for these occurances among others... -Pause, Play, Stop, Seek, and other transport controls -Navigation of the built in wmc menus (DVD, Recorded TV, Live TV, TV Guide, etc.), -Media names (House Hunters, Law & Order, Avengers, whatever media item is in the now playing window of WMC) This includes music artist, and track names -Media track lengths, and now playing times This should be a full list of the HTTP commands WMC can receive taken from VMC Controller's sourceforge page although I haven't test each (I'm more than willing to) button-rec - sends key to application button-left - sends key to application button-up - sends key to application button-right - sends key to application button-down - sends key to application button-ok - sends key to application button-back - sends key to application button-info - sends key to application button-ch-plus - sends key to application button-ch-minus - sends key to application button-dvdmenu - sends key to application button-dvdaudio - sends key to application button-dvdsubtitle - sends key to application button-cc - sends key to application button-pause - sends key to application button-play - sends key to application button-stop - sends key to application button-skipback - sends key to application button-skipfwd - sends key to application button-rew - sends key to application button-fwd - sends key to application button-zoom - sends key to application button-num-0 - sends key to application button-num-1 - sends key to application button-num-2 - sends key to application button-num-3 - sends key to application button-num-4 - sends key to application button-num-5 - sends key to application button-num-6 - sends key to application button-num-7 - sends key to application button-num-8 - sends key to application button-num-9 - sends key to application dvdrom <open|close> - Opens and closes the default dvd drive door msgbox "caption" "message" <timeout seconds> goto <ExtensibilityUrl|FMRadio|InternetRadio|LiveTV|ManageDisks|MovieLibrary|MorePrograms|MusicAlbums|MusicArtists|MusicSongs|MyMusic|MyPictures|MyTV|MyVideos|PhotoDetails|RecordedTV|RecorderStorageSettings|ScheduledTVRecordings|Slideshow|SlideshowSettings|Start|TVGuide|Visualizations|WebAddIn> <optional page parameters> playrate <Stop|Pause|Play|FF1|FF2|FF3|Rewind1|Rewind2|Rewind3|SlowMotion1|SlowMotion2|SlowMotion3|SkipForward|SkipBack> position <seconds> fullscreen - moves the current media playback experience into full-screen mode version - returns the version of MediaCenter capabilities - returns a key value pair list of device capabilities volume <0-50|Up|Down|Mute|UnMute> play-audio <The URL of the audio to play> play-video <The URL of the audio to play> play-dvd <A string in the following format: //path? address> http://msdn2.microsoft.com/en-us/library/ms814628.aspx play-radio <A string in the following format: band:nn.n or band:nn,n, depending on the locale. For example, "fm:103.1" or "fm:103,1". For band, only FM is currently supported> play-tv <A string representing the call sign of the service to play, or channel number> play-dvr <The URL of the video to play> queueaudio <The URL of the audio to play> schedule <recording|recorded|scheduled> epg-lineup <all|channel,channel...> epg-onnow <all|channel,channel...> epg-details <all|channel,channel...> window-close - sends command to Media Center Window window-minimize - sends command to Media Center Window window-maximize - sends command to Media Center Window window-restore - sends command to Media Center Window changer-load <Slot Address> Beta 1 & 2 added: Exit - closes the connection (not useful via http) (note had to expost function CloseClient() to support) mediametadata - returns information on the currently playing media (artist, title, album, etc - varries based on what is playing) playrate-get - shows the current playrate of the currently playing media playstate-get - shows the current playstate of the currently playing media postition-get - shows the current position of the currently playing media type - sends a string to the application list-artists <filter>- returns a list of artists in the library (very slow - my 1K artists takes 1 minute to return) list-artist-songs <filter | index> - returns a list of songs by a given artist (using the index returned by list-artists makes this fast) list-artist-albums <> - returns a list of albums by a given artist (using the index returned by list-artists makes this fast) list-albums <filter | index> - returns a list of songs by a given artist (using the index returned by list-artists makes this fast) list-album-songs <filter | index> - returns a list of songs by a given artist (using the index returned by list-artists makes this fast) list-all-custom list-artist-custom list-album-custom list-song-custom play-audio-artist <filter | index> - plays all songs by first matching artist (using the index returned by list-artists makes this fast) play-audio-album <filter | index> - plays all songs on the specified album by index, or the first album by the first matching artist (using the index returned by list-artists makes this fast) play-audio-song <filter | index> - plays the specified song by index, or the first song by the first matching artist (using the index returned by list-artists makes this fast) queueaudio-artist <filter | index> - same as play, except adds to the queue queueaudio-album <filter | index> - same as play, except adds to the queue queueaudio-song <filter | index> - same as play, except adds to the queue beta 3: added the music / photo commands: music-list-artists - lists matching artists music-list-album-artists - lists matching album artists music-list-albums - list matching albums music-list-songs - list matching songs music-list-details - lists info on matching songs / albums / artists music-list-genres - list matching genres music-list-recent - lists recently played / queued commands music-play - plays matching songs music-queue - adds matching songs to the now playing list music-cover - serves the album cover of the first match music-clear-cache - forces the cache to be cleared (normally only happens when the music library's length changes) music-stats - lists stats (Artist / Album / Track counts, cache age, available templates, etc) photo-clear-cache - Forces the index cache to reset (otherwise only resets when the number of photos changes) photo-list - Lists all the matching images found in the photo collection photo-play - list / play from photo collection photo-queue - list / play from photo collection photo-tag-list - Lists all the tags found in the photo collection photo-serv - Serves the photo to a web browser (all filters apply, first or random matching image is returned) photo-stats - Lists stats of the current querry (filters, counts, etc) You will notice that all of these queries deal with Music & Photos. What I did not find is a way to programmatically query WMC for Movies, and Recorded TV shows. There are other programs that do that his however they rely on the user pointing the program to the folder where movies or TV shows are stored, and indexing its contents. Frontview will have to do the same BUT I believe there are classes included my WIn 7 VMC controller that already accomplish this via the EditDVRMSMetadata class, which you should find in the attached source code. I chose this version of VMC controller because it is working for me, and I have the source. One thing I cannot get to work properly is the TCP control functionality however I can still control WMC via HTTP. I also want to take a minute and explain that VMC Controller has been forked MANY times, and there is updated code for it floating around the internet. I don't know how easily updates will bolt on to my existing code. Installing any of these updated programs over the files I am providing breaks VMC Controller permanently for me. I can go into more detail or discuss different ways to go about this project if need be but for the time being I want to provide you with what I have and get your thoughts on my proposal. Thanks again for your time, and here are the files. I used eventghost to test this but any telnet client such as putty should work. https://drive.google.com/open?id=1zj_Fd7WQQmIhzhqssjtXM_H25nXyQgqJ Edited May 16, 2019 by jachin99 Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted May 16, 2019 Author Share Posted May 16, 2019 Thanks, I’ll have a look. The basic support I’m happy to look at is changing Frontview to the ‘now playing’ screen with details and fanart, when playback starts. For that to work Frontview needs details of what is playing; name, season, episode, thumb art, background fan art etc. This is what Frontview needs from any WMC solution. Glenn Sent from my iPad using Tapatalk Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted May 17, 2019 Author Share Posted May 17, 2019 Hi Mate, Sorry, but scrub that last reply - what you have here is the whole vmcController source/program tinkered with to work on your setup. Basically what is required is to re-write vmcController to work from within Frontview. Doesn't strike me as the most stable solution for a media Playback computer where the odd crash here and there is far from fine. Also would be a shit-ton of work; might as well start again really and re-write another frontview program based on vmcController. I have created a empty/does not work Remote for WMC: Located here: (include csproj file) https://github.com/Ghawken/FrontView/tree/master/FrontView/Plugins/Remote.WMC Welcome to download and build - will create a plugin dll for frontview which will show up when put in the plugins folder as a selectable option. Welcome to see if can get vmcController sink code working from within by modifying as required. The code is pretty straight-forward, with API/Xbmc.cs being inital can connect code, and Api/XbmcPlayer.cs being the code that checks for new media playing and forwards details. Like Plex would only worry about nowplaying details and not library. As you can see is based on Plex current code, and there are a few Plex references that need to be removed etc. Best of Luck Glenn Link to comment Share on other sites More sharing options...
jachin99 82 Posted June 17, 2019 Share Posted June 17, 2019 (edited) After looking through the WMC SDK documentation to find ways around using the MSAS sink I found some information about retrieving metadata for the currently playing media BUT if WMC detects that its using Live TV it will return a null value. Here is a link https://docs.microsoft.com/en-us/previous-versions/windows/desktop/windows-media-center-sdk/bb189336%28v%3dmsdn.10%29 and here are the contexts and properties that are exposed. I'm posting this as a reference for others more than anything but I may play around with your template and this SDK just for the learning experience. Just to be clear the table in the web link utilizes the object model, and NOT a media sink which is the most current way to get now playing info for WMC. This should work for everything EXCEPT Live TV Edited June 17, 2019 by jachin99 Link to comment Share on other sites More sharing options...
Guest Posted July 16, 2019 Share Posted July 16, 2019 Hi Glenn, long time no speak, I hope all is well! There was a Plex Media Server update today and now Frontview isn't working It's been working flawlessly for months, are you still supporting Plex, anything I can do? Thanks! Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted July 17, 2019 Author Share Posted July 17, 2019 Hi Glenn, long time no speak, I hope all is well! There was a Plex Media Server update today and now Frontview isn't working It's been working flawlessly for months, are you still supporting Plex, anything I can do? Thanks! Hi Lisa, still not really supported still I'm afraid. . . . But https://github.com/Ghawken/FrontView/releases/tag/1.295 Think I have fixed, and updated above - replace the plex dll in FrontView/Plugins folder with this one, and let me know! Glenn Link to comment Share on other sites More sharing options...
Guest Posted July 17, 2019 Share Posted July 17, 2019 (edited) Glenn, thank you for the response, I really do appreciate your help and time, I know that Plex is not fully supported, but I really enjoy using Frontview, and can't quite got on with Emby or Kodi. Unfortunately the new Plex remote didn't work. If you have any time to look at it, I have grabbed some logs and outputs that might help, and I'll attach them here. I haven't touched Frontview in 2 years, it has been working perfectly for all that time! So, I was on an older version. I tried the latest version, same result. I also tried a complete uninstall and re-install, same result. If I use the new remote Plex from the start, it does not show up in the drop down menu of remotes to pick, I have to install the old remote, configure it, then copy the new remote.dll over the top. I rebooted the PC after just to be sure, but it didn't spring to life, sadly. Let me know if there is anything more I can do this end. FrontView+.log output.txt Edited July 17, 2019 by Guest Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted July 17, 2019 Author Share Posted July 17, 2019 (edited) OkSeems that windows .net won’t load a Dll file downloaded from internet.... hence doesn’t load and won’t work.I’ll see if I can package the whole thing up .. give me a sec Done: Check the github release again - created the whole installer - pretty sure will work....https://github.com/Ghawken/FrontView/releases/tag/1.295 Sent from my iPad using Tapatalk Edited July 17, 2019 by GlennNZ Link to comment Share on other sites More sharing options...
Guest Posted July 17, 2019 Share Posted July 17, 2019 It works Thank you so very much! Link to comment Share on other sites More sharing options...
jachin99 82 Posted July 18, 2019 Share Posted July 18, 2019 Glenn, have you looked at adding support for JRiver? I know there are a few others who run that and have second screens. Their API doesn't change all that often either so I think the upkeep would be minimal. They recently started making a 64 bit version of their software and I think that broke some of the other plugins that ran on these second screens. Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted July 21, 2019 Author Share Posted July 21, 2019 Glenn, have you looked at adding support for JRiver? I know there are a few others who run that and have second screens. Their API doesn't change all that often either so I think the upkeep would be minimal. They recently started making a 64 bit version of their software and I think that broke some of the other plugins that ran on these second screens. Good suggestion - although don't really need more support work.. Anyway - new version 1.300 which adds Remote control of JRiver software (both local and network library) Glenn 1 Link to comment Share on other sites More sharing options...
Guest Posted July 27, 2019 Share Posted July 27, 2019 Glenn, so sorry, another Plex server update has occurred and now no Frontview I attach the log and output - if you do find time to look at it, it would be very much appreciated! sessions.xml FrontView+.log Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted July 27, 2019 Author Share Posted July 27, 2019 (edited) Glenn, so sorry, another Plex server update has occurred and now no Frontview I attach the log and output - if you do find time to look at it, it would be very much appreciated! Ok - have checked and either Plex Server or Plex Media Player have broken something. Was working fine with all the endpoints and then both needed update. After update Plex Media Player is not being reported by the server in either the /clients endpoint or the new /resources endpoint. It is simply not there - which means Frontview never finds the local playback client. Presume this Plex breaking error will be fixed at some stage soonish. (I have reported it on the Plex Media Player github, even though may be server error) https://github.com/plexinc/plex-media-player/issues/882 Welcome to post issue in Plex Server forums (obviously as closed source can't see or post about the server at github) Glenn Edited July 27, 2019 by GlennNZ Link to comment Share on other sites More sharing options...
Guest Posted July 28, 2019 Share Posted July 28, 2019 Thanks Glenn. Link to comment Share on other sites More sharing options...
Guest Posted October 7, 2019 Share Posted October 7, 2019 Hi, just a quick update to say that everything seems to be working again with the latest versions of Plex Media Player and Plex server Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted October 8, 2019 Author Share Posted October 8, 2019 [emoji1303] Pity it took them a while to fix .... Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Guest Posted October 8, 2019 Share Posted October 8, 2019 Hi Glenn, Apologies, I may have spoke too soon I have discovered something very odd, which I must have triggered by accident yesterday, when I was messing around with my system and trying out different players. When I first boot my HTPC, Frontview auto starts with Windows, and has Plex set as the default remote. I then open Plex Media Player, start playing back some media, and Frontview does not respond. If I then close Plex Media Player and go to an old Plex Player, Open PHT: https://github.com/RasPlex/OpenPHT/releases Start playing back media, and Frontview works Close OpenPHT, go back to PMP, and Frontview still works It's lovely to have Frontview working with the latest PMP release, but a bit of a pain to have to do this every time though, does it make any sense to you? Latest release here in case you need it: https://forums.plex.tv/t/plex-media-player/120475/88 Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted October 8, 2019 Author Share Posted October 8, 2019 (edited) Unfortunately that does seem like the same issue, where PMP does not report itself unless it’s playing. Seems like the old player correctly reports itself (as PMP did) and then everything continues. Does seem like they are dragging feet. Will have a look and see if can bypass when can Glenn Sent from my iPad using Tapatalk Edited October 9, 2019 by GlennNZ Link to comment Share on other sites More sharing options...
jachin99 82 Posted October 9, 2019 Share Posted October 9, 2019 Glenn, frontview is having issues downloading coverart for JRiver. I'm not sure if it is something on my end or what but here is a link to a thread I made over there about it. https://yabb.jriver.com/interact/index.php/topic,121511.0.html Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted October 10, 2019 Author Share Posted October 10, 2019 Hi Glenn, Apologies, I may have spoke too soon I have discovered something very odd, which I must have triggered by accident yesterday, when I was messing around with my system and trying out different players. When I first boot my HTPC, Frontview auto starts with Windows, and has Plex set as the default remote. I then open Plex Media Player, start playing back some media, and Frontview does not respond. If I then close Plex Media Player and go to an old Plex Player, Open PHT: https://github.com/RasPlex/OpenPHT/releases Start playing back media, and Frontview works Close OpenPHT, go back to PMP, and Frontview still works It's lovely to have Frontview working with the latest PMP release, but a bit of a pain to have to do this every time though, does it make any sense to you? Latest release here in case you need it: https://forums.plex.tv/t/plex-media-player/120475/88 Try release 1.304 - think have fixed the Plex issue (may have downstream issues yet to think of) but pretty sure will fix your current issue. Glenn Sent from my iPad using Tapatalk Link to comment Share on other sites More sharing options...
Guest Posted October 10, 2019 Share Posted October 10, 2019 Hi Glenn, thanks for working on it, I am afraid it wasn't successfull. No response from Frontview with PMP at all, until I switch to OpenPHT and play back something from the Plex server (on another machine) for a couple of seconds, then Frontview works with OpenPHT, and continues to work when I switch back to PMP. Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted October 10, 2019 Author Share Posted October 10, 2019 Hi Glenn, thanks for working on it, I am afraid it wasn't successfull. No response from Frontview with PMP at all, until I switch to OpenPHT and play back something from the Plex server (on another machine) for a couple of seconds, then Frontview works with OpenPHT, and continues to work when I switch back to PMP. Can I have a debug and trace log? Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Guest Posted October 10, 2019 Share Posted October 10, 2019 (edited) FrontView+.logIt's been a while, and I can't remember what they are! Here is the log file though, do you need something else? Edited October 10, 2019 by Guest Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted October 10, 2019 Author Share Posted October 10, 2019 FrontView+.logIt's been a while, and I can't remember what they are! Here is the log file though, do you need something else? Thanks Will have a look soon - that’s what I needed! I did test Plex and worked okay on my testing.... Double check the remote is connecting to the Plex Server IP and username in FV is email / password for Plex FV should then only show the player running on the same computer as it (based on IP addresses). If local FV computer has multiple IP address / multiple network connections might cause issue ... Glenn Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Guest Posted October 10, 2019 Share Posted October 10, 2019 Thanks Glenn. I think I am all compliant in that set up. Plex server is running on another computer with a static IP of 192.168.1.1 HTPC where FV is intalled is just on the home network, and set up as you describe. It's very odd that it works for you and not for me. Also odd that OpenPHT works, and after that so does PMP. But PMP won't connect with FV on first boot, until I run OpenPHT. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now