Awesome project. Best one i have seen so far! Good job.
I am using the mysensors sketch for relay-with-button-actuator, and on the debug console i can see the digital reads submitted by the node on the nrf network when i switch the button.
I assume i could use automation tasks to send back a message to the same node to switch the relay state when this read has been received.
Could someone give me a hand how to syntax this right?
ralleboehm wrote: Awesome project. Best one i have seen so far! Good job.
I am using the mysensors sketch for relay-with-button-actuator, and on the debug console i can see the digital reads submitted by the node on the nrf network when i switch the button.
I assume i could use automation tasks to send back a message to the same node to switch the relay state when this read has been received.
Could someone give me a hand how to syntax this right?
Thx.
Here is example. Put this code in automation Setup function:
EventHelper.ModuleChangedHandler((o, m, p) =>
{
//Console.WriteLine(m.Address + " in program id "+ Program.ProgramId.ToString()+ " property "+ p.Property + " value " + p.Value);
if ((m.Domain == "MySensors") && (m.Address = "N1S1") && (P.Value == "1"))
DriverHelper.ProcessCommad(Domains.MYSENSORS, "N1S3", "ControlOn", "");
return true;
});
This code sample sends command ON to MySensors module with address N1S3 when module N1S1 is switched ON. See beta release thread for details.
ralleboehm wrote: Thanks.
Finally had some time on my hand to play with my toys again.
a simple crontab setting of * * * * * will not do the trick i suppose ?
Did this work for you?
no, cron is not good solution. It must be event based solution. I'm preparing tutorials about automation, and everything will be described.