It should work with DT-TS WIFI, PRT-TS WIFI and PRT-E WIFI
It sould not work on Neo (I don't know the protocol)
The data can be readen with a LUA script only.
The only difficult part is to install the socket library because it is not integrted in the domoticz+lua images (is it possible to include it in the future).
The steps are described for domoticz on rabberry2 + fillezilla(windows)+android phone
Here are the steps:
Step 1:Install the socket library
Download usrlocalsharelua5p2.tar.gz and usrlocalliblua5p2.tar.gz to /home/pi/temp with filezilla on the raspberry.
On the raspberry terminal (putty for me)
Copy usrlocalsharelua5p2.tar.gz in directory /usr/local/share/lua/5.2/ and extracting the file with sudo tar -xvf usrlocalsharelua5p2.tar.gz
Copy usrlocalliblua5p2.tar.gz in /usr/local/lib/lua/5.2/ and extract all the files with sudo tar -xvf usrlocalliblua5p2.tar.gz
linux command:
cd /usr/local/share/lua/5.2/
sudo cp /home/pi/temp/usrlocalsharelua5p2.tar.gz .
sudo tar -xvf usrlocalsharelua5p2.tar.gz
cd /usr/local/lib/lua/5.2/
sudo cp /home/pi/temp/usrlocalliblua5p2
sudo tar -xvf usrlocalliblua5p2.tar.gz
Step 2: Find the TCP binary command with your android phone
Install and configure Heatmiser on your android device
Install Packet capture on your android device
Start packet capture
Start and connect to heatmiser
Stop packet capture
Look at the heatmiser capture packet capture + preference Hex. You should have number starting with 93
Step 3: Copy the TCP binary into this lua script time - line 12(local nb=)
Only AA BB (pin code) and CC DD (CRC) sould change for you.
Code: Select all
commandArray = {}
local host, port = "192.168.0.9", 8068
local socket = require("socket")
local tcp = assert(socket.tcp())
local status=tcp:connect(host, port);
print("TCP status:" .. status)
tcp:settimeout(1000)
--see protocol p22 in Heatmiser V3 protocol pdf
local nb=tcp:send(string.char( 0x93, 0x0b, 0x00, 0xAA, 0xBB, 0x00, 0x00, 0xff, 0xff, 0xCC, 0xDD))
print("TCP send lenth:" .. nb)
local data = tcp:receive(50) --receive 50 bytes
tcp:close()
print("TCP receive length:" .. string.len(data)) -- longueur de chaine
--print("TCP raw data 37+38:" .. string.byte(data,45) .. " " .. string.byte(data,46)) --raw temp data 45=37+8 46=38+8
local airTemp=(string.byte(data,45)+string.byte(data,46)*256)/10
print("raw temp45:" .. string.byte(data,45) .. "|raw temp46:" .. string.byte(data,46))
local setTemp=string.byte(data,26)
local heatStatus
if (string.byte(data,48)>0) then heatStatus='On' else heatStatus='Off' end
print("TCP air temp:" .. airTemp .. " setTemp:" .. setTemp .. " Heat:" .. heatStatus)
commandArray['Th. chauffe']=heatStatus --set dummy switch Th. Chauffe
commandArray[2]={['UpdateDevice']='24|1|' .. airTemp} --set temperature of dummy 24/1
commandArray[1]={['UpdateDevice']='25|1|' .. setTemp} --set temperature of dummy 25/1
return commandArray
You must change:
switch name line 27
temperature device number line 28+29
ip port of the heatmiser wifi thermostat
You should be able to get any other data with this script and the protocol
Reference:
heatmiser_v3_protocol_3.9.pdf (I don't know how to upload it ;2024Ko). I will try to put it on another server if not possible (not avaiable on heatmiser website since 2014)
edit: here on the waybackmachine:
https://web.archive.org/web/20130304022 ... l-document
The protocol is page 22
Reading (starts with 0x93)
Reply (starts with 0x94)
http://www.domoticz.com/forum/viewtopic ... 638#p22638 for lua socket
Possible improvement:
Remove the luacolor from the socket lbray of the attached files
I can give you the right code for pin 1234 if somebody want it.
Automatic CRC calculation (if somebody can do the code)
Send data to the thermostat (easy once CRC done)