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


Recommended Posts

Posted

Hi everyone, I have several climate zones configured on my HC3L. My goal is to trigger a scene via a door sensor: when the door is opened, the climate zone should be set to the same temperature as the hallway.

However, this doesn't work—neither with LUA nor with Block Scenes. Interestingly, if I don't set it to 'Manual' but instead use 'Back to Schedule', the climate zone reacts immediately.

Has anyone encountered this problem? I’ve found a workaround using Profiles for now, which works, but I would much prefer to control the climate zones directly.

Thanks in advance, Wolle

Posted

I use the following LUA function to adjust a heating zone:

 

Please login or register to see this code.

 

For me this works as expected. Maybe you can change and use it for your purpose.

  • Topic Author
  • Posted

    Thank You

     

    I but it in a LUA like this

    Please login or register to see this attachment.

     

    If I understand correctly, this should work.

    Unfortunately, neither setting nor resetting works here.

     

    Please login or register to see this attachment.

     

    Or do I need to integrate the function somewhere else?

     

    Thank You

    Posted

    Hi @Wolle_79,

     

    Function provided by @Alex de Bruin is for quick app, not for the scene. You need to remove "QuickApp:" part from the name of the function and it might work.

  • Topic Author
  • Posted

    @Sankotronic Thank you,

     

    that was the error!

    Can i set the Function pubplic vor all scene?

     

    Thanks 

    Wolle

     

    I add a copy funcction from Climazone to climazone

    If Door Open set Livingroom to the same like kitchen.

     

    function set_zone(id,T,H,idz)  -- Adjust heating zone id to temperature T for H hours
       local path = string.format("/panels/climate/%i",id)
       local hzone = api.get(path)
       local curT  = hzone.properties.currentTemperatureHeating
      if idz < 1 then
       --if T ~= curT then -- adjust schedule
          if H > 0 then
             local curH = tonumber(os.date("%H"))
             if curH + H > 24 then H = 24 - curH end
             H = os.time() + ( H * 3600 )
             hzone.properties.handSetPointHeating = T
          else -- H <= 0, back to scheduled mode
             hzone.mode = "Schedule"
          end
          hzone.properties.handTimestamp = H
          api.put(path,hzone)
       --end
      else
        hub.climate.setClimateZoneToManualMode(idz, 'Heat',43200, curT, nil)
      end  
    end
     
    set_zone(2,21,1,3)

     

  • Topic Author
  • Posted

    @Sankotronic Thank you,

     

    that was the error!

    Can i set the Function pubplic vor all scene?  It looks like there is no posipility, all whtat i found is setting global Varriables and then start a szene with the Funnction.

     

    Thanks 

    Wolle

     

    I add a copy funcction from Climazone to climazone

    If Door Open set Livingroom to the same like kitchen.

     

    function set_zone(id,T,H,idz)  -- Adjust heating zone id to temperature T for H hours
       local path = string.format("/panels/climate/%i",id)
       local hzone = api.get(path)
       local curT  = hzone.properties.currentTemperatureHeating
      if idz < 1 then
       --if T ~= curT then -- adjust schedule
          if H > 0 then
             local curH = tonumber(os.date("%H"))
             if curH + H > 24 then H = 24 - curH end
             H = os.time() + ( H * 3600 )
             hzone.properties.handSetPointHeating = T
          else -- H <= 0, back to scheduled mode
             hzone.mode = "Schedule"
          end
          hzone.properties.handTimestamp = H
          api.put(path,hzone)
       --end
      else
        hub.climate.setClimateZoneToManualMode(idz, 'Heat',43200, curT, nil)
      end  
    end
     
    set_zone(2,21,1,3)

     

    Posted

    Based on my original function:

     

    Create for example a QuickApp with the function QuickApp:set_zone(id,T,H) and use the id from this QuickApp in your scene(s).

     

    From a scene you can use the call:  hub.call(QA_id,action_name,arguments) where QA_id is the QuickApp id and action_name the QuickApp function.

     

    For example:

         hub.call(QA_id,"set_zone",2,21,1) -- set heating zone 2 to 21 degrees for 1 hour

         hub.call(QA_id,"set_zone",2,0,0) -- return heating zone 2 to scheduled mode.

  • Topic Author
  • Posted

    How can i do this?

     

    do you have a link or any thing else how i can se the way to do that?

     

    Posted

    Go to "Add device" on the devices page, select  "Other device" and then select Quick App. Add a name and type (generic ? )  and save the device.

    After that go to the edit tab of this new device and edit the device. Simply add the function to the lua main page and save the device.

  • Topic Author
  • Posted

    Thank You,

    it works very well.

    Perfect

    Join the conversation

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

    Guest
    Reply to this topic...

    ×   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...