- Posts: 65
- Thank you received: 13
public void Setup()
{
EventHelper.ModuleChangedHandler((o, m, p) =>
{
// filter digital switch - change module address
if (m.Domain == Domains.VIRTUAL && m.Address == "N14S0" && p.Property == "Sensor.DigitalValue"){
// filter when switch on event
if (p.Value == "1")
{
//Commands to execute in sequence, with inbetween pause while the code is executed
DriverHelper.ProcessCommad(Domains.VIRTUAL, "N10S0", "ControlLevel", "2"); //RED dimmed down to night level
System.Threading.Thread.Sleep(1200); // 1200 ms pause
DriverHelper.ProcessCommad(Domains.VIRTUAL, "N11S0", "ControlLevel", "0"); //GREEN dimmed down to night level
System.Threading.Thread.Sleep(1200); // 1200 ms pause
DriverHelper.ProcessCommad(Domains.VIRTUAL, "N12S0", "ControlLevel", "2"); //BLUE dimmed down to night level
}
else
{
//Commands can be inserted here too (if switch "OFF" is activated)
}
}
return true;
});
}
Please Log in or Create an account to join the conversation.