Python plugin: ELV/EQ-3 MAX!

For heating/cooling related questions in Domoticz

Moderator: leecollings

mvzut
Posts: 443
Joined: Thursday 12 November 2015 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Python plugin: ELV/EQ-3 MAX!

Post by mvzut »

DarkG wrote: Saturday 13 October 2018 17:56 All the data on the cube is lost. Rooms and Thermostats. How can this?
I used to have this too, it happened every few weeks at a certain moment. Appears to be some sort of bug which occurs if you connect to it (too?) often. This is also the reason why I always advise to set the polling interval to 5 minutes or more.
I have now connected my Cube to a wall outlet switch which I control from Domoticz. I created a timer to turn the Cube quickly off and on once per week, haven't had the problem anymore since then.

I don't see a lot of discussion about this issue, so I figured that most people never experience this. But your message makes me realize that there are probably more people. For now, the best solution is probably the one I described above.
Last edited by mvzut on Monday 15 October 2018 8:40, 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
User avatar
l0gic
Posts: 107
Joined: Tuesday 08 October 2013 9:35
Target OS: Linux
Domoticz version: Latest
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by l0gic »

mvzut wrote: Sunday 14 October 2018 19:32
I have now connected my Cube to a wall outlet switch which I control from Domoticz. I created a timer to turn the Cube quickly off and on once per week, haven't had the problem anymore since then.

I don't see a lot of discussion about this issue, so I figured that most people never experience this. But your message makes me realize that there are probably more people. For now, the best solution is probably the one I described above.
Agreed, I reset my cube nightly in the early hours when I know the heating is not in use.
I also restrict polling of the cube to once every ten minutes.
Been running sweet for a few years now.

Before setting up the outlet switch / timer I used to lose the configuration a few times a year.
Non credus crepitus
DarkG
Posts: 89
Joined: Friday 15 September 2017 18:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10076
Location: Germany
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by DarkG »

@mvzut

Can you put Boost in your script with timer option? As you know the Valve sends the temperature only when the valve moves.
Put in Boost mode once a hour would help to get an actually temperature.
RPi4 Shelly1 Shelly2.5 ESPEasy Tuya Domoticz Beta Dashticz 3.6
mvzut
Posts: 443
Joined: Thursday 12 November 2015 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by mvzut »

DarkG wrote: Tuesday 16 October 2018 17:48 @mvzut

Can you put Boost in your script with timer option? As you know the Valve sends the temperature only when the valve moves.
Put in Boost mode once a hour would help to get an actually temperature.
Interesting idea. By the way, everybody can already program a Lua or Blockly time-based script to do this, it's just a few lines of code.

If there are more people who are interested in such functionality, I can probably write some code that puts all radiator valves in Boost mode for 30 seconds every hour. But that should be an optional feature, since it will probably drain your batteries much faster, the valves will create some noise every hour, and your radiators may get slightly warm. This is probably something that not everybody likes..

UPDATE:
If you already want to do this now, create a file called "script_time_valves.lua" in the ~\domoticz\scripts\lua folder with the following content:

Code: Select all

commandArray = {}
valves = {"Mode valve 1","Mode valve 2","Mode valve 3"}
if tonumber(os.date('%M')) == 0 then
  for n, device in pairs(valves) do
    setting = otherdevices_svalues[device]
    table.insert(commandArray, {[device] = "Set Level 30"})
    table.insert(commandArray, {[device] = "Set Level " .. setting .. " AFTER 10"})
  end
end
return commandArray
Replace "Mode valve 1" etc. with the names of the valves you want to switch to Boost for 10 seconds every hour. I haven't tested it thoroughly, but it should work.
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
DarkG
Posts: 89
Joined: Friday 15 September 2017 18:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10076
Location: Germany
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by DarkG »

I looked at the German FHEM Forum. They have a script for Max Temp Scanner.

They have 2 Options to do this.

1. Change desired Temp
2. Change mode

https://wiki.fhem.de/wiki/MAX!_Temperatur-Scanner

I think the change mode is a better way. The Valve will not change his position.
RPi4 Shelly1 Shelly2.5 ESPEasy Tuya Domoticz Beta Dashticz 3.6
mvzut
Posts: 443
Joined: Thursday 12 November 2015 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by mvzut »

DarkG wrote: Wednesday 17 October 2018 0:47 I looked at the German FHEM Forum. They have a script for Max Temp Scanner.

They have 2 Options to do this.

1. Change desired Temp
2. Change mode

https://wiki.fhem.de/wiki/MAX!_Temperatur-Scanner

I think the change mode is a better way. The Valve will not change his position.
Interesting! Apparently you don't have to switch to Boost mode per se, any mode switch will do. You could do that by this (slightly modified) Lua time-based script:

Code: Select all

commandArray = {}
valves = {"Mode valve 1","Mode valve 2","Mode valve 3"}
if tonumber(os.date('%M')) == 0 then
  for n, device in pairs(valves) do
    setting = otherdevices_svalues[device]
    if setting == 0 then tempsetting = 10 else tempsetting = 0 end
    table.insert(commandArray, {[device] = "Set Level " .. tempsetting})
    table.insert(commandArray, {[device] = "Set Level " .. setting .. " AFTER 30"})
  end
end
return commandArray
I'll check for a few days if this really works (be my guest to try it as well!). If it does, I'll have a look if I can build something like this into the Python plugin (as a selectable option).
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
DarkG
Posts: 89
Joined: Friday 15 September 2017 18:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10076
Location: Germany
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by DarkG »

Which name did you use for the valve. I got 3 different, general, thermostat and temp
RPi4 Shelly1 Shelly2.5 ESPEasy Tuya Domoticz Beta Dashticz 3.6
mvzut
Posts: 443
Joined: Thursday 12 November 2015 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by mvzut »

DarkG wrote:Which name did you use for the valve. I got 3 different, general, thermostat and temp
I have room thermostats in most rooms, so I don't get the temperature, thermostat and mode devices for those valves. I only use their opening percentage, to check if I need to switch on my heater (i.e. if there is heat demand).

I have one stand-alone valve, for which I have all devices created. They are given pretty arbitrary names. Because the beauty of the method used in my plugin is that you can give devices any name you want. Why are you interested in the names I use?
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
DarkG
Posts: 89
Joined: Friday 15 September 2017 18:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10076
Location: Germany
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by DarkG »

I asked cause in the script you named

Code: Select all

valves = {"Mode valve 1","Mode valve 2","Mode valve 3"}
I give my Valves this names,
pic.jpg
pic.jpg (148.89 KiB) Viewed 1649 times
RPi4 Shelly1 Shelly2.5 ESPEasy Tuya Domoticz Beta Dashticz 3.6
mvzut
Posts: 443
Joined: Thursday 12 November 2015 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Python plugin: ELV/EQ-3 MAX!

Post by mvzut »

I just used those names as examples, they are not the names I use. You have to change them to your own names. Note that any number of devices is possible, just increase or decrease the array length to match the amount of devices you want to toggle modes on.

By the way, it appears you have not created mode switches yet? You have to do this in order to use the script. For the plugin I might be able to get around that if desired.
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
janvangent2
Posts: 40
Joined: Thursday 18 October 2018 9:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by janvangent2 »

This is great!

I just ordered a raspberry Pi, and a Max! starters'set from conrad, based on this development.

My goal is to use this python plugin and add a way to control my boiler.
To do this, I will need to add a boiler switch (or standard relay). I'm thinking of buying this one:
https://www.robbshop.nl/secure-boiler-schakelaar and buying a z-wave usb stick.

Since I'm completely new in this field, is there an easy way to control the central heating switch based on the data from Max?

Is scripting required?
Would this script also work for the python plugin?
https://www.domoticz.com/wiki/EQ3_MAX!#Valves_Script
mvzut
Posts: 443
Joined: Thursday 12 November 2015 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by mvzut »

janvangent2 wrote: Thursday 18 October 2018 9:59 This is great!

I just ordered a raspberry Pi, and a Max! starters'set from conrad, based on this development.

My goal is to use this python plugin and add a way to control my boiler.
To do this, I will need to add a boiler switch (or standard relay). I'm thinking of buying this one:
https://www.robbshop.nl/secure-boiler-schakelaar and buying a z-wave usb stick.

Since I'm completely new in this field, is there an easy way to control the central heating switch based on the data from Max?

Is scripting required?
Would this script also work for the python plugin?
https://www.domoticz.com/wiki/EQ3_MAX!#Valves_Script
Hi Jan, welcome to the community!

The hardware you mention could certainly do the job, although it is a slightly expensive solution. I think you can switch a contact on and off for less than 100 Euros. By the way, please be aware that this only works if you have an of/off boiler or an OpenTherm boiler with a separate on/off input.

A few possible alternatives for the switching: If you're not afraid of some electronics, you could connect a relay (e.g. this one) to one of the GPIOs of the Raspberry Pi. If your boiler is not near your Raspberry Pi, you could use an ESP8266 with ESPEasy to control a relay (https://www.letscontrolit.com/wiki/index.php/Relais). This should all be possible for less than 10 euros.

If you have a smart thermostat that is supported by Domoticz, or are planning to buy one, this can also be used to turn on your boiler (just set the setpoint to something really high). I have an Opentherm boiler myself, with an Opentherm Gateway (OTGW) connected to it. I use this to control the setpoint from Domoticz.

I think you can use the boiler control script from the Wiki with some modifications. I'm also considering to make this part of my plugin, e.g. by adding a field to the options screen, where you fill in the IDX of a (virtual) switch that is switched on when one of the valves requires heat.
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
janvangent2
Posts: 40
Joined: Thursday 18 October 2018 9:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by janvangent2 »

I think you can use the boiler control script from the Wiki with some modifications. I'm also considering to make this part of my plugin, e.g. by adding a field to the options screen, where you fill in the IDX of a (virtual) switch that is switched on when one of the valves requires heat.
That would be great! I would realy appreciate that.

At this point I have an old oil burner with On/Off control. But I might invest in a more modern gas burner in the next comming years with openterm protocol. So it would be great if both options can be implemented (don't know if this is possible?).

The option to change these folowing parameters would be very useful I believe:

Code: Select all

BoilerOnPercent = 30               -- percentage valve open at which the boiler will be turned on
HysterysisOffPercent = 20             -- percentage below BoilerOnPercent to switch off the boiler
MinValves = 2                      -- Number of Valves that need to be open before boiler is turned on
ValvePercentOveride = 75            -- Percentage value of valve open required to override MinValves value (one room is very cold)
HolidayMinTemp = 10                -- Minimum room temperature before boiler is turned on during holiday period
It would also be great if there could be a minimum cycle time implemented in the script for on/off control (usualy for on/off burners 3 minutes is standard for gas and 6 minutes for oil burners).
A few possible alternatives for the switching: If you're not afraid of some electronics, you could connect a relay (e.g. this one) to one of the GPIOs of the Raspberry Pi. If your boiler is not near your Raspberry Pi, you could use an ESP8266 with ESPEasy to control a relay (https://www.letscontrolit.com/wiki/index.php/Relais). This should all be possible for less than 10 euros.
That will indeed be a cheaper alternative. However, since I'm going to add some more z-wave devices I will need a z-wave USB stick anyway.
And the benefit of the secure boiler switch is the fact that I can still manualy turn on the boiler (buttons) in case there is something wrong with the software. And it's good looking, so it's not a problem to mount it on the current position where the antique thermostat is sitting (and connect it to the heater wiring).

Eq-3 used to have a boiler control, but now they don't sell it anymore and are also not planning to bring it again into the market :(
https://www.eq-3.de/Downloads/eq3/downl ... 160420.pdf
mvzut
Posts: 443
Joined: Thursday 12 November 2015 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by mvzut »

I'm not sure if I can implement all those parameters in the current plugin. I almost used up the maximum amount of configurable parameters that can be shown in the UI. I might be able to do it if I remove the option to create certain device types or not. This means that all devices will always be created and you have to set them to "Unused" if you don't want them. Is that something you guys could live with? Alternatively, I could create a separate plugin purely around boiler control for MAX valves.
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
janvangent2
Posts: 40
Joined: Thursday 18 October 2018 9:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by janvangent2 »

I'm still waiting on my max! equipment to arrive (togheter with the raspPi), but I think both options would work. Maybe a seperate plugin would even be better?

I think the lack of boiler control is the biggest shortcomming of the Max! equipment. I'm not even sure that if they offered this integrated in their software/hardware as they did in the past, if I would need/use domoticz. But now it's a no-brainer, I need domoticz to work with Max! to be able to have the benefits of individual zone heating. Without boiler control, it's quite useless (unless you have city heating, hot water from the city as they have in some countries, I believe Netherlands in some areas).
DarkG
Posts: 89
Joined: Friday 15 September 2017 18:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10076
Location: Germany
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by DarkG »

mvzut wrote: Thursday 18 October 2018 12:49 I think you can use the boiler control script from the Wiki with some modifications. I'm also considering to make this part of my plugin, e.g. by adding a field to the options screen, where you fill in the IDX of a (virtual) switch that is switched on when one of the valves requires heat.

That would be great. I have a boiler with on off switch too.
RPi4 Shelly1 Shelly2.5 ESPEasy Tuya Domoticz Beta Dashticz 3.6
janvangent2
Posts: 40
Joined: Thursday 18 October 2018 9:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by janvangent2 »

mvzut wrote: Thursday 18 October 2018 12:49
The hardware you mention could certainly do the job, although it is a slightly expensive solution. I think you can switch a contact on and off for less than 100 Euros. By the way, please be aware that this only works if you have an of/off boiler or an OpenTherm boiler with a separate on/off input.

A few possible alternatives for the switching: If you're not afraid of some electronics, you could connect a relay (e.g. this one) to one of the GPIOs of the Raspberry Pi. If your boiler is not near your Raspberry Pi, you could use an ESP8266 with ESPEasy to control a relay (https://www.letscontrolit.com/wiki/index.php/Relais). This should all be possible for less than 10 euros.
Thanks for this information.

I ordered a WeMos D1 mini V3 - Wifi Module and a WeMos D1 mini Relais Shield
https://opencircuit.be/Product/12093/We ... -Shield-v2
https://opencircuit.be/Product/12095/We ... ifi-Module

I'll flash ESPeasy to it and hope it will work to switch the oil burner.
janvangent2
Posts: 40
Joined: Thursday 18 October 2018 9:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by janvangent2 »

So I have the plugin up and running. It took me a while I should install python 3.4, since the plugins don't seem to work with the standard 3.5.x which is on the Raspberry Pi image.
It runs great! Immediatly found the installed hardware. Great job on the python script!

I've prepared the Wemos D1 mini ESP2866 and soldered the Relay shield to it, flashed ESPeasy.
I've created a Dummy in the hardware list and generated a switch which control pin 5 on the ESP2866 and this works great.
switch.PNG
switch.PNG (24.81 KiB) Viewed 1541 times
It would be super great mvzut if you could somehow implement the boiler control into a python script to control such a switch. Let me know if I could be of any assistance.
mvzut
Posts: 443
Joined: Thursday 12 November 2015 10:55
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Python plugin: ELV/EQ-3 MAX!

Post by mvzut »

janvangent2 wrote:So I have the plugin up and running. It took me a while I should install python 3.4, since the plugins don't seem to work with the standard 3.5.x which is on the Raspberry Pi image.
It runs great! Immediatly found the installed hardware. Great job on the python script!

I've prepared the Wemos D1 mini ESP2866 and soldered the Relay shield to it, flashed ESPeasy.
I've created a Dummy in the hardware list and generated a switch which control pin 5 on the ESP2866 and this works great.
switch.PNG
It would be super great mvzut if you could somehow implement the boiler control into a python script to control such a switch. Let me know if I could be of any assistance.
Great that you have successfully installed everything! I have Python 3.5.3 installed here, works without problems.

I'll certainly have a look at adding some boiler switching functionality to the plugin. I'm thinking about keeping it simple at first, without too many configurable parameters, maybe just the device IDX that needs to be switched.
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
janvangent2
Posts: 40
Joined: Thursday 18 October 2018 9:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin: ELV/EQ-3 MAX!

Post by janvangent2 »

mvzut wrote: Saturday 20 October 2018 17:58
janvangent2 wrote:So I have the plugin up and running. It took me a while I should install python 3.4, since the plugins don't seem to work with the standard 3.5.x which is on the Raspberry Pi image.
It runs great! Immediatly found the installed hardware. Great job on the python script!

I've prepared the Wemos D1 mini ESP2866 and soldered the Relay shield to it, flashed ESPeasy.
I've created a Dummy in the hardware list and generated a switch which control pin 5 on the ESP2866 and this works great.

switch.PNG
It would be super great mvzut if you could somehow implement the boiler control into a python script to control such a switch. Let me know if I could be of any assistance.
Great that you have successfully installed everything! I have Python 3.5.3 installed here, works without problems.

I'll certainly have a look at adding some boiler switching functionality to the plugin. I'm thinking about keeping it simple at first, without too many configurable parameters, maybe just the device IDX that needs to be switched.
That would indeed be great to start with.

Today I received the remaining EQ-3 equipment.
I have now installed 11 radiator thermostats and 3 wall thermostats.
1 wall thermostat in the living room (controlling 3 radiator thermostats)
1 wall thermotat in the bathroom and 1 in my son's room (because the radiators are inside a wooden housing, so using the radiator thermostat to regulate the temperature in these rooms wouldn't work properly).

I'm now waiting on a small voltage supply (220V acdc converter) to power the ESP8266 module to switch the boiler. As soon as I have this, and you have a script ready I can run a test.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest