google-code-export / openhab

Automatically exported from code.google.com/p/openhab
GNU General Public License v3.0
0 stars 0 forks source link

UPnP binding #85

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice if the OpenHab has a binding that supports the UPnP AV 
specification, in particular the Media Server and Control Point would be 
helpful.

For the Media Server part this means that the OpenHab acts as a source for 
Media Renderers.
For the Control Point the UI can act as a control panel, meaning the OpenHab UI 
can control other UPnP AV devices, e.g. to start/stop/... a media player such 
as Playstation 3 and others.

An Java implementatation for UPnP is available at 
http://4thline.org/projects/cling. An OSGi compatible version can be found 
http://4thline.org/m2/org/fourthline/cling/.

Original issue reported on code.google.com by joris.de...@gmail.com on 3 May 2012 at 12:47

GoogleCodeExporter commented 9 years ago
Would you have a concrete example of what kind of item type you would bind to 
what kind of device? Especially the "act as media server" use case is not 
really clear to me.

Original comment by kai.openhab on 4 May 2012 at 9:14

GoogleCodeExporter commented 9 years ago
An example for the Control Point functionality:
- Switch Room_StartStop   "Play/Pause"    (Bathroom)      { 
upnp.control="ON:<room>:play, OFF:<room>:pause" }
- String CurrentSong         "Currently playing"              
{upnp.control="<room>:active"}
The Control Point Binding discovers the <room>, meaning the Media Device to be 
controlled, and executes the action accordingly.

Regarding the Media Server; At first glance it would be nice that OpenHab is a 
Media Server, but a second glance this doesn't seem the goal of OpenHab... 
OpenHab is not a Media Center Server...

In my case, I would like to have the following. My TV is connected to a HTPC 
running XBMC. From the OpenHab UI I want to control XBMC, e.g. selecting 
content and control the current item. Combined with XBMC control I want to 
integrate with home domotics based on KNX and Loxone. I prefer to integrate on 
specification rather than an implementation, therefore I prefer UPnP (same as 
choosing KNX/X10 rather than vendor based implementation).

Original comment by joris.de...@gmail.com on 7 May 2012 at 12:42

GoogleCodeExporter commented 9 years ago
The control point functionality (play/pause, setting/getting current track) 
should be fine.
Using openHAB UIs as a "remote control" for XBMC is rather difficult - there is 
no easy way to browse through media libraries etc.

Original comment by kai.openhab on 9 May 2012 at 9:04

GoogleCodeExporter commented 9 years ago
I have a particular need for a Sonos binding. There does exist a sourceforge 
project (Janos) that does this trick, and it is based on UPNP as well. It is 
based on SBB (SuperBonBon Industires) UPNP library (used frequently in open 
source projects). Therefore, I am open to contribute to a "base" UPNP binding, 
on with possibly more specific bindings (like Sonos) could be developed. This 
specialization of the binding is most likely to be necessary because of the 
complexity of the underlying upnp messages that are used to to communicate with 
the devices.... It also uses a discovery service to discover devices and so on, 
and in Sonos' case, XML/Upnp messages are defined to exchange, browse, 
control,... media libraries, song queues and so forth....

(http://janos.sourceforge.net/) 

K

Original comment by karel.go...@gmail.com on 10 Jun 2012 at 1:33

GoogleCodeExporter commented 9 years ago
just had a look at cling. imho very nice library and way to go for the upnp 
binding

Original comment by karel.go...@gmail.com on 10 Jun 2012 at 1:45

GoogleCodeExporter commented 9 years ago
After studying Cling in details there are IMHO two options or routes to 
implement UPNP bindings:

1. Customize for a given device (example: Sonos audio equipment), thereby 
implementing all the relevant upnp.org device templates relevant for the device 
(MediaRenderer, ....), and have the binding defacto hide the upnp specifics

2. Implement a binding that is generic and implements a single given/standard 
upnp template, do a mapping between OpenHAB Commands and the upnp template 
Actions, and then do the actual binding to the physical device through its 
unique UID by means of an entry in the .cfg file. If a device announces that it 
adheres to the given upnp binding, then, in theory, it should react/act upon 
all Actions (and thus openhab Commands) define in the template. (reality 
however is that some devices leave some template Actions unimplemented, so this 
can lead to unexpected behavior)

Original comment by karel.go...@gmail.com on 16 Jun 2012 at 1:44

GoogleCodeExporter commented 9 years ago
For everyone following this Issue: i have started work on the Sonos binding, 
based on the Cling UPNP library, and  I intend to build it in such a way that 
it can be easily refactored/stripped afterward to form the basis for a more 
general UPNP binding, e.g. one where there can be a mapping between a given 
UPNP.org service template and OpenHab Commands.

Original comment by karel.go...@gmail.com on 23 Jun 2012 at 11:05

GoogleCodeExporter commented 9 years ago
unassigned to make current state more transparent

Original comment by teichsta on 21 May 2013 at 9:17

GoogleCodeExporter commented 9 years ago

Original comment by kai.openhab on 22 May 2013 at 8:10

GoogleCodeExporter commented 9 years ago
is there some progress for a general upnp binding ? option 2 from ahead ?

Original comment by openhab.lb on 25 Jun 2013 at 6:30

GoogleCodeExporter commented 9 years ago

Original comment by teichsta on 5 Nov 2013 at 10:47

GoogleCodeExporter commented 9 years ago
This issue has been migrated to Github. If this issue id is greater than103 its 
id has been preserved on Github. You can open your issue by calling the URL 
https://github.com/openhab/openhab/issues/<issueid>. Issues with ids less or 
equal 103 new ids were created.

Original comment by teichsta on 17 Nov 2013 at 8:08

GoogleCodeExporter commented 9 years ago
see above!

Issue has been migrated to Github and should be discussed there.

Original comment by teichsta on 21 Nov 2013 at 1:51