- Posts: 8
- Thank you received: 0
/*
This code is running one time when program is enabled
*/
public void Setup()
{
EventHelper.ModuleChangedHandler((o, m, p) =>
{
// bathroom alarm
if (m.Domain == Domains.MYSENSORS && m.Address == "N8S0" && p.Property == "Sensor.Leak" && p.Value == "1")
DO A GET REQUEST
// living room
if (m.Domain == Domains.MYSENSORS && m.Address == "N3S0" && p.Property == "Sensor.Leak" && p.Value == "1")
DO A GET REQUEST
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.
Please Log in or Create an account to join the conversation.
using System;
using System.IO;
using System.Net;
using System.Text;
/*
This code is running one time when program is enabled
*/
public void Setup()
{
EventHelper.ModuleChangedHandler((o, m, p) =>
{
if (m.Domain == Domains.VIRTUAL && m.Address == "N1S0" && p.Property == "Sensor.DigitalValue" && p.Value == "1") {
WebRequest request = WebRequest.Create("http://website.com");
}
});
}
/*
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.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
System.Net.WebRequest request = System.Net.WebRequest.Create("http://website.com");
Please Log in or Create an account to join the conversation.