Announcement

Collapse
No announcement yet.

MediaMonkey Plug-in

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MediaMonkey Plug-in

    This thread is to discuss the MediaMonkey plug-in. Located here: http://board.homeseer.com/showthread.php?t=132792

  • #2
    Boots,

    I had no luck trying to get this running - some questions/comments:

    1. What is the purpose of running MM as Administrator? What is it suppose to do? Am I suppose to run MM and then shut it down and log back in as the user that I normally use for my media players?
    2. Does the UI application run only on the client computers or the HomeSeer computer as well?
    3. At startup of the plug-in in HomeSeer, the plug-in does something that generates a request for the JIT debugger, and HomeSeer is held up from completing the startup (and probably a lot of other things) until this dialog box is responded to.
    4. Why do you only create a single device for the player? I don't understand clicking a button and then clicking refresh to get a new set of buttons, then clicking Main and refresh again to return to the main set of buttons... Why not just create 3 devices for each instance?
    5. Communication/control was never established - I had the UI app running on the client computer, and it did start MM, and then in HomeSeer I configured the client by entering the computer name, but it never was able to control the client or get information from it. Why does it ask for an associated speaker client? I have no speaker client running on the client computer where MM is running - is it required?

    I am interested in using this for remote music clients - iTunes cannot be easily remoted and the WinAMP plug-in has some issues and is not MusicAPI compliant which it appears you are trying to do. Let me know if you have questions with your plug-in that I can help with.
    Regards,

    Rick Tinker (a.k.a. "Tink")

    Comment


    • #3
      Sorry for the late response.. I didn't see the reply.

      1. What is the purpose of running MM as Administrator? What is it suppose to do? Am I suppose to run MM and then shut it down and log back in as the user that I normally use for my media players?
      Information gathered from the MM forum strongly suggests the MM does not register the COM object at install time, and probably has some user level access check before registration is attempted. So running once as the local admin registers the COM object for me to use.

      2. Does the UI application run only on the client computers or the HomeSeer computer as well?
      The UI application runs side by side to each MM instance. The application will also launch MM if it is not already running.

      3. At startup of the plug-in in HomeSeer, the plug-in does something that generates a request for the JIT debugger, and HomeSeer is held up from completing the startup (and probably a lot of other things) until this dialog box is responded to.
      More than likely I forgot to pull out my breakpoint so I could debug the plug-in.

      4. Why do you only create a single device for the player? I don't understand clicking a button and then clicking refresh to get a new set of buttons, then clicking Main and refresh again to return to the main set of buttons... Why not just create 3 devices for each instance?
      This behavior is browser specific. IE will refresh the page and get the newest buttons. FF does not. Since you can have N instances running keeping the number of control devices down increases the usability. I also wanted to avoid the 'button clutter' if all the controls were in one spot.

      This is by no means final solution. I might be forced to have multiple control devices per instance.

      5. Communication/control was never established - I had the UI app running on the client computer, and it did start MM, and then in HomeSeer I configured the client by entering the computer name, but it never was able to control the client or get information from it.
      I'll need to put it some detailed logging to resolve this issue.

      Why does it ask for an associated speaker client? I have no speaker client running on the client computer where MM is running - is it required?
      To make the system "smarter", if HS is about to speak to a client and MM was currently playing on that client, I want to pause MM, allow HS to speak, then resume the music. This will allow the user to hear the HS message. Also if a HS message was targeted to a speaker client other than what MM is running on, then there is no need to pause that one.

      This will not be mandatory in final.
      Last edited by BootsC5; January 22nd, 2009, 04:48 PM.

      Comment


      • #4
        For anyone who is following this here is the latest goings on:

        Getting Artwork for HSTouch broke near .16. I posted some comments why I think it broke here: http://board.homeseer.com/showpost.p...&postcount=114

        Rick, if you could take a look at that and see if I am correct. If not, please help me figure out how to get it working again.


        When I went to add in a second remote instance everything broke. Apparently Microsoft does not like people remoting the same type of object from multiple servers... So I am now reversing the remoting direction.

        What does this mean to non developers? Multiple instance did not work the way I would have liked, and I am working on a new way to do it. The design is a little bit more complex, but it is "better". One of the nice things I will be able to do in this design is when you setup the remote MM instance it will register itself with the HS box and create a HS device that will be mostly configured (should be all but the speaker client information)

        Most of the required music functions, defined by HS, I have implemented.

        Comment


        • #5
          Boots,

          I will look at the thread you referenced after I post this. However, on the multi-instance thing - my suggestion is that you throw away DCOM. Not only throw it away, but run away fast from it. Microsoft provides too many opportunity for headaches - you do not need to find more. ;-)

          If you know how to TALK to multiple instances through the MM COM interface, then why not implement your own client/server connection? I could help with that if you like by providing some VB.NET code for each side if you want and if it will help.

          I think if you write your own TCP or UDP based connection, that you will be much better off, and it will allow you to transfer the images across the network as well.
          Regards,

          Rick Tinker (a.k.a. "Tink")

          Comment


          • #6
            Originally posted by BootsC5 View Post
            Information gathered from the MM forum strongly suggests the MM does not register the COM object at install time, and probably has some user level access check before registration is attempted. So running once as the local admin registers the COM object for me to use.
            Understood. Since MM started, I'm assuming that the registration was successful.

            Originally posted by BootsC5 View Post
            This behavior is browser specific. IE will refresh the page and get the newest buttons. FF does not. Since you can have N instances running keeping the number of control devices down increases the usability. I also wanted to avoid the 'button clutter' if all the controls were in one spot.

            This is by no means final solution. I might be forced to have multiple control devices per instance.
            OK - you caught me - I use FF.
            I put some formatting options for the buttons in a HomeSeer release long ago - so long ago I can't remember when. Not even sure if they are still there, but they were for that purpose - so people could lay the buttons out in such a way that they would look nice if you had a lot.
            So here is another option - no devices. What about having a web page where you could see control options for all of the instances at once, or a drop down selector to pick an instance, and then the control options for that one instance?
            You could provide an option that the user can choose to have a device created, since some plug-ins (like TiVO) use the Device Control API, and so having a device would be necessary for it. In this case, all of the buttons on one device would be acceptable because it is not for purposes of being the main UI. At least if you provided a device for control only, it might not need all of the buttons. Nonetheless, having 3-4 devices per instance is not all that bad IMHO - people will put them in locations that separate the instances, or they will name them in such a way as to separate them. If you decide to do that and want help, let me know - the IOMISC property is a good place to store information in the device so you can find it even if the user totally renames the device or changes its address.


            Originally posted by BootsC5 View Post
            To make the system "smarter", if HS is about to speak to a client and MM was currently playing on that client, I want to pause MM, allow HS to speak, then resume the music. This will allow the user to hear the HS message. Also if a HS message was targeted to a speaker client other than what MM is running on, then there is no need to pause that one.
            Registering the plug-in for the audio events will take care of this - HomeSeer sends you another kind of HSEvent notification which you can use to send a pause/resume signal to the clients.
            Regards,

            Rick Tinker (a.k.a. "Tink")

            Comment


            • #7
              Microsoft provides too many opportunity for headaches - you do not need to find more. ;-)
              I was recently forced (thanks male pattern baldness!) to start shaving my head, so I don't have anything to left to pull out.


              .NET Remoting takes care of most the client/server stuff for me, and as you know, I just use the object as if it was local. That is the biggest plus for me. The down side is handling disconnects. I wanted to spend the majority of my time on getting the music to play than the creating the scaffolding to be able to get the music to play.


              I think if you write your own TCP or UDP based connection, that you will be much better off, and it will allow you to transfer the images across the network as well.
              This wasn't an issue in my old scheme (assuming MM was also on the HS box in a shared lib scenario)... now its just a little but more difficult to stream the image file back to the HS box, but not impossible.


              I put some formatting options for the buttons in a HomeSeer release long ago - so long ago I can't remember when. Not even sure if they are still there, but they were for that purpose - so people could lay the buttons out in such a way that they would look nice if you had a lot.
              I didn't see any formatting info in the SDK, but then I did not look that hard for it. If it is there I'll see what I can do.

              What about having a web page where you could see control options for all of the instances at once, or a drop down selector to pick an instance, and then the control options for that one instance?
              That is one of the things I wanted to work on once I could get things to play. I was going to approach you guys to ask if I could replicate/license the L&F you have for the iTunes/WMP web pages so everything was consistent.

              the IOMISC property is a good place to store information in the device so you can find it even if the user totally renames the device or changes its address
              I'll have to look into that one.. I was saving the deviceref in my config file.


              Registering the plug-in for the audio events will take care of this - HomeSeer sends you another kind of HSEvent notification which you can use to send a pause/resume signal to the clients.
              I think I registered it as a speaker proxy. This told me what instance (a.b.c.d or *) was talking. From that information I could pause the apporiate MM... if you have this logic rolled into the base HS then I'd rather use that... I'll look into it.

              Comment


              • #8
                K - you caught me - I use FF.
                Speaking of which... can you add a bug report that the browsers (FF at least) do not refresh properly when a control button is used. This is not limited to just the control buttons but also the status icon if you use the on/off buttons.
                Last edited by BootsC5; January 22nd, 2009, 10:15 PM.

                Comment


                • #9
                  No need - since I use FF I have been aware of that for a VERY long time.

                  We have coded changes in HS for pretty much all of the places where FF fails except for two - the select-all devices/events checkbox at the top of the status/events pages, and the status update when you control a device. To fix these requires some time that we do not presently have, and we also want to re-vamp the status page entirely anyway, so we are hoping to be able to do that soon.

                  The Check-All buttons fix just needs a VBScript procedure to be converted over to JavaScript (anybody who knows those two well, feel free to look at the page source and send me the fixed code and I will implement it immediately). The other involves some specific browser code that I have not had a chance to look up.
                  Regards,

                  Rick Tinker (a.k.a. "Tink")

                  Comment


                  • #10
                    For anyone monitoring this... a quick little update.

                    As Rick pointed out... DCOM/Remoting is a PITA, and I and currently rolling my own network service. It is going along pretty well, most of the controls at the MM workers are wired up and then I will move to the plug-in controller.

                    Comment


                    • #11
                      Alpha 2 download link. Information pertaining to this are located at this thread: http://board.homeseer.com/showthread.php?t=132792
                      Attached Files

                      Comment


                      • #12
                        Alpha 3:
                        Attached Files

                        Comment


                        • #13
                          Boots,

                          I'm trying to control MediaMonkey running on a remote machine from my HS2 machine. When I run MediaMonkeyRemote.exe on the remote machine, I get the error message below.

                          No other instances of MediaMonkey are running. I have MM 3.0.5 Gold installed. Both machines are running XP Pro.

                          I tried this on another machine running W2K and I get the Windows "MediaMonkeyRemote has encountered a problem and needs to close..." error.

                          I ran MM on both remote machines as Administrator.

                          I use another MM control application for my iPhone (iMonkey.exe) and it starts MM just fine. (In fact, after I ran MM as Administrator, the "com" error message I was getting when MM was closed went away!)

                          Any ideas?
                          Attached Files

                          Comment


                          • #14
                            That message is only shown when the remote app can not create/attach to an instance of MM. Typically when MM has never been run as admin, or there is a copy of MM floating around.

                            Check the task manager to make sure there are infact no other instances of MM (sometimes they exist without a window showing).

                            Beyond that I don't have any ideas. Sounds like I need to add some more debug logging around that.

                            Comment


                            • #15
                              Boots,

                              After a reboot, I checked Task Manager again, and no other instances of MM are running.

                              I've tried running MediaMonkeyRemote.exe from both the "C:\Program Files\MediaMonkey" folder, and the "C:\Program Files\HomeSeer HS2" folder. Both result in the same error message.

                              I understand what you're saying about running MM as Administrator. Before, when I used iMonkey (to allow MM to be controlled from my iPhone), I would get messages about the "com" object still being loaded when MM was closed. But ever since I followed your suggestion of running MM as Administrator, those messages have disappeared. (Thanks!)

                              If you add more debug logging to MediaMonkeyRemote.exe, I'll be happy to try it out and report back. (Something you might consider, iMonkey.exe writes all of it's actions to a log file to help in debugging errors.)

                              -Charlie

                              Comment

                              Working...
                              X