Page 18 of 37
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 0:02
by Skippiemanz
Drum rolls please!
Everything working here without wall thermostats!
Small thing.. i needed to change the default domoticz port in the json call!
Now i can add the rest of the valves and figure out how to use the valve scripts!
Thanks guys for all the effort and graeat work so far!
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 0:07
by mvzut
Skippiemanz wrote:Small thing.. i needed to change the default domoticz port in the json call!
Ah, yes, that's a good one, maybe we can add a variable for this in the top section of the script.
Nice to hear that it seems to work for you as well!
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 0:08
by Skippiemanz
mvzut wrote:Skippiemanz wrote:Small thing.. i needed to change the default domoticz port in the json call!
Ah, yes, that's a good one, maybe we can add a variable for this in the top section of the script.
Nice to hear that it seems to work for you as well!
Yep you've got a happy camper here!
I think the window sensor will also work perfect even though its not displayed in domoticz(yet?!) it will just adapt the setpoint of the valves in the same room
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 0:11
by mvzut
Skippiemanz wrote:mvzut wrote:Skippiemanz wrote:Small thing.. i needed to change the default domoticz port in the json call!
Ah, yes, that's a good one, maybe we can add a variable for this in the top section of the script.
Nice to hear that it seems to work for you as well!
Yep you've got a happy camper here!
I think the window sensor will also work perfect even though its not displayed in domoticz(yet?!) it will just adapt the setpoint of the valves in the same room
I changed the script a few posts back to make the Domoticz port a variable.
Yes, your window sensors will just do their job, you only cannot see them in Domoticz. We could look into that later. Don't have them myself, so difficult to test for me.
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 0:15
by Skippiemanz
mvzut wrote:blackdog65 wrote:Just tried it... nothing in log as no debug... but all sensor reporting now... YAY!

Great to hear! You can always add debugging if you want (there's one print command already in the code that you can un-comment), but I personally like to keep my log clean when everything is working well.
Just updated the code! and will update the WiKi
So and where can i ship the window sensor to for al the hard work?

Acces to my system is also an option.. But for now lets enjoy this!
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 0:23
by Skippiemanz
mvzut wrote:P.S. I changed the direct LUA update command for the Domoticz thermostats into an http JSON command. This is because updating thermostats from within LUA caused error messages stating that the script was running longer than 10 seconds, for reasons not understood. If you get errors in the log because of this JSON method, please add 127.0.0.* to your list of local networks that don't require authentication (this can be done on the settings page) .
Hmm after this change my setpoint updates dont come through to the max cube... I've added 127.0.0.* to trusted networks
p.s. I only got the 10 second error i've i was logged in with the max softwarwe application
ELV Max! Heating control system
Posted: Friday 04 November 2016 0:30
by mvzut
Skippiemanz wrote:mvzut wrote:P.S. I changed the direct LUA update command for the Domoticz thermostats into an http JSON command. This is because updating thermostats from within LUA caused error messages stating that the script was running longer than 10 seconds, for reasons not understood. If you get errors in the log because of this JSON method, please add 127.0.0.* to your list of local networks that don't require authentication (this can be done on the settings page) .
Hmm after this change my setpoint updates dont come through to the max cube... I've added 127.0.0.* to trusted networks
p.s. I only got the 10 second error i've i was logged in with the max softwarwe application
Do you get an error message in the log?
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 0:31
by Skippiemanz
mvzut wrote:Skippiemanz wrote:mvzut wrote:P.S. I changed the direct LUA update command for the Domoticz thermostats into an http JSON command. This is because updating thermostats from within LUA caused error messages stating that the script was running longer than 10 seconds, for reasons not understood. If you get errors in the log because of this JSON method, please add 127.0.0.* to your list of local networks that don't require authentication (this can be done on the settings page) .
Hmm after this change my setpoint updates dont come through to the max cube... I've added 127.0.0.* to trusted networks
p.s. I only got the 10 second error i've i was logged in with the max softwarwe application
Do you get an error message in the log?
No, No log messages. I've noticed it because the valve percentage didnt drop when i lowered the set temp.
I then logged in to the max software and saw the old set temp
ELV Max! Heating control system
Posted: Friday 04 November 2016 0:35
by mvzut
Skippiemanz wrote:mvzut wrote:Skippiemanz wrote:
Hmm after this change my setpoint updates dont come through to the max cube... I've added 127.0.0.* to trusted networks
p.s. I only got the 10 second error i've i was logged in with the max softwarwe application
Do you get an error message in the log?
No, No log messages. I've noticed it because the valve percentage didnt drop when i lowered the set temp.
I then logged in to the max software and saw the old set temp
The 127.0.0.* thing doesn't have anything to do with the updating of setpoints towards MAX! I will have a look tomorrow, it's getting late now...
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 0:37
by Skippiemanz
Thanks! Goodnight for now!
ELV Max! Heating control system
Posted: Friday 04 November 2016 0:38
by mvzut
Skippiemanz wrote:Thanks! Goodnight for now!
By the way, did you wait 5 minutes? I have now introduced an update interval variable, which is set to 5 minutes by default. This is because I experienced complete Cube resets regularly, which might have been caused by too frequent polling. Haven't had them since I changed to 5 minutes polling (fingers crossed).
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 0:42
by Skippiemanz
mvzut wrote:Skippiemanz wrote:Thanks! Goodnight for now!
By the way, did you wait 5 minutes? I have now introduced an update interval variable, which is set to 5 minutes by default.
Yes, i think its really bed time for me! i think i know whats wrong. ive just copy pasted your new version without changing the wal thermostat to false...
And Eurekaa! Works as in the brochure! Sorry for the confusion
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 9:10
by blackdog65
Skippiemanz wrote:Now i can add the rest of the valves and figure out how to use the valve scripts!
I just changed the
script_time_valves.lua in the
wiki so that all the devices are now variable at the beginning.
Let me know if that works ok
Thanks for updating the
script_time_max.lua
There seems to be quite a bit of confusion about the best way to install lua5.2 (+ the extras) does anyone have a definitive method that we can use in the
wiki?
Sean

Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 10:39
by Skippiemanz
No Thanks!
Just made the virtual switches and everything seems to work. But how do you populate the selector switch? With scenes behind it?
I've added al my valves and sensors and an error returns in the log:
Code: Select all
2016-11-04 10:30:02.088 Error: Error opening url: http://127.0.0.1:"..DomoticzPort.."/json.htm?type=command¶m=udevice&idx=462&nvalue=0&svalue=21.5
2016-11-04 10:35:01.333 Error: EventSystem: in EQ3 Cube: [string "--./script_time_max.lua..."]:138: attempt to concatenate field '?' (a nil value)
*edit* after replacing the ..DomoticzPort.. with the port number the json error is gone
Here is my output from maxtest.lua
Code: Select all
Rooms
-----
Hal Room
0CAD07
Kantoor Room
0CABDC
Zolder Room 095231
Kamer Room
0CC2F6
Tijn Room
0CABDA
Noa Room
0CC33E
Badkamer Room 095207
Devices
-------
Kamer Room-Sens 013316
Kantoor Room-Rad 0CABDC
Zolder RoomD-Rad 095231
Kamer RoomR-Rad 0CC2F6
Kamer RoomL-Rad 0CABAF
Tijn Room-Rad 0CABDA
Hal Room-Rad 0CAD07
Noa Room-Sens 0CBCA2
Zolder RoomV-Rad 0CACFA
Zolder Room-Sens 0CBD92
Tijn Room-Sens 013435
Noa Room-Rad 0CC33E
Badkamer Room-Rad 095207
Bitvise SSH ClientBitvise SSH Client
Device status
-------------
Valve Kantoor Room-Rad Setpoint=21.5 Temp=18.5 Valve pos=100 Battery=OK Mode=Manual
Valve Badkamer Room-Rad Setpoint=21.5 Temp=17.9 Valve pos=93 Battery=OK Mode=Manual
Valve Kamer RoomR-Rad Setpoint=21 Temp=0 Valve pos=100 Battery=Low Mode=Manual
Valve Kamer RoomL-Rad Setpoint=21.5 Temp=17.3 Valve pos=100 Battery=Low Mode=Manual
Valve Kamer Room-Sens Setpoint=21.5 Temp=17.3 Valve pos=100 Battery=OK Mode=Auto
Valve Hal Room-Rad Setpoint=21.5 Temp=18.6 Valve pos=100 Battery=OK Mode=Manual
Valve Noa Room-Rad Setpoint=12 Temp=0 Valve pos=0 Battery=OK Mode=Manual
Valve Noa Room-Sens Setpoint=12 Temp=0 Valve pos=0 Battery=OK Mode=Holiday
Valve Tijn Room-Rad Setpoint=21.5 Temp=14.6 Valve pos=100 Battery=OK Mode=Manual
Valve Tijn Room-Sens Setpoint=21.5 Temp=14.6 Valve pos=100 Battery=OK Mode=Holiday
Valve Zolder RoomD-Rad Setpoint=12 Temp=19.4 Valve pos=0 Battery=OK Mode=Manual
Valve Zolder Room-Sens Setpoint=12 Temp=19.4 Valve pos=0 Battery=OK Mode=Holiday
Valve Zolder RoomV-Rad Setpoint=12 Temp=19.5 Valve pos=0 Battery=OK Mode=Manual
I will delete the window sensors to see if that solves the problem.
**EDIT 2** Deleted the window sensors and now no more lua error. Also the rest of the devices ar now being updated... So no window sensors supported yet...
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 10:57
by blackdog65
Skippiemanz wrote:Just made the virtual switches and everything seems to work. But how do you populate the selector switch? With scenes behind it?
Yes, I created 4 scenes Boiler-Off, Boiler-HotWater, Boiler-Heating, and Boiler-Holiday. I made sure that the hot-water scene turned the heating off so that they can't clash and as per the wiki I have separate switches for Hot-Water and Holiday. Then each selector level sends a json command to each scene.
I know this can all be done in lua, but my attempt to script it was very buggy, so this was easier... and it works!
I see from your post that your window sensors are returning "Valve pos=0" which may be the problem. Also some devices are set in "Holiday" mode which may clash with the "Valves" script as the holiday switch is a global "Set everything low while the house is empty" kind of thing. I'm looking at how to control unoccupied rooms at the moment... not sure which way to go.
Sean
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 11:03
by Skippiemanz
blackdog65 wrote:Yes, I created 4 scenes Boiler-Off, Boiler-HotWater, Boiler-Heating, and Boiler-Holiday. I made sure that the hot-water scene turned the heating off so that they can't clash and as per the wiki I have separate switches for Hot-Water and Holiday. Then each selector level sends a json command to each scene.
I know this can all be done in lua, but my attempt to script it was very buggy, so this was easier... and it works!
I see from your post that your window sensors are returning "Valve pos=0" which may be the problem. Also some devices are set in "Holiday" mode which may clash with the "Valves" script as the holiday switch is a global "Set everything low while the house is empty" kind of thing. I'm looking at how to control unoccupied rooms at the moment... not sure which way to go.
Sean
Whats your idea off the hot water switch? My boiler automaticly heats up when hot water is desired. The sensors are indeed seen as valves so youre probably right this causes the error. Maybe with the raw data the can be seen different. With the max buddy script there was made a difference so somwhere in the raw data it should be different. Perhaps i can work it out with mzvut in the future. Or i have to replace the window sensors with z-wave ones. Because the idea behind is is very nice. When opening window to ventilate turn of heat(Setpoint 12)
*EDIT* Just made the selector switch scenes in blockly and works ok1
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 11:12
by Westcott
Hi Skippiemanz,
Which device in your output is the window sensor?
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 11:14
by Skippiemanz
Westcott wrote:Hi Skippiemanz,
Which device in your output is the window sensor?
Thanks for jumping in! The devices ending with -Sens are the room sensors
Code: Select all
Devices
-------
Kamer Room-Sens 013316
Kantoor Room-Rad 0CABDC
Zolder RoomD-Rad 095231
Kamer RoomR-Rad 0CC2F6
Kamer RoomL-Rad 0CABAF
Tijn Room-Rad 0CABDA
Hal Room-Rad 0CAD07
Noa Room-Sens 0CBCA2
Zolder RoomV-Rad 0CACFA
Zolder Room-Sens 0CBD92
Tijn Room-Sens 013435
Noa Room-Rad 0CC33E
Badkamer Room-Rad 095207
Bitvise SSH ClientBitvise SSH Client
Device status
-------------
Valve Kantoor Room-Rad Setpoint=21.5 Temp=18.5 Valve pos=100 Battery=OK Mode=Manual
Valve Badkamer Room-Rad Setpoint=21.5 Temp=17.9 Valve pos=93 Battery=OK Mode=Manual
Valve Kamer RoomR-Rad Setpoint=21 Temp=0 Valve pos=100 Battery=Low Mode=Manual
Valve Kamer RoomL-Rad Setpoint=21.5 Temp=17.3 Valve pos=100 Battery=Low Mode=Manual
Valve Kamer Room-Sens Setpoint=21.5 Temp=17.3 Valve pos=100 Battery=OK Mode=Auto
Valve Hal Room-Rad Setpoint=21.5 Temp=18.6 Valve pos=100 Battery=OK Mode=Manual
Valve Noa Room-Rad Setpoint=12 Temp=0 Valve pos=0 Battery=OK Mode=Manual
Valve Noa Room-Sens Setpoint=12 Temp=0 Valve pos=0 Battery=OK Mode=Holiday
Valve Tijn Room-Rad Setpoint=21.5 Temp=14.6 Valve pos=100 Battery=OK Mode=Manual
Valve Tijn Room-Sens Setpoint=21.5 Temp=14.6 Valve pos=100 Battery=OK Mode=Holiday
Valve Zolder RoomD-Rad Setpoint=12 Temp=19.4 Valve pos=0 Battery=OK Mode=Manual
Valve Zolder Room-Sens Setpoint=12 Temp=19.4 Valve pos=0 Battery=OK Mode=Holiday
Valve Zolder RoomV-Rad Setpoint=12 Temp=19.5 Valve pos=0 Battery=OK Mode=Manual
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 11:21
by blackdog65
Skippiemanz wrote:Whats your idea off the hot water switch? My boiler automaticly heats up when hot water is desired
It's because my boiler has a single flow & return for hot water. The heated water is then diverted either to the radiators or a heating coil in the hot water tank... but not both. So I have to have one or the other turned on at one time. I suppose if someone had a similar system and wanted hot water "on demand" 24/7 they could use a simple script to switch the selector to "Hot-Water" if the tank temperature dips below a set level.
As to your window sensors, although it would be nice to see them in Domoticz (long term), if they were taken out of the script (i.e. the script doesn't look for or read them) they would still function and work nice (short term).
Sean
Re: ELV Max! Heating control system
Posted: Friday 04 November 2016 11:24
by Skippiemanz
blackdog65 wrote:Skippiemanz wrote:Whats your idea off the hot water switch? My boiler automaticly heats up when hot water is desired
It's because my boiler has a single flow & return for hot water. The heated water is then diverted either to the radiators or a heating coil in the hot water tank... but not both. So I have to have one or the other turned on at one time. I suppose if someone had a similar system and wanted hot water "on demand" 24/7 they could use a simple script to switch the selector to "Hot-Water" if the tank temperature dips below a set level.
Aaah i see! My next step is to control my boiler with the OTGW so i then also switch to Hot Water only during the summer months!
blackdog65 wrote:
As to your window sensors, although it would be nice to see them in Domoticz (long term), if they were taken out of the script (i.e. the script doesn't look for or read them) they would still function and work nice (short term).
Sean
Thats also a nice option indeed!