Announcement

Collapse
No announcement yet.

Winamp - HS Control Script

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

  • #16
    Thanks to mycrobytes for providing the original script!

    Hi Dan,

    I think you would have to give it a try to determine if this method is right for your system. I'm simply using this within my local network as a winamp remote control. I am attaching some of the files I used to get this to work including my personally modified JaniWinamp.vbs. Also, I have found Notepad++ to be very helpful for vbs script editing. I have no official programming training aside from a single university class in java, so I can't answer too many in depth questions about correct syntax etc.

    I'm attaching two .txt scripts used to create a PlayPause event and a SendVolume event.

    The PlayPause event calls the PlayPause() Sub in JaniWinamp.vbs and is used to act as a Play function, when winamp is stopped (to start from a stopped position) as well as a pause function while winamp is playing (to pause the song).

    The SendVolume event is used to send the deviceValue of the device PlayerVolume (renamed from strPlayerVolume from the original) back to winamp only when the device value changes ie. when the slider is moved.

    Because of this, you will need to change the Trigger tab under Homeseer Events to be triggered when this device value changes after you install the event.

    Also included, are my modified JaniWinamp.vbs script and the startup_x.vbs (with fixes mentioned above).

    Let me know if I can be of any more help. Here is a picture of my current GUI.

    Ben
    Attached Files

    Comment


    • #17
      Ben,

      Thank you for posting! The hs.WaitSecs isn't really needed and provides an error because there is no value associated with it. I've combined your stuff with the original "tweaked" scripts to make an easy install Event (for the Homeseer portion) that mycrobyte might consider in his next release.

      By creating a manual event (Group = JaniWinAmp) named Install JaniWinAmp with the following Run Script Actions (remembering to check "Wait for script to finish" for each one), all of the Events, Devices and buttons will be installed and ready for the tweaking (triggers) that you mention.

      InstallJaniEvents.txt<BR>EnableJaniEvents.txt<BR>CreateJaniD evices.txt<BR>CreateJaniButtons.txt
      My modified combined versions (your input ) of the scripts are attached (txt files only; to be used with Ben's vbs files in the zip file in the previous post).

      mycrobyte - if you release a new package and wish for me to delete my attachment to avoid confusion, just let me know.
      Attached Files
      Last edited by ameridan; October 28th, 2010, 08:07 PM.

      Comment


      • #18
        File Selector? Launch an Application?

        I am now trying to figure out a way to select a file (or playlist) from a list displaying these items. Ideally, a list box element would be able to return a list of files or playlist .m3u files from a local hard disk folder and allow you to select which file to run locally. By locally, I mean on the HSTouch server machine running winamp.

        Any ideas on how to accomplish something like this? I would love to be able to choose and run one of my 20+ playlists from the phone.

        Ben

        Comment


        • #19
          Ben,

          I don't use HSTouch (which is what I am finding the code and what'not on this page is really for), but I have a webpage I use, I designed for my whole house Audio. It reads a directory that you preset in it. It then presents all the playlists in there. It also supports directories.

          So, I have a Dan directory, my wife has hers, and there is a Holiday one. Then at the root, there are just a bunch of frequently used playlists.

          You might have to modify it to suit your needs, but I'd be willing to share it, assuming you left the notes in the code (as I borrowed code from others, so we need to make sure that they are properly labeled as the authors).

          I will probably be looking more in detail at this code soon, as IF it can work with multiple Zones, I STILL need to get the current playing song as feedback to the user (at least for local...for remote shoutcasting, it can be polled by the user).

          --Dan
          Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

          Comment


          • #20
            Originally posted by keystonega View Post
            I am now trying to figure out a way to select a file (or playlist) from a list displaying these items. Ideally, a list box element would be able to return a list of files or playlist .m3u files from a local hard disk folder and allow you to select which file to run locally. By locally, I mean on the HSTouch server machine running winamp.

            Any ideas on how to accomplish something like this? I would love to be able to choose and run one of my 20+ playlists from the phone.

            Ben
            I think it may be possible, it would involve some scripting using the file system object to loop through a directory then build a string of the names of the files - then using the command hs.devicevalueadd you would add each entry to a value box in the HS webserver, then status track this device to a box in HSTouch. To then select the playlist you would need another sub or script which used the selected value, sent this to a script and then passed it to winamp.

            It may not be 100% accurate and I would avoid over complicating it (ie having album/artists/genres), a couple of things do come to mind one at the moment is detecting changes in the directory (you could run the box populate script once an hour [or manually], but not sure if the values disappear in HSTouch for the moment it clears the box)...
            My Plugins:

            Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
            Yeelight 3P | Nanoleaf 3P

            Comment


            • #21
              Originally posted by drozwood90 View Post
              Ben,

              I don't use HSTouch (which is what I am finding the code and what'not on this page is really for), but I have a webpage I use, I designed for my whole house Audio. It reads a directory that you preset in it. It then presents all the playlists in there. It also supports directories.

              So, I have a Dan directory, my wife has hers, and there is a Holiday one. Then at the root, there are just a bunch of frequently used playlists.

              You might have to modify it to suit your needs, but I'd be willing to share it, assuming you left the notes in the code (as I borrowed code from others, so we need to make sure that they are properly labeled as the authors).

              I will probably be looking more in detail at this code soon, as IF it can work with multiple Zones, I STILL need to get the current playing song as feedback to the user (at least for local...for remote shoutcasting, it can be polled by the user).

              --Dan

              Wow, I was looking to do something like that for years! Is there a chance you can share the methot/plugins you use to be able to browse music by folder?

              Is there's a way to use Winamp as the main music player with that setup? I hate the way other players work with their "library" type of music organisation...

              Comment


              • #22
                Jack,

                It's a custom webpage and I only use Winamp for my Zones.

                I've since moved to HSTouch, but there is a problem with a dynamic listbox. So, I still use the webpage to select the playlist. Plus, webpages as sometimes easier to deal with.

                I'll send myself a note to try to put all this together into a page/script to post for tomorrow or so. Give me a few days to make sure I've got all the files.

                It really wasn't that hard to put together. In fact using that file, I put together something for someone else, where it reads in the files in a directory, then plays a passage from the Bible or something like that, one a day. Dunno if they still use it...but it's really easy to edit/modify.

                Some of the code in there was not mine, so if you do edit/redistribute, please leave their names on the code as the source authors.

                --Dan
                Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

                Comment


                • #23
                  Originally posted by JackStone View Post
                  Wow, I was looking to do something like that for years! Is there a chance you can share the methot/plugins you use to be able to browse music by folder?

                  Is there's a way to use Winamp as the main music player with that setup? I hate the way other players work with their "library" type of music organisation...
                  At last someone else like me

                  For years I have wanted to just browse by DIR structure and select either a single song or a folder / album and it seemed that I was the only one.

                  Anyway, I now use Browseamp, a winamp plugin, no longer developed, wit winamp running on the HS pc, I map a networked drive to my music (on another pc) and it does just what you want...

                  HOWEVER: the downside is the graphic look of browseamp sucks... I did try once to code a new frontend but I have no idea about it.

                  Ill grab a couple of screen shots in a second and post them here.. it MAY be what your trying to do.

                  TrOjAn
                  Attached Files

                  Comment


                  • #24
                    TrOjAn,

                    Seems like you could be using Jon's mp3 player.

                    --Dan
                    Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

                    Comment


                    • #25
                      Mine is not pretty by any means, but it's purpose was to be an in an IFRAME, which allowed it to be embedded in MANY applications/webpages that I use.

                      Provided a single point of failure/success, single place to put the code, and allowed all the "fancy" stuff to be around the page. It pretty much allows for a nice cross platform use, at least combined with the rest of the support files.

                      You'll need 3 webpages, 1 image and the support script / events.

                      The support script is 90% good for auto-generation of Virtual devices that it uses. It works...mostly. You'll have to play with it or just generate your own virtual devices for it.

                      Two webpages use each other to "setup" configure the Winamp Zone and also to display and choose which zone/playlist you are using.

                      The 3rd webpage kind of ties into what is in this thread. Just allows control over the Zone. I was going to use this, but by the time that project rolled back around, I was using HStouch...so I just tied HStouch into the control script. Never had to go any further than that.

                      --Dan
                      Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

                      Comment


                      • #26
                        Originally posted by drozwood90 View Post
                        TrOjAn,

                        Seems like you could be using Jon's mp3 player.

                        --Dan
                        Nope, its winamp running browseamp and those screens are on the HSTouch.. does what I want but always on the lookout for better ways

                        TrOjAn

                        Comment


                        • #27
                          T,

                          That's what I mean, you COULD be using Jon's MP3 player instead of browseamp...have you looked at it?

                          --Dan
                          Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

                          Comment


                          • #28
                            Originally posted by drozwood90 View Post
                            T,

                            That's what I mean, you COULD be using Jon's MP3 player instead of browseamp...have you looked at it?

                            --Dan
                            I would not recommend it now as it has reached EOL.
                            Jon

                            Comment


                            • #29
                              Jack,

                              Sorry, I forgot about you!

                              I had the webpage open on my laptop at home so I would not forget, but I've not used my laptop in...well, my last post to this thread was Jan 30. Wow, sorry about that!

                              I'll get something packaged up and over to you. Man, stuff stacks up. I've got to do this and mail out some packages that someone else on the forum here is waiting on me for. Dang work, keeps getting in the way of my doing stuff!

                              --Dan
                              Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

                              Comment


                              • #30
                                Jack,

                                do you still need this? I actually forgot about this (have not used my laptop in a while...got a new phone so I've not really used the laptop much).

                                --Dan
                                Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

                                Comment

                                Working...
                                X