Page 1 of 15 12311 ... LastLast
Results 1 to 10 of 150

Thread: UPnP and Girder

  1. #1
    Join Date
    Apr 2004
    Location
    Dearborn, MI
    Posts
    1,968

    Default UPnP and Girder

    Anyone doing anything with UPnP using Gider/LUA code? Looking for some examples.

    Found a nice little application to inspect UPnP devices

    http://coherence.beebits.net/wiki/UPnP-Inspector


    Just trying to find some help in talking to the device using LUA.
    John

    Now Playing skin creator

    Girder 5.0 / Elk-M1EZ8 / Ocelot / SECU-16IR /SECU-16I / SECU-16 / BobCat Humidity
    JRMC 11.1 / M-Audio Delta 410 / Xitel HIFI Pro / Xitel HIFI Link
    NetRemote 2.0 / 6 Zone whole house audio delivering 1580 watts RMS total
    ELO 15" Touchscreen, Nokia 770 and Advent 3500PC Mobile PC 7" TS
    Droid 2 Global

    Click here to visit my Nowplaying Showcase Blog

  2. #2
    Join Date
    Oct 2005
    Posts
    307

    Default

    It reminds me of mDNS and some work I did trying to add native support to Girder for an Apple iTunes Remote. http://www.promixis.com/forums/showt...packet-via-lua
    Even though I found a blog with all the stuff reverse engineered, I was never able to pass a correct string to iTunes to get the connection established. I'd still like to get it working, but gave up until I have some more time or have a better idea off how to get it going....

    For your UPnP it looks like discovery is UDP and communication is TCP. I've got a UDP socket listening and sending commands to my IRtrans that works great (no additional software running between the IRtrans and Girder). It was hacked from Ron's UDP example - http://www.promixis.com/forums/showt...ieve-in-girder. There is TCP support in the LUA socket, but I wouldn't use it (A Girder transport has much more functionality)...

  3. #3
    Join Date
    Jul 2007
    Location
    Netherlands
    Posts
    370

    Default

    Unless you've got some serious time to spare I wouldn't take that route. Building a UPnP stack from scratch is quite a task. If you want to add support, then the quickest route would be to pick up some example code for a UPnP controlpoint in native C and build a plugin from there. The 'developer tools for UPnP' (formerly by Intel) have a code generator, but I don't know if that just generates a devicestack, or it also capable of creating a controlpoint stack.

    A while ago I created a test app to bridge UPnP to xPL (in .NET), it only works one-way. If you use the xPL plugin for Girder, you should be able to grab some UPnP status/update info. See http://www.thijsschreijer.nl/blog/?p=376, let me know if it works or if I can lend a hand to tweak the code a bit if necessary.
    Using: Win7 MCE, Girder, xPL, RFXcom, HomeEasy

    http://www.thijsschreijer.nl

  4. #4
    Join Date
    May 2004
    Posts
    2,589

    Default

    It would be the logical thing to develop a UPnP interface for Girder at some point in the near future. There seem to be a lot of devices popping up that use it.
    Personally, I'm investigating ways to have Girder and the Vera 2 communicate, and hoping there is a way of not only controlling the Vera, but keeping track of the device statuses (even if only the ZWave ones) . Vera uses Luup, ie. Lua UPnP.
    Check this out:
    http://wiki.micasaverde.com/index.ph..._Press_Release
    and
    http://wiki.micasaverde.com/index.php/Luup_Intro
    Last edited by quixote; July 27th, 2011 at 04:25 AM.
    Beware of the robot.

  5. #5
    Join Date
    Jul 2007
    Location
    Netherlands
    Posts
    370

    Default

    Quote Originally Posted by Tieske8 View Post
    A while ago I created a test app to bridge UPnP to xPL (in .NET), it only works one-way. If you use the xPL plugin for Girder, you should be able to grab some UPnP status/update info. See http://www.thijsschreijer.nl/blog/?p=376, let me know if it works or if I can lend a hand to tweak the code a bit if necessary.
    I tried this actually, and it works for all I can see. Threw together an xPLHandler for UPnP.basic messages. It will create a global table UPnP, with subtable for devices, services and current parameter values of UPnP devices.
    As mentioned, its one-way only, but its a start.




    It does require some software though;
    • Install the UPnP-2-xPL gateway (see my site)
    • Install the xPLGirder plugin
    • Add the xPLHandler ('UPnP.basic.lua', see attachement) to the xPLGirder setup in the xPLHandlers directory
    • setup xPL (can use xPLCheckPackage, see my site again), for firewall and xPL hub setup
    • Use a simple UPnP app to test it (I used the UPnP software light, also on my site)
    Attached a screenprint of the results of my basic test.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	UPnPsample.JPG 
Views:	219 
Size:	23.9 KB 
ID:	6284  
    Last edited by Tieske8; September 7th, 2011 at 01:51 AM. Reason: removed .lua code file, newer files are downstream...
    Using: Win7 MCE, Girder, xPL, RFXcom, HomeEasy

    http://www.thijsschreijer.nl

  6. #6
    Join Date
    May 2004
    Posts
    2,589

    Question

    Hats off to all of your work --it's impressive and indeed a very big accomplishment.
    However, as you mentioned, it can only communicate in one direction.
    Secondly, this should be built into to Girder or at least simple enough to install with one plug-in file.
    Most Girder users are not as skilled as yourself, nor do they have the patience to deal with such a task -- myself included.

    The general acceptance and adoption of automation tech seems to be contingent and governed by its simplicity as well as its ability to be customized and enhanced by advanced users. I think it's a pretty safe bet to say that UPnP has a place in our future and therefore Girder needs to adapt as well.
    The questions now are not "Do we need an Android app to work with Girder?", or "Should we start working on a UPnP stack for Girder", but rather whether or not Promixis has the programming hours for it or who has the skills to that will step up to the plate. HTLuke has answered the call for the Android app and no one can deny that he is doing a SPECTACULAR job of it.
    Who will be our UPnP savior? ;D
    Beware of the robot.

  7. #7
    Join Date
    Jul 2007
    Location
    Netherlands
    Posts
    370

    Default

    Quote Originally Posted by quixote View Post
    Hats off to all of your work --it's impressive and indeed a very big accomplishment.
    Thanks

    Quote Originally Posted by quixote View Post
    However, as you mentioned, it can only communicate in one direction.
    Secondly, this should be built into to Girder or at least simple enough to install with one plug-in file.
    Most Girder users are not as skilled as yourself, nor do they have the patience to deal with such a task -- myself included.
    I agree that Girder should have it built in. Then again, I'm not seeing much development around Girder (besides the recent 5.1 efforts, which seem more maintenance than new development)
    The UPnP-2-xPL gateway was just a means for me to study the UPnP protocol, but I intended to make it more complete once I had use for it, including 2-way comms. And xPL is an opensource network protocol, so I don't see any obstacles to using that.

    I don't mind putting in some effort as long as nobody is in a rush to get there.

    So what I can see as possible steps to improve UPnP support (whilst Girder has nothing built in)
    • Update the UPnP-2-xPL gateway with a proper xPL installer (that would mean it will include the xPLCheckPackage in the installer so it will setup firewall, xPL hub, and the app itself in one standard windows installer), which any user can handle.
    • Installing the xPLGirder plugin is already a drag-and-drop installation as with most plugins (though I think Promixis should get that fixed too)
    • the gateway needs updating for 2-way comms and should become a windows service, or at least minimize to a traybar icon.
    • the xPLHandler for UPnP.basic should probably become a 'Provider' for the girder devicemanager so it can be controlled from there (this is by far the biggest thing as there is virtually no documentation on that)
    The current gateway only reports changes in evented state variables, I have no idea whether the setup will be viable for browsing a mediaserver for example, I would have to look into that. Other than that, basic transport controls, volume, etc. shouldn't be hard to support
    Using: Win7 MCE, Girder, xPL, RFXcom, HomeEasy

    http://www.thijsschreijer.nl

  8. #8
    Join Date
    May 2004
    Posts
    2,589

    Default

    I can't begin to understand exactly what would be involved in creating this plug-in or the two that would be required for use with the Vera, but what I do understand is that Girder would need to act as a UPnP Device as well as a UPnP Control Point.
    Girder would not only need to be able to send commands, but keep track of device states so that those variables could be used with conditionals.
    Ultimately, this feature would be useful for all UPnP devices, not just the Vera.
    Beware of the robot.

  9. #9
    Join Date
    Jul 2007
    Location
    Netherlands
    Posts
    370

    Default

    Quote Originally Posted by quixote View Post
    what I do understand is that Girder would need to act as a UPnP Device as well as a UPnP Control Point.
    Girder would only be a controlpoint to control other devices. Only if Girder where to publish its own devices as UPnP devices, then it would have to act as a device as well (the approach the Vera apparently takes by publishing UPnP devices for the z-wave hardware)

    Quote Originally Posted by quixote View Post
    Girder would not only need to be able to send commands, but keep track of device states so that those variables could be used with conditionals.
    That is exactly what the UPnP-2-xPL gateway does now, no more, no less.

    Quote Originally Posted by quixote View Post
    Ultimately, this feature would be useful for all UPnP devices, not just the Vera.
    It automatically does, thats the way UPnP was designed, though it would be for advanced users.

    PS. why use both a Vera and Girder?
    Using: Win7 MCE, Girder, xPL, RFXcom, HomeEasy

    http://www.thijsschreijer.nl

  10. #10
    Join Date
    May 2004
    Posts
    2,589

    Default

    If Girder were to act only as a control point, then one would not be able to trigger Girder events using ZWave or other UPnP devices that are linked to the Vera, correct?
    The trick will be to make this simple enough to be useful for all users, not just the advanced ones. The reason to use Girder as well as the Vera is to take advantage of all of Girder's features and strengths; HTPC capabilities (including audio), acquiring caller ID info, text-to-speech announcements, its simplicity when it comes to testing and writing Lua scripts, just to name a few. The list is endless. The Vera is great, but quite immature in comparison to Girder right now. I feel that the two would compliment each other perfectly. You don't think so?
    Beware of the robot.

Page 1 of 15 12311 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •