I found out it is pretty complicated to switch arbitrary Domoticz devices from within a Python plugin. Therefore, I am working on a plugin version which creates it's own boiler switch. You can then couple this switch to your own "real" boiler switch using it as slave device. The plugin is actually ready, but I want to test it a bit before releasing it.janvangent2 wrote: That would indeed be great to start with.
...
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.
Python plugin: ELV/EQ-3 MAX!
Moderator: leecollings
-
- 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!
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: Python plugin: ELV/EQ-3 MAX!
I have released an update of the plugin again on Github (version 0.6.0).
This version has an option to create a "Heat demand" switch, which will be turned on when at least one valve requires heat (i.e. if it is open for more than 25%). This 25% is not configurable at this stage, nor is the amount of valves that need to be open before the "Heat demand" switch is turned on. I may add this configurability later. However, since Domoticz plugins do not support more than 6 user-configurable parameters, this will only be possible if I remove other configurable parameters (e.g. the optional creation of certain devices). Actually, I already had to remove one of them (the optional creation of temperature devices) to make this new option possible.
You can use the new "Heat demand" switch to control your boiler. The exact execution of this will differ per situation, since all boilers work differently. You may have to send a command via http, or switch on another device that controls your boiler's thermostat. You can achieve this by creating (Blockly) scripts or configuring other devices as slave of the "Heat demand" switch.
Let me know if this works for you!
P.S. Please restart Domoticz after updating the files with the git commands mentioned in earlier posts. After restarting, go to Devices and set the parameters (again). This is necessary because I made some major changes there.
.
.
This version has an option to create a "Heat demand" switch, which will be turned on when at least one valve requires heat (i.e. if it is open for more than 25%). This 25% is not configurable at this stage, nor is the amount of valves that need to be open before the "Heat demand" switch is turned on. I may add this configurability later. However, since Domoticz plugins do not support more than 6 user-configurable parameters, this will only be possible if I remove other configurable parameters (e.g. the optional creation of certain devices). Actually, I already had to remove one of them (the optional creation of temperature devices) to make this new option possible.
You can use the new "Heat demand" switch to control your boiler. The exact execution of this will differ per situation, since all boilers work differently. You may have to send a command via http, or switch on another device that controls your boiler's thermostat. You can achieve this by creating (Blockly) scripts or configuring other devices as slave of the "Heat demand" switch.
Let me know if this works for you!
P.S. Please restart Domoticz after updating the files with the git commands mentioned in earlier posts. After restarting, go to Devices and set the parameters (again). This is necessary because I made some major changes there.
.
.
Last edited by mvzut on Friday 26 October 2018 20:21, 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: 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!
I have this running for a while, seems to update temperature more often now. Have others tried it? If it works well for more people, I might consider adding this functionality to the plugin.mvzut wrote: ↑Wednesday 17 October 2018 21:41 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: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).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
.
.
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: 33
- Joined: Wednesday 03 October 2018 18:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Spain
- Contact:
Re: Python plugin: ELV/EQ-3 MAX!
I'm about to try the last update of the plugin and I also want to test the script that acts on the valves every hour, I can use the domoticz editor to include it, or it is necessary to write the file in the folder ~ \ domoticz \ scripts \ lua
-
- 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!
No, the internal editor is also fine, just make sure you set it to time-triggered.AurelioF wrote:I'm about to try the last update of the plugin and I also want to test the script that acts on the valves every hour, I can use the domoticz editor to include it, or it is necessary to write the file in the folder ~ \ domoticz \ scripts \ lua
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: 33
- Joined: Wednesday 03 October 2018 18:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Spain
- Contact:
Re: Python plugin: ELV/EQ-3 MAX!
Ok gracias...mvzut wrote: ↑Friday 26 October 2018 19:59No, the internal editor is also fine, just make sure you set it to time-triggered.AurelioF wrote:I'm about to try the last update of the plugin and I also want to test the script that acts on the valves every hour, I can use the domoticz editor to include it, or it is necessary to write the file in the folder ~ \ domoticz \ scripts \ lua
Después de actualizar el plugin encontrarte algunos errores en el log.
Tengo 2 válvulas al 40% y 60% pero Heat demand aparece siempre OFF
2018-10-26 20:03:31.498 Error: (Rad) 'onStart' failed 'ValueError':'invalid literal for int() with base 10: 'True''.
2018-10-26 20:03:31.498 Error: (Rad) ----> Line 322 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onStart
2018-10-26 20:03:31.498 Error: (Rad) ----> Line 177 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onStart
2018-10-26 20:03:41.014 Error: (Rad) 'onHeartbeat' failed 'AttributeError':''BasePlugin' object has no attribute 'beats''.
2018-10-26 20:03:41.014 Error: (Rad) ----> Line 330 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 20:03:41.015 Error: (Rad) ----> Line 266 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 20:04:00.793 Error: (Rad) 'onHeartbeat' failed 'AttributeError':''BasePlugin' object has no attribute 'beats''.
2018-10-26 20:04:00.793 Error: (Rad) ----> Line 330 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 20:04:00.793 Error: (Rad) ----> Line 266 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 20:04:10.810 Error: (Rad) 'onHeartbeat' failed 'AttributeError':''BasePlugin' object has no attribute 'beats''.
2018-10-26 20:04:10.810 Error: (Rad) ----> Line 330 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 20:04:10.810 Error: (Rad) ----> Line 266 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 20:04:20.828 Error: (Rad) 'onHeartbeat' failed 'AttributeError':''BasePlugin' object has no attribute 'beats''.
2018-10-26 20:04:20.828 Error: (Rad) ----> Line 330 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 20:04:20.828 Error: (Rad) ----> Line 266 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 20:04:30.795 Error: (Rad) 'onHeartbeat' failed 'AttributeError':''BasePlugin' object has no attribute 'beats''.
2018-10-26 20:04:30.795 Error: (Rad) ----> Line 330 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 20:04:30.795 Error: (Rad) ----> Line 266 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbea
-
- Posts: 33
- Joined: Wednesday 03 October 2018 18:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Spain
- Contact:
Re: Python plugin: ELV/EQ-3 MAX!
Could it be because I do not have thermostats?
I think you activate the option unintentionally
I think you activate the option unintentionally
-
- 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!
Sorry, I forgot to explain that after updating the files, Domoticz needs to be restarted completely, not just the plugin. After restarting, you have to go to Devices and set the user configurable parameters of the plugin again. This is because I changed the order & meaning of the parameters.
I expect this will solve your error messages.
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: 33
- Joined: Wednesday 03 October 2018 18:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Spain
- Contact:
Re: Python plugin: ELV/EQ-3 MAX!
Opss ok hahaha ... solved thank you very much.mvzut wrote: ↑Friday 26 October 2018 20:19Sorry, I forgot to explain that after updating the files, Domoticz needs to be restarted completely, not just the plugin. After restarting, you have to go to Devices and set the user configurable parameters of the plugin again. This is because I changed the order & meaning of the parameters.
I expect this will solve your error messages.
-
- Posts: 33
- Joined: Wednesday 03 October 2018 18:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Spain
- Contact:
Re: Python plugin: ELV/EQ-3 MAX!
my cost more than expected solve the problem, delete all devices and restart domotiz, but continue the problem, finally change the names in MAX and there are no error messages, although the demand for continuous heat was even with more than one valve in heats greater than 25%
-
- 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!
Ok, I'm not sure I completely understand... Is it working now? And does the heat demand switch work as expected?
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: 33
- Joined: Wednesday 03 October 2018 18:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Spain
- Contact:
Re: Python plugin: ELV/EQ-3 MAX!
2018-10-26 23:06:49.300 Error: (Rad) 'onHeartbeat' failed 'ValueError':'invalid literal for int() with base 10: 'None''.
2018-10-26 23:06:49.300 Error: (Rad) ----> Line 330 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 23:06:49.300 Error: (Rad) ----> Line 288 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 23:06:49.300 Error: (Rad) ----> Line 146 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function UpdateDevice
2018-10-26 23:06:49.300 Error: (Rad) ----> Line 330 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 23:06:49.300 Error: (Rad) ----> Line 288 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 23:06:49.300 Error: (Rad) ----> Line 146 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function UpdateDevice
-
- Posts: 33
- Joined: Wednesday 03 October 2018 18:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Spain
- Contact:
Re: Python plugin: ELV/EQ-3 MAX!
I can start a clean installation, for the moment I am still doing tests.
-
- 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!
Mmm... strange. It's working fine here. It seems it's reading "None" as your valve position, don't know why. I've updated the code again with one minor edit, may help to make it at least not crash in those situations. Can you try this, and put debugging on? This will show more status updates in the log.AurelioF wrote:2018-10-26 23:06:49.300 Error: (Rad) 'onHeartbeat' failed 'ValueError':'invalid literal for int() with base 10: 'None''.
2018-10-26 23:06:49.300 Error: (Rad) ----> Line 330 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 23:06:49.300 Error: (Rad) ----> Line 288 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 23:06:49.300 Error: (Rad) ----> Line 146 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function UpdateDevice
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: 33
- Joined: Wednesday 03 October 2018 18:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Spain
- Contact:
Re: Python plugin: ELV/EQ-3 MAX!
2018-10-26 23:58:10.888 Status: (Rad) Started.mvzut wrote: ↑Friday 26 October 2018 23:27Mmm... strange. It's working fine here. It seems it's reading "None" as your valve position, don't know why. I've updated the code again with one minor edit, may help to make it at least not crash in those situations. Can you try this, and put debugging on? This will show more status updates in the log.AurelioF wrote:2018-10-26 23:06:49.300 Error: (Rad) 'onHeartbeat' failed 'ValueError':'invalid literal for int() with base 10: 'None''.
2018-10-26 23:06:49.300 Error: (Rad) ----> Line 330 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 23:06:49.300 Error: (Rad) ----> Line 288 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 23:06:49.300 Error: (Rad) ----> Line 146 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function UpdateDevice
2018-10-26 23:58:11.167 (Rad) Debug logging mask set to: PYTHON
2018-10-26 23:58:11.167 (Rad) Debugging mode activated
2018-10-26 23:58:11.167 (Rad) Reading e-Q3 MAX! devices from Cube...
2018-10-26 23:58:11.153 Status: (Rad) Entering work loop.
2018-10-26 23:58:11.154 Status: (Rad) Initialized version 0.6.0, author 'mvzut'
2018-10-26 23:58:13.939 (Rad) Number of rooms found: 9 (highest number: 9)
2018-10-26 23:58:23.461 (Rad) Reading e-Q3 MAX! devices from Cube...
2018-10-26 23:58:26.239 (Rad) Checking device 'WC-Bajo' in room 1
2018-10-26 23:58:26.242 (Rad) Checking device 'Despa' in room 2
2018-10-26 23:58:26.245 (Rad) Checking device 'Pasillo-Superior' in room 3
2018-10-26 23:58:26.247 (Rad) Checking device 'WC-Superior' in room 4
2018-10-26 23:58:26.250 (Rad) Checking device 'Dormitorio' in room 5
2018-10-26 23:58:26.253 (Rad) Checking device 'Invitados-' in room 6
2018-10-26 23:58:26.255 (Rad) Checking device 'Rad-Libreria' in room 7
2018-10-26 23:58:26.258 (Rad) Checking device 'Rad-mesacomedor' in room 7
2018-10-26 23:58:26.261 (Rad) Checking device 'Hall' in room 8
2018-10-26 23:58:26.263 (Rad) Checking device 'Cocina-' in room 9
2018-10-26 23:58:26.264 Error: (Rad) 'onHeartbeat' failed 'TypeError':'unorderable types: NoneType() > int()'.
2018-10-26 23:58:26.264 Error: (Rad) ----> Line 330 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 23:58:26.264 Error: (Rad) ----> Line 288 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-26 23:58:26.264 Error: (Rad) ----> Line 146 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function UpdateDevice
2018-10-26 23:58:55.815 (Rad) Skipping heartbeat: 1
2018-10-26 23:59:25.816 (Rad) Skipping heartbeat: 2
.....
....
2018-10-27 00:00:28.866 Error: (Rad) 'onHeartbeat' failed 'TypeError':'unorderable types: NoneType() > int()'.
2018-10-27 00:00:28.866 Error: (Rad) ----> Line 330 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-27 00:00:28.866 Error: (Rad) ----> Line 288 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function onHeartbeat
2018-10-27 00:00:28.866 Error: (Rad) ----> Line 146 in '/home/pi/domoticz/plugins/MaxCube/plugin.py', function UpdateDevice
-
- Posts: 33
- Joined: Wednesday 03 October 2018 18:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Spain
- Contact:
Re: Python plugin: ELV/EQ-3 MAX!
The last 4 lines are repeated periodically.
-
- 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!
Are the valve percentages updated correctly? And did everything work correctly in the previous version? Somehow (one of) your valves report "None" as percentage. I could send you a version with even more logging to find out what's going wrong. But this will have to wait until tomorrow, no time today. In the meantime, you could try the Lua test script from the Domoticz EQ3 Wiki, and check if all valves report their values correctly.AurelioF wrote:The last 4 lines are repeated periodically.
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: 33
- Joined: Wednesday 03 October 2018 18:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Spain
- Contact:
Re: Python plugin: ELV/EQ-3 MAX!
Until the last update, the operation of the valves was correct, the problems began with the update.mvzut wrote: ↑Saturday 27 October 2018 9:51Are the valve percentages updated correctly? And did everything work correctly in the previous version? Somehow (one of) your valves report "None" as percentage. I could send you a version with even more logging to find out what's going wrong. But this will have to wait until tomorrow, no time today. In the meantime, you could try the Lua test script from the Domoticz EQ3 Wiki, and check if all valves report their values correctly.AurelioF wrote:The last 4 lines are repeated periodically.
Today I plan to start from the beginning, I will keep you informed.
Thank you
-
- Posts: 33
- Joined: Wednesday 03 October 2018 18:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Spain
- Contact:
Re: Python plugin: ELV/EQ-3 MAX!
I started a clean installation, I'm using Domoticz V. 4.10111, Python Version: 3.5.3, the installation of the plugin worked fine, but after a few minutes it gave an error message.
2018-10-27 20: 57: 19.660 Error: hardware eQ3 (2) thread seems to have ended unexpectedly
After this, no more errors appear, I work all night correctly, but the Heat demand switch never worked, not once.
It seems that - Heat demand does not respond to the heat demands of the valves.
2018-10-27 20: 57: 19.660 Error: hardware eQ3 (2) thread seems to have ended unexpectedly
After this, no more errors appear, I work all night correctly, but the Heat demand switch never worked, not once.
It seems that - Heat demand does not respond to the heat demands of the valves.
Who is online
Users browsing this forum: No registered users and 0 guests