- Posts: 65
- Thank you received: 13
Please Log in or Create an account to join the conversation.
ArneiO wrote: How do I send a sequence of instructions to several nodes? Like for instance a "Night" button that sets all ESP controlled lights to night mode (most lamps OFF, some dimmed).
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
ArneiO wrote: I am trying... but am not able to set up the automation correctly.
I have modified the relay automation code here: iot-playground.com/2-uncategorised/40-es...y-switch-arduino-ide
But after many hours' of trying... I just can't make it happen!
I have five dimmer nodes that I want to set to a default day or night setting depending on the state of a "Day / Night" switch.
Would you be so kind as to give me a hint in the right direction?
Please Log in or Create an account to join the conversation.
Yes, that would be great!EasyIoT wrote: I see this is common problem. I will prepare tutorial.
Please Log in or Create an account to join the conversation.
DriverHelper.ProcessCommad(Domains.VIRTUAL, "N14S0", "ControlOff", "");
System.Threading.Thread.Sleep(3000);
/*
This code is running one time when program is enabled
*/
public void Setup()
{
EventHelper.ModuleChangedHandler((o, m, p) =>
{
// filter digital switch - change module address
if (m.Domain == Domains.VIRTUAL && m.Address == "N13S0" && p.Property == "Sensor.DigitalValue"){
// filter when switch on event
if (p.Value == "0")
{
//Commands to execute in sequence, with inbetween pause while the code is executed
DriverHelper.ProcessCommad(Domains.VIRTUAL, "N10S0", "ControlOff", ""); //Switch off RED (dimmed down over 1000 ms)
System.Threading.Thread.Sleep(1200); // 1200 ms pause
DriverHelper.ProcessCommad(Domains.VIRTUAL, "N11S0", "ControlOff", ""); //Switch off GREEN (dimmed down over 1000 ms)
System.Threading.Thread.Sleep(1200); // 1200 ms pause
DriverHelper.ProcessCommad(Domains.VIRTUAL, "N12S0", "ControlOff", ""); //Switch off BLUE (dimmed down over 1000 ms)
}
else
{
//Commands to execute in sequence, with inbetween pause while the code is executed
DriverHelper.ProcessCommad(Domains.VIRTUAL, "N10S0", "ControlOn", ""); //Switch on RED (dimmed down over 1000 ms)
System.Threading.Thread.Sleep(1200); // 1200 ms pause
DriverHelper.ProcessCommad(Domains.VIRTUAL, "N11S0", "ControlOn", ""); //Switch on GREEN (dimmed down over 1000 ms)
System.Threading.Thread.Sleep(1200); // 1200 ms pause
DriverHelper.ProcessCommad(Domains.VIRTUAL, "N12S0", "ControlOn", ""); //Switch on BLUE (dimmed down over 1000 ms)
}
}
return true;
});
}
/*
This code is running periodicaly when program is enabled.
Cron job detirmine running period.
*/
public void Run()
{
}
Please Log in or Create an account to join the conversation.