The code should work, the only reason that it should not work is the following:
When you created a new automation program it would have asked you for a name and a cron job, the format of the cron time is important, so here is a website that explains cron job format
www.nncron.ru/help/EN/working/cron-format.htm
or read EasyIOT automation documents here
iot-playground.com/2-uncategorised/25-ea...er-automation-part-i
For testing I created a single (one) Automation program with the following cron job timing * * * * * this timing means that the cron job runs ever minute. I then have the following code in the program
public void Run()
{
DriverHelper.ProcessCommad(Domains.VIRTUAL, "N2S0", "ControlOn","");
}
You must change the following...... Look at the node name you want to change, meaning when you are on the EasyIOT website you should have a switch that when you toggle the switch the relay goes on or off..... Under the name of the switch is a node type and its name.
MySensors - Domains.MYSENSORS
RPiGPIO - Domains.RPIGPIO
Esp8266 - Domains.ESP8266
Virtual - Domains.VIRTUAL
Next it the node address in my example its N2S0... this must match your node name for your relay switch.
I then press update on the bottow right to "save" the automation script.... and then make sure that its enabled... when you click back once there is a slide switch to enable the program... then wait one minute and the relay should swtich "ON".
Then go back into the automation program that you made and change the following
"ControlOn" must become "ControlOff"... when press update again and wait another minute..... the relay should go off....
Now you know the program works... you need to create a second program with the correct cron timing
An example... the program that you have made can be called relay off..... change the cron timing from * * * * * to * 22 * * * this means it will turn off at 10pm each night.
the second program you make can be called relay on... change the timing for the cron to * 18 * * * this means it will turn on each day at 6pm.
I have found that creating NEW automation programs is better when you want to work with cron as sometimes I have found that just chaging exisiting programs didnt work for me, there is no reason why this should not run on RasPi
Hope this helps