Danfoss LC 13 not always working. Please help.

I have the above referenced Danfoss device and seem to be having trouble and would appreciate your help and advice.

I have installed as per the provided instructions. However when I change the temperature set point the radiator does not always respond. If I change the set point from 24 to 28 for example, the radiator doesn?t get hotter even when the temperature in the room is 20.

I have noticed that after installation the unit sits tightly on the valve. After a period this becomes loose and the unit can be swiveled easily. If I reinstall the value (i.e., by pressing the dot until flashing M then pressing dot again unil the spindle withdraws and then pressing dot again until the spindle re calibrates.) it becomes tight again and the set points will change the temperature again as they should.

The unit has been installed using the supplied m30 adapter.

Why would it loose its calibration after a day or so. I don’t want to have to re-set the until all the time.

Many thanks in advance

note. The unit is 014G0013

Got them same issues.

What I did is:
-Remove batteries , exchange them for a 3V 2A trafo.
-Wake up intervall 600
-poll: 0

Make a scene: setpoint, 20 degrees. 11minutes later again 20 degrees as a Backup.
Make more scenes as appropriate.

This works almost flawless for me.

Cor

Thank you.

Can I ask what a 3V 2A trafo is? Perhaps post a link?

Do you think the supplied batteries are not powerful enough?

Many thanks

No , the batteries are powerfull enough , but when you change the wakeup intervall to 1/3 what they are now , they will be empty very rapidly.

For me it looks like the wake up interval of 30 minutes is way too long , and when it is send , it often looks like when vera polls the Thermostat , it goes back to the setpoint it had first. Although I am not 100% sure If I am right . This work around seems to work now about 95% of the time.
-Wake up interval: 600 ( every 10 minutes , but will drain the battery , hence the converter from mains to 3volts).
-Poll: 0 (never)
-Scene: setpoint , and repeat after 11 minutes as a backup.

A 3V,2A trafo , a converter , from mains to 3volts.
[url=https://www.ebay.de/itm/Steckernetzteil-alle-Modelle-5-5mm-Hohlstecker-Netzteil-Schaltnetzteil-Trafo/351218451793?hash=item51c6404551:m:mNUnHiXiGBrF80qi8IO2iDQ]Steckernetzteil alle Modelle 5,5mm Hohlstecker Netzteil Schaltnetzteil Trafo | eBay

But you can first always try with batteries.

Cor

Why 2A? Did you have issues with smaller power output?

I have similar issues, and for the setting I did a scene which compares setpoint target and current setpoint variables.
If there is a difference, then the scene request change to the targeted value. it goes as below (you have to change “ID” to the ID of your thermostat:

-- check target and current setpoint values
local Gosp_Target = luup.variable_get("urn:upnp-org:serviceId:TemperatureSetpoint1", "SetpointTarget", ID)
local Gosp_Current = luup.variable_get("urn:upnp-org:serviceId:TemperatureSetpoint1", "CurrentSetpoint", ID)

-- compare target with current and re-request temperature change if values are not equal
if Gosp_Target ~= Gosp_Current then
 luup.call_action( "urn:upnp-org:serviceId:TemperatureSetpoint1", "SetCurrentSetpoint", {NewCurrentSetpoint = Gosp_Target}, ID)
end

This way I can set desired temperature manually or via other scenes (like: night and day values) and the code above is making sure that in case of reset the temperature will be set back to the last used, no matter what setting it was. The scene with above code runs on schedule, I did a 20 min. setting for it.

The problem I have is that thermostat goes back to the initial (21 degrees) setting almost immediately after I set the proper temperature (within 10 minutes or so). It can be because I’ve set both polling and wakeup times to 10 minutes.
My issues are with Devolo unit, which is more or less a clone of LC 13 with added possibility to report current temperature to the controller. I’m not sure if disabling polling will affect that feature, but I’ll try and see if there is any change in the behaviour.

Another interesting thing is that my unit repeatedly goes into “E1” error. It is stuck and doesn’t react to buttons. Surprisingly, If I change the temperature via controller, the E1 error clears itself and the unit start working again.

@ Kwieto:

Initially I had 1A power units , but when the motor of the thermostat was turning , the thermostat display started flickering. With the 2A version it is stable. I think the flickering is mainly due to poor (Chinese) quality of the power unit.

Thanks for that LUE code , I made a scene as well for one of my thermostats ( ID 316) , and will check if it works with mine as well.

I assume I can use multiple of these codes in 1 scene, how would I do that , will this work?

[code]-- check target and current setpoint values
local Gosp_Target = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetpointTarget”, 316)
local Gosp_Current = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “CurrentSetpoint”, 316)

– compare target with current and re-request temperature change if values are not equal
if Gosp_Target ~= Gosp_Current then
luup.call_action( “urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetCurrentSetpoint”, {NewCurrentSetpoint = Gosp_Target}, 316)

– check target and current setpoint values
local Gosp_Target = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetpointTarget”, 318)
local Gosp_Current = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “CurrentSetpoint”, 318)

– compare target with current and re-request temperature change if values are not equal
if Gosp_Target ~= Gosp_Current then
luup.call_action( “urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetCurrentSetpoint”, {NewCurrentSetpoint = Gosp_Target}, 318)

– check target and current setpoint values
local Gosp_Target = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetpointTarget”, 44)
local Gosp_Current = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “CurrentSetpoint”, 44)

– compare target with current and re-request temperature change if values are not equal
if Gosp_Target ~= Gosp_Current then
luup.call_action( “urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetCurrentSetpoint”, {NewCurrentSetpoint = Gosp_Target}, 44)

– check target and current setpoint values
local Gosp_Target = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetpointTarget”, 45)
local Gosp_Current = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “CurrentSetpoint”, 45)

– compare target with current and re-request temperature change if values are not equal
if Gosp_Target ~= Gosp_Current then
luup.call_action( “urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetCurrentSetpoint”, {NewCurrentSetpoint = Gosp_Target}, 45)
end[/code]

Or will I have to use for every thermostat a new scene?

Thanks,
Cor

You can do several units in one scene. It can be done as you wrote, but I think more “elegant” way is to define all local variables at the beginning of the scene, individually for each thermostat, then use them throughout the scene.
The “Gosp_Target” and “Gosp_Current” are arbitrary taken names, you can replace them with whatever you like (i.e. Target_1, Target_2,… and Current_1, Current_2, …)

You can omit all data preceded with “–” as it is a text information (comment), not used in the scene

the final code for two devices would be then something like following (devices ID’s are 44 and 45, as from your example):

local Target_1 = luup.variable_get("urn:upnp-org:serviceId:TemperatureSetpoint1", "SetpointTarget", 44)
local Current_1 = luup.variable_get("urn:upnp-org:serviceId:TemperatureSetpoint1", "CurrentSetpoint", 44)
local Target_2 = luup.variable_get("urn:upnp-org:serviceId:TemperatureSetpoint1", "SetpointTarget", 45)
local Current_2 = luup.variable_get("urn:upnp-org:serviceId:TemperatureSetpoint1", "CurrentSetpoint", 45)

if Target_1 ~= Current_1 then
 luup.call_action( "urn:upnp-org:serviceId:TemperatureSetpoint1", "SetCurrentSetpoint", {NewCurrentSetpoint = Target_1}, 44)
end

if Target_2 ~= Current_2 then
 luup.call_action( "urn:upnp-org:serviceId:TemperatureSetpoint1", "SetCurrentSetpoint", {NewCurrentSetpoint = Target_2}, 45)
end

Remember that variable “Gosp_Target” was replaced by respective “Target_1” and “Target_2” also in the luup.call_action… part of the code (“NewCurrentSetpoint” part)

Many thanks kwieto :slight_smile:

Cor

@ Kwieto: , juste wanted to implement my 4 thermostats with the Lua code you provided.

But since There is no way ( I think) to check if it is correct , since there will be ( hopefully) no obvious change in the thermostat.
Can you please check If I did this correct? , I added _3 and _4 for TArget and current. Is it correct that after each “if Target_1 ~= Current_1 then” and “end” comes?

[code]local Target_1 = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetpointTarget”, 316)
local Current_1 = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “CurrentSetpoint”, 316)
local Target_2 = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetpointTarget”, 318)
local Current_2 = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “CurrentSetpoint”, 318)
local Target_3 = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetpointTarget”, 44)
local Current_3 = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “CurrentSetpoint”, 44)
local Target_4 = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetpointTarget”, 45)
local Current_4 = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSetpoint1”, “CurrentSetpoint”, 45)

if Target_1 ~= Current_1 then
luup.call_action( “urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetCurrentSetpoint”, {NewCurrentSetpoint = Target_1}, 316)
end

if Target_2 ~= Current_2 then
luup.call_action( “urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetCurrentSetpoint”, {NewCurrentSetpoint = Target_2}, 318)
end

if Target_3 ~= Current_3 then
luup.call_action( “urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetCurrentSetpoint”, {NewCurrentSetpoint = Target_3}, 44)
end

if Target_4 ~= Current_4 then
luup.call_action( “urn:upnp-org:serviceId:TemperatureSetpoint1”, “SetCurrentSetpoint”, {NewCurrentSetpoint = Target_4}, 45)
end[/code]

Many thanks,
Cor

Yes, your code is OK.

And yes, you should put an end after each “if…then…” condition. You have to “tell” the system somehow that the code referring to the condition is finished.

General structure for that is: if… then… else/elseif… end, where “else” or “elseif” can be omited if you don’t have alternative actions defined (as it is in my code), but if you forget about “end” you’ll get an error.

You can’t use “elseif” here for defining another conditions as they should be considered separately for each radiator, not as a combination.

For defining condition in the “if…then” section you can use following operators: A == B, A > B, A < B, A >= B, A <= B, A ~= B. As you can see, when the “=” sign is involved, you have to use two signs (i.e. “==” instead of “=”).

@ Kwieto: Many thanks . I wish I paid more attention when we had computer “programming” at school when I was young.

Cor

I am using a Danfoss RS Z room stat to set the setpoint of a Danfoss TRV. Using your code what would you suggest? Should I get the current set point of the trv and compare it to the current set point of the thermostat? Or should I compare target values?

I don’t know Danfoss RS thermostat so I don’t know what variables it has available.
I designed the code from above because if you set temperature by main controller, the only place you can check what was set is “Target” of the specific radiator head.
If you use RS to set temperature and it keep information about current setpoint in it’s variables, then you can compare values from RS with TRV and update TRV to match RS setting.
This is maybe more “foolproof” solution, as it may happen that your TRV will not update target value from RS or it will be reset for some reason - then referring to “external” data from RS may help in such cases.

But in general either way should work.

I have used the code you kindly provided and added an array feature to make adding multiple radiator TRV’s easier. This is currently working very well for me so thought I’d share here.

-- Array of devices
tbl = {55}

-- Start Loop Through Array
for key, value in ipairs(tbl) do

-- check target and current setpoint values
local Gosp_Target = luup.variable_get("urn:upnp-org:serviceId:TemperatureSetpoint1", "SetpointTarget", value)
local Gosp_Current = luup.variable_get("urn:upnp-org:serviceId:TemperatureSetpoint1", "CurrentSetpoint", value)

-- compare target with current and re-request temperature change if values are not equal
if Gosp_Target ~= Gosp_Current then
 luup.call_action( "urn:upnp-org:serviceId:TemperatureSetpoint1", "SetCurrentSetpoint", {NewCurrentSetpoint = Gosp_Target}, value)
end
end

For the array you would add addtional TRV’s by adding the device number between the curly brackets separated by a comma.

Nice

can you explain following part of the code:

for key, value in ipairs(tbl) do

I suppose “value” is taken from tbl, but what is the “key”, for example?
I don’t know this function and it seems usefull in other cases

The data in the array has a key and a value. And the code gets the array entries in pairs i.e. key and value.

The key in this case is an index. So the key is 1 and the value is 55 (this being my device ID).

If you put a second value in the array it’s index key would be 2.

So you could use the key to extract a value or values from the array.