Posts: 3,746
Joined: May 2004
Reputation:
20
Livin
Posting Freak
Posts: 3,746
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.
Posts: 3,746
Joined: May 2004
Reputation:
20
Livin
Posting Freak
Posts: 3,746
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.
Posts: 16
Joined: Apr 2006
Reputation:
0
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.
Posts: 13
Joined: Apr 2006
Reputation:
0
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.
Posts: 16
Joined: Apr 2006
Reputation:
0
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!
Posts: 3,746
Joined: May 2004
Reputation:
20
Livin
Posting Freak
Posts: 3,746
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.
Posts: 16
Joined: Apr 2006
Reputation:
0
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.
Posts: 109
Joined: Jan 2005
Reputation:
10
lolol
Senior Member
Posts: 109
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:
Posts: 3,746
Joined: May 2004
Reputation:
20
Livin
Posting Freak
Posts: 3,746
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.