Control WinAmp (on a PC) from XBMC
#1
using a winamp plug-in like wawi
winamp web interface you can send simple commands like

Quote:http://192.168.0.1/play
http://192.168.0.1/stop

and so on to control winamp compatible players on a pc.

i'd love to have a super simple xbmc script like

name: pcstopplay.py
content: http://192.168.0.1/stop

however, this seems to be too simple. anyone here who could guide me how this script suppose to look like to actually work?



Reply
#2
i trimmed down a tutorial example at
http://manual.xboxmediacenter.de/wakka.p...nscripting


Quote:import urllib,urllib2 , re
base_url = "http://192.168.0.1:90/pause"
websock = urllib.urlopen(base_url)

nice to control the mediamonkey from the xbox. Smile mediamonkey is by the way a fine tool to get the music organized.



Reply
#3
looks like you have a handle on the main code to do the control... code it up!

i posted a script that sends encoded post commands to a home automation web server, you are welcome to use it as an example and hack it to your delight to get it to fit your needs. it does some cool stuff with autocreating buttons too.

go to xbmcscripts.com and grab "home control 1.8"
I'm not an expert but I play one at work.
Reply
#4
thank you very much!

however, i find mature scripts like this a bit overwelming. i sometimes wish i could get hold of coders version 0.0.0.1 Wink

what would be cool is something like...

start script.
when script is active, xbox remote control turn out to be a pc remote.
(sending commands like
/pause
/play
/nexttrack
/previoustrack
/stop
/forward
etc.)

when hitting button "whatever" the script is cancelled and the xbox remote goes back to normal mode.

maybe that is a fair little project to start with.

please forgive me if your script do already do these things. i have yet to install it on the xbox...



Reply
#5
my script is actually pretty basic compared to the expert scripters on this forum... it is my first script.

i document my script better then most so people can learn from it and reuse as desired.

i suggest reading it over to figure out how it works or reading the tutorials and go from there.

good luck
I'm not an expert but I play one at work.
Reply
#6
you're right. having a second look at the code, i find it quite understandable. i've had one of those 'long days' so i'll give it a good study in the weekend. thank you again! i appreciate it.
Reply
#7
not a flame, but its not that hard to understand really

import urllib,urllib2 , re <------- basically tells xbmc which libraries its gonna use.

base_url = "[url]http://192.168.0.1:90/pause"[/url] <------ just a string making it easier later on.

websock = urllib.urlopen(base_url) <------ .urlopen is a function within the library which we called at the beginning. it has arguements which are contained inside the brackets. in this case the arguement needs to be a url, so instead of typing out the whole thing, and keeping the scipt neater and simpler, we just use the string we defined earlier.
Reply
#8
affini's script is a bit more complex though.

over the last week i just did a vbscript for automatically rating music, which was a cool experience. basicaly i have just started scripting, and it seems like can become a fun hobby!
Reply
#9
my script actually encodes urls for a post command. the winamp usage may be more simple, not sure.
I'm not an expert but I play one at work.
Reply
#10
the basics of sending commands to a winamp compatible player is very simple. just send the html request, and that's it. no waiting around for replies. send and the computer do.

next track | previous track | play | stop | pause | volume level, and maybe more..

i find it really handy when being in the lounge where the xbox is, and the computer 3 rooms away play music. nice to be able to skip tracks, or turn the computer music off, before using the xbox or the tv.

basic remote control functions. it is possible to take it further by manipulating playlists, but that is a bit beyond the scope really.

time do not allow me to do this at the moment. currently playing catch-up with work after doing that autoratesongs script.



Reply
#11
hello,

i'm doing a script based on this thread idea...

i called it winamprc...

the current status is quite early, but i plan to do some other stuff, like viewing/manipulating the playlist...

maybe some people are intrested in this.

you can download it from here:
http://rapidshare.de/files/18366966/winamprc.rar.html

some comments would be nice, it's my first "working" script...


the usage is quite simple: install the winamp plugin (description above) from the archive, set your pc's ip-adress in the top of the script and upload the whole folder to your scripts dir.

cheers lolol
Reply
#12
i'm stunned!! that is just beautiful!! :kickass:

what a beautiful job! far beyond what i could do!

love the script! thank you!

hope you do not mind that i start spreading the word. this may very well become a 'hot script'

in my case i have a good set of studio speakers/soundcard set-up on the computer, and the lounge only a set of 5.1 'movie/games speakers'. another step in the journey towards total couch potato.. love it Smile

pause may be good to include too. that's what i had my one-line script set to, but your script is so far beyond what i had that i just want to express my appreciation!



Reply
#13
play/pause will be also be in the script some some versions higher.

under the "more" button which is without function now, i want to set the playlist editor.

currently playing is also not working yet...

...but i think there willbe a new version today.

please don't publish to xbmcscripts, i will do at right time.... :bowdown:



Reply
#14
here's a cool feature if you can add it in...

multiple zones

winamp can run multiple instances and each instance can be assigned to a specific sound card. this allows for multiple zones.

then to take it one step further, zone syncing... being able to have multiple zones playing different things (or nothing on some zones) and then syncing some/all of the zones to play the same song/playlist.

this would allow us to have true audio zone control... if you'd impliment this, i'd definitely use it!
I'm not an expert but I play one at work.
Reply
#15
@ lolol. you're the master of your script. i simply told a few that may be in a similar situation to myself. you publish to the 'big shop' :o when you feel it's ripe.

@affini. you must have a pretty advanced setup at your place. Rolleyes i'm still at the 'thinking about it' stage, and i get a big kick out of little things like lolol just made. it's a lot of fun. sounds like you've had this kind of fun for awhile.
Reply

Logout Mark Read Team Forum Stats Members Help
Control WinAmp (on a PC) from XBMC0