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

Change Heating Zone "mode" by LUA-scene


Question

Guest jmcclaassens
Posted

Hello,

 

I want to change the  "mode" of a Heating Zone with a Lua-scene from "Schedule" into "Vacation" as soon as  the status window sensor changes from "closed" to "open".
The scene trigger is no problem but how can i change the "mode"  of the Heating Zone by LUA ?

 

Please login or register to see this attachment.

 

Thnx!

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

Hello... please check this..

Please login or register to see this link.

 i think it will help you... I use this script since years.. it works very good.

 

 

Edited by alexpelli
  • 0
Posted

Hi,

 

maybe this would help: this was my starting point - [VD] Heating Override by @Dave Harrison:

 

https://forum.fibaro.com/topic/24105-vd-heating-override-v13/?tab=comments#comment-108485

 

It was my starting point to add "Heating Off" feature in "Leave" scene: when everybody leaves, heating zones turn to "Vacation" mode. Here is the excerpt showing mechanics:

 

if (thermostatsOff) then
    local http = net.HTTPClient();
      local dataTable = {mode = "",properties = {handTemperature = 0, handTimestamp = 0, vacationTemperature = 0}};
      
      dataTable.mode = "Vacation";
      dataTable.properties.handTemperature = 0;
      dataTable.properties.handTimestamp = currentTimestamp;
      dataTable.properties.vacationTemperature = 10;
      
      local dataJson = json.encode(dataTable);
      
      for i = 1, #heatingZones do
          http:request("http://127.0.0.1:11111/api/panels/heating/"..heatingZones,
        {
        options = {
        method = "PUT",
        headers = {
        ["Content-Type"] = "application/json"
        },
        data = dataJson
        },
        success = function(response) 
            result = json.decode(response.data);
              debug("maroon",result.name.." heating turned off.");
        end,
        failure = function(err) debug("maroon","Error : "..err) end
        })
    end
else
    debug("lightblue","thermostatsOff variable set to false - no action.");
end

 

Best,

 

Andrzej

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