|
|
@ -70,13 +70,13 @@ |
|
|
|
/***************Ethernet ENC28J60***************/ |
|
|
|
|
|
|
|
//Mac must be unique for each sensor
|
|
|
|
byte mac[] = { 0xD3, 0x5D, 0xBE, 0xEF, 0xEE, 0x15 }; |
|
|
|
byte mac[] = { 0xD3, 0x5D, 0xBE, 0xEF, 0xEE, 0x51 }; |
|
|
|
//Static IP of Arduino
|
|
|
|
byte ip[] = { 192, 168, 1, 177 }; |
|
|
|
//IP of ZM Server
|
|
|
|
byte server[] = { 192, 168, 1, 178 }; |
|
|
|
//ZM server IP to put in requests.
|
|
|
|
String host="192.168.1.178"; |
|
|
|
String host="192.168.78.123"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -104,7 +104,7 @@ String host="192.168.1.178"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char* LOCATIONOFSENSOR = "Bay Four - Tool Room"; |
|
|
|
char* LOCATIONOFSENSOR = "Dispatch"; |
|
|
|
|
|
|
|
/***************Variables************/ |
|
|
|
|
|
|
@ -133,10 +133,10 @@ and the source of ZoneAVR. The text field, and show text are not setup here. |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
char* monnum = "25"; //monitor number
|
|
|
|
char* monnum = "11"; //monitor number
|
|
|
|
char* onoff = "on"; //command to send to zmtrigger.
|
|
|
|
char* timealarm = "10"; //time to set monitor to alarm
|
|
|
|
char* score = "100"; //score to assign
|
|
|
|
char* score = "77"; //score to assign
|
|
|
|
char* source = "ZMHW"; //source. Add details as needed (e.g. Hallway sensor)
|
|
|
|
|
|
|
|
|
|
|
@ -277,6 +277,8 @@ void loop() |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
//todo: only serial.print temp every 10 or so reads
|
|
|
|
TEMPERATUREVALUE = analogRead(TEMPPIN); |
|
|
|
Serial.print(F("Temperature Value: ")); |
|
|
|
// See resources. uses 1.1 aref, converts to celcius, then to Fareinheit.
|
|
|
@ -348,7 +350,7 @@ void loop() |
|
|
|
//beware that the buffer in snprintf is big enough to hold everything
|
|
|
|
snprintf(ZMTriggerMessage, 56, "%s|%s+%s|%s|%s||", monnum, onoff, timealarm, score, source); |
|
|
|
Serial.print(F("the TCP Packet being sent:")); |
|
|
|
Serial.println(String(ZMTriggerMessage)); |
|
|
|
//Serial.println(String(ZMTriggerMessage));
|
|
|
|
client.println(String(ZMTriggerMessage)); //required
|
|
|
|
Serial.println(F("TCP packet sent to ZMTrigger")); |
|
|
|
client.stop(); |
|
|
@ -488,12 +490,13 @@ void loop() |
|
|
|
client.println(""); |
|
|
|
//client.println("<b>IP Address:</b>");
|
|
|
|
//client.println(Ethernet.localIP());
|
|
|
|
client.println("<b>Sensor Location:</b>"); |
|
|
|
//client.println("Bay Four - Tool Room");
|
|
|
|
client.print("Sensor Location:"); |
|
|
|
client.println(LOCATIONOFSENSOR); |
|
|
|
client.println("<b>Type of Sensor</b>:"); |
|
|
|
client.println("Microwave - HFS-DC06H"); |
|
|
|
client.println("<b>Temperature Sensor Value:</b>"); |
|
|
|
client.print("Type::"); |
|
|
|
client.println("HFS-DC06H"); |
|
|
|
client.print("Monitor: "); |
|
|
|
client.println(monnum); |
|
|
|
client.print("Temp:"); |
|
|
|
client.println(TEMPERATUREVALUE2); |
|
|
|
client.println("</pre></html>"); |
|
|
|
break; |
|
|
|