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


Ask for Scene by Lua


mohamedsalah

Recommended Posts

  • Topic Author
  • --[[
    %% autostart
    %% properties
    110 stairMS
    266 stairSoptLight
    263 stairHiddenLight
    %% events
    %% globals

    --]]
    jS2n={stairMS=110,stairSoptLight=266,stairHiddenLight=263} --please change stairMS and stairLight to your real device ID

    jM = {
    {5,"`stairMS`",{state="value=true",timeSlot="17:00~07:00",timeSpanOn=true,
    trueAct={"`stairSoptLight`|`stairHiddenLight`","turnOn",""},
    timeLoopAct={"`stairSoptLight`|`stairHiddenLight`","turnOff","","{`stairMS`:valueModified>1200|`stairSoptLight`,`stairHiddenLight`:value=true}"}}},
    }

     

     

    thats still not work??

    and no error come 

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    No,no no... you need to download and copy entire

    Please login or register to see this link.

    to blank Lua scene window.

    Then you need to add to :

    jS2n { stairMS=110,stairSoptLight=266,stairHiddenLight=263 }

    jM{} - {5,"`stairMS`",{state="value=true",timeSlot="17:00~07:00",timeSpanOn=true,
    trueAct={"`stairSoptLight`|`stairHiddenLight`","turnOn",""},
    timeLoopAct={"`stairSoptLight`|`stairHiddenLight`","turnOff","","{`stairMS`:valueModified>1200|`stairSoptLight`,`stairHiddenLight`:value=true}"}}},

     

    It should look like this:

    Please login or register to see this image.

    Please login or register to see this spoiler.

    Again, all code should be part of scene.

    Link to comment
    Share on other sites

  • Topic Author
  • aha, sorry my bad ??
    Excuse me, this is my first time using it lua code
    I started installing fibaro devices 
    A year ago but that first time to using the lua scene ??

    Link to comment
    Share on other sites

  • Topic Author
  •  

     

     

     

    Now I use HC2 and HCL in the same building because it is made up of two floors. I put HCL on the second floor, which is also linked to the motion. I want to do the same previous process, but the light it on the second floor.

     

     

     

     

    jS2n={lobbyMS=328,lobbySoptLight=331} 
    jM = {
    {5,"`lobbyMS`",{state="value=true",timeSlot="17:00~07:00",timeSpanOn=true,
    trueAct={"`lobbySoptLight`","turnOn",""},
    timeLoopAct={"`lobbySoptLight`","turnOff","","{`lobbyMS`:valueModified>1200|`lobbySoptLight`:value=true}"}}},
     

    Please login or register to see this attachment.

    I think lua scene in HCL cannot be done but if it is bound to HC2 can it be done??

    Link to comment
    Share on other sites

    1.Please don't use Master devices. They are not have states or actions.

    Please login or register to see this spoiler.

     

    2. No Lua scenes in HCL available.

    If HCL is a remote gateway to HC2 do you see HCL devices in HC2? If yes, I think you can use it. Let's try.....

    I'll try to help as much as possible.

     

    Link to comment
    Share on other sites

  • Topic Author
  • okay now id for motion in HCL is 87 
    and after i make connection between HC2 and HCl same id for that motion change for 328

    what can i do for that to make it work in lua  scene as the first one ?

     

    i think i need to try to make the same code but change id for devices as id in hcl !!!? ?

    Link to comment
    Share on other sites

    So in HC2 this device is 382, so use it and let's see....

    Link to comment
    Share on other sites

  • Topic Author
  • Okay but I used it before
    and that message come 

    Please login or register to see this attachment.

    and you told me don't use Master devices put in HC2 i cant know how is the master device 

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    could you please post API device property ?

    in browser http://<HC2-IP>/api/devices/382

     

    Edited by cag014
    Link to comment
    Share on other sites

    No... The link doesn't help (login security)

    please execute on your browser

    Please login or register to see this link.

    copy received data and post it.

     

    Link to comment
    Share on other sites

    OK..post it when available

    Link to comment
    Share on other sites

    • 2 weeks later...
  • Topic Author
  • http://192.168.0.106/fibaro/en/devices/configuration.html?id=328

    Sorry for being late

     

    http://192.168.0.106/fibaro/en/devices/configuration.html?id=328

    Link to comment
    Share on other sites

    I cannot use your local link..

    Executed this link on your browser copy the screen and post it.

    Thanks

     

    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.

    ×
    ×
    • Create New...