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

fan coil setpoint


marius de jong

Question

Hello

i have several fan coil units in my house.
i would like to make a rule witch lets the ventilator go faster or slower when the room temperature reaches the set point.
So for example on my heating panel the living room is set to 20.5 and the actual temperature is 19 the fan goes to high when it gets within 1 degree of the set point it goes to medium and within 0.5 goes to low.
I have 3 switches connected to the fan fore low-med-high speed

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Yeah, you are on the right track, but you've got a few subtle things wrong, probably copy paste and decimal point (not a comma).

 

I think I've removed all the issues, can you please give it a try?

 

Please login or register to see this code.

 

  • Thanks 1
Link to comment
Share on other sites

  • 0

Hi,

 

I was thinking to do the same but you cannot rely on the HC2. Sometimes you will need to reconfigure the system after a beta testing or something else and you will end up with no heating. In order not to depend of Fibaro, I have bought thermostat controller MCO Home MH8-FC - Fan Coil Thermostat 2 pipe and connected with 2 wires for starting the boiler. All the thermostats in the house I have connected the water valve contact in parallel, giving command to the starting relay of the boiler so, even if the Fibaro it is not working, the heating system can be operated  manually on each room. In this case you will need to set up desired temperature on the thermostat and will start and stop the fan unit according to that temperature.. The heating panel from Fibaro is just sending me scheduled temperature set point but the thermostat unit is deciding if need heating on low, medium or high speed of fan, changing them automatically.  

Edited by silvinnio
  • Like 1
Link to comment
Share on other sites

  • 0
  • Inquirer
  • i have 1 of does but i do not have wires running from all the fan coils to a remote thermostat. so i need to control them via relay's and scene.

    i got this rule but i cant get to compare difference of 0,5 to each other

     

     

    --[[
    %% properties
    %% events
    %% globals
    --]]

    local Tempratuurverschil = fibaro:getValue(50, "value")
    local Setpointwoonkamer = fibaro:getGlobalValue("Setpointwoonkamer")

    fibaro:debug(Tempratuurverschil)
    fibaro:debug(Setpointwoonkamer)


    if fibaro:getGlobalValue('Setpointwoonkamer') == Tempratuurverschil
    then fibaro:debug("are equal")
    else fibaro:debug("are NOT equal")
    end
    if fibaro:getGlobalValue('Setpointwoonkamer') -0.5 < Tempratuurverschil
    then fibaro:debug("is lower")
    else fibaro:debug("is not lower")
    end

     

    Link to comment
    Share on other sites

    • 0

    @silvinnio I agree... It is my personal opinion, always use a "thermostat" device for temperature control. If you depend on controller + algorithm + batteries + perfect network communication and so on you could have a nasty surprise some day! Image you use a Door/Window sensor in your living room. It reports "18 °C" and then its battery dies (you did not notice, you forgot to check or it has a bad battery). Your script turns on the heating system... When is it going to stop? When are you going to notice? What is going to limit the temperature in that room? If you use a thermostatic device (radiator valve, or electrical on/off thermostat, any thermostat) and set it to some high temperature, like 28 °C at least you know it is going to stop at around 28... And setting it to 28 probably was intentional, unless children have played with the settings.

     

    24 minutes ago, marius de jong said:

    i got this rule but i cant get to compare difference of 0,5 to each other

     

    I think it is better to do tonumber() on that global variable. In fact, it is always better to do that, even when calling fibaro:getValue. Then print the number, do the math and do the comparison.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • i get an error

     

    --[[
    %% properties
    %% events
    %% globals
    --]]

    local ruimtetempratuur = fibaro:getValue(50, tonumber("value"))
    local Setpointwoonkamer = fibaro:getGlobalValue(tonumber("Setpointwoonkamer"))

    fibaro:debug(ruimtetempratuur)
    fibaro:debug(Setpointwoonkamer)


    if fibaro:getGlobalValue('Setpointwoonkamer') <= 0,5 ruimtetempratuur
    then fibaro:debug("is lager")
    fibaro:setGlobal('test',0)
    else fibaro:debug("is niet lager")
    fibaro:setGlobal('test',1)
    end
    if fibaro:getGlobalValue('Setpointwoonkamer') >= ruimtetempratuur
    then fibaro:debug("is hoger")
    else fibaro:debug("is niet hoger")
    end

    Link to comment
    Share on other sites

    • 0
    11 minutes ago, marius de jong said:

    i get an error

     

    Tell me all about it, you got me all excited!

     

    Or do you want me to guess which error? I can do that, I like a challenge!

     

    Edit: that is an honest question, I really like to guess ;-)

    Edited by petergebruers
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • if i do it thisway

    --[[
    %% properties
    %% events
    %% globals
    --]]

    local ruimtetempratuur = fibaro:getValue(50,"value")
    local Setpointwoonkamer = fibaro:getGlobalValue("Setpointwoonkamer")

    fibaro:debug(ruimtetempratuur)
    fibaro:debug(Setpointwoonkamer)


    if fibaro:getGlobalValue('Setpointwoonkamer') <= 0.5 ruimtetempratuur
    then fibaro:debug("is lager")
    fibaro:setGlobal('test',0)
    else fibaro:debug("is niet lager")
    fibaro:setGlobal('test',1)
    end
    if fibaro:getGlobalValue('Setpointwoonkamer') >= ruimtetempratuur
    then fibaro:debug("is hoger")
    else fibaro:debug("is niet hoger")
    end


    i get:

    Please login or register to see this image.

    /monthly_2018_01/image.png.09a3c7229e711b113244857b4c09bea6.png" alt="image.png.09a3c7229e711b113244857b4c09bea6.png" />

    if i do it whith the tonumber( )
     

    --[[
    %% properties
    %% events
    %% globals
    --]]

    local ruimtetempratuur = fibaro:getValue tonumber((50,"value"))
    local Setpointwoonkamer = fibaro:getGlobalValue tonumber(("Setpointwoonkamer"))

    fibaro:debug(ruimtetempratuur)
    fibaro:debug(Setpointwoonkamer)


    if fibaro:getGlobalValue('Setpointwoonkamer') <= 0.5 ruimtetempratuur
    then fibaro:debug("is lager")
    fibaro:setGlobal('test',0)
    else fibaro:debug("is niet lager")
    fibaro:setGlobal('test',1)
    end
    if fibaro:getGlobalValue('Setpointwoonkamer') >= ruimtetempratuur
    then fibaro:debug("is hoger")
    else fibaro:debug("is niet hoger")
    end

     

    i get image.png.c869fa389dc1a587f201eed60dd13102.png

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Thanks petergebruers

    It works. I added medium en high modes so now when room temperature is 0.5 lower than room set point fan goes to medium, and when the difference is more then 1 it goes to high,
    on/off of the low speed is working via the heating panel



    --[[
    %% properties
    %% events
    %% globals
    --]]

    local ruimtetempratuur = tonumber(fibaro:getValue(50, "value"))
    local Setpointwoonkamer = tonumber(fibaro:getGlobalValue("Setpointwoonkamer"))

    fibaro:debug(ruimtetempratuur)
    fibaro:debug(Setpointwoonkamer)

    if ruimtetempratuur <= Setpointwoonkamer - 0.5 then
      fibaro:debug("ventilator midden aan")
      fibaro:call(17, "turnOn");
    else fibaro:debug("ventilator midden uit")
      fibaro:call(17, "turnOff");
    end

    if ruimtetempratuur <= Setpointwoonkamer - 1 then
      fibaro:debug("ventilator hoog aan")
      fibaro:call(15, "turnOn")
    else fibaro:debug("ventilator hoog uit")
         fibaro:call(15, "turnOff")
    end

     

    Link to comment
    Share on other sites

    • 0

    @marius de jong

     

    To avoid simple coding errors. This is actually good for both beginners and pro:s..

     

    I suggest use of the free Visual Studio Code editor with "lua lint" (from satoren) plugin. I use it on MAC, but it runs on all OS:es. This editor do supports handling of unicode charachers  which is not the case with for example Notepad++ (that I know is a popular editor on windows)

     

    (But of course there are more good editors. Non free Sublime for example)

     

    Then I also suggest a Git repo and any of the Git plugins.

     

    I´ll attach a screenshot...

     

    /Peo

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Edited by pos
    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...