KMtronic UDP LAN Controled Internet relay board

 

 

http://www.info.kmtronic.com/km-udp-eight-relay-box.html

 

 

PHP code for STATUS Read UDP Relay board connected to

IP: 192.168.1.199

PORT:12345

 

UDP COMMAND: FF0000

 

Create a new file.

<?php

$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); 

$msg = "FF0000";

$len = strlen($msg);

socket_sendto($sock, $msg, $len, 0 ,'192.168.1.199', 12345); socket_recvfrom($sock, $buf, 12, 0, $from, $port);

echo $buf; socket_close($sock);

?>

 

Save the file as status.php and run. ( $ php status.php )

 

Result:

$ php list.php





 

 

PHP code for CONTROL UDP Relay board connected to

IP: 192.168.1.199

PORT:12345

 

UDP COMMANDS:
FF0101  // TURN ON Relay 1
FF0100  // TURN OFF Relay 1
FF0201  // TURN ON Relay 2
FF0200  // TURN OFF Relay 2
...

FF0801  // TURN ON Relay 8
FF0800  // TURN OFF Relay 8

 

Create a new file.

<?php

$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);

$msg = "FF0101"; // TURN ON Relay 1

$len = strlen($msg);

socket_sendto($sock, $msg, $len, 0 ,'192.168.1.199', 12345);

socket_recvfrom($sock, $buf, 12, 0, $from, $port);

echo $buf;

socket_close($sock);

?>

Save the file as relay_1_on.php and run. ( $ php relay_1_on.php )

Wednesday, 27 July 2016 06:48

Creating PHP Scripts ("Hello World!")

 

Create a new empty file with your editor and begin with a simple PHP code block.

<?php

Print "Hello, World!"; 

?>

 

Save the file as hello.php

 

To make the script work, run the hello.php command:

$ php list.php

 


 

 

 

 

 

 

 

 

 

 

 

 

 http://sigma-shop.com/rs485-relays.html

 

 

 

 

Download ZIP file 

http://www.info.kmtronic.com/software/RS485_Relays/RS485_Relays_Command_Prompt.zip 

 

Unzip in any folder
in example "D:\KMtronic"

 

Quick help
rs485relays.exe COM<COM port> <COMMAND>
COM port: COM port
COMMAND: RS485 Relays commands (http://info.kmtronic.com/kmtronic-rs485-relays-commands.html)

NOTE: Commands must be without space (intervals).

 

 

Commands examples
rs485relays.exe COM5 FF0101 (this will turn on channel 1 board connected to COM:5)
rs485relays.exe COM5 FF0100 (this will turn off channel 1 board connected to COM:5)

 



 

 

 

 

 

 

 

 

 

 

 

 

 

 

http://www.loxone.com

 

 

Thank you David!

 

Loxone KMtronic UDP relay 

 

 

 

 Loxone KMtronic UDP Relay


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example file for COM Port 1 (COM1)

 

 

KMtronic USB Relay control

 

 

 KMtronic USB Relay control

 

 


 

 

@echo off
cls
echo "--------------------------------------"
echo " KMtronic USB One Relay "
echo " example "
echo " "
echo " "
echo " "
echo " ON Command : 0xFF, 0x01, 0x01 "
echo " "
echo " OFF Command : 0xFF, 0x01, 0x00 "
echo " "
echo "--------------------------------------"

 

echo FF0100>off.txt

 

echo FF0101>on.txt

 

certutil -decodehex off.txt off.bin
certutil -decodehex on.txt on.bin

 

MODE COM1:9600,n,8,1
copy on.bin \\.\com1 /b
echo " Relay is ON"
copy off.bin \\.\com1 /b
echo " Relay is OFF"

 

del on.bin
del off.bin
del on.txt
del off.txt

 

 

 


 

 

 

Download

www.info.kmtronic.com/software/USB_Relays/KMtronic_USB_Relay_Command_Prompt.zip

 

 

 

 

 

 

 

 

Friday, 31 July 2015 10:16

KMtronic RF433MHz Relays commands

 

 

RF 433MHz Relays commands

 

 

           ON Command                    OFF Command
              DEC   HEX                      DEC      HEX
Relay Board ID:01 Relay 1 Channel   1 255 1 1 FF 01 01 255 1 0 FF 01 00
  Relay 2 Channel   2 255 2 1 FF 02 01 255 2 0 FF 02 00
  Relay 3 Channel   3 255 3 1 FF 03 01 255 3 0 FF 03 00
  Relay 4 Channel   4 255 4 1 FF 04 01 255 4 0 FF 04 00
  Relay 5 Channel   5 255 5 1 FF 05 01 255 5 0 FF 05 00
  Relay 6 Channel   6 255 6 1 FF 06 01 255 6 0 FF 06 00
  Relay 7 Channel   7 255 7 1 FF 07 01 255 7 0 FF 07 00
  Relay 8 Channel   8 255 8 1 FF 08 01 255 8 0 FF 08 00
             
Relay Board ID:02 Relay 1 Channel   9 255 9 1 FF 09 01 255 9 0 FF 09 00
  Relay 2 Channel 10 255 10 1 FF 0A 01 255 10 0 FF 0A 00
  Relay 3 Channel 11 255 11 1 FF 0B 01 255 11 0 FF 0B 00
  Relay 4 Channel 12 255 12 1 FF 0C 01 255 12 0 FF 0C 00
  Relay 5 Channel 13 255 13 1 FF 0D 01 255 13 0 FF 0D 00
  Relay 6 Channel 14 255 14 1 FF 0E 01 255 14 0 FF 0E 00
  Relay 7 Channel 15 255 15 1 FF 0F 01 255 15 0 FF 0F 00
  Relay 8 Channel 16 255 16 1 FF 10 01 255 16 0 FF 10 00
             
Relay Board ID:03 Relay 1 Channel 17 255 17 1 FF 11 01 255 17 0 FF 11 00
  Relay 2 Channel 18 255 18 1 FF 12 01 255 18 0 FF 12 00
  Relay 3 Channel 19 255 19 1 FF 13 01 255 19 0 FF 13 00
  Relay 4 Channel 20 255 20 1 FF 14 01 255 20 0 FF 14 00
  Relay 5 Channel 21 255 21 1 FF 15 01 255 21 0 FF 15 00
  Relay 6 Channel 22 255 22 1 FF 16 01 255 22 0 FF 16 00
  Relay 7 Channel 23 255 23 1 FF 17 01 255 23 0 FF 17 00
  Relay 8 Channel 24 255 24 1 FF 18 01 255 24 0 FF 18 00
             
Relay Board ID:04 Relay 1 Channel 25 255 25 1 FF 19 01 255 25 0 FF 19 00
  Relay 2 Channel 26 255 26 1 FF 1A 01 255 26 0 FF 1A 00
  Relay 3 Channel 27 255 27 1 FF 1B 01 255 27 0 FF 1B 00
  Relay 4 Channel 28 255 28 1 FF 1C 01 255 28 0 FF 1C 00
  Relay 5 Channel 29 255 29 1 FF 1D 01 255 29 0 FF 1D 00
  Relay 6 Channel 30 255 30 1 FF 1E 01 255 30 0 FF 1E 00
  Relay 7 Channel 31 255 31 1 FF 1F 01 255 31 0 FF 1F 00
  Relay 8 Channel 32 255 32 1 FF 20 01 255 32 0 FF 20 00
             
Relay Board ID:05 Relay 1 Channel 33 255 33 1 FF 21 01 255 33 0 FF 21 00
  Relay 2 Channel 34 255 34 1 FF 22 01 255 34 0 FF 22 00
  Relay 3 Channel 35 255 35 1 FF 23 01 255 35 0 FF 23 00
  Relay 4 Channel 36 255 36 1 FF 24 01 255 36 0 FF 24 00
  Relay 5 Channel 37 255 37 1 FF 25 01 255 37 0 FF 25 00
  Relay 6 Channel 38 255 38 1 FF 26 01 255 38 0 FF 26 00
  Relay 7 Channel 39 255 39 1 FF 27 01 255 39 0 FF 27 00
             
Relay Board ID:06 Relay 8 Channel 40 255 40 1 FF 28 01 255 40 0 FF 28 00
  Relay 1 Channel 41 255 41 1 FF 29 01 255 41 0 FF 29 00
  Relay 2 Channel 42 255 42 1 FF 2A 01 255 42 0 FF 2A 00
  Relay 3 Channel 43 255 43 1 FF 2B 01 255 43 0 FF 2B 00
  Relay 4 Channel 44 255 44 1 FF 2C 01 255 44 0 FF 2C 00
  Relay 5 Channel 45 255 45 1 FF 2D 01 255 45 0 FF 2D 00
  Relay 6 Channel 46 255 46 1 FF 2E 01 255 46 0 FF 2E 00
  Relay 7 Channel 47 255 47 1 FF 2F 01 255 47 0 FF 2F 00
  Relay 8 Channel 48 255 48 1 FF 30 01 255 48 0 FF 30 00

 

 

 

 

 

  Binary Commands

Relay Board ID:01           FF B1 xx

FF B1 xx -  Set the status of the relays in HEX format where (xx) is the last byte corresponding for each relay.
For example:
FF B1 FF – All relay ON
FF B1 00 – All relay OFF
FF B1 10 – only (5) relay ON all others OFF and so on….

  > FF B1 xx xx xx xx xx xx xx xx  - Reply from relay where xx is status: 01 - Relay is ON, 00 - Relay is OFF

First byte is status first relay, Eight byte is status eight relay..

Relay Board ID:02           FF B2 xx
Relay Board ID:03           FF B3 xx
Relay Board ID:04           FF B4 xx
Relay Board ID:05           FF B5 xx
Relay Board ID:06           FF B6 xx

 

  Status read commands

 
KMtronic RS485 Relay board


Relay Board ID:01

FF A1 00 - Status request command

  > FF A1 xx xx xx xx xx xx xx xx  - Reply from relay where xx is status: 01 - Relay is ON, 00 - Relay is OFF 

First byte is status first relay, Eight byte is status eight relay

 

Relay Board ID:02

FF A2 00 - Status request command

  > FF A2 xx xx xx xx xx xx xx xx  - Reply from relay where xx is status: 01 - Relay is ON, 00 - Relay is OFF 

First byte is status first relay, Eight byte is status eight relay

 


Relay Board ID:03

FF A3 00 - Status request command

  > FF A3 xx xx xx xx xx xx xx xx  - Reply from relay where xx is status: 01 - Relay is ON, 00 - Relay is OFF 

First byte is status first relay, Eight byte is status eight relay

 


Relay Board ID:04

FF A4 00 - Status request command

  > FF A4 xx xx xx xx xx xx xx xx  - Reply from relay where xx is status: 01 - Relay is ON, 00 - Relay is OFF 

First byte is status first relay, Eight byte is status eight relay

 


Relay Board ID:05

FF A5 00 - Status request command

  > FF A5 xx xx xx xx xx xx xx xx  - Reply from relay where xx is status: 01 - Relay is ON, 00 - Relay is OFF 

First byte is status first relay, Eight byte is status eight relay

 


Relay Board ID:06

FF A6 00 - Status request command

  > FF A6 xx xx xx xx xx xx xx xx  - Reply from relay where xx is status: 01 - Relay is ON, 00 - Relay is OFF 

First byte is status first relay, Eight byte is status eight relay

 

 


 

 

 

Dip Switch (Address) Calculators

 

 

http://www.sabretechnology.co.uk/downloads/dipcalc.swf

 

http://www.chauvetlighting.com/chauvet-dip-switch-calculator/

http://www.thedmxwiki.com/dmx_definitions/dip_switches

http://www.xledlighting.co.uk/led-technology/dmx-dip-switch-calculator/

 

 

 

 

 

 

 

 

 

KMtronic Modbus LAN TCP/IP to Modbus RTU RS485 Serial Communication Module Converter

 


Manufacturer:

KMtronic LTD


Features:

- Converts Modbus RS485 RTU into Modbus TCP/IP over Ethernet
- Connect up to 32 Modbus RS485 devices to an Ethernet network


Applications:
- Monitoring (logging) photovoltaic systems and wind power turbines
- Monitoring (logging) of energy consumption


Supply:

Requires external 12 volt DC / 600mA power supply


Operation Range:

Industrial (0°C to +80°C)


Dimensions:

110 mm / 55 mm / 25 mm (connectors mounted)


Ethernet Communication:
Protocol - MODBUS TCP
TCP Port - 502

Serial RS485 Communication:
Protocol - MODBUS RTU
RS-485 Sugnals -    A(Data+), B(Data-), GND
Baudrate -  1200 bps to 115.2 Kbps


Default:

IP address: 192.168.1.199
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
Username: admin
Password: admin


Reset to Default Settings:
Hold Reset button for 10 seconds

 

 

 

KMtronic Modbus RS485 RTU Serial to Modbus LAN TCP/IP Module Converter

 

 

Modbus RS485 RTU Serial to Modbus LAN TCP/IP Module Converter

Modbus RS485 RTU Serial to Modbus LAN TCP/IP Module Converter

Modbus RS485 RTU Serial to Modbus LAN TCP/IP Module Converter 

 

 

 

 

 

 

KMtronic

 

Manufacturer:
KMTronic LTD

Features:
- Each relay has an LED to indicate when it is operated.
- Relay outputs can be used to turn ON/OFF lights, motors and other devices.

Specifications:
Relays have Normally Open (NO) and
Normally Closed (NC) Contacts each capable of switching max:
- 12VDC/15A
- 24VDC/15A
- 125VAC/15A
- 250VAC/10A

Supply:
Requires external 12 volt DC / 500mA power supply

Operation Range:
Industrial (0°C to +80°C)

Dimensions:
110 mm / 55 mm / 25 mm(connectors mounted)

Default:
IP address: 192.168.1.199
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
UDP Port: 12345

 

UDP Commands:

FF0000 - Status Read command

FF0100 - Relay 1 OFF command
FF0101 - Relay 1 ON command

FF0200 - Relay 2 OFF command
FF0201 - Relay 2 ON command

 

FFE000 - All relays OFF command
FFE003 - All relays ON command

 

UDP Test Software example including source code (C#):

 

KMTronic UDP Test Software.zip
KMTronic UDP Test Software Source Code.zip

 

 

 

 

 

 

 

 

 

 

 KMTronic LAN Ethernet IP 8 channels WEB Relay board BOX

 

 Google Chrome Example

 

Control KMtronic LAN relays using Explorer Bookmarks

 

 

 

 Click on the right top corner to open the Bookmark Manager or simple click Ctrl+Shift + O

 

 

Control KMtronic LAN relays using Explorer Bookmarks

 

copy this to the empty field : http://admin:This email address is being protected from spambots. You need JavaScript enabled to view it./FF0101

and change the user name and password with yours and change the IP address

  

Control KMtronic LAN relays using Explorer Bookmarks

 

 

same thing for OFF command just replace the FF0101 with FF0100

 http://admin:This email address is being protected from spambots. You need JavaScript enabled to view it./FF0100

 

Control KMtronic LAN relays using Explorer Bookmarks

 

 

 

 

 

 

Control KMtronic LAN relays using Explorer Bookmarks

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Modbus Poll


Modbus Poll is the very popular Modbus master simulator

for test and debug of your slave devices.

Supports Modbus RTU/ASCII and Modbus TCP/IP.


www.ModbusTools.com

 

 

 

 

05 (0x05) Write Single Coil LOG

 

web-8relay-modbus-mobile

 

 

 

 

 

 

 

 

 

 

 

Page 2 of 41