water leak system

Hi experts

below is our system architecture.

we have no experience on arduino platform.

our major problems are

  1. how to communicate with water leak sensor.
  2. how to call webservice on arduino platform.

please recommend arduino module and water leak sensor.

sample code on arduino module will be appreciated.

thanks in advance.

we have no experience on arduino platform.

Does that mean you have no experience with any embedded controller system? Otherwise it is very similar to any other controller.

how to communicate with water leak sensor.

That depends on what sensor you use.

.
2. how to call webservice on arduino platform.

You need an Ethernet shield or a wi-if shield.

Not come across a specific leak sensor but you could make one with a rag wrapped round the pipe with two non touching wires threaded through it. The resistance will drop when you have a leak.

thanks to Grumpy_Mike

i have some experiences on Windows CE programming
and keil c coding on 8051 many years ago.
no embedded linux at all.

here is the water leak sensor we have surveyed with little information.

and sample code

int analogPin=1;
int led=12;
int val=0;
int data=0;
void setup()
{
pinMode(led,OUTPUT);
Serial.begin(9600);
}
void loop()
{
val=analogRead(analogPin);
if(val>700)
{
digitalWrite(led,HIGH);
}
else
{
digitalWrite(led,LOW);
}
data=val;
Serial.println(data);
delay(100);
}

no embedded linux at all.

You do know the Arduino uses C / C++ ?

That sensor is basically what I said only without the rag.

WELCOME !

May we invite you to read 'how to use this forum'
it is a sticky at the top of every forum.
what would interest us in you knowing is item #7

google:
arduino water sensor

AFAIK, you can push the data to the web, but there is noting in the Ardino software that allows you to push anhthing from the web to any other device. the Arduino software is strickly based on the board.

however, you can get 3rd party software to do that.
google
arduino android
arduino iphone

Blynk may be a good solution for your project. - Scotty

Grumpy_Mike:
You do know the Arduino uses C / C++ ?

sure
thanks, i should study embedded linux

dave-in-nj:
what would interest us in you knowing is item #7

sorry about that

int analogPin=1; 
int led=12; 
int val=0; 
int data=0; 

void setup()
{
    pinMode(led,OUTPUT); 
    Serial.begin(9600); 
}


void loop()
{
    val=analogRead(analogPin); 

    if(val>700)
    { 
        digitalWrite(led,HIGH); 
    }
    else
    {
        digitalWrite(led,LOW); 
    }

    data=val; 
    Serial.println(data);
    delay(100);
}

dave-in-nj:
AFAIK, you can push the data to the web, but there is noting in the Ardino software that allows you to push anhthing from the web to any other device. the Arduino software is strickly based on the board.

however, you can get 3rd party software to do that.

thanks for advice.

on the atduino platform, all we need is to call the webservice.
for example, call url as "https://api.forecast.io/forecast/APIKEY/LATITUDE,LONGITUDE"

push notification are jobs of web server, google cloud service or or apple push notification server.
we experienced on those field.

scottyjr:
Blynk may be a good solution for your project. - Scotty

thanks
i'll give it a try

immot:
sure
thanks, i should study embedded linux

Embedded Linux has nothing to do with the solution to your problem. Study it by all means but it will not help you at all.

Grumpy_Mike:
Embedded Linux has nothing to do with the solution to your problem. Study it by all means but it will not help you at all.

OK, no need to study embedded linux.
i see, it's only 2 functions setup and loop.
so, is there a library which i can use to go to the internet like HttpURLConnection in java.

it's only 2 functions setup and loop.

Those are the starting functions. The setup runs once at the start of the code and the loop runs repeatedly. You then write functions of your own and can call them from either of the basic functions.

Java has nothing to do with the Arduino, the language you use here is called C. While the individual statements of C and Java look the same the overall structure is very different.

However you need to get an Arduino and do some of the basic examples built into the Arduino software first. You will find them under the file menu -> examples -> basic.
See what code is all about. At the moment you know so little that any other advice is just wasting everyone's time because you are not yet capable of understanding it.

The task is basically very simple and the major elements of the solution appear in this thread.

An Arduino is integrated with Local Area Network (Ethernet or WiFi adapter) and a moisture sensor.
If moisture is detected above a certain threshold, an URL is issued ( OP's example: call url as "https://api.forecast.io/forecast/APIKEY/LATITUDE,LONGITUDE" ).

What's missing is subscribing to the on line service behind the URL which handles the push notification to the mobile device.

My preference would be to look at the ESP8266 (either standalone or as a Wifi adapter for an arduino).

we are still in survey phase.
all we concern is it possible or impossible.
if it can be done, how much effort it will take.

i found this sample is useful, Arduino Playground - WebClient.
thanks everybody.