Page 4 of 10

Python plugin: ELV/EQ-3 MAX!

Posted: Sunday 28 October 2018 9:11
by mvzut
Ok, good to hear it at least doesn't give error messages anymore (the "thread seems to have ended unexpectedly" message occurs for me too, although rarely, I suspect this happens when the communication with the Cube occasionally takes too long).

Are the valve positions updated correctly? Can you perhaps post the relevant log parts when debugging is on? It should say something like "x valves require heat".

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

Posted: Sunday 28 October 2018 12:48
by AurelioF
mvzut wrote: Sunday 28 October 2018 9:11 Ok, good to hear it at least doesn't give error messages anymore (the "thread seems to have ended unexpectedly" message occurs for me too, although rarely, I suspect this happens when the communication with the Cube occasionally takes too long).

Are the valve positions updated correctly? Can you perhaps post the relevant log parts when debugging is on? It should say something like "x valves require heat".
OK that's ...
in the log it appears ...
2018-10-28 11: 43: 52.773 (eQ3) 246 valves require heat

But the Heat demand switch remains closed.


2018-10-28 11:43:37.700 Status: (eQ3) Initialized version 0.6.0, author 'mvzut'
2018-10-28 11:43:40.444 (eQ3) Number of rooms found: 9 (highest number: 9)
2018-10-28 11:43:49.965 (eQ3) Reading e-Q3 MAX! devices from Cube...
2018-10-28 11:43:52.744 (eQ3) Checking device 'WC-Bajo' in room 1
2018-10-28 11:43:52.747 (eQ3) Checking device 'Despacho' in room 2
2018-10-28 11:43:52.750 (eQ3) Checking device 'Pasillo-Superior' in room 3
2018-10-28 11:43:52.753 (eQ3) Checking device 'WC-Superior' in room 4
2018-10-28 11:43:52.756 (eQ3) Checking device 'Dormitorio' in room 5
2018-10-28 11:43:52.759 (eQ3) Checking device 'Invitados' in room 6
2018-10-28 11:43:52.761 (eQ3) Checking device 'Rad-Libreria' in room 7
2018-10-28 11:43:52.764 (eQ3) Checking device 'Rad-mesacomedor' in room 7
2018-10-28 11:43:52.767 (eQ3) Checking device 'Hall' in room 8
2018-10-28 11:43:52.770 (eQ3) Checking device 'Cocina' in room 9
2018-10-28 11:43:52.773 (eQ3) 246 valves require heat
2018-10-28 11:44:22.323 (eQ3) Skipping heartbeat: 1
2018-10-28 11:44:52.324 (eQ3) Skipping heartbeat: 2
2018-10-28 11:45:22.325 (eQ3) Skipping heartbeat: 3
2018-10-28 11:45:52.326 (eQ3) Reading e-Q3 MAX! devices from Cube...
2018-10-28 11:45:55.147 (eQ3) Checking device 'WC-Bajo' in room 1
2018-10-28 11:45:55.150 (eQ3) Checking device 'Despacho' in room 2
2018-10-28 11:45:55.153 (eQ3) Checking device 'Pasillo-Superior' in room 3
2018-10-28 11:45:55.155 (eQ3) Checking device 'WC-Superior' in room 4
2018-10-28 11:45:55.158 (eQ3) Checking device 'Dormitorio' in room 5
2018-10-28 11:45:55.161 (eQ3) Checking device 'Invitados' in room 6
2018-10-28 11:45:55.164 (eQ3) Checking device 'Rad-Libreria' in room 7
2018-10-28 11:45:55.167 (eQ3) Checking device 'Rad-mesacomedor' in room 7
2018-10-28 11:45:55.170 (eQ3) Checking device 'Hall' in room 8
2018-10-28 11:45:55.173 (eQ3) Checking device 'Cocina' in room 9
2018-10-28 11:45:55.176 (eQ3) 246 valves require heat
2018-10-28 11:46:24.726 (eQ3) Skipping heartbeat: 1
2018-10-28 11:46:54.728 (eQ3) Skipping heartbeat: 2
2018-10-28 11:47:24.730 (eQ3) Skipping heartbeat: 3
2018-10-28 11:47:54.731 (eQ3) Reading e-Q3 MAX! devices from Cube...
2018-10-28 11:47:57.549 (eQ3) Checking device 'WC-Bajo' in room 1
2018-10-28 11:47:57.552 (eQ3) Checking device 'Despacho' in room 2
2018-10-28 11:47:57.555 (eQ3) Checking device 'Pasillo-Superior' in room 3
2018-10-28 11:47:57.558 (eQ3) Checking device 'WC-Superior' in room 4
2018-10-28 11:47:57.561 (eQ3) Checking device 'Dormitorio' in room 5
2018-10-28 11:47:57.564 (eQ3) Checking device 'Invitados' in room 6
2018-10-28 11:47:57.567 (eQ3) Checking device 'Rad-Libreria' in room 7
2018-10-28 11:47:57.570 (eQ3) Checking device 'Rad-mesacomedor' in room 7
2018-10-28 11:47:57.573 (eQ3) Checking device 'Hall' in room 8
2018-10-28 11:47:57.576 (eQ3) Checking device 'Cocina' in room 9
2018-10-28 11:47:57.579 (eQ3) 246 valves require heat

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

Posted: Sunday 28 October 2018 12:54
by AurelioF
It is correct "246 valves require heat"
246 seems a high value :?:
I only have 25 devices in this machine

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

Posted: Sunday 28 October 2018 15:41
by DarkG
How did you update the plugin?

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

Posted: Sunday 28 October 2018 17:40
by DarkG
So got it installed. Valves are over 50%, but the Heat demand wont switch.

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

Posted: Sunday 28 October 2018 18:18
by AurelioF
DarkG wrote: Sunday 28 October 2018 15:41 How did you update the plugin?
The update is done with

Code: Select all

git reset --hard
git pull
But problems may appear, keep in mind that it is still in development, visit.

viewtopic.php?f=34&t=25081&start=40#p195558

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

Posted: Sunday 28 October 2018 18:24
by AurelioF
DarkG wrote: Sunday 28 October 2018 17:40 So got it installed. Valves are over 50%, but the Heat demand wont switch.
It seems that there is some problem, mvzut is reviewing the code.

Python plugin: ELV/EQ-3 MAX!

Posted: Sunday 28 October 2018 18:56
by mvzut
AurelioF wrote: Sunday 28 October 2018 18:24
DarkG wrote: Sunday 28 October 2018 17:40 So got it installed. Valves are over 50%, but the Heat demand wont switch.
It seems that there is some problem, mvzut is reviewing the code.
I reviewed the code, and found a "bug"! For some reason, the state of the Heat demand switch is undefined directly after it is created. Since I do a check if it is off before I turn it on, it never turned on... The logging of the number of valves that need heat is also correct now.

Please update again using the standard method. Please also REMOVE the heat demand switch, it will be recreated again automatically (but now with a defined initial state). Alternatively, you can also uninstall the plugin completely (removing all devices) and install it back again. For new users, everything should work out-of-the-box now.

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

Posted: Sunday 28 October 2018 20:04
by AurelioF
mvzut wrote: Sunday 28 October 2018 18:56
AurelioF wrote: Sunday 28 October 2018 18:24
DarkG wrote: Sunday 28 October 2018 17:40 So got it installed. Valves are over 50%, but the Heat demand wont switch.
It seems that there is some problem, mvzut is reviewing the code.
I reviewed the code, and found a bug! For some reason, the state of the Heat demand switch is undefined directly after it is created. Since I do a check if it is off before I turn it on, it never turned on... The logging of the number of valves that need heat is also correct now.

Please update again using the standard method. Please also REMOVE the heat demand switch, it will be recreated again automatically (but now with a defined initial state). Alternatively, you can also uninstall the plugin completely (removing all devices) and install it back again. For new users, everything should work out-of-the-box now.

Ok, turn on the heat demand switch!
The log looks good
I will try it for a while and if you want I inform you ..
Thank you very much for this add-on ... :D

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

Posted: Sunday 28 October 2018 21:10
by mvzut
Great! Feedback is always welcome. Also from others who use the plugin. Let me know if the features work, if/how you use them, if you have ideas for other features, etc.

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

Posted: Monday 29 October 2018 16:25
by janvangent2
Today I installed the new version, linked it to my ESP8266 module + relay to control the heater and all is working great!

Many thanks mvzut! ;)

Image
I took a small power supply and integrated both in a white General Electric box
Image
I made this relay control for the heater in parallel to the conventional control. Which is now set at 10°C. In case the raspberry Pi crashes or my wifi network is down, I can still control the heater with the conventional thermostat.

Image

Installed the wall thermostat (which fits great with my other household switches)
Image

Al temperatures are updated and the heat demand switch does it job.
Image

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

Posted: Monday 29 October 2018 17:35
by mvzut
Cool (or should I say: hot?)! Curious if the heat demand switch works satisfactory on the long run. You have quite a number of valves, I can imagine that switching the boiler on every time just a single valve requires heat could lead to "nervous" switching. If this turns out to be the case, we could experiment with an additional setting which specifies the amount of valves that need to be open before the heat demand switch is turned on.

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

Posted: Monday 29 October 2018 18:20
by janvangent2
I have 11 radiator vavles and 3 wall thermostats.

I will monitor the on/off behavior in the next few days.
In case there is an issue, we could possible re-use some of the coding of the other EQ-3 max plugin?
In case you run out of user configurable parameters, could I edit the values in the python script directly?

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)

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

Posted: Tuesday 30 October 2018 15:46
by AurelioF
Some appreciations after a few days of use.

First I want to say that in my installation I still do not have wall thermostats, I hope to solve this situation in a few days.

I'm working with 11 valves and their corresponding integrated thermostats, I know this is not the best.

in my case the percentage of the opening of the valves of 25% caused a demand of continuous or almost heat, modify this value in your script and use 50%, with this value the behavior improved, even so I find differences of 1º or more between the setpoint temperature and the temperature actually reached, I explain, to have a stay at 19 º I have to adjust the valve to 18 º.

My heating uses valves from a single pipe, the most abundant systems use a hot water pipe and a return pipe for the already cooled water. In my heating, the water after passing through the radiator goes back to the same pipe.

I would also like to point out, that I do not find improvement in the frequency of taking temperature when using the 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 tried to put the script also in the directory for lua, as indicated.

maybe I misunderstood how to use the names of the valves, I think these are the names of the valves in domoticz, is that correct?
After testing the script for 48 hours I do not find more frequent temperature taking.

Next week I will include wall thermostats

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

Posted: Tuesday 30 October 2018 16:35
by janvangent2
So far it is working great.

Below a graph of the heat demand switch.
logging.PNG
logging.PNG (50.57 KiB) Viewed 1450 times
Last heat demand yesterday evening was at 20.34
At 22.00 we went to sleep and all temperature setpoints are lowered except the sleeping room of our son, which is set to 19°C.
As you can see only once during the night (00.39) heat was requested to keep the sleeping room on it's setpoint. Next time was in the morning around 5:30 when the setpoint of the living room goes up to 21°C.
Since I'm at home this week, the heating in the living room is set to 20°C during the day, so about every 2 hours there is heat demand to maintain this temperature.
So I couldn't be happier for the moment.

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

Posted: Tuesday 30 October 2018 16:53
by mvzut
AurelioF wrote: Tuesday 30 October 2018 15:46 in my case the percentage of the opening of the valves of 25% caused a demand of continuous or almost heat, modify this value in your script and use 50%, with this value the behavior improved, even so I find differences of 1º or more between the setpoint temperature and the temperature actually reached, I explain, to have a stay at 19 º I have to adjust the valve to 18 º.
For me 25% works ok, but I only have 3 valves, and the heater switches on a lot due to the normal thermostat in my living room as well.
I am experimenting with a version that approaches it from a slightly different perspective: I calculate the average opening percentage of all valves, which should be above e.g. 10%. In my case, with only 3 valves, this means that one valve needs to be open 30% or two @ 15% or three @ 10%. If you have 11 valves, it means one valve @ 100% will not even cause the heat demand switch to go on because it gives an average of 9%. But usually, when one valve requires heat, more will, so eventually the average opening percentage will rise above 10%. I think this could reduce the amount of "nervous" switching. Anyone interested to try this out? For such testing pruposes, I suggest that I send or attach the python file directly, instead of using Github.
AurelioF wrote: Tuesday 30 October 2018 15:46 I would also like to point out, that I do not find improvement in the frequency of taking temperature when using the script
I tried to put the script also in the directory for lua, as indicated.
maybe I misunderstood how to use the names of the valves, I think these are the names of the valves in domoticz, is that correct?
After testing the script for 48 hours I do not find more frequent temperature taking.
You should indeed use the (axact!) names of the mode switches in Domoticz. To make sure it's actually running: If you look at the history of the mode switches, do they indeed change position briefly every hour? In my case it seems to help a bit. I'll disable the script tonight to see the difference.

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

Posted: Tuesday 30 October 2018 18:35
by AurelioF
ok thank you very much mvzut, I am willing to experience what is necessary.

for me the current method works well, and has the advantage of being able to completely close valves (guest room) without influencing the rest, just comment as general information in case someone could find the same problem.

Something that I see very interesting, is to be able to use different types of thermostats, for example the intelligent virtual thermostat, it seems an interesting development.

For me, it would be a great solution, to be able to use a thermostat per floor or per room, without being forced to buy wall thermostats EQ-3 MAX!

although it seems that it is not easy to implement given the operation of the EQ-3 MAX!

Next week I will have the EQ-3 MAX thermostats! and I will prove how they work.

thanks for everything.

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

Posted: Tuesday 30 October 2018 20:06
by haajee
Hi.

Thank you for your great work! i tried directly on my Orange Pi PC with Armbian Ubuntu Bionic. But sadly it does nothing... Also if i reboot the Domoticz or even the complete Orange PI... There comes no new hardware under the devices...

I have the following Python versions installed:

Code: Select all

root@orangepipc:/# python --version
Python 2.7.15rc1
root@orangepipc:/# python3 --version
Python 3.6.6
What do i wrong? Or should i just activate plugins in the settings or something? A clean install does also not fix this problem.

Edit: i look in the log and i read:

Code: Select all

2018-10-30 18:56:34.878 Status: EventSystem - Python: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
Edit2: this error did i fixed with:

Code: Select all

apt-get install libpython3
I didn't see a error in Domoticz error log now but it's still not working :(

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

Posted: Tuesday 30 October 2018 20:31
by AurelioF
Hello haajee, I use raspbian in my pi, and it works without problems, I use the version of Python: 3.5.3, in the Domoticz wiki you can find all the information to install.
If you have difficulties trying to help you.

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

Posted: Tuesday 30 October 2018 20:33
by haajee
Thaml you very much. :) This is what the log now shows. I see nothing what could be wrong?

Code: Select all

 2018-10-30 19:30:02.886 Status: Domoticz V4.9700 (c)2012-2018 GizMoCuz
2018-10-30 19:30:02.898 Status: Build Hash: a3a45906, Date: 2018-06-23 14:24:51
2018-10-30 19:30:02.899 Status: Startup Path: /home/hj/domoticz/
2018-10-30 19:30:03.174 Sunrise: 06:27:00 SunSet: 16:08:00
2018-10-30 19:30:03.174 Day length: 09:41:00 Sun at south: 11:05:00
2018-10-30 19:30:03.174 Civil twilight start: 05:51:00 Civil twilight end: 16:44:00
2018-10-30 19:30:03.174 Nautical twilight start: 05:11:00 Nautical twilight end: 17:25:00
2018-10-30 19:30:03.174 Astronomical twilight start: 04:31:00 Astronomical twilight end: 18:04:00
2018-10-30 19:30:03.515 Active notification Subsystems: (0/13)
2018-10-30 19:30:03.642 Starting shared server on: :::6144
2018-10-30 19:30:03.174 Status: EventSystem: reset all events...
2018-10-30 19:30:03.504 Status: PluginSystem: Started, Python version '3.6.6'.
2018-10-30 19:30:03.529 Status: WebServer(HTTP) started on address: :: with port 8080
2018-10-30 19:30:03.637 Status: WebServer(SSL) started on address: :: with port 443
2018-10-30 19:30:03.640 Status: Proxymanager started.
2018-10-30 19:30:03.642 Status: TCPServer: shared server started...
2018-10-30 19:30:03.642 Status: RxQueue: queue worker started...
2018-10-30 19:30:05.643 Status: EventSystem: reset all events...
2018-10-30 19:30:05.644 Status: EventSystem: reset all device statuses...
2018-10-30 19:30:05.725 Status: PluginSystem: Entering work loop.
2018-10-30 19:30:05.736 Status: Python EventSystem: Initalizing event module.
2018-10-30 19:30:05.736 Status: EventSystem: Started
2018-10-30 19:30:05.736 Status: EventSystem: Queue thread started...