ELV Max! Heating control system

For heating/cooling related questions in Domoticz
Teatech
Posts: 22
Joined: Sunday 22 November 2015 12:10
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Finland
Contact:

Re: ELV Max! Heating control system

Postby Teatech » Thursday 10 November 2016 9:43

I'm using port 8080.

Skippiemanz
Posts: 245
Joined: Sunday 14 July 2013 20:21
Target OS: Raspberry Pi
Domoticz version: 3.5859
Location: Alkmaar, The Netherlands
Contact:

Re: ELV Max! Heating control system

Postby Skippiemanz » Thursday 10 November 2016 10:19

I get the same error..

Code: Select all

2016-11-10 09:25:01.051 Error: EventSystem: in EQ3 Auto: [string "package.loadlib("core.so", "*")..."]:158: attempt to concatenate global 'MAX_ID' (a nil value)


*EDIT*

After looking in to the code is saw that it searches for a hardware ID named MAX! So i created on manually.

After that i got the following error:

Code: Select all

2016-11-10 09:30:01.108 Schedule item started! Name: Badkamer Room-Stat, Type: On Time, ThermostatID: 447, Time: 2016-11-10 09:30:01
2016-11-10 09:30:01.108 Error: Error setting thermostat setpoint, ThermostatID: 447, Time: 2016-11-10 09:30:01
2016-11-10 09:30:10.743 Error: EventSystem: Warning!, lua script EQ3 Auto has been running for more than 10 seconds
2016-11-10 09:30:02.383 (Smart Meter) P1 Smart Meter (Stroom meter)
2016-11-10 09:30:11.044 Error: EventSystem: in EQ3 Auto: [string "package.loadlib("core.so", "*")..."]:40: bad argument #1 to 'sub' (string expected, got nil)
2016-11-10 09:30:11.044 EventSystem: Fetching url...
2016-11-10 09:30:11.044 EventSystem: Script event triggered: EQ3 Auto


And 1 device in my devices list called:

Code: Select all

   442   MAX!   00095207   1   Unknown   General   Percentage   0.00%

Teatech
Posts: 22
Joined: Sunday 22 November 2015 12:10
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Finland
Contact:

Re: ELV Max! Heating control system

Postby Teatech » Thursday 10 November 2016 10:54

I did the same and one valve out of total 3 devices was found without any error messages.

2016-11-10 10:50:02.257 EventSystem: Fetching url...
2016-11-10 10:50:02.257 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_max.lua
2016-11-10 10:50:03.264 (MAX!) General/Percentage (Unknown)

After 5 minutes one error and still only one device.

2016-11-10 10:55:03.266 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_time_max.lua: /home/pi/domoticz/scripts/lua/script_time_max.lua:40: bad argument #1 to 'sub' (string expected, got nil)
2016-11-10 10:55:03.266 EventSystem: Fetching url...
2016-11-10 10:55:03.267 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_max.lua
2016-11-10 10:55:04.274 (MAX!) General/Percentage (Unknown)

And after that same error every event. And no more devices.

mvzut
Posts: 253
Joined: Thursday 12 November 2015 11:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Marum, The Netherlands
Contact:

Re: ELV Max! Heating control system

Postby mvzut » Thursday 10 November 2016 21:04

Teatech wrote:I did the same and one valve out of total 3 devices was found without any error messages.

2016-11-10 10:50:02.257 EventSystem: Fetching url...
2016-11-10 10:50:02.257 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_max.lua
2016-11-10 10:50:03.264 (MAX!) General/Percentage (Unknown)

After 5 minutes one error and still only one device.

2016-11-10 10:55:03.266 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_time_max.lua: /home/pi/domoticz/scripts/lua/script_time_max.lua:40: bad argument #1 to 'sub' (string expected, got nil)
2016-11-10 10:55:03.266 EventSystem: Fetching url...
2016-11-10 10:55:03.267 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_max.lua
2016-11-10 10:55:04.274 (MAX!) General/Percentage (Unknown)

And after that same error every event. And no more devices.

Strange, it's working kind of ok here. I say "kind of" since I sometimes get error messages as well,e.g. that the script has been running for more than 10 seconds or "Error opening url" messages. But it creates & updates both my two wall thermostats and my two valves perfectly.

Somehow the status of the new MAX! hardware cannot be read few milliseconds after it was created from within the script. This causes the error message saying MAX_ID has a nil value. But the second time the script is called, it should be able to detect the value for MAX_ID and the devices will be created, at least with me (tried it again half an hour ago).

The error message about line 40 is caused by the fact that the thermostat setpoint devices are not yet created. I just realised that you first have to change the setpoint of your thermostats/valves before they are created. Have you tried that? I will look for a way to overcome this limitation.

By the way, did the original script (where you had to create your own devices) work for you?
Raspberry Pi 2B - RFXtrx433 - Aeon Z-Stick gen5 - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - Sonos Connect & PLAY:1 - Kodi - Wall mounted tablet + Imperihome - MANY switches/sensors

Teatech
Posts: 22
Joined: Sunday 22 November 2015 12:10
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Finland
Contact:

Re: ELV Max! Heating control system

Postby Teatech » Thursday 10 November 2016 21:31

I just realised that you first have to change the setpoint of your thermostats/valves before they are created. Have you tried that?

No I haven't but i'll try.

By the way, did the original script (where you had to create your own devices) work for you?

I had problems with wall temperature value. It was updated in Domoticz only once.

mvzut
Posts: 253
Joined: Thursday 12 November 2015 11:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Marum, The Netherlands
Contact:

Re: ELV Max! Heating control system

Postby mvzut » Thursday 10 November 2016 21:40

Teatech wrote:No I haven't but i'll try.

I made a few changes, which could solve (some of) your problems, also the problem that thermostats were not created. It's in the post where I first shared the new script: viewtopic.php?f=34&t=841&p=103332#p103332
Can you try this?
Raspberry Pi 2B - RFXtrx433 - Aeon Z-Stick gen5 - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - Sonos Connect & PLAY:1 - Kodi - Wall mounted tablet + Imperihome - MANY switches/sensors

Teatech
Posts: 22
Joined: Sunday 22 November 2015 12:10
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Finland
Contact:

Re: ELV Max! Heating control system

Postby Teatech » Thursday 10 November 2016 21:51

I changed the setpoint but it didn't change situation.

After that I removed MAX! and re-created it again, changed setpoints but only that same valve position appeared to list.

mvzut
Posts: 253
Joined: Thursday 12 November 2015 11:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Marum, The Netherlands
Contact:

ELV Max! Heating control system

Postby mvzut » Thursday 10 November 2016 21:54

Teatech wrote:I changed the setpoint but it didn't change situation.

After that I removed MAX! and re-created it again, changed setpoints but only that same valve position appeared to list.

Please try the new script, after removing the MAX! hardware again. It should now also create the new hardware better. I hope... It will take two cycles, if you want to speed it up you can temporarily set the interval to 1 minute.
Raspberry Pi 2B - RFXtrx433 - Aeon Z-Stick gen5 - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - Sonos Connect & PLAY:1 - Kodi - Wall mounted tablet + Imperihome - MANY switches/sensors

Teatech
Posts: 22
Joined: Sunday 22 November 2015 12:10
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Finland
Contact:

Re: ELV Max! Heating control system

Postby Teatech » Thursday 10 November 2016 22:10

mvzut wrote:
Teatech wrote:No I haven't but i'll try.

I made a few changes, which could solve (some of) your problems, also the problem that thermostats were not created. It's in the post where I first shared the new script: https://www.domoticz.com/forum/viewtopi ... 32#p103332
Can you try this?


I tryed it so that I left only that MAX! device.
Now it found all devices.. GREAT JOB!!!

2016-11-10 22:00:06.170 LUA: Domoticz setpoint Olohuone-Rad updated
2016-11-10 22:00:06.738 LUA: Domoticz setpoint Makuuhuone-Rad updated
2016-11-10 22:00:07.321 LUA: Domoticz setpoint Olohuone-Stat updated
2016-11-10 22:00:07.322 EventSystem: Fetching url...
2016-11-10 22:00:07.322 EventSystem: Fetching url...
2016-11-10 22:00:07.322 EventSystem: Fetching url...
2016-11-10 22:00:07.323 EventSystem: Fetching url...
2016-11-10 22:00:07.323 EventSystem: Fetching url...
2016-11-10 22:00:07.323 EventSystem: Fetching url...
2016-11-10 22:00:07.324 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_max.lua
2016-11-10 22:00:08.481 (MAX!) General/Percentage (Unknown)
2016-11-10 22:00:08.507 Sending SetPoint to device....
2016-11-10 22:00:08.509 (MAX!) Thermostat (Unknown)
2016-11-10 22:00:08.526 (MAX!) General/Percentage (Unknown)
2016-11-10 22:00:08.552 Sending SetPoint to device....
2016-11-10 22:00:08.553 (MAX!) Thermostat (Unknown)
2016-11-10 22:00:09.491 Sending SetPoint to device....
2016-11-10 22:00:09.493 (MAX!) Thermostat (Unknown)
2016-11-10 22:01:15.936 (RFlink) Temp + Humidity (Ulkolämpötila / Kosteus)
2016-11-10 22:05:04.228 EventSystem: Fetching url...
2016-11-10 22:05:04.228 EventSystem: Fetching url...
2016-11-10 22:05:04.228 EventSystem: Fetching url...
2016-11-10 22:05:04.228 EventSystem: Script event triggered: /home/pi/domoticz/scripts/lua/script_time_max.lua
2016-11-10 22:05:05.214 (MAX!) General/Percentage (Unknown)
2016-11-10 22:05:05.232 (MAX!) General/Percentage (Unknown)

Teatech
Posts: 22
Joined: Sunday 22 November 2015 12:10
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Finland
Contact:

Re: ELV Max! Heating control system

Postby Teatech » Thursday 10 November 2016 22:21

I was thinking why there was one additional setpoint but now both valve and wall thermostat setpoints are shown.
Only thing I can wish is that if there's no wall thermostat at the room is it possible to get temperature from thermostat valve (onlý for nice-to-have ;) )

mvzut
Posts: 253
Joined: Thursday 12 November 2015 11:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Marum, The Netherlands
Contact:

ELV Max! Heating control system

Postby mvzut » Thursday 10 November 2016 22:49

Teatech wrote:I was thinking why there was one additional setpoint but now both valve and wall thermostat setpoints are shown.
Only thing I can wish is that if there's no wall thermostat at the room is it possible to get temperature from thermostat valve (onlý for nice-to-have ;) )

Nice to hear it works for you now!
What you want is pretty easy to do. I left it out originally since I expected most people would not be interested in a temperature sensor that only updates when the valve is active (i.e. when the motor is running). But if you want it: I changed the script again (see earlier post), you only have to un-comment the line after "if not useWMT". I haven't tested it myself, but it should work.

By the way, do you also get error messages every full and half hour? If so, please make a small change in the line that reads

Code: Select all

local m = os.date('%M')

And change it into

Code: Select all

m = tonumber(os.date('%M'))

For some reason, updating devices via external JSON calls causes problems at exactly the full and half hour. I tried to prevent the script from running at those intervals, but the check didn't work yet since the variable "m" (containing the minutes after the hour) turned out to be a string rather than a number.
Raspberry Pi 2B - RFXtrx433 - Aeon Z-Stick gen5 - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - Sonos Connect & PLAY:1 - Kodi - Wall mounted tablet + Imperihome - MANY switches/sensors

Teatech
Posts: 22
Joined: Sunday 22 November 2015 12:10
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Finland
Contact:

Re: ELV Max! Heating control system

Postby Teatech » Thursday 10 November 2016 23:16

Great, I'll test it.
I haven't received that error anymore.
About that room temperatures without wall thermostat; I was thinking that get some times temperature is better than nothing to have some feedback
that everyting is ok. It's important especially in winter times from rooms that are rarely used.
Thanks once more!

mvzut
Posts: 253
Joined: Thursday 12 November 2015 11:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Marum, The Netherlands
Contact:

ELV Max! Heating control system

Postby mvzut » Thursday 10 November 2016 23:23

Teatech wrote:Great, I'll test it.
About that room temperatures without wall thermostat; I was thinking that get some times temperature is better than nothing to have some feedback
that everyting is ok. It's important especially in winter times from rooms that are rarely used.
Thanks once more!

Hold your horses! It just occurred to me that it will report 0 degrees whenever the valve doesn't communicate its temperature. That is probably not what you want. So I changed the code again. Plus I uncommented it already, since your explanation convinced me that more people might be interested. You can always choose not to add the sensor to the list of used devices.
Raspberry Pi 2B - RFXtrx433 - Aeon Z-Stick gen5 - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - Sonos Connect & PLAY:1 - Kodi - Wall mounted tablet + Imperihome - MANY switches/sensors

Teatech
Posts: 22
Joined: Sunday 22 November 2015 12:10
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Finland
Contact:

Re: ELV Max! Heating control system

Postby Teatech » Thursday 10 November 2016 23:27

Are setpoint values updated in Domoticz only when they change? Last update was almost 1.5 hours ago and because of that those values are on red now.

mvzut
Posts: 253
Joined: Thursday 12 November 2015 11:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Marum, The Netherlands
Contact:

ELV Max! Heating control system

Postby mvzut » Thursday 10 November 2016 23:36

Teatech wrote:Are setpoint values updated in Domoticz only when they change? Last update was almost 1.5 hours ago and because of that those values are on red now.

Ah, yes, very good point. To avoid unnecessary JSON API calls, I have chosen to only update them when they have changed. I changed the timeout warning to 1500 minutes (can be found on the Domoticz settings page under "Other") to avoid red warnings. Since I have timers on the thermostats (in Domoticz) they change their value at least twice a day, so this works well for me.

I could change the script such that it always updates the thermostat values, even if they haven't changed. Though it could be that at some point, the script will take too long to run (every JSON API call seems to take about 1 second). When a script runs for longer than 10 seconds, Domoticz will start complaining about it.
Raspberry Pi 2B - RFXtrx433 - Aeon Z-Stick gen5 - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - Sonos Connect & PLAY:1 - Kodi - Wall mounted tablet + Imperihome - MANY switches/sensors

Teatech
Posts: 22
Joined: Sunday 22 November 2015 12:10
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Finland
Contact:

Re: ELV Max! Heating control system

Postby Teatech » Thursday 10 November 2016 23:47

Hold your horses! It just occurred to me that it will report 0 degrees whenever the valve doesn't communicate its temperature. That is probably not what you want. So I changed the code again. Plus I uncommented it already, since your explanation convinced me that more people might be interested. You can always choose not to add the sensor to the list of used devices.

That's correct but only valves that has WMT, temperature comes from thermostat. I still receive temperature from room valve/thermostat that don't have WMT.

Teatech
Posts: 22
Joined: Sunday 22 November 2015 12:10
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Finland
Contact:

Re: ELV Max! Heating control system

Postby Teatech » Thursday 10 November 2016 23:55

mvzut wrote:
Teatech wrote:Are setpoint values updated in Domoticz only when they change? Last update was almost 1.5 hours ago and because of that those values are on red now.

Ah, yes, very good point. To avoid unnecessary JSON API calls, I have chosen to only update them when they have changed. I changed the timeout warning to 1500 minutes (can be found on the Domoticz settings page under "Other") to avoid red warnings. Since I have timers on the thermostats (in Domoticz) they change their value at least twice a day, so this works well for me.

I could change the script such that it always updates the thermostat values, even if they haven't changed. Though it could be that at some point, the script will take too long to run (every JSON API call seems to take about 1 second). When a script runs for longer than 10 seconds, Domoticz will start complaining about it.

Those are good ideas! I haven't used different setpoints because I didn't find it neccessery. In our house temperature changes so slowly. Another thing is when you're longer time away from home. But in this case little change solves the problem if I also change timeout warning abit longer than default value.

mvzut
Posts: 253
Joined: Thursday 12 November 2015 11:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Marum, The Netherlands
Contact:

ELV Max! Heating control system

Postby mvzut » Friday 11 November 2016 0:03

The new script with automatic device creation seems to work for at least two people now (including myself). Any more volunteers? Tip: if you already had things working and you don't want to risk losing your configuration, you can keep your existing devices and temporarily disable your original MAX! script by removing the .lua extention. That way you can quickly revert if the new script doesn't work for you.

If it works for more people, we could consider changing the Wiki... Unless you don't see it as an improvement of course.
Last edited by mvzut on Friday 11 November 2016 0:03, edited 1 time in total.
Raspberry Pi 2B - RFXtrx433 - Aeon Z-Stick gen5 - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - Sonos Connect & PLAY:1 - Kodi - Wall mounted tablet + Imperihome - MANY switches/sensors

Teatech
Posts: 22
Joined: Sunday 22 November 2015 12:10
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Finland
Contact:

Re: ELV Max! Heating control system

Postby Teatech » Friday 11 November 2016 0:11

I'll report if something strange happens. What did you do to script about that 0 decree value? I' wonder should I update it. Everyting seems to be ok for now.

mvzut
Posts: 253
Joined: Thursday 12 November 2015 11:55
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Marum, The Netherlands
Contact:

ELV Max! Heating control system

Postby mvzut » Friday 11 November 2016 0:13

Teatech wrote:I'll report if something strange happens. What did you do to script about that 0 decree value? I' wonder should I update it. Everyting seems to be ok for now.

I simply told it not to update if the value is zero, somewhere around line 161. Shouldn't do any harm. If it breaks things, I promise I'll take it out again for you.
Raspberry Pi 2B - RFXtrx433 - Aeon Z-Stick gen5 - Opentherm Gateway - P1 smart meter - Netatmo - Philips Hue - ELV Max! - ESP8266 DIY water meter - Sonos Connect & PLAY:1 - Kodi - Wall mounted tablet + Imperihome - MANY switches/sensors


Return to “Heating/cooling”

Who is online

Users browsing this forum: No registered users and 1 guest