Page 1 of 1
Dune mediaplayer script vanuit HSTouch
Posted: Sun Nov 04, 2012 9:57 pm
by Zefram
I am making use of the ipad interface made by r-255
domoticaforum.eu/viewtopic.php?f=46& ... 827#p51747. I want to use the PS3 screen to controle my Dune mediaplayer, by using IR HEX codes. My programming skills are very low, so by trail and error (copy) I made a script. Pressing a button on the ipad screen turns the player on and off.
Code: Select all
Sub Main(ByVal strDuneCmd As String)
Dim strReturn, strWebsite As String
Dim strDune As String
strDune = "BC43BF00"
strWebsite = "http://192.168.1.12/cgi-bin/do?cmd=ir_code&ir_code=" & strDune
strReturn = hs.URLAction(strWebsite, "GET", "", "")
End Sub
So far so good, there are about 50 codes for the player, and I don't think 50 scripts is an option.
I tried the script part below, but I don't get around the param part.
Code: Select all
Dim action
Dim cmd
action = param(0).ToString 'button to take action on
Select Case action
Case "dunepower"
cmd = "BC43BF00"
Case "1191"
cmd = "E718BF00"
End Select
So my question is how to link the buttons on the screen to the codes and make a select in the script.
Does any one have a lookalike script or can give me hints?
dune-hd.nl/eng/support/additional_featu ... ntrol.html
Re: Dune mediaplayer script vanuit HSTouch
Posted: Sun Nov 04, 2012 10:06 pm
by Digit
I have a HDI Dune HD Max and do essentially the same to control my Dune and as far as I can see the first script looks OK.
The 2nd one is half finished, you'll need Sub main(Byval param as String) or something like that.
I'm probably mixing up some things here, but maybe it can help you to find the right syntax.
Re: Dune mediaplayer script vanuit HSTouch
Posted: Mon Nov 05, 2012 8:49 pm
by Chiel
I use &HS.GetUrl.
Run a Homeseer script with values from elements
In the script line i put something like this;
&hs.GetUrl("
http://10.0.0.8/cgi-bin/do?cmd=ir_code& ... "",True,80)
This one is "PLAY"
No seperate scripts, just one line.
Easy.
Re: Dune mediaplayer script vanuit HSTouch
Posted: Mon Nov 05, 2012 11:00 pm
by Digit
I can understand what Zefram is trying to do: keeping device specific stuff in a single script.
Cause that's his goal, a single script for the Dune.
And I think that's a good thing to do; if he buys another brand media player he will only have to modify that single script instead of all the buttons.
Or consider the situation where the IP address of the Dune has to be changed; in that case he'll be very happy with his single script and job done in 10 seconds.
Re: Dune mediaplayer script vanuit HSTouch
Posted: Tue Nov 06, 2012 12:23 am
by Zefram
Chiel thank you for your input, I tested some buttons and it runs fine.
But like in Digit's reply you can see the advantage of one script.(to rule them all

)
For me it is a challenge to learn more about VB-scripts.
So if there is input for the script I am all ears.
Chiel thank you for sharing and a nice Dune button by the way.
Re: Dune mediaplayer script vanuit HSTouch
Posted: Tue Nov 06, 2012 12:26 am
by Chiel
Ah, like that.
Does he needs all possible command in a list then? (under case action)
Re: Dune mediaplayer script vanuit HSTouch
Posted: Tue Nov 06, 2012 8:19 am
by r_255
Is there any feedback on the command from the dune ?
else the serial/ip plugin could be a option to...
The nice thing of this plugin is it can do a event on feedback.
But isnt the dune DLNA compatible...? in that case i would try the dlna plugin at the hs forum as that supports the music api from homeseer.
Re: Dune mediaplayer script vanuit HSTouch
Posted: Tue Nov 06, 2012 2:32 pm
by Zefram
If you fire this URL in your browser
1.1.1.1/cgi-bin/do?cmd=ir_code&ir_code=BC43BF00
You get this
Code: Select all
<command_result>
<param name="protocol_version" value="3"/>
<param name="command_status" value="ok"/>
<param name="player_state" value="navigator"/>
</command_result>
The script I "made" works perfect for one button, but inserting a select has failed.
See below for example.
forums.homeseer.com/showpost.php?p=1019 ... stcount=19
Re: Dune mediaplayer script vanuit HSTouch
Posted: Fri Nov 09, 2012 1:23 pm
by DrDoo
Not sure if you wanna go this route but take a look at my post here :
http://domoticaforum.eu/viewtopic.php?f ... 7&start=15
I posted a script for XBMC there. You can then call the different functions (play/stop etc etc). Its all in one script.
You could probably change it for the Dune.