Home Assistant: Awaken your home – open-source Home Automation platform

KMtronic LAN Ethernet IP 8 channels Modbus/TCP Relay board


KMtronic LAN Ethernet IP 8 channels Modbus/TCP Relay board

KMtronic LAN Ethernet IP 8 channels Modbus/TCP Relay board

Manufacturer:
KMTronic LTD

Model:
MDB8CR

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 / 1000mA power supply

Standby current:
(Relays OFF) – 79mA
One Relay ON – 116mA
Two Relays ON – 147mA
All Relays ON – 350 mA

Dimensions:
KMTronic_8Relay_Dimension.pdf

Default:
IP address: 192.168.1.199
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1

MODBUS Commands:
01 (0x01) Read Coils
05 (0x05) Write Single Coil
15 (0x0F) Write Multiple Coils

Coil 0000: Relay 01
Coil 0001: Relay 02
Coil 0002: Relay 03
Coil 0003: Relay 04
Coil 0004: Relay 05
Coil 0005: Relay 06
Coil 0006: Relay 07
Coil 0007: Relay 08

Reset to Default Settings:
Hold Reset button for 10 seconds

 

 

 

https://home-assistant.io

 

 

KMtronic LAN ModBus Relay board CONFIG

modbus:
 type: tcp
 host: 192.168.1.207
 port: 502
 
switch:
 platform: modbus
 slave: 1
 coils:
 - name: Switch1
 slave: 1
 coil: 0
 - name: Switch2
 slave: 1
 coil: 1
 - name: Switch3
 slave: 1
 coil: 2
 - name: Switch4
 slave: 1
 coil: 3
 - name: Switch5
 slave: 1
 coil: 4
 - name: Switch6
 slave: 1
 coil: 5
 - name: Switch7
 slave: 1
 coil: 6
 - name: Switch8
 slave: 1
 coil: 7

 

 

Wireless outdoor Weather station to Domoticz / RF-LINK

Wireless outdoor Weather station to Domoticz / RF-LINK
Wireless outdoor Weather station to Domoticz / RF-LINK

 

Step 1: What You Need

  • Raspberry Pi (The Raspberry Pi is a series of small single-board computers developed in the United Kingdom)
  • Domoticz Free Home Automation System
  • USB RFlink Gateway

Step 2: Add USB RFlink Gateway to Domoticz

Wireless outdoor Weather station to Domoticz / RF-LINK
Wireless outdoor Weather station to Domoticz / RF-LINK

 

Step 3: Go to Setings>Devices and tun to Used and add name. In example  “Xiron KZ-RF Temperature”.

Step 4: Wait about minute and check LOG file for information

LOG file:

2017-11-28 12:42:01.714 RFLink: 20;B9;PONG;
2017-11-28 12:42:51.705 RFLink: 20;BA;Tunex;ID=4A01;TEMP=0119;HUM=42;20;BB;PONG;
2017-11-28 12:42:51.706 (RF-LINK--RECEIVER) Temp + Humidity (Xiron)
2017-11-28 12:43:00.393 LUA: Reading values from: 'http://192.168.1.133/status.xml'
2017-11-28 12:43:00.610 LUA: 28FFA233021705CA 12.25 ---------------- --- ---------------- --- ---------------- --- ---------------- --- ---------------- --- ---------------- --- ---------------- --- KMtronic RF433 DS1820 Temperature Monitor 3.0
2017-11-28 12:43:00.611 LUA: 12.25
2017-11-28 12:43:00.611 LUA: RF433 R1 temp returned 28FF4C9E9016047B = '12.25'
2017-11-28 12:43:00.611 LUA: RF433 R2 temp returned 28FFA233021705CA = '12.25'
2017-11-28 12:43:00.611 LUA: RF433 R3 temp returned = '12.25'
2017-11-28 12:43:00.611 LUA: RF433 R4 temp returned = '12.25'
2017-11-28 12:43:00.612 EventSystem: Script event triggered: /home/domoticz/scripts/lua/script_time_kmtronic_rf433_temperature.lua
2017-11-28 12:43:00.614 LUA: Reading values from: 'http://192.168.1.202/status.xml'
2017-11-28 12:43:00.682 LUA: 2874EDD0040000F3 2874EDD0040000F3 36.00 284108D104000072 284108D104000072 26.18 28C9A0B804000037 28C9A0B804000037 24.81 28F3FDB80400006C 28F3FDB80400006C 32.00 KMtronic DS1820 Temperature Monitor 1.0
2017-11-28 12:43:00.682 LUA: Office1 temp returned 28F3FDB80400006C = '32.00'
2017-11-28 12:43:00.682 LUA: Office2 temp returned 28C9A0B804000037 = '24.81'
2017-11-28 12:43:00.682 LUA: Office3 temp returned 284108D104000072 = '26.18'
2017-11-28 12:43:00.682 LUA: Heating temp returned 2874EDD0040000F3 = '36.00'
2017-11-28 12:43:00.685 EventSystem: Script event triggered: /home/domoticz/scripts/lua/script_time_kmtronic.lua
2017-11-28 12:43:16.077 RFLink: 20;BC;Tun=42;BAT=OK;
2017-11-28 12:43:41.700 RFLink: 20;BD;PONG;
2017-11-28 12:44:00.194 LUA: Reading values from: 'http://192.168.1.133/status.xml'
2017-11-28 12:44:00.448 LUA: 28FFA233021705CA 12.25 ---------------- --- ---------------- --- ---------------- --- ---------------- --- ---------------- --- ---------------- --- ---------------- --- KMtronic RF433 DS1820 Temperature Monitor 3.0

 

Step 5: New sensor will be available in Temperatures

 

Wireless outdoor Weather station to Domoticz / RF-LINK
Wireless outdoor Weather station to Domoticz / RF-LINK

 

Similar articles

Domoticz starter set: Raspberry Pi, KMtronic WEB Relay, Temperature…

Music On Console is a lightweight music player

Music OConsole is a lightweight music player which consists of 2 parts, a server (Moc) and a player/interface (Mocp).

 

PHP example file

<?php

$ret = exec("sudo mocp -S", $out, $err);
 print_r($ret);
 print_r($out);
 print_r($err);
 
 $ret = exec("amixer -q sset Master 70%", $out, $err);
 
 $ret = exec("sudo mocp -l /music/sounds/01.mp3", $out, $err);
 
 sleep(10);
 $ret = exec("sudo mocp -l /music/sounds/02.mp3", $out, $err);
 
 sleep(10); 
 $ret = exec("amixer -q sset Master 80%", $out, $err);
 
 sleep(10);
 $ret = exec("amixer -q sset Master 90%", $out, $err);
 print_r($ret);
 print_r($out);
 print_r($err);

 ?>