Wednesday, 11 December 2013 10:08

USB, RS232, RS485

Written by





Control KMtronic USB, RS485, RS232 relay boards via EXCEL files Control KMtronic USB, RS485 and TCP(Web) relay boards by Domoticz

Control KMtronic USB, RS232 relay boards via BAT files Control KMtronic USB, RS485 and TCP(Web) relay boards by Domoticz


Control KMtronic RS485 relay boards via BAT files Control KMtronic USB, RS485 and TCP(Web) relay boards by Domoticz


Control KMtronic USB, RS485 and TCP(Web) relay boards by Domoticz Control KMtronic USB, RS485 and TCP(Web) relay boards by Domoticz

KMTronic USB Relay Test software


KMtronic USB 8 Relay software


KMtronic One Relay Timer software


RS485 Relays commands


DSP Robotics  FlowStone example


Labview example (thanks, Siva)


MATLAB example (thanks, Dr. Dean Rose)


Windows Shortcut example for switching on and off  the KMTronic USB One Relay


Windows Command Line example

Windows Command Line example 2 Control KMtronic USB, RS485 and TCP(Web) relay boards by Domoticz


Windows Startup Control

Abacom ProfiLAB example



Controlling USB Relay via Microsoft Office PowerPoint   



Mach3 CNC


GBTimelapse to control the Dynamic Perception MX2 Dolly using a USB relay


Macro Express




Vixen lighting automation software


Centrafuse AUTO






KMTronic USB One Relay Linux Test script


Linux example





Macintosh example






Controlling KMTronic Relays by Arduino ADK





Controlling RS485 Relays by Raspberry Pi







Sample VB NET 2010 software (inc. source code)


Sample Visual Basic code



Sample C# NET 2010 software (inc. source code)


Sample C# code



Sample php files



The Perl example(thanks, Pascal)


The python library(thanks, David)






A USB relay for your D-Star repeater


Door lock using USB Relay


Controlling KMTronic Relays by Loxone Home Automation Miniserver


Control4 RS232 8 Relay Board Driver License


Self Service Tablet Kiosk by Enigma Systems LLC










Monday, 09 December 2013 14:26

Controlling USB One Relay by Raspberry Pi

Written by






USB One Relay commands:


 FF 01 00 - OFF command

FF 01 01 - ON command


                   FF 01 03 - Status request command

> FF 01 xx - Reply from relay

where xx is status: 01 - Relay is ON, 00 - Relay is OFF




Set baudrate to 9600b/s



Switch ON relay




Switch OFF relay




Status request



Friday, 29 November 2013 16:24

How to change default settings KMTronic LAN board

Written by





Turn OFF Wi-Fi Internet if you using Laptop PC.


Open ‘Network and Sharing Center’ and go to ‘Local Area Connection’ properties.


Set as show in next screenshots:





Connect to PC direct !!!


Open Explorer and type and press Enter.


If all is right you will see Login menu board.


Type ‘admin’ ‘admin’ and go to Configuration page, change Board IP address, Gateway IP address and click Save Config.






Monday, 09 September 2013 13:31


Written by


Master (Inputs) Code


#include "EtherShield.h"

uint8_t mymac[6] = {0xCF,0x70,0x7C,0xE4,0x8A,0xB9}; // Master MAC
uint8_t myip[4] = {192,168,1,26};  // Master IP
uint8_t udpmac[6] = {0xCF,0x70,0x7C,0xE4,0x8A,0xB8}; // Slave MAC
uint8_t udpip[4] = {192,168,1,25}; // Slave IP
#define DEST_PORT_L  0x34
#define DEST_PORT_H  0x12

const char iphdr[] PROGMEM ={0x45,0,0,0x82,0,0,0x40,0,0x20}; // 0x82 is the total len on ip, 0x20 is ttl (time to live)

#define BUFFER_SIZE 750
static uint8_t buf[BUFFER_SIZE+1];
char reply[]={0xFF, 0x00, 0x00, 0x00, 0x00};

EtherShield es=EtherShield();

uint16_t plen, dat_p, a;

static uint32_t timetosend;

void setup(){
  es.ES_init_ip_arp_udp_tcp(mymac,myip, 80);

} // end setup
void loop(){
    // read packet, handle ping and wait for a tcp packet:
    dat_p=es.ES_packetloop_icmp_tcp(buf,es.ES_enc28j60PacketReceive(BUFFER_SIZE, buf));
    if(millis() - timetosend > 100) // every 10 seconds //
    timetosend = millis();
    if ( check()  )
                reply[1] = digitalRead(A5) ? 1 : 0;
                reply[2] = digitalRead(A4) ? 1 : 0;
                reply[3] = digitalRead(A3) ? 1 : 0;
                reply[4] = digitalRead(A2) ? 1 : 0;
} // end loop

void UDP_Send( void ) {
  uint8_t i=0;
  uint16_t ck;
  // Setup the MAC addresses for ethernet header
    buf[ETH_DST_MAC +i]= udpmac[i];
    buf[ETH_SRC_MAC +i]= mymac[i];

  // IP Header
  buf[UDP_SRC_PORT_L_P]=0x34; // lower 8 bit of src port
  buf[UDP_LEN_L_P]=8+sizeof(reply); // fixed len
  // zero the checksum
  // copy the data:
  // most fields are zero, here we zero everything and fill later
  uint8_t* b = (uint8_t*)&reply;
  while(i< sizeof( reply ) ){
  // Create correct checksum
  ck=es.ES_checksum(&buf[IP_SRC_P], 16 + sizeof( reply ),1);
  buf[UDP_CHECKSUM_L_P]=ck& 0xff;
  es.ES_enc28j60PacketSend(42 + sizeof( reply ), buf);

int check()
        if (digitalRead(A5) != reply[1] ) return(1);
        if (digitalRead(A4) != reply[2] ) return(1);
        if (digitalRead(A3) != reply[3] ) return(1);
        if (digitalRead(A2) != reply[4] ) return(1);
        return 0;





Slave (Relays) code


#include "EtherShield.h"

uint8_t mymac[6] = {0xCF,0x70,0x7C,0xE4,0x8A,0xB8};
uint8_t myip[4] = {192,168,1,25};
uint16_t MYWWWPORT = 80;

#define BUFFER_SIZE 750
static uint8_t buf[BUFFER_SIZE+1];

EtherShield es=EtherShield();

uint16_t plen, dat_p;

void setup(){
es.ES_init_ip_arp_udp_tcp(mymac,myip, MYWWWPORT);

} // end setup

void loop(){

// read packet, handle ping and wait for a tcp packet:
dat_p=es.ES_packetloop_icmp_tcp(buf,es.ES_enc28j60PacketReceive(BUFFER_SIZE, buf));


} // end loop

void Setup_Pins(){

pinMode(5, OUTPUT); digitalWrite(5, 0);
pinMode(6, OUTPUT); digitalWrite(6, 0);
pinMode(7, OUTPUT); digitalWrite(7, 0);
pinMode(8, OUTPUT); digitalWrite(8, 0);

} // end Setup_Pins

void Relay_Control(){
Serial.print(buf[43], HEX);
//if (buf[42]==0xFF)
// {
//Serial.print(buf[43], HEX);
digitalWrite(8, buf[43]);
digitalWrite(7, buf[44]);
digitalWrite(6, buf[45]);
digitalWrite(5, buf[46]);
// }
} // end Relay_Control




Monday, 26 August 2013 08:40

Vixen KMtronic Relays Control

Written by




Vixen KMtronic Relays Control




Download and install Vixen Lightning from



Download information and DLL:






Wednesday, 07 August 2013 04:37

PLC 8 relay remote control net for Android

Written by



PLC 8 relay remote control net

Vincenzo Scozzaro


8 channels WEB Relay board










Tuesday, 30 July 2013 13:42


Written by











Playstore app:



Some functions:
Support up to 60 relay (is not important how many board)
Relay state
Connection automatic/manual
Use Gps for restricted area
Password security
Skin (2)
Can use realy from Ipcamera (some Foscam or clone)
Italian/english language
Voice command










Tuesday, 23 July 2013 06:48

USB 8 Relay software

Written by



KMTronic USB Relay software




Download from:


Unzip it to your own folder.


If you get this message you see the following error

that means that you do not have the latest version of Microsoft .NET Framework installed on your computer.
Microsoft .NET Framework has to be installed on your computer in order to use the software.


You can download this from there:


The software will detect all COM ports you have and there must be one more (Virtual COM port).

Choose COM port. Click on “OPEN” button and using “ON” and “OFF” buttons you can control relay.






Tuesday, 09 July 2013 15:17

USB 8 Relay BOX Drivers Instalation

Written by



USB 8 Relay BOX



Download Drivers from:


UnZip in a separate folder ( in example D:\Driver_KMtronic_USB8relays_BOX_CDC )



Open Device Manager


Connect the board to PC



You will see USB CDC COM under "Other devices"



Click on USB CDC COM and next Update Driver...



Click on Browse my computer ...



Locate driver’s holder and click Next


Click on Install this driver ...



Wait until Windows install the driver



Windows will show confirmation message that drivers are installed



Close and open again Device Manager to check that USB COM is now installed




Windows 8









Page 10 of 33