KMTronic Plug-in and Creating Devices on HomeSeer HS3

KMTronic Plug-in and Creating Devices on HomeSeer HS3

 

We already have a plug-in for Sonoff’s with Tasmota firmware which works great and we use it all the time, but sometimes WiFi isn’t good enough especially for controls outside of the home or in a situation where reliability is important. For these cases we introduce the KMTronic Web Relay, an Ethernet based 8 relay device with optional DIN mounting. With the Web Relay we can control 8 individual relays using HomeSeer and our KMT Plug-in. We already use these both inside and outside of the building and find them very reliable and cost effective especially as compared to devices such as the Adam 6060 at 5 times the price. Likewise, sometimes temperature measurement is required with a degree of reliability and flexibility, such as monitoring external temperature, or water temperature. The one-wire DS18B20 is an established and reliable sensor available in many form factors and each LAN-DS1820 unit can support up to 4 of these.

 

KMTronic Plug-in and Creating Devices on HomeSeer HS3
KMTronic Plug-in and Creating Devices on HomeSeer HS3

 

 

LAN DS18B20 WEB Temperature Monitor 4 Sensors Complete

KMtronic LAN DS18B20 WEB Temperature Measuring Monitor 4 Sensors Complete

 

 

 

https://www.gen.net.uk/kmtronic-homeseer

 

 

 

KMtronic Modbus LAN TCP/IP to Modbus RS485 RTU Serial Converter: testing MODBUS LED Display

 

Python examples KMtronic Modbus LAN TCP/IP to Modbus RS485 RTU Serial Converter: testing MODBUS LED Display

 

Python examples KMtronic Modbus LAN TCP/IP to Modbus RS485 RTU Serial Converter: testing MODBUS LED Display
Python examples KMtronic Modbus LAN TCP/IP to Modbus RS485 RTU Serial Converter: testing MODBUS LED Display

 

Pymodbus is a full Modbus protocol implementation using twisted for its asynchronous communications core.

 

import struct

from struct import *
from pymodbus.client.sync import ModbusTcpClient
# from pymodbus.client.sync import ModbusSerialClient as ModbusClient

import logging
logging.basicConfig()
log = logging.getLogger()
log.setLevel(logging.DEBUG)

// IP KMtronic Modbus LAN TCP/IP to Modbus RS485 RTU Serial Converter
host = '192.168.1.199'
port = 502

client = ModbusTcpClient(host, port)
# client = ModbusClient(method='rtu', port='/dev/ttyUSB0', timeout=1)
client.connect()


# First digital input address
address = 0
# Written value
value = 1221

# It will send '1221' to the output 
client.write_register(address, value, unit=1)

print "-----------------------------"

 

Output

kr@ubuntu-server:/var/www/html/python-test$ python ModBus-LED-Display.py
DEBUG:pymodbus.transaction:Current transaction state - IDLE
DEBUG:pymodbus.transaction:Running transaction 1
DEBUG:pymodbus.transaction:SEND: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x6 0x0 0x0 0x4 0xc5
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x6 0x0 0x0 0x4 0xc5
DEBUG:pymodbus.framer.socket_framer:Processing: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x6 0x0 0x0 0x4 0xc5
DEBUG:pymodbus.factory:Factory Response[WriteSingleRegisterResponse: 6]
DEBUG:pymodbus.transaction:Adding transaction 1
DEBUG:pymodbus.transaction:Getting transaction 1
DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
-----------------------------
kr@ubuntu-server:/var/www/html/python-test$

 

Python examples KMtronic Modbus LAN TCP/IP to Modbus RS485 RTU Serial Converter: testing MODBUS LED Display
Python examples KMtronic Modbus LAN TCP/IP to Modbus RS485 RTU Serial Converter: testing MODBUS LED Display

 

Netcat: Send TCP binarry files for control KMtronic RS485 Relay

 

 

Netcat (often abbreviated to nc) is a computer networking utility for reading from and writing to network connections using TCP or UDP.

 

BAT file for generate BIN files

@echo off
echo FF0101>on.txt
certutil -decodehex on.txt on.bin@echo off
echo FF0100>off.txt
certutil -decodehex off.txt off.bin

 

D:\Rabotna\Socat>nc -w 1 192.168.1.199 12345 < on.bin
D:\Rabotna\Socat>nc -w 1 192.168.1.199 12345 < off.bin

 

 

KMtronic LAN TCP/IP to RS485 Serial Converter

 

 

 

 

 

 

Testing Heatmiser EDGE ModBus Thermostat with ModbusMAT freeware program

 

Heatmiser EDGE ModBus Thermostat
Heatmiser EDGE ModBus Thermostat

 

Protocol:
EDGE SERIES MODBUS COMMUNICATION PROTOCOL V1.8

Communication protocol:
1. UART Baud Rate: 9600
2. UART Parity: None
3. Communications ID Rang:0-32 ,255

Heatmiser EDGE
The Heatmiser EDGE is 230v powered Thermostat that is compatible with the Heatmiser wireless air sensor and wireless door/window switch. The wireless air sensor function is perfect for those looking to measure the temperature in another location and for those with larger open plan properties, multiple air sensors can be used to create an average temperature.

The Heatmiser EDGE can be set to work as a non programmable, 5/2 day, 7 day or 24 hour programmable thermostat.

230V Powered
Wireless Air Sensor Function
Modbus Network Function

 

Testing Heatmiser EDGE ModBus Thermostat with ModbusMAT freeware program and KMtronic USB<>RS485 adapter
Testing Heatmiser EDGE ModBus Thermostat with ModbusMAT freeware program and KMtronic USB<>RS485 adapter

 

Testing Heatmiser EDGE ModBus Thermostat with ModbusMAT freeware program and KMtronic USB<>RS485 adapter
Testing Heatmiser EDGE ModBus Thermostat with ModbusMAT freeware program and KMtronic USB<>RS485 adapter

 

Testing Heatmiser EDGE ModBus Thermostat with ModbusMAT freeware program and KMtronic USB<>RS485 adapter
Testing Heatmiser EDGE ModBus Thermostat with ModbusMAT freeware program and KMtronic USB<>RS485 adapter

 

Testing Heatmiser EDGE ModBus Thermostat with ModbusMAT freeware program and KMtronic USB<>RS485 adapter
Testing Heatmiser EDGE ModBus Thermostat with ModbusMAT freeware program and KMtronic USB<>RS485 adapter

 

ModbusMAT freeware ModBus program

 

Test KMtronic LAN TCP/IP to RS485 Serial Converter

 

KMtronic LAN TCP/IP to RS485 Serial Converter
KMtronic LAN TCP/IP to RS485 Serial Converter

 

Default:
IP address: 192.168.1.199
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
Default RS485 Bringe Port – 12345
Username: admin
Password: admin

Ethernet Communication:
TCP/IP
Bringe Port – 12345

RS485 Serial Port Communication:
RS-485 Sugnals –    A(Data+), B(Data-), GND
Baudrate –  1200, 2400, 4800, 9600, 19200,
38400, 57600 and 115200 bits per second.
Parity Check: None, Even, Odd
Data bits: 8
Stop bits: 1, 2

Reset to Default Settings:
Hold Reset button for 10 seconds

 

Testing KMtronic LAN TCP/IP to RS485 Serial Converter
Test KMtronic LAN TCP/IP to RS485 Serial Converter
Testing KMtronic LAN TCP/IP to RS485 Serial Converter
Test KMtronic LAN TCP/IP to RS485 Serial Converter

 

Testing KMtronic LAN TCP/IP to RS485 Serial Converter
Test KMtronic LAN TCP/IP to RS485 Serial Converter