UDP packet send from ESP8266 to KMtronic UDP LAN Relay board

 

KMtronic UDP LAN Ethernet IP 2 channels Relay Controller
KMtronic UDP LAN Ethernet IP 2 channels Relay Controller

 

NodeMcu
NodeMcu

 

#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()
{
 Serial.begin(115200);
 Serial.println();

Serial.printf("Connecting to %s ", ssid);
 WiFi.begin(ssid, password);
 while (WiFi.status() != WL_CONNECTED)
 {
 delay(500);
 Serial.print(".");
 }
 Serial.println(" connected");

Udp.begin(localUdpPort);
 Serial.printf("Now listening at IP %s, UDP port %d\n", WiFi.localIP().toString().c_str(), localUdpPort);
 
 // Turn relay 1 ON KMtronic UDP Relay board
 // connected to IP: 192.168.1.199 PORT:12345
 Udp.beginPacket("192.168.1.199", 12345);
 Serial.println("Send UDP...");
 Udp.write("FF0101");
 Serial.println(Udp.endPacket());
 // --------------------------------------
}


void loop()
{
 int packetSize = Udp.parsePacket();
 if (packetSize)
 {
 // receive incoming UDP packets
 Serial.printf("Received %d bytes from %s, port %d\n", packetSize, Udp.remoteIP().toString().c_str(), Udp.remotePort());
 int len = Udp.read(incomingPacket, 255);
 if (len > 0)
 {
 incomingPacket[len] = 0;
 }
 Serial.printf("UDP packet contents: %s\n", incomingPacket);

// send back a reply, to the IP address and port we got the packet from
 Udp.beginPacket(Udp.remoteIP(), Udp.remotePort());
 Udp.write(replyPacket);
 Udp.endPacket();
 }
}

 

 

 

 

 

Centrafuse Auto Application Integration Framework

 

Centrafuse Auto Framework
Centrafuse Auto is a completely agnostic Application Integration Framework that enables separate applications, content sources and devices to merge into a single user experience, achieving what we like to call “Intelligent Convergence”.
Centrafuse Auto Application Integration Framework KMtronic USB Relays
Centrafuse Auto Application Integration Framework KMtronic USB Relays
This App controls the KMtronic Relay Board. You need a Relay Board with 8 Relays or more. Up to 32 Relays are possible.

AVSforum: Software for a DIY Home Automation based off of relays for my new home theater

 

Software for a DIY Home Automation based off of relays for my new home theater

KMtronic 24 channel RS485-over-USB controlled relay system

 

AVSforum: Software for a DIY Home Automation based off of relays for my new home theater KMtronic
AVSforum: Software for a DIY Home Automation based off of relays for my new home theater KMtronic
AVSforum: Software for a DIY Home Automation based off of relays for my new home theater
AVSforum: Software for a DIY Home Automation based off of relays for my new home theater

 

http://www.avsforum.com/forum/155-diy-speakers-subs/1457157-diy-home-automation.html

 

 

Testing Radzio Modbus Master Simulator with KMtronic RS485 RTU Serial Converter

Testing Radzio Modbus Master Simulator with KMtronic RS485 RTU Serial Converter

 

KMtronic USB to RS485 FTDI Interface Converter – BOX

 


SDM230 Modbus 220/230V Single Phase Energy Meter

 

 

 

Testing Radzio Modbus Master Simulator with KMtronic RS485 RTU Serial Converter
Testing Radzio Modbus Master Simulator with KMtronic RS485 RTU Serial Converter

 

Testing Radzio Modbus Master Simulator with KMtronic RS485 RTU Serial Converter
Testing Radzio Modbus Master Simulator with KMtronic RS485 RTU Serial Converter

 

 

http://en.radzio.dxp.pl/modbus-master-simulator/