SMS Automation Enable/Disable

9 years 6 months ago - 9 years 6 months ago #1319 by cdj
Hi again,
I've just setup an automation program that send an sms when a door is opened :
public void Setup()
{
EventHelper.ModuleChangedHandler((o, m, p) =>
{
Console.WriteLine(m.Address + " in program id "+ Program.ProgramId.ToString()+ " property "+ p.Property + " value " + p.Value);
if ((m.Domain == Domains.VIRTUAL) && (m.Address == "N8S0") && (p.Property == "Sensor.DoorWindow") && (p.Value == "1"))
{
SmsHelper.SendSms("+39XXXX","Porta di casa aperta");
}
return true;
});
}
public void Run()
{
}

and it works perfectly.
But when i activate or deactivate program it seems to rest active. and arrive sms regulary....

In other words, in this moment my automation program is DISABLED but SMS arrive if i open the door....

Thanks
Dario
The following user(s) said Thank You: sharonlei

Please Log in or Create an account to join the conversation.

9 years 6 months ago #1321 by EasyIoT

cdj wrote: Hi again,
I've just setup an automation program that send an sms when a door is opened :

public void Setup()
{
EventHelper.ModuleChangedHandler((o, m, p) =>
{
Console.WriteLine(m.Address + " in program id "+ Program.ProgramId.ToString()+ " property "+ p.Property + " value " + p.Value);
if ((m.Domain == Domains.VIRTUAL) && (m.Address == "N8S0") && (p.Property == "Sensor.DoorWindow") && (p.Value == "1"))
{
SmsHelper.SendSms("+39XXXX","Porta di casa aperta");
}
return true;
});
}
public void Run()
{
}

and it works perfectly.
But when i activate or deactivate program it seems to rest active. and arrive sms regulary....

In other words, in this moment my automation program is DISABLED but SMS arrive if i open the door....

Thanks
Dario


I've noticed the same yesterday. If I disable program EventHelper stays active (or even all program??). It helps only if I restart server. I will fix that in next release.
The following user(s) said Thank You: cdj, sharonlei

Please Log in or Create an account to join the conversation.

9 years 6 months ago #1326 by kindr
Replied by kindr on topic SMS Automation Enable/Disable
Hello
It seems that I have the same problem.
and one question on how to set the delay between sending each sms? so to me sent a maximum of 1 per 15 minutes
Sorry for my bad English
The following user(s) said Thank You: sharonlei

Please Log in or Create an account to join the conversation.

9 years 6 months ago #1331 by EasyIoT
Here is solution for problem. Unzip and replace EasyIoT.exe in easyiot folder and then you can disable automation program EventHelper.

File Attachment:

File Name: EasyIoT.zip
File Size:29 KB
Attachments:
The following user(s) said Thank You: kindr, cdj

Please Log in or Create an account to join the conversation.

9 years 6 months ago #1335 by kindr
Replied by kindr on topic SMS Automation Enable/Disable
pls ... how to set the delay between sending each sms? so to me sent a maximum of 1 per 15 minutes
Sorry for my bad English

Please Log in or Create an account to join the conversation.

9 years 6 months ago #1336 by EasyIoT

kindr wrote: pls ... how to set the delay between sending each sms? so to me sent a maximum of 1 per 15 minutes
Sorry for my bad English


[Admin]
This question is not related with topic. Please ask question in new thread - that way others will see solution.

Please Log in or Create an account to join the conversation.

Time to create page: 0.216 seconds

Forum latest

  • No posts to display.