Hello
I have been trying to follow the examples.
I can create a sensor and switch but I can’t seam to change the value of the sensor or switch,
Here is a bit of demo I code I have created:
const string A_DOM = "HomeAutomation.INPUT_Test";
Program.AddVirtualModule(A_DOM, "1","Switch", "homegenie/generic/switch");
var AModule = Modules.InDomain(A_DOM).WithAddress("1").Set();
hg.Settings.Parameter("AModule").Value = "on";
//var Senser1 = hg.Modules.WithName("Arduino Senser1").Get();
hg.Settings.Parameter("AModule").Value = "on";
while (Program.IsEnabled)
{
hg.Settings.Parameter("AModule").Value = "on";
Program.Notify("X10 Auto Bright", "on" + "<br>" + "**** on *****");
Pause(5);
hg.Settings.Parameter("AModule").Value = "off";
Program.Notify("X10 Auto Bright", "off" + "<br>" + "**** off *****");
Pause(5);
hg.Settings.Parameter("AModule").Value = "1";
Program.Notify("X10 Auto Bright", "on" + "<br>" + "**** 1 *****");
Pause(5);
hg.Settings.Parameter("AModule").Value = "0";
Program.Notify("X10 Auto Bright", "off" + "<br>" + "****0 *****" );
Pause(5);
}
Program.GoBackground();
The popups are working as expected but the switch will not change state,
And when i try it with a sensor I just get a blank sensor widget displayed.
any help would be appreciated.
Thanks