ELV Max! Heating control system

For heating/cooling related questions in Domoticz

Moderator: leecollings

User avatar
l0gic
Posts: 107
Joined: Tuesday 08 October 2013 9:35
Target OS: Linux
Domoticz version: Latest
Contact:

Re: ELV Max! Heating control system

Post by l0gic »

Hi guys,
wow! you lot have been busy!
Very impressive I must say and a much smarter solution than the old Max!Buddy option. It was needing a few sticking plasters on it to keep it working.

I'm going to have a go at implementing this on my Windows system, I'm guessing getting the lua and luarocks working in Windows will be a bit of a challenge, but what the hey - it's only time.

I'll be back once I have an installed lua subsystem on my box.
Plus I'll document it for addition to the wiki.

great work guys!

All the best

Kevin
Non credus crepitus
User avatar
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

Post by blackdog65 »

l0gic wrote:Hi guys,
wow! you lot have been busy!
Very impressive I must say and a much smarter solution than the old Max!Buddy option. It was needing a few sticking plasters on it to keep it working.

I'm going to have a go at implementing this on my Windows system, I'm guessing getting the lua and luarocks working in Windows will be a bit of a challenge, but what the hey - it's only time.

I'll be back once I have an installed lua subsystem on my box.
Plus I'll document it for addition to the wiki.

great work guys!

All the best

Kevin
Excellent news!
Welcome back :D

Sean
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
User avatar
l0gic
Posts: 107
Joined: Tuesday 08 October 2013 9:35
Target OS: Linux
Domoticz version: Latest
Contact:

Re: ELV Max! Heating control system

Post by l0gic »

Cheers Sean.

Quick question, is the luarocks luasec actually required?
I've managed to install lua and luarocks after a bit of pain and faffing around, but the luarocks luasec is being a real pain.
Looking at the scripts I can't see luasec being loaded at all.
So before I put too much effort into it I'm wondering if it will be needed?

Also, can the script manage the situation where a room has a thermostat with two or more radiators?
I have a stat in my front room with two radiators plus the conservatory radiator also included as the physical rooms are combined.

Looking good, should have a working system tomorrow (hopefully)

All the best

Kevin
Non credus crepitus
User avatar
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

Post by blackdog65 »

l0gic wrote:Quick question, is the luarocks luasec actually required?
I've managed to install lua and luarocks after a bit of pain and faffing around, but the luarocks luasec is being a real pain.
Looking at the scripts I can't see luasec being loaded at all.
So before I put too much effort into it I'm wondering if it will be needed?

Also, can the script manage the situation where a room has a thermostat with two or more radiators?
I have a stat in my front room with two radiators plus the conservatory radiator also included as the physical rooms are combined.
Good question.
I think it was a possibly a requirement in another project that a lot of this was originally based on but may not be used. I'd try running the test script and see if it works. If it does... well the rest may and we can update the wiki accordingly.

As to 2 rads, it shouldn't be a problem as the max script takes it's temp reading from the wall stat and that in turn forwards it's set-point to the rad valve/valves associated with it. The second script... which didn't you write the original?... looks at the rad valve open % and doesn't much care which rooms or how many. At least that's my understanding of it.

Good luck with your set-up, I'm REALLY pleased with how mine is working now... more importantly, the Wife is REALLY pleased!

Sean
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
Skippiemanz
Posts: 230
Joined: Sunday 14 July 2013 20:21
Target OS: Linux
Domoticz version: 4.10233
Location: Alkmaar, The Netherlands
Contact:

Re: ELV Max! Heating control system

Post by Skippiemanz »

A happy customer here also! Would be nice and so Much easier If the luassec part could be skipped.. Looking forward to you're findings!

In the meantime im having a look at this interesting subject https://r.tapatalk.com/shareLink?url=ht ... are_type=t
Intelligent Multi-Zone Heating Script witch would be the ultimate addition to this system!
mvzut
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

Post by mvzut »

daveabbott007 wrote:
Added Debug back into Script_time_max.lua

Code: Select all

2016-11-07 12:50:00.728 LUA: Valve LivingRoom2-Rad Setpoint=18 Temp=22.3 Valve pos=0
2016-11-07 12:50:00.728 LUA: Domoticz setpoint LivingRoom2-Stat updated
2016-11-07 12:50:00.729 LUA: Valve LivingRoom1-Rad Setpoint=18 Temp=23.2 Valve pos=0
2016-11-07 12:50:00.729 LUA: Domoticz setpoint LivingRoom1-Stat updated
2016-11-07 12:50:00.729 LUA: Valve DinningRoom-Rad Setpoint=18 Temp=23 Valve pos=0
2016-11-07 12:50:00.729 LUA: Domoticz setpoint DinningRoom-Stat updated
2016-11-07 12:50:00.729 LUA: Valve MasterBedroom-Rad Setpoint=18 Temp=22.3 Valve pos=0
2016-11-07 12:50:00.729 LUA: Domoticz setpoint MasterBedroom-Stat updated
2016-11-07 12:50:00.730 LUA: Valve RachaelsBedroom-Rad Setpoint=18 Temp=20.7 Valve pos=0
2016-11-07 12:50:00.730 LUA: Domoticz setpoint RachaelsBedroom-Stat updated
2016-11-07 12:50:00.730 LUA: Valve ConnorsRoom-Rad Setpoint=18 Temp=22.3 Valve pos=0
2016-11-07 12:50:00.730 LUA: Domoticz setpoint ConnorsRoom-Stat updated
2016-11-07 12:50:00.730 LUA: Valve Bathroom-Rad Setpoint=18 Temp=22.5 Valve pos=0
2016-11-07 12:50:00.730 LUA: Domoticz setpoint Bathroom-Stat updated
2016-11-07 12:50:00.732 EventSystem: Fetching url...
2016-11-07 12:50:00.732 EventSystem: Fetching url...
2016-11-07 12:50:00.733 EventSystem: Fetching url...
2016-11-07 12:50:00.734 EventSystem: Fetching url...
2016-11-07 12:50:00.734 EventSystem: Fetching url...
2016-11-07 12:50:00.735 EventSystem: Fetching url...
2016-11-07 12:50:00.736 EventSystem: Fetching url...
2016-11-07 12:50:00.736 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_max.lua

i cant see whats up with names, Temps will not update in Domoticz, Setpoints will not update in Domticz from Max But max will change if i change Domoticz setpoints.
Any help or ideas greatfully recived

Dave
Temperature will indeed not be updated if you don't have wall thermostats. Earlier versions of the script updated the Domoticz temperature device(s) with the actual temperature(s) received from the valves, but I removed that since the valves only send the current temperature when the motor is running. That didn't give very usable day graphs for the room temperature. We still need to explain this in the Wiki, actually you don't even have to create temperature devices in Domoticz if you don't have wall thermostats.

Apart from that, it seems you have everything set up correctly. The log says the Domoticz setpoints are updated, and it seems to send the commands. At least I assume so, because it says "Fetching url...", which is the expected message since I use API calls to do this. That is because of a bug Domoticz where updating setpoints via lua "UpdateDevice" commands results in script timeouts). Only the commands apparently never reach the setpoint devices. Are you using the right port number for the API calls to Domoticz?

You could try and replace (twice)

Code: Select all

table.insert(commandArray, { ['OpenURL'] = 'http://127.0.0.1:'..DomoticzPort..'/json.htm?type=command&param=udevice&idx='..otherdevices_idx[name]..'&nvalue=0&svalue='..setpoint})
with

Code: Select all

table.insert(commandArray, { ['UpdateDevice'] = otherdevices_idx[name]..'|0|'..setpoint})
which could give the notorious timeout messages but should work regardlessly.

P.S. I now see all your valves seem to report an actual temperature... This would contradict my story above. Can you maybe check, e.g. by running the lua test script a couple of times, if those temperatures are actually updated regularly? Maybe you have other valves than myself (I use the basic model)?!

If your valve temperatures are updated regularly, or if you don't have a problem with virtual Domoticz temperature sensors that are only updated every now and then, you can get temperature reading back into the script again by adding this line:

Code: Select all

		  table.insert(commandArray, { ['UpdateDevice'] = otherdevices_idx[room]..'|0|'..temp})
directly below the "if not useWMT then" line. This will update the virtual temperature sensor(s) named after the room name(s), using the current temperature as reported by each valve.
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
User avatar
l0gic
Posts: 107
Joined: Tuesday 08 October 2013 9:35
Target OS: Linux
Domoticz version: Latest
Contact:

Re: ELV Max! Heating control system

Post by l0gic »

Hmm, having an issue.
Lua & Luarocks compiled and installed fine.
Installed Luasocket & Luabasexx, again fine.

Trying to run the script_time_EQ3_Cube.lua inside Domoticz (in the script directory) causes an error

Code: Select all

Error: EventSystem: in C:\Program Files (x86)\Domoticz\scripts\lua\script_time_maxCube.lua: error loading module 'socket.core' from file 'c:\program files (x86)\lua\5.2\lib\lua\5.2\socket\core.dll':
The specified module could not be found. 


However, running it from the command line it runs without the error (doesn't particularly do much though - not sure if it would)

I'm suspecting a clash between Lua versions.

I've set LUA_PATH_5_2 and LUACPATH_5_2 up OK. From the error it seems to see the core.dll file but cant find socket.core in it.
Luarocks install luasocket executed fine so I can only assume it is installed ok.

Anyone have any ideas at all?
NOTE - I have not been able to install luassec but I can't see that being the issue as it would have been indicated as a dependency if required.

ATB

Kevin
Non credus crepitus
User avatar
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

Post by blackdog65 »

Hi kevin,

What's in script_time_EQ3_Cube.lua?

Did you try the test script to do a basic read?


Sean
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
hasan
Posts: 34
Joined: Saturday 31 October 2015 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: ELV Max! Heating control system

Post by hasan »

Hi guys, finally I`m able to run script but there is error:

Code: Select all

2016-11-08 15:45:01.078 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_time_max.lua: /home/pi/domoticz/scripts/lua/script_time_max.lua:138: attempt to concatenate field '?' (a nil value)
Does anybody have any idea what is wrong? I only copied script from Wiki.

Thanks
Skippiemanz
Posts: 230
Joined: Sunday 14 July 2013 20:21
Target OS: Linux
Domoticz version: 4.10233
Location: Alkmaar, The Netherlands
Contact:

Re: ELV Max! Heating control system

Post by Skippiemanz »

Are U sure youve got the latest version from the wiki?

I will compare my version with the wiki version tonight to make sure.
hasan
Posts: 34
Joined: Saturday 31 October 2015 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: RE: Re: ELV Max! Heating control system

Post by hasan »

Skippiemanz wrote:Are U sure youve got the latest version from the wiki?

I will compare my version with the wiki version tonight to make sure.
Yes. Copied few minutes ago.

Odesláno z mého LG-D855 pomocí Tapatalk
Skippiemanz
Posts: 230
Joined: Sunday 14 July 2013 20:21
Target OS: Linux
Domoticz version: 4.10233
Location: Alkmaar, The Netherlands
Contact:

Re: ELV Max! Heating control system

Post by Skippiemanz »

Do you have Window sensors anf/or Wall thermostat? Could you post the result off maxtest. Lua
hasan
Posts: 34
Joined: Saturday 31 October 2015 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: RE: Re: ELV Max! Heating control system

Post by hasan »

Skippiemanz wrote:Do you have Window sensors anf/or Wall thermostat? Could you post the result off maxtest. Lua
I have window sensor.

Odesláno z mého LG-D855 pomocí Tapatalk
Skippiemanz
Posts: 230
Joined: Sunday 14 July 2013 20:21
Target OS: Linux
Domoticz version: 4.10233
Location: Alkmaar, The Netherlands
Contact:

Re: ELV Max! Heating control system

Post by Skippiemanz »

Ok. Did you name it like this Entrance Room-Sens?

That way it's ignored by the scripts but stil sets the valves low when Window is open
hasan
Posts: 34
Joined: Saturday 31 October 2015 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: RE: Re: ELV Max! Heating control system

Post by hasan »

Skippiemanz wrote:Ok. Did you name it like this Entrance Room-Sens?

That way it's ignored by the scripts but stil sets the valves low when Window is open
Fuck... I'll do it... Sorry. Thanks

Odesláno z mého LG-D855 pomocí Tapatalk
Skippiemanz
Posts: 230
Joined: Sunday 14 July 2013 20:21
Target OS: Linux
Domoticz version: 4.10233
Location: Alkmaar, The Netherlands
Contact:

Re: ELV Max! Heating control system

Post by Skippiemanz »

No problem, i think it's not yet marked in the wiki
hasan
Posts: 34
Joined: Saturday 31 October 2015 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: RE: Re: ELV Max! Heating control system

Post by hasan »

Skippiemanz wrote:No problem, i think it's not yet marked in the wiki
It isn't there. I'll send update about Lua installation on RPi image...

Odesláno z mého LG-D855 pomocí Tapatalk
Skippiemanz
Posts: 230
Joined: Sunday 14 July 2013 20:21
Target OS: Linux
Domoticz version: 4.10233
Location: Alkmaar, The Netherlands
Contact:

Re: ELV Max! Heating control system

Post by Skippiemanz »

Ok! Please update the wiki on the lua part and If you have time also about the Window sensors!
hasan
Posts: 34
Joined: Saturday 31 October 2015 14:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: RE: Re: ELV Max! Heating control system

Post by hasan »

Skippiemanz wrote:Ok! Please update the wiki on the lua part and If you have time also about the Window sensors!
Windows sensor is type "switch" in Dummy?

Odesláno z mého LG-D855 pomocí Tapatalk
Skippiemanz
Posts: 230
Joined: Sunday 14 July 2013 20:21
Target OS: Linux
Domoticz version: 4.10233
Location: Alkmaar, The Netherlands
Contact:

Re: ELV Max! Heating control system

Post by Skippiemanz »

The Window sensors are not(yet) seen in domoticz so no devices are Needed
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests