DLNA interactions/tools
Last update
2020-04-26
2020
04-26
« — »

ref

tools

ruby easy_upnp gem

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require 'easy_upnp'

searcher = EasyUpnp::SsdpSearcher.new
devices = searcher.search 'ssdp:all'

device = devices.first
device.all_services

device.description

# client
service = device.service 'urn:schemas-upnp-org:service:ContentDirectory:1', validate_arguments: true
service.service_methods

service.GetSystemUpdateID

service.method_args :Browse
ris = service.Browse ObjectID: '0', BrowseFlag: 'BrowseDirectChildren'
ris2 = Nokogiri::XML.parse ris[:Result]
ris2.css('container').map{|e| e['id'] }

# client from static config
service2 = EasyUpnp::DeviceControlPoint.from_params service.to_params
service.GetSystemUpdateID