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

 

Add temperature sensor in Domoticz: KMtronic LAN DS18B20 WEB Temperature Monitor

KMtronic LAN DS18B20 WEB Temperature Monitor

 

Domoticz: KMtronic LAN DS18B20 WEB Temperature Monitor
Domoticz: KMtronic LAN DS18B20 WEB Temperature Monitor

 

Domoticz: KMtronic LAN DS18B20 WEB Temperature Monitor
Domoticz: KMtronic LAN DS18B20 WEB Temperature Monitor

 

Domoticz: KMtronic LAN DS18B20 WEB Temperature Monitor
Domoticz: KMtronic LAN DS18B20 WEB Temperature Monitor

 

 

Domoticz: KMtronic LAN DS18B20 WEB Temperature Monitor
Domoticz: KMtronic LAN DS18B20 WEB Temperature Monitor

 

 

LOG file

 

2018-04-02 14:13:12.546 (KMtronic DS18B20 Temperature Monitor) Temp (Boiler)
2018-04-02 14:13:12.547 (KMtronic DS18B20 Temperature Monitor) Temp (Office 1)
2018-04-02 14:13:12.548 (KMtronic DS18B20 Temperature Monitor) Temp (Office 2)
2018-04-02 14:13:12.549 (KMtronic DS18B20 Temperature Monitor) Temp (Store)

 

PHP receive script for KMTronic DS1820 LAN POST version module

 

Receive POST data using PHP

KMtronic LAN DS18B20 Temperature Monitor

 

 

LAN DS18B20 High-Precision 1-Wire Digital Temperature Monitor

 


 

PHP file:

<?php


$date = date('Ymd');
$time = date('H:i:s');
$hourtime = date('H:i');
$unixtime = time();

$file = "/var/www/html/data/".$date.".log";
$current = file_get_contents($file);

$current .= $date;
$current .= "-";
$current .= $time;
$current .= "\t";
$current .= $unixtime;
$current .= "\t";

$temp = $_POST['temperature'];

$temp2 = implode("",$_POST['temperature']);

$current .=  $temp2;
$current .= "\r\n";

// Write the contents back to the file
file_put_contents($file, $current);

// a:2:{s:9:"device_id";s:10:"B3D53A5348";s:11:"temperature";a:1:{s:18:"'2874EDD0040000F3'";s:5:"15.43";}}

?>

 


 

DATA file:
20161229-00:00:21    1482962421    22.75
20161229-00:00:56    1482962456    22.75
20161229-00:01:30    1482962490    22.75
20161229-00:02:04    1482962524    22.75
20161229-00:02:38    1482962558    22.75
20161229-00:03:12    1482962592    22.75
20161229-00:03:46    1482962626    22.75
20161229-00:04:20    1482962660    22.75
20161229-00:04:54    1482962694    22.75
20161229-00:05:28    1482962728    22.81
20161229-00:06:02    1482962762    22.81




 

 

 

Create a Crontab server side PHP script for uploading temperature to a MySQL database

 

KMtronic LAN DS18B20 WEB 1-Wire Digital Temperature Monitor
KMtronic LAN DS18B20 WEB 1-Wire Digital Temperature Monitor

 


 

Temperature Monitor STATUS XML data

http://XXX.XXX.XXX.XXX/status.xml
XXX.XXX.XXX.XXX is IP ADDRESS Temperature monitor

 


 

MySQL table

Create a Crontab server side PHP script for uploading temperature to a MySQL database
Create a Crontab server side PHP script for uploading temperature to a MySQL database
Create a Crontab server side PHP script for uploading temperature to a MySQL database
Create a Crontab server side PHP script for uploading temperature to a MySQL database

 


 

Cron is a system daemon used to execute desired tasks (in the background) at designated times. 

A crontab file is a simple text file containing a list of commands meant to be run at specified times. It is edited using the crontab command. The commands in the crontab file (and their run times) are checked by the cron daemon, which executes them in the system background.

Crontab PHP file:

<?php

$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "temperature_database";


// Loading the XML file
$xml = simplexml_load_file("http://XXX.XXX.XXX.XXX/status.xml");
// XXX.XXX.XXX.XXX is IP ADDRESS Temperature monitor

foreach($xml->children() as $sensor)
 {
  if ($sensor->id == "2874EDD0040000F3" )
  {
  $temp_value = $sensor->temp;
  }
 }
// "2874EDD0040000F3" is ID DS18B20 sensor

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
 die("Connection failed: " . $conn->connect_error);
}

$sql = "INSERT INTO km_temperature (temp_id, temp_value, temp_time )
VALUES ('2874EDD0040000F3', $temp_value , NOW())";
// "km_temperature" is TABLE name


if ($conn->query($sql) === TRUE) {
 echo "New record created successfully";
} else {
 echo "Error: " . $sql . "<br>" . $conn->error;
}

$conn->close();

?>