Page 26 of 37

Re: ELV Max! Heating control system

Posted: Tuesday 06 December 2016 1:13
by lpipoz
Almost same for me.
But with FHEM to send readings to Domoticz.

For your issue, you may find yourself happy with:

Code: Select all

sudo apt-get install libssl-dev
sudo mkdir /usr/local/ssl
sudo cp /usr/lib/arm-linux-gnueabihf/libssl.* /usr/local/ssl
sudo luarockt install luasec OPENSSL_LIBDIR=/usr/local/ssl --server=http://luarocks.org
sudo luarockt install luasocket
sudo luarocks install basexx

And I had to copy 5.1 to 5.2 after installing:

Code: Select all

/usr/local/share/lua/5.1/*.lua
Hope this help

Best
Loïc
1970sITman wrote:Gents,

Long time user (3 years or so) of MAX! hardware using Max!buddy as 'read only' interface to Domoticz.

Not looked at the forum for a good few months so VERY surprised (and pleased) to find how far you have developed the two way communication to Domoticz.

So.....dived in headfirst this evening with a spare cube, thermostat and valve

.........only to fall at the first hurdle installing the LUA modules on a spare Pi !

At the 4th install line in the Wiki sudo luarocks install luasec, i get

Warning: Failed searching manifest: Failed loading manifest: Failed fetching manifest for http://luarocks.org/repositories/rocks - Error fetching file: Failed downloading http://luarocks.org/repositories/rocks/manifest - URL redirected to unsupported protocol - install luasec to get HTTPS support.
Error: No results matching query were found.


Tried the options further down the Wiki with the same result.

Suggestions please?

Thanks

Re: ELV Max! Heating control system

Posted: Tuesday 06 December 2016 1:15
by lpipoz

Code: Select all

sudo cp /usr/local/share/lua/5.1/*.lua /usr/local/share/lua/5.2
ThaButcha wrote:I followed the instructions on the wiki and have some problems with Lua5.2. I know my way around in Linux, but am not really familiar with Lua or fixing library problems.

If I run the test script to scan for the radiators. It finds the radiators but then crashes at the device status:
Device status
-------------
lua: maxtest.lua:115: attempt to concatenate global 'setpoint' (a nil value)
stack traceback:
maxtest.lua:115: in function 'maxCmd_L'
maxtest.lua:148: in main chunk
[C]: in ?
The other script gives the following in the domoticz logs:
2016-12-03 22:13:00.404 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_time_max.lua: /usr/local/share/lua/5.2/socket.lua:12: module 'socket.core' not found:
no field package.preload['socket.core']
no file '/usr/local/share/lua/5.2/socket/core.lua'
no file '/usr/local/share/lua/5.2/socket/core/init.lua'
no file '/usr/local/lib/lua/5.2/socket/core.lua'
no file '/usr/local/lib/lua/5.2/socket/core/init.lua'
no file './socket/core.lua'
no file '/usr/local/lib/lua/5.2/socket/core.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './socket/core.so'
no file '/usr/local/lib/lua/5.2/socket.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './socket.so'
I did install the luarocks packages, with SSL and created /usr/local/share/lua/5.2 and moved the .so files, but still no dice.

any suggestions?

Re: ELV Max! Heating control system

Posted: Tuesday 06 December 2016 23:25
by daveabbott007
If your still having trouble (like i did on a clean install) look back at this post http://www.domoticz.com/forum/viewtopic ... gz#p101650 it sorted me out.

Note: there is a typo - here is a correction:

download the lua 5.2 files from http://www.domoticz.com/forum/viewtopic ... 638#p22638
and placed them in /home/pi/

Next steps where:

Code: Select all

mv usrlocalsharelua5p2.tar.gz /usr/local/share/lua/5.2/
mv usrlocalliblua5p2.tar.gz /usr/local/lib/lua/5.2/

cd /usr/local/share/lua/5.2/
sudo tar -xvf usrlocalsharelua5p2.tar.gz
sudo rm  usrlocalsharelua5p2.tar.gz

cd /usr/local/lib/lua/5.2/
sudo tar -xvf usrlocalliblua5p2.tar.gz
rm usrlocalliblua5p2.tar.gz

Re: ELV Max! Heating control system

Posted: Wednesday 07 December 2016 10:28
by Skippiemanz
Westcott wrote:Hi Jmbjmbjmb,

I was saying how to do it with a Lua script control, I've no idea how to do it with the Max! app.
The Lua scripts were developed so that the Max! app was not needed.
Could you explain how you dit it? i also could only find the offset in the max app...

Re: ELV Max! Heating control system

Posted: Monday 12 December 2016 10:25
by jmbjmbjmb
I would like to be able to change the target temperature (and also switch from/to manual/auto). Is there some lua code/library that already takes care of that so it could be easily integrated in domoticz ?

Re: ELV Max! Heating control system

Posted: Monday 12 December 2016 11:08
by Westcott
Hi Jmbjmbjmb,

Yes, this function in the Lua code sends setpoint and mode to and valve.

MaxCmdSend(id, room, mode, setpoint)

Re: ELV Max! Heating control system

Posted: Monday 19 December 2016 0:58
by nono212
Hi guys

Thanks for your great job

I m almost there I gigure ut how to install lua ,and the scripts
But the data does not come accurate and I have errors in my logs
The setpoint is 21 ° everywhere but I receive 20.5
+ some script errors
::
2016-12-18 23:54:00.056 LUA:
2016-12-18 23:54:00.056 LUA: *** Heating Script Output ***
2016-12-18 23:54:00.056 LUA:
2016-12-18 23:54:00.056 LUA: Cuisine valve is open 0.0 percent Setpoint temperature is 20.5C
2016-12-18 23:54:00.056 LUA: Cuisine last seen 2016-12-18 23:46:14 Elapsed time 466
2016-12-18 23:54:00.056 LUA: Adam valve is open 0.0 percent Setpoint temperature is 20.5C
2016-12-18 23:54:00.056 LUA: Adam last seen 2016-12-18 23:45:32 Elapsed time 508
2016-12-18 23:54:00.056 LUA: Bureau valve is open 0.0 percent Setpoint temperature is 20.5C
2016-12-18 23:54:00.056 LUA: Bureau last seen 2016-12-18 23:45:42 Elapsed time 498
2016-12-18 23:54:00.056 Error: EventSystem: in /home/osboxes/domoticz/scripts/lua/script_time_Heating_Valve.lua: ...boxes/domoticz/scripts/lua/script_time_Heating_Valve.lua:80: attempt to concatenate global 'sSetTempValue' (a nil value)
2016-12-18 23:54:00.057 Error: EventSystem: in /home/osboxes/domoticz/scripts/lua/script_time_max.lua: error loading module 'socket.core' from file '/usr/local/lib/lua/5.2/socket/core.so':
/usr/local/lib/lua/5.2/socket/core.so: wrong ELF class: ELFCLASS32

Re: ELV Max! Heating control system

Posted: Wednesday 21 December 2016 3:52
by mongoose
Just found this: https://www.homegear.eu/index.php/Main_Page
Replaces Max! cube completely

Re: ELV Max! Heating control system

Posted: Tuesday 03 January 2017 12:31
by Skippiemanz
mongoose wrote:Just found this: https://www.homegear.eu/index.php/Main_Page
Replaces Max! cube completely
If someone could make that work that would be great!

Right now im suffering of loss of connection with the cube around every 5-10 hours. Pulling the power plug and reconnecting it gets things going again. But its not ideal! Anyone else has the same problem?

I have 8 TRV's and 3 windows sensors

Re: ELV Max! Heating control system

Posted: Wednesday 04 January 2017 10:06
by l0gic
Skippiemanz wrote:
mongoose wrote:Just found this: https://www.homegear.eu/index.php/Main_Page
Replaces Max! cube completely
If someone could make that work that would be great!

Right now im suffering of loss of connection with the cube around every 5-10 hours. Pulling the power plug and reconnecting it gets things going again. But its not ideal! Anyone else has the same problem?

I have 8 TRV's and 3 windows sensors
Hi,
I went through a period of time where mine did a similar thing, I'm pleased to say it is behaving now...

What I did was to plug the cube in via a spare socket controller I had.
I created a lua script to check the socket every minute and if it is off, turn it on.
I then monitored the last update time from the cube devices and if they were older than an hour then turn off the socket controller.
It would then be turned on again within a minute.
A bit of a bodge but it did the job.

ATB

Kevin

Re: ELV Max! Heating control system

Posted: Wednesday 04 January 2017 11:05
by dervogt
nono212 wrote: .....
I m almost there I gigure ut how to install lua ,and the scripts
But the data does not come accurate and I have errors in my logs
The setpoint is 21 ° everywhere but I receive 20.5
+ some script errors
.......
I fixed this issue by naming my temperature sensors (not the ones from the thermostats, but the "normal" thermometers of the room) by modifying the script in the appropriate section:

Code: Select all

-- Get Data from Thermostats
      for i, v in pairs(otherdevices) do -- Get all devices in the database
         v = i:sub(-5,-1) -- Grab the last five characters of the device name
 
            if (v == '-Stat') then -- are the last five characters "-Stat "? If so we have an EQ-3 Thermostat
 
                RoomName = i:sub(1,-6) -- Get the rest of the name, which will be the room name
                  sTemp = otherdevices_svalues[b][RoomName..'-Temp'][/b] -- get the temperature   
                sLastUpdateTime = otherdevices_lastupdate[i]
                sElapsedTime = TimeElapsed(otherdevices_lastupdate[i])               
                message = RoomName.." temperature is " .. sTemp .. " Centigrade "  -- for debug
                message2 = RoomName .. " last seen " .. sLastUpdateTime  ..  " Elapsed time " .. sElapsedTime
                if printData == true then
                  print(message)
                  print(message2)
                end
I then suffixed my room thermosensors with -Temp to get the reading into the script (e.g. "LivingRoom-Temp"), it is working pretty well for me now.

Re: ELV Max! Heating control system

Posted: Wednesday 04 January 2017 14:50
by cmbc
ThaButcha wrote:I followed the instructions on the wiki and have some problems with Lua5.2. I know my way around in Linux, but am not really familiar with Lua or fixing library problems.

If I run the test script to scan for the radiators. It finds the radiators but then crashes at the device status:
Device status
-------------
lua: maxtest.lua:115: attempt to concatenate global 'setpoint' (a nil value)
stack traceback:
maxtest.lua:115: in function 'maxCmd_L'
maxtest.lua:148: in main chunk
[C]: in ?
The other script gives the following in the domoticz logs:
2016-12-03 22:13:00.404 Error: EventSystem: in /home/pi/domoticz/scripts/lua/script_time_max.lua: /usr/local/share/lua/5.2/socket.lua:12: module 'socket.core' not found:
no field package.preload['socket.core']
no file '/usr/local/share/lua/5.2/socket/core.lua'
no file '/usr/local/share/lua/5.2/socket/core/init.lua'
no file '/usr/local/lib/lua/5.2/socket/core.lua'
no file '/usr/local/lib/lua/5.2/socket/core/init.lua'
no file './socket/core.lua'
no file '/usr/local/lib/lua/5.2/socket/core.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './socket/core.so'
no file '/usr/local/lib/lua/5.2/socket.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './socket.so'
I did install the luarocks packages, with SSL and created /usr/local/share/lua/5.2 and moved the .so files, but still no dice.

any suggestions?
Hello, this is because the explanation are written for Raspberry Pi (arm) and not linux (x68/x64)
Here is the step to achieve this on a ubuntu linux:

Code: Select all

apt-get install liblua5.2-dev
cd ..
cd sources/
wget http://luarocks.github.io/luarocks/releases/luarocks-2.4.2.tar.gz
tar xzvf luarocks-2.4.2.tar.gz
cd luarocks-2.4.2
./configure --lua-version=5.1
make build && make install
apt-get install liblua5.2-dev
./configure --lua-version=5.2
make build && make install
export PATH=$PATH:/usr/local/bin
/usr/local/bin/luarocks-5.1 install luasocket
/usr/local/bin/luarocks-5.1 install luasec
/usr/local/bin/luarocks-5.1 install basexx
/usr/local/bin/luarocks-5.1 list
/usr/local/bin/luarocks-5.2 install luasocket
/usr/local/bin/luarocks-5.2 install luasec
/usr/local/bin/luarocks-5.2 install basexx
/usr/local/bin/luarocks-5.2 list
It should be working without coping file from 5.1 to 5.2

Re: ELV Max! Heating control system

Posted: Wednesday 04 January 2017 16:03
by cmbc
Hello,

i try and i try for several day to receive temperature captured by my Max Valve in Domotics.

The first lua script to test connection to Cube is working fine and it show that temperature are well displayed:

Code: Select all

Rooms
-----
SDB Rez 137937
Bureau  137C2C
Cuisine 1378DE
Entrée  1375D6
Chambre Lisalie 13761A
Chambre Parents 1375C2
Rez     1326B6
Chambres Rez    10F330

Devices
-------
Bureau Couloir-Rad              137C2C
Bureau Rue-Rad          1378D3
Chambres Rez Lens-Rad   10F335
Rez SalleManger-Rad     13253D
Rez Salon-Rad   1326B6
Chambres Rez Loan-Rad   10F330
SDB Rez-Rad     137937
Cuisine-Rad     1378DE
Entrée-Rad      1375D6
Chambres Rez Couloir-Rad        137666
Chambre Parents-Rad     1375C2
Chambres Rez Leena-Rad  132719
Chambre Lisalie-Rad     13761A

Device status
-------------
Valve           Entrée-Rad      Setpoint=21     Temp=21.8       Valve pos=79    Battery=OK      Mode=Manual
Valve           SDB Rez-Rad     Setpoint=20     Temp=21.7       Valve pos=24    Battery=OK      Mode=Manual
Valve           Chambres Rez Lens-Rad   Setpoint=20     Temp=19.8       Valve pos=89    Battery=OK      Mode=Manual
Valve           Bureau Rue-Rad          Setpoint=22     Temp=24.1       Valve pos=58    Battery=OK      Mode=Manual
Valve           Rez SalleManger-Rad     Setpoint=30     Temp=0  Valve pos=100   Battery=OK      Mode=Manual
Valve           Chambres Rez Couloir-Rad        Setpoint=20     Temp=22.6       Valve pos=0     Battery=OK      Mode=Manual
Valve           Chambre Parents-Rad     Setpoint=20     Temp=21.7       Valve pos=44    Battery=OK      Mode=Manual
Valve           Chambres Rez Loan-Rad   Setpoint=20     Temp=21.4       Valve pos=52    Battery=OK      Mode=Manual
Valve           Chambre Lisalie-Rad     Setpoint=20     Temp=22 Valve pos=22    Battery=OK      Mode=Manual
Valve           Bureau Couloir-Rad              Setpoint=22     Temp=24.3       Valve pos=47    Battery=OK      Mode=Manual
Valve           Rez Salon-Rad   Setpoint=30     Temp=0  Valve pos=100   Battery=OK      Mode=Manual
Valve           Chambres Rez Leena-Rad  Setpoint=20     Temp=20.6       Valve pos=79    Battery=OK      Mode=Manual
Valve           Cuisine-Rad     Setpoint=21     Temp=23 Valve pos=33    Battery=OK      Mode=Manual
I have create Virtuaal dummy Hardware Max, with virtual sesnor like this

Dummy Temperature Sensor for SDB Rez, Bureau, Cuisine, Entrée, Chambre Lisalie, Chambre Parents, Rez, Chambres Rez
and

Dummy Percentage for Entrée-Rad, SDB Rez-Rad, Chambres Rez Lens-Rad, Bureau Rue-Rad, Rez SalleManger-Rad, Chambres Rez Couloir-Rad, Chambre Parents-Rad, Chambres Rez Loan-Rad, Chambre Lisalie-Rad, Bureau Couloir-Rad, Rez Salon-Rad, Chambres Rez Leena-Rad, Cuisine-Rad

Dummy Thermostat Setpoint for Entrée-Stat, SDB Rez-Stat, Chambres Rez Lens-Stat, Bureau Rue-Stat, Rez SalleManger-Stat, Chambres Rez Couloir-Stat, Chambre Parents-Stat, Chambres Rez Loan-Stat, Chambre Lisalie-Stat, Bureau Couloir-Stat, Rez Salon-Stat, Chambres Rez Leena-Stat, Cuisine-Stat (since i don't have wall thermostats)

I can retrieve setpoint and valve percentage but temperature does not working!?

Could someone tell me why?

Thanks for your help

Re: ELV Max! Heating control system

Posted: Wednesday 04 January 2017 18:00
by blackdog65
Do you have

Code: Select all

useWMT = true --Set to true if there is a wall mounted thermostat in every room
set to false?
If set to true (I think) it takes temperature from the wall stat (more accurate) and false forces it to read from the valves.
Hope this helps

Sean

Re: ELV Max! Heating control system

Posted: Wednesday 04 January 2017 19:05
by cmbc
blackdog65 wrote:Do you have

Code: Select all

useWMT = true --Set to true if there is a wall mounted thermostat in every room
set to false?
If set to true (I think) it takes temperature from the wall stat (more accurate) and false forces it to read from the valves.
Hope this helps

Sean
Hello, it's set to false as it's not wall sensor but Valve sensor...

Re: ELV Max! Heating control system

Posted: Wednesday 04 January 2017 19:43
by cmbc
I don't know why but i have finally had to tweak the original code since i don't see anywhere any temperature post operation

Near line 137 i have change this

Code: Select all

      if dtype == "Valve" and name:sub(-5,-1) ~= "-Sens" then
        table.insert(commandArray, { ['UpdateDevice'] = otherdevices_idx[name]..'|0|'..valve_pos})...
        if not useWMT then --Use valve to update temperature and synchronize setpoints
to this

Code: Select all

      if dtype == "Valve" and name:sub(-5,-1) ~= "-Sens" then
        table.insert(commandArray, { ['UpdateDevice'] = otherdevices_idx[name]..'|0|'..valve_pos})...
        table.insert(commandArray, { ['UpdateDevice'] = otherdevices_idx[name]..'|0|'..temp})...
        if not useWMT then --Use valve to update temperature and synchronize setpoints
Is this a mistake in the original code shown at the wiki main page?

Re: ELV Max! Heating control system

Posted: Thursday 05 January 2017 23:20
by Skippiemanz
l0gic wrote:
Skippiemanz wrote:
mongoose wrote:Just found this: https://www.homegear.eu/index.php/Main_Page
Replaces Max! cube completely
If someone could make that work that would be great!

Right now im suffering of loss of connection with the cube around every 5-10 hours. Pulling the power plug and reconnecting it gets things going again. But its not ideal! Anyone else has the same problem?

I have 8 TRV's and 3 windows sensors
Hi,
I went through a period of time where mine did a similar thing, I'm pleased to say it is behaving now...

What I did was to plug the cube in via a spare socket controller I had.
I created a lua script to check the socket every minute and if it is off, turn it on.
I then monitored the last update time from the cube devices and if they were older than an hour then turn off the socket controller.
It would then be turned on again within a minute.
A bit of a bodge but it did the job.

ATB

Kevin

Hmmm i've thought of that but not my favorite solution. I've just bought a second hand cube hopen i just had a monnday morning cube. The old one i can then flash with wulfw firmware witch should be able to transcieve the max signals. Its bin implementen in OpenHAB, Home gear, etc. so maybe we kan get it in Domoticz and get rid of the max software!

Re: ELV Max! Heating control system

Posted: Friday 13 January 2017 15:32
by udippel
Dear all, I have registered in order to thank everyone, especially those who provided the information necessary to get my Max!Buddy started under Linux.
I very much hope i can also help others, with similar problems. My excuses for not contributing to this interesting project myself, but due to time constraints I stick with my existing Max!Cube.

As of today, the software is still available under
http://download.kopsan.de/
For Linux MAXBuddy-r9.16.2-linux.tar.gz suffices. Download and unpack.

Let me start with the theory before I give a short practical guide on how to make it work:

The trick is that the files
MaxEssentialsBackend
and
MaxLocalBackend
are correctly tried to be updated at each start of Max!Buddy via ./maxbuddy.sh from the webpages of the manufacturer. Alas, those don't exist any longer.

Everything can be found under ~/.maxbuddy/ext-libs/. Including the file links-{version_number}.xml. This contains the URLs of the message digest as well as those of the most recent 2 files as mentioned above.
Since the Max!Buddy needs these two, it will never start on its own. Therefore, one has to provide these two in advance. Cleverly written, Max!Buddy uses the existing ones - if they are there! - in case of e.g. no Internet connection.

The folder structure under ~/.maxbuddy/ext-libs/ is identical to the one on the (former) web server of ELV, with ~/.maxbuddy/ext-libs/ as virtual root.

That much to theory, here is how to make it work:
Copy the most recent available versions of MaxEssentialsBackend and MaxLocalBackend into subdirectory ~/.maxbuddy/ext-libs/.
Next, Max!Buddy needs to know where the (local) files are. Therefore one need to edit this file, links-{version_number}.xml, to contain a web address (so I imagine), the subdirectory as used (here the virtual webroot '/'), and the file names.

The easiest solution is just using that subdirectory itself for all files. I simply use www.google.com as webpages. Since the files don't exist there, Max!Buddy will use the local versions.

For e.g. Max!Buddy 9.16 a file links-916.xml is necessary, that may for example contain the following:

<linklist>

<set checksums="http://www.google.com/digest.txt">
<ext>http://www.google.com/MaxEssentialsBack ... 1.jar</ext>
<ext>http://www.google.com/MaxLocalBackend-1.4.1.jar</ext>
</set>

</linklist>

Like this, Max!Buddy works as expected.
Firstly, it checks if there are updated versions (there can't be!), so that the local files are to be used. Of course these must be there. As of today, one can still find locations from where these can be downloaded.

On my PC it looks like this:

$ ls -l
-rw-rw-r-- 1 me myself    206 Jan 12 13:05 links-916.xml
-rw-rw-r-- 1 me myself 295023 Jan 10 16:51 MaxEssentialsBackend-1.4.1.jar
-rw-rw-r-- 1 me myself 161225 Jan 10 16:51 MaxLocalBackend-1.4.1.jar


And with this, Max!Buddy works great here.

Thanks again, kind regards,

Uwe

Re: ELV Max! Heating control system

Posted: Monday 23 January 2017 22:28
by rkollman
Wow! This is getting even better!

I still had the "screen" session running using MaxBuddy, but the last few months there has been lots of progress according to messages I read by mvzut.
Great work and I'm now in the progress of further incorporating Max! into my Domoticz-setup.

I just had to type this message to say these thank you words to everyone who has done work for this project!

Re: ELV Max! Heating control system

Posted: Tuesday 24 January 2017 11:05
by blackdog65
rkollman wrote:Wow! This is getting even better!
During the last 12 months I have
  1. Replaced my oil fired boiler (like for like) and set it spot on with gas analyser etc.
  2. Fitted LOTS of MAX! devices
This has almost HALVED my oil consumption compared to the previous year. :o
The bulk of the saving was due to the old boiler running very inefficiently but then using the new one in an intelligent and efficient manner has really paid off.
Another factor in my hue savings though is house size. Mine is very large and very old so intelligent control has had a much larger impact than say on a one bedroom apartment.
I would be interested to read others experiences/setups etc.

Also on the plus side... my wife LOVES the savings AND being able to control the heating and hot water from her phone. This has led to her giving me the green light for more spending on other projects :D :D :D

All in all I'm a happy bunny :D