ELV Max! Heating control system
Moderator: leecollings
-
- Posts: 267
- Joined: Tuesday 14 January 2014 14:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: ELV Max! Heating control system
Hi
I am looking to replace my upstairs rad valves and bought a Smartwares one to try but it's very noisy in operation and also gives off a loud "beep" whenever the setpoint is changed so a definate no no for the bedrooms. How noisy are the MAX ones please? Has anyone used both and able to offer a comparison?
I am looking to replace my upstairs rad valves and bought a Smartwares one to try but it's very noisy in operation and also gives off a loud "beep" whenever the setpoint is changed so a definate no no for the bedrooms. How noisy are the MAX ones please? Has anyone used both and able to offer a comparison?
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
-
- Posts: 443
- Joined: Thursday 12 November 2015 10:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
ELV Max! Heating control system
I've never used the Smartwares, but I can tell from experience that the MAX! valves - the most basic version - are really quiet. From more than a few meters distance they are practically inaudible (at least in my perception). I have one installed in my 12 year old son's bedroom, and have not had any complaints so far.markk wrote:Hi
I am looking to replace my upstairs rad valves and bought a Smartwares one to try but it's very noisy in operation and also gives off a loud "beep" whenever the setpoint is changed so a definate no no for the bedrooms. How noisy are the MAX ones please? Has anyone used both and able to offer a comparison?
Last edited by mvzut on Wednesday 08 June 2016 22:45, edited 1 time in total.
Raspberry Pi 4 - RFXtrx433 - CC2531 Zigbee - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - 6 x Sonos - 4 x IP cameras - Wall mounted tablet + Dashticz - Google Home integration - MANY switches/sensors
-
- Posts: 18
- Joined: Friday 25 December 2015 9:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: ELV Max! Heating control system
I'm happy with the basic MAX ones, when they change position there is just a gentle whiring from them - not off putting at all.
Sent from my PLK-L01 using Tapatalk
Sent from my PLK-L01 using Tapatalk
-
- Posts: 443
- Joined: Thursday 12 November 2015 10:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
Re: ELV Max! Heating control system
I tried the code using the room number that the previous code reported for each room (e.g. 130E43), but that doesn't seem to work. I just left it at "01" and that works fine. What is the intended use of the room number?Westcott wrote:You're welcome - thanks for testing.
Here's a function to send data.
Next I'll have to write something to save the connection between Domoticz device name, Max device name, Max device ID, and Max room number.
Code: Select all
function MaxCmdSend(id, room, mode, setpoint) bits = setpoint * 2 smode = string.upper(mode) if smode == 'MANUAL' then bits = 64 + bits elseif smode == 'BOOST' then bits = 192 + bits elseif smode == 'VACATION' then bits = 128 + bits end hex = "000440000000"..id..room..string.format("%x",bits) --print(bits, hex) s = Basexx.from_hex(hex) sendStr = Basexx.to_base64(s) --print(sendStr) i, status = tcp:send("s:"..sendStr.."\r\n"); if not i then print("MAX TCP send failed - "..status) return else --print("Sent OK") end end -- Valve ID, roomnum, auto or manual or vacation or boost, setpoint MaxCmdSend("1062EA", "01", "manual", 21.5)
Please note that in order to integrate this into your previous script, I had to change the assignment "local tcp = Socket.connect(MaxIP, MaxPort)" into "tcp = Socket.connect(MaxIP, MaxPort)", otherwise the tcp object is not recogized within a function.
Raspberry Pi 4 - RFXtrx433 - CC2531 Zigbee - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - 6 x Sonos - 4 x IP cameras - Wall mounted tablet + Dashticz - Google Home integration - MANY switches/sensors
- Westcott
- Posts: 423
- Joined: Tuesday 09 December 2014 17:04
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: UK - Glos
- Contact:
Re: ELV Max! Heating control system
Hi Mvzut,
Thanks again for testing.
'roomnum' is part of the Max send protocol.
I guess it's whichever Max room the device is in.
As for the socket, I moved the line to the top of the script, so it ready for all of the following action.
We need to save the cross-reference between Max device ID (e.g. 130E43) and the Domoticz device names for 'temperature', 'setpoint', 'valve position', and 'mode'.
I propose to hold the info in a Lua table at the top of the script, something like -
Devices = {}
Devices[ "130E43"] = {"01","Room temp","Room setpoint","Room valve pos", "Room mode"}
...
Then, on a Domoticz devicechange, the MAx ID (and roomnum!) can be found from the Domotics changed device name.
Thanks again for testing.
'roomnum' is part of the Max send protocol.
I guess it's whichever Max room the device is in.
As for the socket, I moved the line to the top of the script, so it ready for all of the following action.
We need to save the cross-reference between Max device ID (e.g. 130E43) and the Domoticz device names for 'temperature', 'setpoint', 'valve position', and 'mode'.
I propose to hold the info in a Lua table at the top of the script, something like -
Devices = {}
Devices[ "130E43"] = {"01","Room temp","Room setpoint","Room valve pos", "Room mode"}
...
Then, on a Domoticz devicechange, the MAx ID (and roomnum!) can be found from the Domotics changed device name.
Zwave - Sigma Z+ stick, Fibaro, Horstmann, Neo Coolcam, EUROtronic
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
RFlink - IR detectors and temperatures
Wifi - YeeLights, ESP32s, Anoop sockets
Zigbee - lots with zigbee2mqtt and ZbBridge
-
- Posts: 443
- Joined: Thursday 12 November 2015 10:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
ELV Max! Heating control system
I finally found some time to build te functionality I wanted (based on your great code Westcott)!
Firstly, I created the following (virtual) devices in Domoticz:
- a temperature sensor for each room
- a thermostat setpoint for every wall mounted thermostat
- a percentage sensor for each valve (optional, but I need this to control my heater)
I named the devices exactly the same as in the MAX! Cube configuration, this is very important otherwise my script will not work. The temperature sensors have to be named afer the MAX! room names.
I am currently using this script (I called it "script_time_max.lua" and put it in ~/domoticx/scripts/lua):
Now every minute all Domoticz thermostats are read, and if the value is different from the MAX! setpoint, a new setpoint is sent to the corresponding MAX! thermostat. If the setpoint has changed externally, e.g. on the wall-mounted thermostat itself of via the MAX! app, it is updated in Domoticz. Next to this, the actual room temperatures are logged in Domoticz (virtual) temperature sensors.
I'm very happy with the way it works now. There is still one minor problem/annoyance: When the script changes a thermostat setpoint in Domoticz, it takes more than 10 seconds for some strange reason. Everything works though, you only get an error message in the log. I have posted a question about this in another forum thread, seems more people are experiencing this problem.
Please note that this is all using manual setpoints. You can still use automatic temperature programs on your MAX! Cube, but these will be overridden every time you change the setpoint in Domoticz (and vice-versa). It's probably better (and in my opinion more user friendly too) to leave alone the MAX! programming functionality altogether, and create all your setpoint timers in Domoticz.
A nice addition to make it almost completely novice-proof could be automatic device creation at first time use. I've seen this being done using JSON commands somewhere, need to dive into that sometime. From that point on, it's probably not extremely difficult to convert it into an actual Domoticz plugin?! But at the moment that's still a few bridges too far for me...
Anyone interested in testing this code? After manually adding (and correctly naming!) all the required sensors, the code should work out-of-the-box, you only need to change the IP address of your Cube in the top section of the script.
Firstly, I created the following (virtual) devices in Domoticz:
- a temperature sensor for each room
- a thermostat setpoint for every wall mounted thermostat
- a percentage sensor for each valve (optional, but I need this to control my heater)
I named the devices exactly the same as in the MAX! Cube configuration, this is very important otherwise my script will not work. The temperature sensors have to be named afer the MAX! room names.
I am currently using this script (I called it "script_time_max.lua" and put it in ~/domoticx/scripts/lua):
Code: Select all
package.loadlib("core.so", "*")
local Socket = require "socket"
local Basexx = require "basexx"
local MaxIP='192.168.178.46'
local MaxPort = 62910
local Rooms = {}
local Devices = {}
local Room_nums = {}
function age(timestring)
t = {}
t.year = string.sub(timestring,1,4)
t.month = string.sub(timestring,6,7)
t.day = string.sub(timestring,9,10)
t.hour = string.sub(timestring,12,13)
t.min = string.sub(timestring,15,16)
t.sec = string.sub(timestring,18,19)
return os.difftime(os.time(),os.time(t))
end
function maxCmd_H(data)
-- print('H='..data)
end
function maxCmd_M(data)
i = 0
j = 0
while true do -- find next comma
i = string.find(data, ",", i+1)
if not i then break end
j = i
end
s = data:sub(j+1)
dec = Basexx.from_base64(s)
num_rooms = string.byte(dec,3)
pos=4
for i=1, num_rooms do
room_num = string.byte(dec, pos)
name_len = string.byte(dec, pos+1)
pos = pos+2
name = dec:sub(pos, pos+name_len-1)
pos = pos+name_len
adr = Basexx.to_hex(dec:sub(pos, pos+2))
Rooms[room_num] = name
pos = pos+3
end
num_devs = string.byte(dec, pos)
for i=1, num_devs do
dtype = string.byte(dec, pos+1)
adr = Basexx.to_hex(dec:sub(pos+2, pos+4))
snum = dec:sub(pos+5, pos+14)
name_len = string.byte(dec, pos+15)
pos = pos+16
name = dec:sub(pos, pos+name_len-1)
pos = pos+name_len
room_num = string.byte(dec, pos)
Room_nums[adr] = room_num
Devices[adr] = name
end
end
function maxCmd_C(data)
-- print('C='..data)
end
function maxCmd_L(data)
pos = 1
dec = Basexx.from_base64(data)
L_hex = Basexx.to_hex(dec)
L_len = string.len(L_hex)
while (pos < L_len) do
s = L_hex:sub(pos,(pos+1))
data_len = tonumber(s,16) + 1
hex = L_hex:sub(pos,pos+(data_len*2))
adr = hex:sub(3,8)
room_num = string.format("%02X", Room_nums[adr])
room = Rooms[Room_nums[adr]]
name = Devices[adr]
if not name then name=adr end
valve_info = tonumber(hex:sub(13,14),16)
batt = bit32.extract(valve_info,7,1)
bst = bit32.extract(valve_info,3,1)
mode = bit32.extract(valve_info,0,2)
if (batt==0) then sbat="OK" else sbat="Low" end
if (mode==0) then smode="Auto" elseif (mode==1) then smode="Manual"
elseif (mode==2) then smode="Holiday" elseif (mode==3) then smode="Boost" end
if (data_len == 13) then -- WallMountedThermostat (dev_type 3)
valve_pos = -1
s = hex:sub(17,18)
setpoint = tonumber(s,16) / 2
s = hex:sub(23,26)
temp = tonumber(s,16) / 10
dtype = "Thermostat"
elseif (data_len == 12) then -- HeatingThermostat (dev_type 1 or 2)
s = hex:sub(15,16)
valve_pos = tonumber(s,16)
s = hex:sub(17,18)
setpoint = tonumber(s,16) / 2
if (mode ~= 2) then
s = hex:sub(19,22)
temp = tonumber(s,16) / 10
else
temp = 0
end
dtype = "Valve"
end
if temp < 5 then temp = temp + 25.5 end --necessary since first two digits seem to be unused?
-- Update virtual devices in Domoticz and update MAX! setpoints if necessary
--print(dtype.." "..name.." Setpoint="..setpoint.." Temp="..temp.." Valve pos="..valve_pos)
if dtype == "Valve" then
if tonumber(otherdevices_svalues[name]) ~= valve_pos then
table.insert(commandArray, { ['UpdateDevice'] = otherdevices_idx[name]..'|0|'..valve_pos})
end
elseif dtype == "Thermostat" then
table.insert(commandArray, { ['UpdateDevice'] = otherdevices_idx[room]..'|0|'..temp})
setpoint_Domoticz = tonumber(otherdevices_svalues[name])
if setpoint_Domoticz ~= setpoint then
if age(otherdevices_lastupdate[name]) > 60 then --Domoticz thermostat value must be updated
table.insert(commandArray, { ['UpdateDevice'] = otherdevices_idx[name]..'|0|'..setpoint})
else --Max! setpoint must be updated
MaxCmdSend(adr, room_num, "manual", setpoint_Domoticz)
end
end
end
pos = pos + (data_len*2)
end
end
function MaxCmdSend(id, room, mode, setpoint)
bits = setpoint * 2
smode = string.upper(mode)
if smode == 'MANUAL' then
bits = 64 + bits
elseif smode == 'BOOST' then
bits = 192 + bits
elseif smode == 'VACATION' then
bits = 128 + bits
end
hex = "000440000000"..id..room..string.format("%x",bits)
sendStr = Basexx.to_base64(Basexx.from_hex(hex))
i, status = tcp:send("s:"..sendStr.."\r\n")
if not i then
print("MAX TCP send failed - "..status)
return
end
end
commandArray = {}
tcp = Socket.connect(MaxIP, MaxPort)
if not tcp then
print("Socket connect failed for "..MaxIP..':'..MaxPort)
return
end
tcp:settimeout(2)
local time = os.date("*t")
while (time.min ~= 0) do
s, status, partial = tcp:receive()
if (status) then
print("TCP receive - "..status)
break
end
local line = (s or partial)
local cmd = line:sub(1,1)
local data = line:sub(3)
if (cmd == 'H') then
maxCmd_H(data)
elseif (cmd == 'M') then
maxCmd_M(data)
elseif (cmd == 'C') then
maxCmd_C(data)
elseif (cmd == 'L') then
maxCmd_L(data)
break
end
end
tcp:close()
return commandArray
I'm very happy with the way it works now. There is still one minor problem/annoyance: When the script changes a thermostat setpoint in Domoticz, it takes more than 10 seconds for some strange reason. Everything works though, you only get an error message in the log. I have posted a question about this in another forum thread, seems more people are experiencing this problem.
Please note that this is all using manual setpoints. You can still use automatic temperature programs on your MAX! Cube, but these will be overridden every time you change the setpoint in Domoticz (and vice-versa). It's probably better (and in my opinion more user friendly too) to leave alone the MAX! programming functionality altogether, and create all your setpoint timers in Domoticz.
A nice addition to make it almost completely novice-proof could be automatic device creation at first time use. I've seen this being done using JSON commands somewhere, need to dive into that sometime. From that point on, it's probably not extremely difficult to convert it into an actual Domoticz plugin?! But at the moment that's still a few bridges too far for me...
Anyone interested in testing this code? After manually adding (and correctly naming!) all the required sensors, the code should work out-of-the-box, you only need to change the IP address of your Cube in the top section of the script.
Last edited by mvzut on Monday 13 June 2016 15:22, edited 2 times in total.
Raspberry Pi 4 - RFXtrx433 - CC2531 Zigbee - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - 6 x Sonos - 4 x IP cameras - Wall mounted tablet + Dashticz - Google Home integration - MANY switches/sensors
-
- Posts: 18
- Joined: Friday 25 December 2015 9:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: ELV Max! Heating control system
Sounds fantastic, I'll give it a go soon and feedback.
Sent from my PLK-L01 using Tapatalk
Sent from my PLK-L01 using Tapatalk
-
- Posts: 443
- Joined: Thursday 12 November 2015 10:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
ELV Max! Heating control system
Great, let me know if it works! By the way, do you have wall thermostats in every room? I realized later that my script won't work if you don't. You could probably still get it to work with some changes to the script. It would then have to read the setpoint and the actual temperature (when available) from the valves instead of the thermostats.Meza wrote:Sounds fantastic, I'll give it a go soon and feedback.
Sent from my PLK-L01 using Tapatalk
Raspberry Pi 4 - RFXtrx433 - CC2531 Zigbee - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - 6 x Sonos - 4 x IP cameras - Wall mounted tablet + Dashticz - Google Home integration - MANY switches/sensors
-
- Posts: 18
- Joined: Friday 25 December 2015 9:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: ELV Max! Heating control system
Oh no, I only have three wall thermostats, and 9 rooms with 13 TRVs in total.
How would I go about trialing it on this setup?
Sent from my PLK-L01 using Tapatalk
How would I go about trialing it on this setup?
Sent from my PLK-L01 using Tapatalk
-
- Posts: 443
- Joined: Thursday 12 November 2015 10:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
ELV Max! Heating control system
Hmmm, interesting. I can write a version of the script where you can set a variable to indicate if you want to use thermostats or valves for setpoint getting & setting. If you set it to use the valves, it should probably work for you. You then only need to add temperature sensor devices for the rooms that have a thermostat. I could also update temperature sensors from valves, but that doesn't make much sense since valves don't report their actual temperature very often, only directly after their setpoint has changed. Please note that you have to name your thermostat devices after the valve names then, not after the wall thermostats (since you don't have them in every room).Meza wrote:Oh no, I only have three wall thermostats, and 9 rooms with 13 TRVs in total.
How would I go about trialing it on this setup?
Sent from my PLK-L01 using Tapatalk
You have more TRVs than rooms, is it safe to assume that the rooms with more than one TRV are the rooms with the wall thermostats? That would be the easiest for me. If not, I'm not sure what to do when there are more valves in a room but no thermostat. By default, the new script would assume that there is a Domoticz thermostat for every valve (provided you have set the valve flag), but I guess they will be coupled somehow by the Cube?!
Raspberry Pi 4 - RFXtrx433 - CC2531 Zigbee - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - 6 x Sonos - 4 x IP cameras - Wall mounted tablet + Dashticz - Google Home integration - MANY switches/sensors
-
- Posts: 443
- Joined: Thursday 12 November 2015 10:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
Re: ELV Max! Heating control system
Here is the script you could try:
[/code]
Things to take into account:
Code: Select all
[code]package.loadlib("core.so", "*")
local Socket = require "socket"
local Basexx = require "basexx"
local MaxIP='192.168.178.46'
local MaxPort = 62910
local useWMT = false --Set to true if there is a wall mounted thermostat in every room, then this one will be used for setpoint getting/setting
local Rooms = {}
local Devices = {}
local Room_nums = {}
function age(timestring)
t = {}
t.year = string.sub(timestring,1,4)
t.month = string.sub(timestring,6,7)
t.day = string.sub(timestring,9,10)
t.hour = string.sub(timestring,12,13)
t.min = string.sub(timestring,15,16)
t.sec = string.sub(timestring,18,19)
return os.difftime(os.time(),os.time(t))
end
function maxCmd_H(data)
-- print('H='..data)
end
function maxCmd_M(data)
i = 0
j = 0
while true do -- find next comma
i = string.find(data, ",", i+1)
if not i then break end
j = i
end
s = data:sub(j+1)
dec = Basexx.from_base64(s)
num_rooms = string.byte(dec,3)
pos=4
for i=1, num_rooms do
room_num = string.byte(dec, pos)
name_len = string.byte(dec, pos+1)
pos = pos+2
name = dec:sub(pos, pos+name_len-1)
pos = pos+name_len
adr = Basexx.to_hex(dec:sub(pos, pos+2))
Rooms[room_num] = name
pos = pos+3
end
num_devs = string.byte(dec, pos)
for i=1, num_devs do
dtype = string.byte(dec, pos+1)
adr = Basexx.to_hex(dec:sub(pos+2, pos+4))
snum = dec:sub(pos+5, pos+14)
name_len = string.byte(dec, pos+15)
pos = pos+16
name = dec:sub(pos, pos+name_len-1)
pos = pos+name_len
room_num = string.byte(dec, pos)
Room_nums[adr] = room_num
Devices[adr] = name
end
end
function maxCmd_C(data)
-- print('C='..data)
end
function maxCmd_L(data)
pos = 1
dec = Basexx.from_base64(data)
L_hex = Basexx.to_hex(dec)
L_len = string.len(L_hex)
while (pos < L_len) do
s = L_hex:sub(pos,(pos+1))
data_len = tonumber(s,16) + 1
hex = L_hex:sub(pos,pos+(data_len*2))
adr = hex:sub(3,8)
room_num = string.format("%02X", Room_nums[adr])
room = Rooms[Room_nums[adr]]
name = Devices[adr]
if not name then name=adr end
valve_info = tonumber(hex:sub(13,14),16)
batt = bit32.extract(valve_info,7,1)
bst = bit32.extract(valve_info,3,1)
mode = bit32.extract(valve_info,0,2)
if (batt==0) then sbat="OK" else sbat="Low" end
if (mode==0) then smode="Auto" elseif (mode==1) then smode="Manual"
elseif (mode==2) then smode="Holiday" elseif (mode==3) then smode="Boost" end
if (data_len == 13) then -- WallMountedThermostat (dev_type 3)
valve_pos = -1
s = hex:sub(17,18)
setpoint = tonumber(s,16) / 2
s = hex:sub(23,26)
temp = tonumber(s,16) / 10
dtype = "Thermostat"
elseif (data_len == 12) then -- HeatingThermostat (dev_type 1 or 2)
s = hex:sub(15,16)
valve_pos = tonumber(s,16)
s = hex:sub(17,18)
setpoint = tonumber(s,16) / 2
if (mode ~= 2) then
s = hex:sub(19,22)
temp = tonumber(s,16) / 10
else
temp = 0
end
dtype = "Valve"
end
if temp < 5 then temp = temp + 25.5 end --necessary for me since first two digits seem to be unused?
-- Update virtual devices in Domoticz and update MAX! setpoints if necessary
--print(dtype.." "..name.." Setpoint="..setpoint.." Temp="..temp.." Valve pos="..valve_pos)
if dtype == "Valve" then
if not useWMT then --Use valve to check setpoint mismatch
setpoint_Domoticz = tonumber(otherdevices_svalues[name])
if setpoint_Domoticz ~= setpoint then
if age(otherdevices_lastupdate[name]) > 60 then --Domoticz thermostat value must be updated
table.insert(commandArray, { ['UpdateDevice'] = otherdevices_idx[name]..'|0|'..setpoint})
else --Max! setpoint must be updated
MaxCmdSend(adr, room_num, "manual", setpoint_Domoticz)
end
end
end
elseif dtype == "Thermostat" then
table.insert(commandArray, { ['UpdateDevice'] = otherdevices_idx[room]..'|0|'..temp})
if useWMT then --Use wall mounted thermostat to check setpoint mismatch
setpoint_Domoticz = tonumber(otherdevices_svalues[name])
if setpoint_Domoticz ~= setpoint then
if age(otherdevices_lastupdate[name]) > 60 then --Domoticz thermostat value must be updated
table.insert(commandArray, { ['UpdateDevice'] = otherdevices_idx[name]..'|0|'..setpoint})
print("Domoticz setpoint updated")
else --Max! setpoint must be updated
MaxCmdSend(adr, room_num, "manual", setpoint_Domoticz)
print("MAX! setpoint updated")
end
end
end
end
pos = pos + (data_len*2)
end
end
function MaxCmdSend(id, room, mode, setpoint)
bits = setpoint * 2
smode = string.upper(mode)
if smode == 'MANUAL' then
bits = 64 + bits
elseif smode == 'BOOST' then
bits = 192 + bits
elseif smode == 'VACATION' then
bits = 128 + bits
end
hex = "000440000000"..id..room..string.format("%x",bits)
sendStr = Basexx.to_base64(Basexx.from_hex(hex))
i, status = tcp:send("s:"..sendStr.."\r\n")
if not i then
print("MAX TCP send failed - "..status)
return
end
end
commandArray = {}
tcp = Socket.connect(MaxIP, MaxPort)
if not tcp then
print("Socket connect failed for "..MaxIP..':'..MaxPort)
return
end
tcp:settimeout(2)
local time = os.date("*t")
while (time.min ~= 0) do
s, status, partial = tcp:receive()
if (status) then
print("TCP receive - "..status)
break
end
local line = (s or partial)
local cmd = line:sub(1,1)
local data = line:sub(3)
if (cmd == 'H') then
maxCmd_H(data)
elseif (cmd == 'M') then
maxCmd_M(data)
elseif (cmd == 'C') then
maxCmd_C(data)
elseif (cmd == 'L') then
maxCmd_L(data)
break
end
end
tcp:close()
return commandArray
Things to take into account:
- If useWMT is set to false, then create one dummy Domoticz thermostat per valve, and name it EXACTLY after the valve name as it is defined in the MAX! software. If useWMT is set to true (only do this if you have a wall thermostat in every room), name the Domoticz thermostats after the MAX! thermostat names
- Don't create the valve percentage sensors, I left those out of this version of the script. The problem is that the valve percentage sensors were named after the MAX! valve names, but since you are going to name the Domoticz themostats after the valves as well, this won't work. That is because my script uses device idx look-up based on the device name, which will go wrong when there are two devices with identical names. If you want the valve position sensors, I could put them back in, but with a new naming agreement: we could e.g. name all valve position sensors as "Valve position " + valve name.
- Create a dummy temperature sensor for each wall mounted thermostat that you have
Raspberry Pi 4 - RFXtrx433 - CC2531 Zigbee - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - 6 x Sonos - 4 x IP cameras - Wall mounted tablet + Dashticz - Google Home integration - MANY switches/sensors
- blackdog65
- Posts: 311
- Joined: Tuesday 17 June 2014 18:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Norfolk, UK
- Contact:
Re: ELV Max! Heating control system
Hi all,
Got home at the weekend and this is my 1st chance to catch up. I tried the latest script from Westcott viewtopic.php?f=34&t=841&start=180#p87061
and I get this
None of my devices have names i.e. "Kitchen WallStat" which you guys are getting.
Did I miss out a step in the original inclusion/setup?
Sean
PS Nice work so far guys
Got home at the weekend and this is my 1st chance to catch up. I tried the latest script from Westcott viewtopic.php?f=34&t=841&start=180#p87061
and I get this
Code: Select all
Rooms
-----
SittingRm 0EB8E8
Bedroom-1 13865E
Kitchen 13862F
Devices
-------
WallStat-1 096C9E
WallStat-1 137035
Radiator-1 0EB8E8
WallStat-1 137084
Radiator1 13865E
Radiator-1 13862F
Device status
-------------
Valve Radiator1 Setpoint=19.5 Temp=0 Valve pos=0 Battery=OK Mode=Auto
Thermostat WallStat-1 Setpoint=19.5 Temp=22 Valve pos=-1 Battery=OK Mode=Auto
Valve Radiator-1 Setpoint=19.5 Temp=0 Valve pos=0 Battery=OK Mode=Auto
Thermostat WallStat-1 Setpoint=19.5 Temp=21.6 Valve pos=-1 Battery=Low Mode=Auto
Thermostat WallStat-1 Setpoint=19.5 Temp=21.5 Valve pos=-1 Battery=OK Mode=Auto
Valve Radiator-1 Setpoint=19.5 Temp=0 Valve pos=0 Battery=OK Mode=Auto
Did I miss out a step in the original inclusion/setup?
Sean
PS Nice work so far guys
CubieTruck Master
RasPi slaves
Aeon Labs Z-Stick, multi sensor
Fibaro Dimmers, relays, Universal sensors
EQ3 MAX!
TKB Sockets
RFXCOM
LightwaveRF sockets, switches, relays, doorbell
MySensors
ESPEasy ESP8266-12E
RasPi slaves
Aeon Labs Z-Stick, multi sensor
Fibaro Dimmers, relays, Universal sensors
EQ3 MAX!
TKB Sockets
RFXCOM
LightwaveRF sockets, switches, relays, doorbell
MySensors
ESPEasy ESP8266-12E
-
- Posts: 443
- Joined: Thursday 12 November 2015 10:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: The Netherlands
- Contact:
ELV Max! Heating control system
My MAX! script is running well for many weeks now. I noticed that my Cube "forgets" all its devices now and then, which is very annoying, but that's a separate problem.
What I did notice is that the script sometimes returns 76 degrees Celsius as wall thermostat setpoint, where it has always been on 12 degrees for the last few weeks. The binary code in the L message is 98 (hex), or 152 decimal, so divided by 2 that's indeed 76. The number in hex should be 18 instead of 98 I guess?!
I've had the problem three times in the past few weeks, and every time it automatically disappeared after a while.
What could cause this problem? Any idea Westcott?
UPDATE: Just found out that it correlates to the measured temperature on the wall thermostat. When this is above the "notorious" 25.5 degrees, as discussed earlier, the returned setpoint is messed up. Could it be that there is a "bit shift" somewhere when the temperature is above 25.5 degrees Celsius?
What I did notice is that the script sometimes returns 76 degrees Celsius as wall thermostat setpoint, where it has always been on 12 degrees for the last few weeks. The binary code in the L message is 98 (hex), or 152 decimal, so divided by 2 that's indeed 76. The number in hex should be 18 instead of 98 I guess?!
I've had the problem three times in the past few weeks, and every time it automatically disappeared after a while.
What could cause this problem? Any idea Westcott?
UPDATE: Just found out that it correlates to the measured temperature on the wall thermostat. When this is above the "notorious" 25.5 degrees, as discussed earlier, the returned setpoint is messed up. Could it be that there is a "bit shift" somewhere when the temperature is above 25.5 degrees Celsius?
Raspberry Pi 4 - RFXtrx433 - CC2531 Zigbee - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - 6 x Sonos - 4 x IP cameras - Wall mounted tablet + Dashticz - Google Home integration - MANY switches/sensors
-
- Posts: 15
- Joined: Sunday 25 October 2015 18:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: ELV Max! Heating control system
Hey... this look's very good...
Last fall, i created a phonedetection script, which sends commands to the MAX!-Cube, for setting my valves... and bla.bla.bla.. (See url for explanation :: http://www.domoticz.com/forum/viewtopic ... 34&t=10786
Well, i would like to recieve some of the informations for further use with my script, which is extracted with the .lua script's pasted here; i tried to use it, and the following information is sent back to me :
Everything seems to work, and for sure i would like to have the Room name, Setpoint, Temp(Seems to work only when thermostat is in AUTO-mode), Valve pos, and Mode for every room...
So i kindly ask here if someone would write some code, which paste thoose information into a file e.g /home/pi/Roome1.txt, or like ? (Thoose files i will use to read from, from my .bash script)
I know i could learn the .lua myself, but i have a really good realationship with .bash for now...
Regards; Jesper.
Last fall, i created a phonedetection script, which sends commands to the MAX!-Cube, for setting my valves... and bla.bla.bla.. (See url for explanation :: http://www.domoticz.com/forum/viewtopic ... 34&t=10786
Well, i would like to recieve some of the informations for further use with my script, which is extracted with the .lua script's pasted here; i tried to use it, and the following information is sent back to me :
Code: Select all
pi@HomeBox2:~/MAX$ lua max3.lua
Rooms
-----
Stue 13D8C1
Josefines værelse 1147EA
Soveværelse 114876
Frederiks værelse 114802
Devices
-------
Josefine's værelse 1147EA
Frederik's værelse 114802
Eco Switch 1 01B87B
Stuen 13D8C1
Soveværelse 114876
Device status
-------------
Valve Josefine's værelse Setpoint=4.5 Temp=0 Valve pos=0 Battery=OK Mode=Manual
Valve Eco Switch 1 Setpoint=4.5 Temp=0 Valve pos=0 Battery=OK Mode=Auto
Valve Frederik's værelse Setpoint=4.5 Temp=0 Valve pos=0 Battery=OK Mode=Manual
Valve Soveværelse Setpoint=4.5 Temp=0 Valve pos=0 Battery=OK Mode=Manual
Valve Stuen Setpoint=4.5 Temp=0 Valve pos=0 Battery=OK Mode=Manual
So i kindly ask here if someone would write some code, which paste thoose information into a file e.g /home/pi/Roome1.txt, or like ? (Thoose files i will use to read from, from my .bash script)
I know i could learn the .lua myself, but i have a really good realationship with .bash for now...
Regards; Jesper.
-
- Posts: 37
- Joined: Monday 25 April 2016 9:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.4834
- Location: France
- Contact:
Re: ELV Max! Heating control system
Hi
I'm thinking of buying elv max set for my house (without window sensor) . Do you recommend it? Is that a good product because it's quite cheap?
Do you know if it's pid or hysteresis regulation?
I'm thinking of buying elv max set for my house (without window sensor) . Do you recommend it? Is that a good product because it's quite cheap?
Do you know if it's pid or hysteresis regulation?
-
- Posts: 18
- Joined: Friday 25 December 2015 9:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: RE: Re: ELV Max! Heating control system
It's cheap but not reliable. I invested in the whole system and have had it since March this year, so not even through winter. Regularly different parts of the system go offline and do not communicate with the Cube.n1c0l45 wrote:Hi
I'm thinking of buying elv max set for my house (without window sensor) . Do you recommend it? Is that a good product because it's quite cheap?
Do you know if it's pid or hysteresis regulation?
(red items in this screenshot taken just now are offline)
The valves often have errors displayed on the screens, sometimes remaining even after power cycling.
The official app is fiddly, and the 3rd party ones are a mixed bag.
If you can afford Honeywell Evo Home I would go with that.
Sent from my PLK-L01 using Tapatalk
-
- Posts: 37
- Joined: Monday 25 April 2016 9:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.4834
- Location: France
- Contact:
Re: ELV Max! Heating control system
Ok, not good so...
Honeywell are expensive...
Do you know Danfoss? Seems cheaper and compatible with zwave
Honeywell are expensive...
Do you know Danfoss? Seems cheaper and compatible with zwave
-
- Posts: 15
- Joined: Sunday 25 October 2015 18:57
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: ELV Max! Heating control system
Hi...Ok, not good so...
Honeywell are expensive...
Do you know Danfoss? Seems cheaper and compatible with zwave
First off, i talked with some Danfoss guy, a few years back, when i started this homeauto project, i am in.
The Danfoss, had really big problems, with there Z-wave thermostats, and as now, there is no solution... so please stay away from danfoss, even if they are far the prettiest ones -They even had a project in southern Denmark, that failed with theese thermostats.
I have been using 4 MAX! thermostat, 1 Cube, 1 wall switch for over 1 year now, without problems. I newer experience dropout's an soo?, so i am in no worry promoting the MAX! system...
Regarding the software for programming the system, i see there could be improvements, but everything is working as expected.
Just my 1Cent
Regards; JEsper.
-
- Posts: 37
- Joined: Monday 25 April 2016 9:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.4834
- Location: France
- Contact:
Re: ELV Max! Heating control system
Arf, 1pro 1con...
LOL can I get others returns from owners?
Thanks guys for your help!
LOL can I get others returns from owners?
Thanks guys for your help!
-
- Posts: 30
- Joined: Thursday 26 March 2015 16:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Contact:
Re: ELV Max! Heating control system
Using it for more than 2 years without any problems. Standard software is oké, can be better but it is working fine for first time setup.
Setup with domoticz is still under construction but will be there eventually, I am sure!
For now using 'MAX! Remote', a very nice working android app.
Using 7 radiator valves.
Setup with domoticz is still under construction but will be there eventually, I am sure!
For now using 'MAX! Remote', a very nice working android app.
Using 7 radiator valves.
Who is online
Users browsing this forum: No registered users and 0 guests