Hello! New to HomeGenie and wish to create a few virtual switches to keep track of general states around the house (whether we're home, whether we have guests, etc).
I've attempted to create virtual switches a few different times, but I cannot seem to properly interact with them once they're created.
Here's the code I'm currently attempting- a simple AddVirtualModules, grab it, turn it on, and then read its value. This always returns false, though.
Program.AddVirtualModules("HomeAutomation.VirtualSwitches", "Switch", "homegenie/generic/switch", 1, 4);
var module1 = Modules.InDomain("HomeAutomation.VirtualSwitches").WithAddress("1").Get();
module1.On();
Program.Notify("First virtual switch", "" + module1.IsOn);
Please help!
Thanks,
-Clint