Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Danfoss+thermostats LUA


Lauri

Question

Hello,

i was thinking, if I have 3 radiators in same room, or using wall thermostat (secure) at same room. How can I make LUA to keep the thermostats always at same level?

Same thing, if I'm using wall thermostat and want to try temperature, then it needs to affect danfoss thermostats also. I tried association groups but it didnt work this way.

I made simple LUA:

189 - is Secure thermostat

187 - is danfoss thermostat.

--[[

%% properties

189 value

%% globals

--]]

local startSource = fibaro:getSourceTrigger();

if (

( tonumber(fibaro:getValue(189, "value")) == 5 )

or

startSource["type"] == "other"

)

then

fibaro:call(187, "setTargetLevel", "5");

fibaro:call(187, "setTime", tonumber(os.time(t)) + 120*60);

end

This way I have to make scene for every temperature from 5C to 28C. Is there better way to disolve this?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Change it to bigger than.

So if value >=

and then use the value to put it in the danfoss

[ Added: 2013-09-25, 11:42 ]

--[[

%% properties

189 value

%% globals

--]]

local startSource = fibaro:getSourceTrigger();

if (

( tonumber(fibaro:getValue(189, "value")) >= 5 )

or

startSource["type"] == "other"

)

then

fibaro:call(187, "setTargetLevel", fibaro:getValue(189, "value"));

fibaro:call(187, "setTime", tonumber(os.time(t)) + 120*60);

end

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...