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

Question

Posted

Hi


I am trying to debug the output of my triggers for a scene, the scene is as follows


local startSource = fibaro:getSourceTrigger();
if (
 ( tonumber(fibaro:getValue(230, "value")) > 28 ) --Dinning Temp
and
 ( tonumber(fibaro:getValue(167, "value")) > 28 ) --Living Temp
and
 ( tonumber(fibaro:getValue(190, "value")) > 31 ) --Bedroom Temp
and
  tonumber(fibaro:getGlobalValue("OccupyCount")) == tonumber("0") --OcupyCount = 0
and
 ( tonumber (fibaro:getValue(163, "ui.solar.value")) > 3000 ) --Solar >3000kw
and
 ( fibaro:getGlobalValue("TimeOfDay") == "Afternoon"  )  -- Afternoon Time    
)    

then

 

how would i send the current value of each one to the debug window?

9 answers to this question

Recommended Posts

  • 0
Posted (edited)

 

 

Please login or register to see this code.

 

Edited by 10der
  • 0
Posted (edited)

A little more elaborate 

 

Please login or register to see this code.

 

Edited by jgab
More general
  • Thanks 1
  • 0
Posted

@jgab cool!

  • 0
  • Inquirer
  • Posted
    1 hour ago, jgab said:

    A little more elaborate 

     

    Please login or register to see this code.

     

    Thanks for this i have added it on but only see the following

     

     

    [DEBUG] 20:44:46: fibaro:getSourceTrigger()={"type":"other"}
    [DEBUG] 20:44:46: fibaro:getValue(230,"value")="26.5"

     

    Do i need to do something to get all the other values?  Also how would i name them something more standard such as bedroom 26.5

    • 0
    Posted
    4 minutes ago, Dman568 said:

    Thanks for this i have added it on but only see the following

     

     

    [DEBUG] 20:44:46: fibaro:getSourceTrigger()={"type":"other"}
    [DEBUG] 20:44:46: fibaro:getValue(230,"value")="26.5"

     

    Do i need to do something to get all the other values?  Also how would i name them something more standard such as bedroom 26.5

     

    So, the first first test is not bigger than 26.5 so it won't do the other tests...

    • 0
  • Inquirer
  • Posted
    13 minutes ago, jgab said:

     

    So, the first first test is not bigger than 26.5 so it won't do the other tests...

    great thanks for you help and the explanation very much appreciated

     

    • 0
    Posted

    Please login or register to see this link.

    Please login or register to see this link.

    Woow, Awesome thank you very much!

    Sir, what do you recommend to use as default in a scene?Do you have some more "smart things to add?"

    • 0
    Posted (edited)

    If you  have your deviceIDs in a table (type HomeTable) you can do this if you add a mapFibaroIDs function and make some changes to traceFibaro()

    Please login or register to see this code.

    to get log printouts with the name of the id

    Please login or register to see this code.

     

    Edited by jgab
    • Like 1
    • 0
    Posted
    32 minutes ago, jgab said:

    If you  have your deviceIDs in a table (type HomeTable) you can do this if you add a mapFibaroIDs function and make some changes to traceFibaro()

    to get log printouts with the name of the id

    Please login or register to see this code.

     

    This is brilliant... I at the moment have not got all my device IDs into a table... do you mind sharing how I can do this and keep it updated regularly??

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