Hi guys !
I’m trying to use the Lolodomo’s uPnP/DLNA Plugin from OpenHAB through Mios binding. Mainly because OpenHAB do not have a uPnP Media control binding ATM (as far as I know). and I use it a lot in my Home Automation.
In my Vera’s script for playing a webradio, I must fetch the selected DescriptionURL and send a SelectDMRDevice with the DescriptionURL lul_arguments for “wake up” uPnP proxy and get the correct Device status (actually ON).
Here is the begining of my Lua Script :
[…]
local descriptionURL = luup.variable_get(“urn:dlna-org:serviceId:DLNAMediaController1”, “DescriptionURL”, 47)
local lul_arguments = {}
lul_arguments[“URL”] = descriptionURL
luup.call_action(“urn:dlna-org:serviceId:DLNAMediaController1”, “SelectDMRDevice”, lul_arguments, 47)
local lul_arguments = {}
lul_arguments[“URI”] = radio_selected
luup.call_action(“urn:dlna-org:serviceId:DLNAMediaController1”, “Play”, lul_arguments, 47)
So … My first step is to get the “DescriptionURL” into a Openhab String like this :
String AUDIO_SLN_DESCR {mios:“unit:house,device:44/service/urn:dlna-org:serviceId:DLNAMediaController1/DescriptionURL” }
The second step is to send the SelectDMRDevice with the value of AUDIO_SLN_DESCR string but I don’t know how to do it, and if is it possible to do ? something like this but how to pass the DescriptionURL ?
Switch AUDIO_SLN_SELECT {mios:“unit:house,device:44/service/urn:dlna-org:serviceId:DLNAMediaController1/SelectDMRDevice” , autoupdate=“false”}
Must I use a Mapping File ? maybe playing with the _defaultCommand ?
Same thing for the “Play” action, but one problem at a time My goal is to transfer all automations process out of my Vera to OpenHAB.
Thanks for reading, for this binding and sorry for my crappy English