Configure with Luup

Hi,

I’m trying to set a user-configurable variable of a Z-Wave device, using Luup code. I’ve searched the forum, and most recommendations are to use “Device Options”, which I perfectly know, but it is not an option for me.

I’ve tried “luup.variable_set”, on “VariablesSet”, “ConfiguredVariable” - no success. I’ve tried sending “Reconfigure” action after previous calls - no success.

By “no success” I mean - that with certain combination of variables to set (since both VariablesSet and ConfiguredVariable can set several configuration variables at once), and sometimes it manages to set it, but not all values are correct. Any help?

Why do I need it? I need to train ZXT-120 (A/C Ir transmitter) with mu IR handheld, and I need to set the code that I need to train to a certain variable and make the actual training. And repeat the procedure 23 times. For one ZXT-120. I need to prepare 6. And each time you use “Device Options” tab, Vera restarts ALL Luup engine and reconfigures ALL devices. Clever. And it doesn’t always work - if you need to be sure you need to call “Configure now” of the device one more time. And that need to be done for each of the 23 x 6 codes. Hence, the reason I want to speed up the process?

Thanks!

Ok, I’ve found some solutions? digging into the forum. I’ve managed to write a Lua function:

function ihSetZVar(node, lul_var, lul_size, lul_val)
	local data = '112 4 ' .. tostring(lul_var) .. ' ' .. tostring(lul_size) .. ' ' .. tostring(lul_val)
	luup.call_action('urn:micasaverde-com:serviceId:ZWaveNetwork1', 'SendData', { Node=tostring(node), Data=data }, 1)
end

The key moment here is the specification ‘Data’ parameter of ‘SendData’. What I’ve deduced for is - the format is space-separated byte-values (be it hex or decimal), with the following meaning:

<class_code> <command_code> <command-specific>

For example in my case it occurs that CONFIGURATION_SET command’s code is ‘4’, then the parameter number follows, then the value size (in bytes), then the value it self, i.e.:

112 4 <conf. number> <conf size: 1 | 2 | 4> <conf. value>

This worked for me - a training cycle for one command dropped from around 15+ seconds, to 1-2. BTW, it is rather ridiculous for Vera to send ALL configuration of ALL devices on EACH Save?!

Hi … I have the same setup with a mini split heat pump and a zxt-120. The preprogrammed codes didn’t work for me so I decided to do a learning mode for a couple temp/fan settings. I was able to get the zxt to learn the codes but now I’m trying to figure out how exactly to have vera automate them. I can go into the settings and set variable to “35”, select a code variable I programmed and then hit “configure node” I’ve spent many hours on the forum and haven’t been able to find a solution.

Basically once you program your mini splits how are you going to control them? How are you going to automate once you program it. The way I understand it, you can’t send the codes through the UI of the thermostat if yiu use the learning method. You have to go into setting and change the configuration variables. Is there a code I could use? I just want to set vera on a weekly timer to use the codes I’ve learned on the zxt. It would be great if you could help! I’m so close!