LAN DS18B20 WEB Temperature Monitor 1 meter Cable
www.WEB-Relays.com
www.Facebook.com/KMtronic

PHP receive script for KMTronic DS1820 LAN POST version module

  Receive¬†POST data using PHP         PHP file: <?php $date = date(‘Ymd’); $time = date(‘H:i:s’); $hourtime = date(‘H:i’); $unixtime = time(); $file = “/var/www/html/data/”.$date.”.log”; $current = file_get_contents($file); $current .= $date; $current .= “-“; $current .= $time; $current .= “\t”; $current .= $unixtime; $current .= “\t”; $temp = $_POST[‘temperature’]; $temp2 = implode(“”,$_POST[‘temperature’]); $current . . .

Read More …

Create a Crontab server side PHP script for uploading temperature to a MySQL database

      Temperature Monitor STATUS XML data http://XXX.XXX.XXX.XXX/status.xml XXX.XXX.XXX.XXX is IP ADDRESS Temperature monitor     MySQL table     Cron is a system daemon used to execute desired tasks (in the background) at designated times.¬† A crontab file is a simple text file containing a list of commands meant to be run at . . .

Read More …

UDP packet send from ESP8266 to KMtronic UDP LAN Relay board

      #include <ESP8266WiFi.h> #include <WiFiUdp.h> const char *ssid = “KMTRONIC”; const char *password = “12345678”; WiFiUDP Udp; unsigned int localUdpPort = 12345; // local port to listen on char incomingPacket[255]; // buffer for incoming packets char replyPacket[] = “Hi there! Got the message :-)”; // a reply string to send back void setup() . . .

Read More …

Randomnerdtutorials: ESP8266 Controlled with Android App (MIT App Inventor)

  ESP8266 Controlled with Android App (MIT App Inventor)   #include <ESP8266WiFi.h> #include <WiFiClient.h> #include <ESP8266WebServer.h> #include <ESP8266mDNS.h> const char *ssid = “KMTRONIC”; const char *password = “12345678”; ESP8266WebServer server(80); const int led = D0; void handleRoot() { digitalWrite(led, 1); server.send(200, “text/plain”, “hello from esp8266!”); digitalWrite(led, 0); } void handleNotFound(){ digitalWrite(led, 1); String message = . . .

Read More …

ESP8266 NodeMCU: KMtronic UART 8 Channel Relay Controller control

KMtronic UART 8 Channel Relay Controller control         void setup() { //Initialize serial and wait for port to open: Serial.begin(9600); } void loop() { for(uint8_t i=1; i < 9; i++ ){ KMtronic_Relay_ON(i); delay(50); } for(uint8_t i=1; i < 9; i++ ){ KMtronic_Relay_OFF(i); delay(50); } KMtronic_Relay_ON(1); delay(500); KMtronic_Relay_OFF(1); delay(500); KMtronic_Relay_ON(8); delay(500); KMtronic_Relay_OFF(8); delay(500); . . .

Read More …

KMtronic LAN WEB 8 Channel Relay board