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]

Fw: Sonos Remote control from PC


  • Subject: Fw: Sonos Remote control from PC
  • From: Gareth Cook <g@xxxxxxxxxx>
  • Date: Wed, 21 Dec 2005 12:36:30 +0000

I've been digging about on how to get HomeSeer 2 to talk uPnP - at least
get the status of the zones and act upon them.

Of course, it's total gibberish to me ! I did hear Sonos' uPnP
implementation was a bit iffy - but can't give you any more than that.

Here's a bit of script a guy sent me - mebe this can be modified to work
with HomeSeer ? At least then it will open up to the xAP network as well.


Dim DeviceFinder

Set DeviceFinder = CreateObject("UPnP.UPnPDeviceFinder")

Dim devices, Services

Set devices = deviceFinder.FindByType( "upnp:rootdevice", 0 )

For each objDevice in Devices
Select Case objDevice.Type
Case "urn:schemas-upnp-org:device:BinaryLight:1"
wscript.echo "Found a Light."
wscript.echo objDevice.FriendlyName
Set Services = objDevice.Services
wscript.echo vbTab & "Number of services provided:
" & Services.Count
For each objService in Services
wscript.echo vbTab & "Service Type
Identifier: " & objService.ServiceTypeIdentifier
Select Case
objService.ServiceTypeIdentifier
Case
"urn:schemas-upnp-org:service:SwitchPower:1"
wscript.echo vbTab &
"Checking On\Off Status..."
GetPowerState(objService)
Case
"urn:schemas-upnp-org:service:DimmingService:1"
wscript.echo vbTab &
"Checking Dim Level..."
GetDimLevel(objService)
End Select
next
Case "urn:schemas-upnp-org:device:MediaRenderer:1"
wscript.echo "Found a Media Renderer."
wscript.echo objDevice.FriendlyName
Set Services = objDevice.Services
wscript.echo vbTab & "Number of Services provided:
" & Services.Count
For each objService in Services
Select Case
objService.ServiceTypeIdentifier
Case
"urn:schemas-upnp-org:service:AVTransport:1"
wscript.echo vbTab &
"AVTransport Service found"
rem                                             PlayMediaFile(objService)
Case
"urn:schemas-upnp-org:service:ConnectionManager:1"
wscript.echo vbTab &
"Connection Manager Service Found."
Case
"urn:schemas-upnp-org:service:RenderingControl:1"
wscript.echo vbTab &
"Rendering Control service found."
Case else
wscript.echo vbTab &
"Unknown service found."
wscript.echo vbTab &
"Service Type Identifier: " &
objService.ServiceTypeIdentifier
end select
next
Case Else
wscript.echo "Unknown device type..."
wscript.echo objDevice.FriendlyName
wscript.echo objDevice.Type
wscript.echo "Device has children: " &
objDevice.HasChildren
If objDevice.HasChildren = TRUE then
Set Children = objDevice.Children
For each Child in Children
wscript.echo vbTab & vbTab &
"Child name: " & Child.FriendlyName
wscript.echo vbTab & vbTab &
"Child description: " & Child.Description
wscript.echo vbTab & vbTab &
"Child type: " & Child.Type
Set ChildServices = Child.Services
wscript.echo vbTab & vbTab &
"Number of services: " & ChildServices.Count
For each objChildService in
ChildServices
wscript.echo vbTab & vbTab
& objChildService.ServiceTypeIdentifier
next
next
End If
End Select
next

G.

Gareth Cook
Tools and Process Architect
IBM SWG Sales - Lotus Park, Staines, TW18 3AG
Office: +44 (0)1784 445166 - Mobile: +44 (0)7980 445166
AIM Chat : TheBoyG - MSN Chat : chat@xxxxxxx
email: g@xxxxxxx


----- Forwarded by Gareth Cook/UK/IBM on 21/12/2005 12:31 -----

Discussion
Main Topic

ukha_d@xxxxxxx
Yesterday 21:09

.
Subject:
.
RE: [ukha_d] Sonos Remote control from PC
.
Category:



> VB.NET. Is anyone else looking into this? As I'm a little out
> of my depth and haven't found many references on the web.

Iain, I would suggest you try the sonos.pl script. This will give you a
web interface into the sonos system, and the ability to control sonos
from an app that can make http requests.

http://www.purple.org/sonos/

Im using this and it works well, even searches on the music library via
upnp layer :)







UKHA_D Main Index | UKHA_D Thread Index | UKHA_D 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.