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

LUA Code for hoilday mode


Question

Posted

Can someone make me simple LUA code for electrical underfloor heating.

There is one sensor in the room, and connected to relay (linked devices) which controls room temperature through heating panel. BUT another sensor is inside the floor, and monitors the floor temperature which should not exceed 38degrees.

So - I need a scene which turns on holiday mode if temperature is 38 degrees inside the floor else should regular heating panel work.

Lauri.

10 answers to this question

Recommended Posts

  • 0
Posted

Lauri, my code is on forum, find it and you will have in virtual device where in slider you setting new vacation temperature for all sections for example

  • 0
  • Inquirer
  • Posted

    Is this the code?

    HC2 = Net.FHttp("192.168.100.53",80)

    HC2:setBasicAuthentication("admin", "admin")

    -- get harmonogram

    response ,status, errorCode = HC2:GET("/api/panels/heating?id=1")

    jsonTable = json.decode(response)

    -- change tabele in Lua

    jsonTable.properties.vacationTemperature = 12;

    -- send back

    json = json.encode(jsonTable);

    HC2:PUT("/api/panels/heating?id=1", json)

    fibaro:log("ready")

    Where do I find room ID for heating?

    • 0
    Posted

    Lauri, in url

    192.168.100.53/api/panels/heating?id=1

    • 0
  • Inquirer
  • Posted

    Okay, now I understand this.

    But about this code, this work as lua scene or I have to make virtual device? Can you explain me this easily step-by-step? It would be really appreciated!

    Lauri

    • 0
    Posted

    Lauri, yes you must do a virtual device

    if you want control it manually then leave as a virtual device

    if you want to do that create scene who gonna press button when you meet conditions

    • 0
  • Inquirer
  • Posted

    I got it working! Many thanks again!

    [ Added: 2013-09-09, 09:57 ]

    Hello,

    I have a small problem with this now. I can turn holiday mode ON but I cannot turn it OFF from virtual device.

    Can someone try this and let me know?

    • 0
    Posted

    I Think you Can change the id=1 to id=0

    • 0
    Posted

    Change Temperature to 0 - this will finish the holiday mode

    • 0
    Posted

    any idea how to do it for 10 rooms in one response or at least with one virtual device?

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