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

HC3 / From BLOCK to LUA > Code failing


Question

Posted

Hello,

 

I am completely new here (

Please login or register to see this link.

), I read some posts but I did not find my solution.

I am trying to understand the concept of LUA and for that purpose, I made a scene using BLOCK, which is working perfectly fine.
I wanted to transform it to LUA, which works fine as well.

But as soon as I make ONE modification in the LUA (or adding a comment), it fails = scene do not output anything !!!

 

The code is the following.

 

CONDITiON (if a motion detector is seeing something it triggers my alarm):

Please login or register to see this code.

 

ACTIONS

Please login or register to see this code.

 

Any idea more than welcomed !
Thanks,

Fly

3 answers to this question

Recommended Posts

  • 0
Posted

Is this what you meant to achieve? 
 

 

Please login or register to see this code.

 

  • Like 1
  • 0
  • Inquirer
  • Posted
    58 minutes ago, SmartHomeEddy said:

    Is this what you meant to achieve? 

     

    Yessss, wow, works like a charm !! What was my error ??? I am searching, I do not find... :-)

     

    I worked on it a lot, and I find also an alternative as follow:

     

    Please login or register to see this code.

     

    But either with my solution or yours, I experiment a lot of delay between the switch and the RED.
    And in addition, my daughter is playing on WiFi (tablet) to a game, she told me that each time I run a scene, it inserts a lot of lag/ping into her game.
    I suspect HUE for that, or Fibaro ?

     

    Apart the fact that the light switch on, and then the RED arrive VERY VERY LATE, I would like now to do LIGHT ON RED / LIGHT OFF / LIGHT ON RED / LIGHT OFF, etc...
    Is that possible ?

    Maybe, I am wondering if I am using the correct "Quick App" for my HUE ?
    Does it exist multiple app for it ?
    In particular, I would like one where I could easily choose the color on a slider. Does it exists ?
     

    Right now, I have this (not user friendly to choose my own color excepted to pick up one):

    Please login or register to see this attachment.

    • 0
    Posted

    @Fly The HUE bridge works with the Zigbee protocol. And on the 2.4ghz band.

     

    That might inerrupt with the Wifi on your doughters tablet if the device is also on the 2.4ghz.

    My advise would be, if possible set the tablet to use the 5ghz band. Maybe that helps.

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