Project

druzy-upnp

0.0
No commit activity in last 3 years
No release in over 3 years
Discover and interact with upnp device
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.12
~> 10.5

Runtime

>= 1.4.0.3
>= 2.0.1
>= 1.0.0
>= 1.6.8
 Project Readme

Druzy::Upnp

This is a upnp control point. You can search and interact with any upnp device or service and use event

Installation

Add this line to your application's Gemfile:

gem 'druzy-upnp'

And then execute:

$ bundle

Or install it yourself as:

$ gem install druzy-upnp

Or for ubuntu run:

$ sudo add-apt-repository ppa:druzy_druzy/rubymita
$ sudo apt-get update
$ sudo apt-get install ruby-druzy-upnp

Usage

This is an exemple

require 'druzy/upnp/ssdp'

Druzy::Upnp::Ssdp.new.search("urn:schemas-upnp-org:device:MediaRenderer:1") do |device|
  puts device.device_type
  connection_id, av_transport_id, rcs_id = device.ConnectionManager.PrepareForConnection("RemoteProtocolInfo" => "http-get:*:video/mp4:*", "PeerConnectionManager" => "/", "PeerConnectionID" => -1, "Direction" => "Output").values
  puts av_transport_id.to_s
end

For all device

Druzy::Upnp::Ssdp.new.search do |device|
    puts device.friendly_name
end

Event

service.subscribe do |event|
    puts event.property_name+" : "+event.new_value
end

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/druzy/ruby-druzy-upnp.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).