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


Heating Panel Manual Mode - from Scene


careyjack
 Share

Recommended Posts

I am new to LUA and have been automating my heating.  I wanted to be able to create a scene that triggered the manual mode for some of the heating panels.  I wanted to share the code with this forum - I am aware there is a similar thread but I found copying the code (and modifying) did not work.

 

The LUA code below works for three rooms (just copy the section to a new section for another room), sets the Temperature to 21 for 3 hours from the current time

 

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

local ManualTemp = 20
local ManualTime = (os.time()+3*60*60) -- 3 hours

-- Repeat for each room that you want to set a manual temperature in.
-- Office
local IdPanel = 21
local panel = api.get("/panels/heating/" .. IdPanel)
panel.properties.handTemperature = (ManualTemp)
panel.properties.handTimestamp =  (ManualTime)
api.put("/panels/heating/" ..IdPanel, panel)

-- Kitchen ID 18
local IdPanel = 18
local panel = api.get("/panels/heating/" .. IdPanel)
panel.properties.handTemperature = (ManualTemp)
panel.properties.handTimestamp =  (ManualTime)
api.put("/panels/heating/" ..IdPanel, panel)

Edited by careyjack
  • Like 2
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
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.

 Share

×
×
  • Create New...