The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

RE: dummy scripting question


  • Subject: RE: dummy scripting question
  • From: Tony Tofts
  • Date: Tue, 27 Jan 2004 17:04:00 +0000

> what i cant do is get a script to work to extract the
> albim/artist/title from the rio xap msg.

That's cause it's an xpl message ;-)

> Steve had posted on this (shown below) but still no joy. Has
> anyone done this, if so can they post the script.

I use the following script with each rio to capture everything into global
values (for website display) but you could put the sending of the xpl pcosd
message in there somewhere. Obviously you need to replace 'bathroom' with
the instance of your rio.

Regards
Tony

sub TONYT_RIO_BATHROOM_Status(xPLMessage)

' record last status

sys.value("RIO_BATHROOM_STATUS")=xpl.getparam(xplmessage,"STATUS",true)
select case ucase(sys.value("RIO_BATHROOM_STATUS"))
case "PLAYING"

sys.value("RIO_BATHROOM_TYPE")=xpl.getparam(xplmessage,"TYPE",true)

sys.value("RIO_BATHROOM_ARTIST")=xpl.getparam(xplmessage,"ARTIST",true)

sys.value("RIO_BATHROOM_ALBUM")=xpl.getparam(xplmessage,"ALBUM",true)

sys.value("RIO_BATHROOM_TRACK")=xpl.getparam(xplmessage,"TRACK",true)
case "NEXT"

sys.value("RIO_BATHROOM_NEXT_TYPE")=xpl.getparam(xplmessage,"TYPE",true)

sys.value("RIO_BATHROOM_NEXT_ARTIST")=xpl.getparam(xplmessage,"ARTIST",true)

sys.value("RIO_BATHROOM_NEXT_ALBUM")=xpl.getparam(xplmessage,"ALBUM",true)

sys.value("RIO_BATHROOM_NEXT_TRACK")=xpl.getparam(xplmessage,"TRACK",true)
case "POWER ON"
' don't clear, as rio may have been playing in off mode
case else
sys.value("RIO_BATHROOM_TYPE")=""
sys.value("RIO_BATHROOM_ARTIST")=""
sys.value("RIO_BATHROOM_ALBUM")=""
sys.value("RIO_BATHROOM_TRACK")=""
sys.value("RIO_BATHROOM_NEXT_TYPE")=""
sys.value("RIO_BATHROOM_NEXT_ARTIST")=""
sys.value("RIO_BATHROOM_NEXT_ALBUM")=""
sys.value("RIO_BATHROOM_NEXT_TRACK")=""
end select

end sub









xPL Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.