HomeGenie Forum
Automation Program Plugins and Wizard Scripting => Help => Topic started by: Jens on August 14, 2014, 12:28:12 PM
-
Hello,
is there a way to make UPNP Devices to trigger wizard scripts?
Please see screenshot attached, the device is recognized by HG and I can control it via the widget and even sent a stream to it (to turn it on at certain times) by using the macro function and wizard scripts.
Is there a way in doing it the other way around, turning the UPNP Device on and playing a stream (via control at the device) is detected by HG and triggers a wizard script?
Many thanks for help
Regards
Jens
-
Event subscription is not implemented in the UPnP interface yet. So the only way to know the status of a property is to poll the UPnP device.
To find out all supported commands on an hg UPnP module see the source code:
https://github.com/genielabs/HomeGenie/blob/master/MIG/MIG/Interfaces/Protocols/UPnP.cs#L52
so, for example in a script you can do stuff like:
var mySmartTV = Modules.WithName("Smart TV");
mySmartTV.Command("AvMedia.SetVolume").Set("50");
var volume = mySmartTV.Command("AvMedia.GetVolume").Execute();
Cheers,
g.