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

Need help with HC2 Heating Script to HC3 Script conversion


Question

Posted

Hi All,

 

I am using my HC2 to control my central heating. It is a Lua scene I found on the forum and adapted it for my needs. And that works great. :)

 

But now I have bought a HC3 and started looking into the Lua part, and found it is completely changed. And my programming skills are not good enough to see what needs to be changed in the current Lua Script from the HC2.

 

Who can help me to convert the basics of the scrip t?

 

So I can get it working on my HC3, and I can understand the differences.

 

Thnx

 

 

Please login or register to see this attachment.

13 answers to this question

Recommended Posts

  • 0
Posted

...spaghetti code

  • Like 1
  • 0
  • Inquirer
  • Posted (edited)

    @10der

     

    I know, but it works.

     

    I have no idea on how to get it working in HC3. 

     

    Can you help me break it up in parts, so I can rebuild it in HC3?

     

     

    Edited by rwijbenga
    • 0
    Posted (edited)

    not sure 

     

    i hate such code

    i never working with such code.

    i am to much expensive (rate $50 per hour) I don't think about what worth a shot.

    Edited by 10der
    • 0
    Posted (edited)

    try to understand all alone.

    thank you!

     

    Please login or register to see this code.

     

    Edited by 10der
    • Like 1
    • 0
    Posted

    That is structure ?

    • 0
    Posted

    Goodday all,

    @10der, I modified your code a little so it runs on HC3.

     

    I also added manual override and the build in open window check of the Fibaro heat controller.

    Maybe when I have the rest of the house moved from the HC2 to the HC3 I'll go back to window sensors (to little time to really play with HA).

    For now I have the code in a scene that runs every minute, maybe in the future I'll try to make a QA out of it.

     

    At first I tried the Fibaro heat activator plugin, but that works very poorly, think Fibaro has shares in my local gas company... Very glad I found your code!

     

    Sorry I turned your code into spaghetti again :).  I am no coder by very very far.

     

    P.s. I use Fibaro heat controllers, not sure if this works for other brand's heat controllers.

    P.p.s. I use a hometable, if anyone who's interested in this remove the following line:

     

    Please login or register to see this code.

     

    The Scene:

    Please login or register to see this spoiler.

    Please login or register to see this code.

     

    Jim

    • Like 1
    • Thanks 1
    • 0
    Posted
    3 minutes ago, jimicr said:

    At first I tried the Fibaro heat activator plugin, but that works very poorly

    Same here, a lot of glitches in the heat activator.

     

    I also use a modified code from @10der

    • Like 1
    • 0
    Posted

    Welcome guys, but it’s not my code ;) just all credits to topic starter ;) 

    • 0
    Posted
    3 minutes ago, 10der said:

    Welcome guys, but it’s not my code ;) just all credits to topic starter ;) 

    Ah thanks @10der for clearing that up.

    Thanks @rwijbenga for the code in the first palce!

     

    Jim

    • 0
    Posted

    I am just rewrite code ;) 

    • 0
    Posted

    And that was/ is very useful for me at least :D

     

    • 0
    Posted
    31 minutes ago, jimicr said:

    And that was/ is very useful for me at least

    Also for me ?

    • 0
    Posted

    Which part of the code belongs to be in the Declarations / Actions? @10der @jimicr 

    I tried to break it up myself, but have issues with saving the scene. 

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