ELV Max! Heating control system

For heating/cooling related questions in Domoticz

Moderator: leecollings

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 »

Yay! It worked!
Many thanks for your enormous help. :D
It worked fine, but I woke to over 700 e-mails telling me that the stats were missing :lol: because the set-points have not changed in over an hour the system thinks they are lost :lol:

For anyone else thinking of using this script, I have a multi-switch with Off|Heating|Hot Water|Holiday with timers. This also serves as a manual over-ride.
Then a dummy switch called "Heating" which the script uses to determine if I want heat before it allows any other condition to turn on the "CH_Switch" for the boiler.
If the multi-switch is set to "Hot Water", the "Heating" dummy is turned off and "HW_Switch" is turned on.

The "MissingDevicesTime" is useful as I ignored it over summer and a wall stat battery died... leaked... killed the stat :cry:
However, if a set-point hasn't been updated within "MissingDevicesTime" ie 3600s it sees it as not updating and will e-mail you.
My initial cure for this is to a) double the time to 2hrs (7200s) and b) introduce some kind of "jitter" into the set-points. I believe there is a script for this that pops the setting up/down 1/2 deg every 30mins or so. I'll probably start by dropping and raising my temps every hour until the correct solution presents itself.

If anyone is interested, I'm thinking of putting a wiki page together so that the hard work of Westcott :ugeek: , l0gic :ugeek: and mvzut :ugeek: is in one place with a working solution.

Thanks to all that have helped :D :D :D :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
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 »

Great news! Please make a wiki.. Ive read through most of this thread but got a bit lost and want to implement you're solutions! Great work from both of you!
mvzut
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

Post by mvzut »

blackdog65 wrote:Yay! It worked!
Many thanks for your enormous help. :D

...

I'll probably start by dropping and raising my temps every hour until the correct solution presents itself.
You're welcome!

Isn't it a little strange to solve your problem with timeout notifications by periodically changing your setpoint, for no other reason than to trick the timeout detection script? Why not simply set the timeout period to e.g. 24 hours? In that time frame, your setpoint has probably changed anyway (assuming you have some kind of daily timer program on them). And having your valves out of control for one day, or not detecting an empty battery until the next day, doesn't seem like a disaster to me.

By the way, if you're interested, I could also adapt the script so that it updates a battery status device in Domoticz (in the form of another % device per MAX! device).

Martijn
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
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

Post by Westcott »

Isn't the battery status simply reported as OK or not?
Does a low battery make the Cube's battery LED flash?
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
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 »

Guys, thanks for great work. It would be nice to create Wiki for all others. I`m looking forward to finally integrate MAX! into Domoticz.
Thanks
mvzut
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

Post by mvzut »

Westcott wrote:Isn't the battery status simply reported as OK or not?
Does a low battery make the Cube's battery LED flash?
Hmmm, I think you're right. I only knew battery status was extracted from the datagrams but now I see it can indeed only have two states. And it's on system level, not per device. We could still add a "MAX! battery low" status switch in Domoticz.

I haven't had empty batteries myself yet, don't know if the light will flash but I assume so (why else would they have added the LED?).
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
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 »

hasan wrote:Guys, thanks for great work. It would be nice to create Wiki for all others. I`m looking forward to finally integrate MAX! into Domoticz.
Thanks
I agree that integration of MAX! in Domoticz is great, and probably interesting for a lot of others. Sean, if you start a Wiki page I'll see if I can add to it where possible.

Even greater would be if this was all converted into a real plugin, at least the part that reads out the Cube and updates the devices in Domoticz. You would then only have to fill in your Cube's IP address and port in the plugin settings, plus maybe the desired polling frequency, and it would automatically create and update all devices for you. I know this is possible, but I'm mainly a script coder (and only by self education) and plugins are written in C, plus they require you to follow certain templates. So I'm afraid this is way over my head. I feel tempted to dive into it though, starting by looking at comparable plugins such as the Hue plugin... Or is there anybody else here that has more experience and wants to help?
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
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 »

+1 for the plugin! It already exists for openhab
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 »

Ok guys,
I've just written my first wiki :ugeek:
https://www.domoticz.com/wiki/EQ3_MAX!
Please check it out and pull it apart and find the typos etc.
Be gentle though... this is my first time :oops:

Sean :D
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
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

Post by Westcott »

Great work, BD!
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
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, Here we go.. I read your wiki and followed the steps youve described.

bu the pain starts at installing the luasec

Code: Select all

sudo luarocks install luasec
Installing https://rocks.moonscript.org/luasec-0.6-1.rockspec...
Using https://rocks.moonscript.org/luasec-0.6-1.rockspec... switching to 'build' mode

Error: Could not find expected file libssl.a, or libssl.so, or libssl.so.* for OPENSSL -- you may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSSL_LIBDIR to the luarocks command. Example: luarocks install luasec OPENSSL_DIR=/usr/local
Im using the default Domoticz SD Card image on my Raspberry pi 3

Any pointing in the right directions?

P.S. the problem showed up in the log when running the script_time_max.lua. Running maxtest.lua had the derired outcome.

Although im not sure how my Window sensors will b treated with this scripts.
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 Skippiemanz,
Skippiemanz wrote: but the pain starts at installing the luasec
Take a look at this post viewtopic.php?f=34&t=841&start=160#p86836 and the following 2 or 3 posts.
It looks like you've run into a similar problem to me. I'm sure I used mvzut's solution.

I hope some others can jump in here too ;)

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 »

Ok,

Did som more digging...

The steps in the posts didn't get me further and are all in the wiki..

So i did a little google..

First i did a

Code: Select all

sudo chown -R pi /usr/local
then i download the lua 5.2 files from http://www.domoticz.com/forum/viewtopic ... 638#p22638

and placed them in /home/pi/

Next steps where:

Code: Select all

mv usrlocalliblua5p2.tar.gz /usr/local/lib/lua/5.2/
mv usrlocalliblua5p2.tar.gz /usr/local/lib/lua/5.2/
cd /usr/local/lib/lua/5.2/
sudo tar -xvf usrlocalsharelua5p2.tar.gz
sudo rm  usrlocalsharelua5p2.tar.gz
cd /usr/local/lib/lua/5.2/
sudo tar -xvf usrlocalliblua5p2.tar.gz
rm usrlocalliblua5p2.tar.gz
After that no more socket errors in the log.

But this line shows up:

Code: Select all

2016-11-01 20:24:00.675 Error: EventSystem: in Max: [string "--..."]:155: attempt to concatenate field '?' (a nil value)
Line 155 states:

Code: Select all

       table.insert(commandArray, { ['UpdateDevice'] = otherdevices_idx[name.." (Valve)"]..'|0|'..temp..';'..valve_pos..';0'})
Could it has something to do with me not having wall thermostats?

Code: Select all

package.loadlib("core.so", "*")
local Socket = require "socket"
local Basexx = require "basexx"
local Rooms = {}
local Devices = {}
local Room_nums = {}
 
local MaxIP = "192.168.2.123"
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
 
Debug = "YES"                       --# Turn debugging on ("YES") or off ("NO")
 
Or the fact that i have a windows sensor?

Code: Select all

pi@raspberrypi:~/domoticz/scripts/lua$ lua maxtest.lua
Rooms
-----
Kantoor Room
                0CABDC
Zolder Room
                0CACFA
Badkamer Room           095207

Devices
-------
Kantoor Room-Rad        0CABDC
Zolder Links-Rad        0CACFA
Zolder Raam-Sens        0CBD92
Badkamer Room-Rad       095207

Device status
-------------
Valve           Kantoor Room-Rad        Setpoint=20     Temp=21.5       Valve pos=55    Battery=OK Mode=Manual
Valve           Badkamer Room-Rad       Setpoint=15     Temp=0  Valve pos=0     Battery=OK      Mode=Manual
Valve           Zolder Links-Rad        Setpoint=20     Temp=0  Valve pos=44    Battery=OK      Mode=Manual
Valve           Zolder Raam-Sens        Setpoint=20     Temp=0  Valve pos=44    Battery=OK      Mode=Auto
pi@raspberrypi:~/domoticz/scripts/lua$
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 Skippiemanz,

1st. thanks for the lua installation info, I'll slip it into the wiki.

As to your error, I get that too. Not all the time but it comes and goes. I still don't know exactly what causes it

Code: Select all

2016-11-01 19:42:00.906 LUA: Thermostat SittingRoom-Stat Setpoint=20 Temp=20.5 Valve pos=-1
2016-11-01 19:42:00.906 LUA: Thermostat V-Bed-Stat Setpoint=18 Temp=19.3 Valve pos=-1
2016-11-01 19:42:00.907 LUA: Valve SittingRoom-Rad Setpoint=20 Temp=0 Valve pos=0
2016-11-01 19:42:00.907 LUA: Valve Z-Bed-Rad Setpoint=17 Temp=0 Valve pos=0
2016-11-01 19:42:00.907 Error: EventSystem: in /home/linaro/domoticz/scripts/lua/script_time_max2.lua: /home/linaro/domoticz/scripts/lua/script_time_max2.lua:131: attempt to concatenate field '?' (a nil value)
2016-11-01 19:42:00.911 EventSystem: Script event triggered: /home/linaro/domoticz/scripts/lua/script_time_max.lua 
So it reads 4 devices then for some reason throws up an error and doesn't get the next 4.

Is the script reading any of your devices and updating the dummies?

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 »

thanks for the prompt response...

No unfortunetly no updates at all. Stil at the date of creation.
eeeeeeeeeeeeeeeeeeq.PNG
eeeeeeeeeeeeeeeeeeq.PNG (78.44 KiB) Viewed 2279 times
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 »

Hmmm,
I see you have one device set to auto. I had that and it wasn't read.
Does the log show any devices?
I'm hoping mvzut can get back to us on this. My problem isn't so bad as it's intermittent.

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 »

Thats the window sensor, i will delete that one and report back.

But it would be great if i can use them. because the sensor sets the valve to a fixed low temp to prevent loss of heat when the window is open.

*EDIT* Just deleted the window sensor and still the same error.

Could it be because 2 of the valves have 0 as temperature?

*EDIT 2* Did the maxtest.lua again and found out the window sensor wasn't removed. Then reset the cube and added 2 room/valves and voila!

Code: Select all

2016-11-01 22:04:00.950 LUA: Valve Kantoor Room-Rad Setpoint=21 Temp=0 Valve pos=82
2016-11-01 22:04:00.950 LUA: 2016-10-31 23:19:02
2016-11-01 22:04:00.950 LUA: 81898
2016-11-01 22:04:00.950 LUA: Domoticz setpoint updated
2016-11-01 22:04:00.950 LUA: Valve Badkamer Room-Rad Setpoint=21 Temp=0 Valve pos=67
2016-11-01 22:04:00.950 LUA: 2016-10-31 23:19:13
2016-11-01 22:04:00.950 LUA: 81887
2016-11-01 22:04:00.950 LUA: Domoticz setpoint updated
2016-11-01 22:04:00.953 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_max.lua
User avatar
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

Post by Westcott »

Thermostats in Auto mode should work OK.
A bit more coding is needed to get window sensors working.
The first step is to get its raw L data.
Also an extra test in the function maxCmd_L(data) to handle data_len other than 12 and 13, print the actual value, and not do the full device data print.
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
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 »

Hmmm... It read the data twice and now it stopped and gives the same error.

The window sensor including parts sounds good!

How can i give you the raw L data?
User avatar
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

Post by Westcott »

Hi Skippiemanz,

Con you post the Lua file that You use, please?
I'll mod it for you.
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest