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.
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.
from struct import *
from pymodbus.client.sync import ModbusTcpClient
# from pymodbus.client.sync import ModbusSerialClient as ModbusClient
log = logging.getLogger()
// 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)
# First digital input address
address = 0
# Written value
value = 1221
# It will send '1221' to the output
client.write_register(address, value, unit=1)
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'
EDGE SERIES MODBUS COMMUNICATION PROTOCOL V1.8
1. UART Baud Rate: 9600
2. UART Parity: None
3. Communications ID Rang：0-32 ,255
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.
Wireless Air Sensor Function
Modbus Network Function