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

Help me. I can´t understand why fibaro:setSceneEnabled() function doesn´t disable the scene triggered.


Question

Posted

Hi, everybody. I have a problem with the following scene. When the fibaro:setSceneEnabled(16,false) is called and the ID 904 device is turned OFF the scene with ID 16 is triggered (because the value of ID 904 trigger it). So I don´t understand why happen it if i have disabled the  ID 16 previuosly. Could anyone help me? Thanks in advance.

 

--[[
%% properties
903 value
%% weather
%% events
%% globals
--]]

local dispositivos = {178, 194, 183, 189, 188, 179, 309, 368, 184};
local startSource = fibaro:getSourceTrigger();
if ( tonumber(fibaro:getValue(903, "value")) > 0 )   --Si Botonera 5 Tecla 5 ON
then
  local id;
  for i=1,#dispositivos
      do
      id = tonumber(dispositivos[i]);
        fibaro:call(id, "setValue", "100");  --Enciendo toda la SALA DE ESTAR
    end
  fibaro:setSceneEnabled(16,false);           -- Why the scene is not disabled?
  fibaro:call(904, "turnOff");                       --When i turn OFF the ID 904 device the scene with ID 16 is triggered anyway
  fibaro:setSceneEnabled(16,true);
  print ("La Tecla 5 de Botonera 5 está ON");
end
if ( tonumber(fibaro:getValue(903, "value")) == 0 )   --Si Botonera 5 Tecla 5 OFF
then
  local id;
  for i=1,#dispositivos
      do
      id = tonumber(dispositivos[i]);
        fibaro:call(id, "turnOff");   --Apago toda la SALA DE ESTAR
    end
  print ("La Tecla 5 de Botonera 5 está OFF");
end
 

8 answers to this question

Recommended Posts

  • 0
Posted (edited)

Hello @Herni ,

 

Try following commands:

Please login or register to see this code.

 

 

Edited by Sankotronic
format code
  • Like 1
  • 0
  • Inquirer
  • Posted

    Hello @Sankotronic

     

    Thanks for the answer. I have done resolve the problem in another way. 

    I have used the fibaro:abort() command in the other scene. So, After that the fibaro:call(904, "turnOff") command trigger the scene ID=16 it is abort if the trigger was from the main scene. 

    Anyway i´m going to try with the fibaro:setSceneRunConfig(sceneID,'DISABLED') command too. 

    Thank you very much.

    • 0
    Posted

    Sankotronic@, please,

     

    would these commands be the same for HC3?

    thanks

    • 0
    Posted
    11 hours ago, jorge rintaro said:

    Sankotronic@, please,

     

    would these commands be the same for HC3?

    thanks

     

    Hi @jorge rintaro ,

     

    I have no idea what Fibaro is adding and changing on HC3 except what is in this manuals:

    Please login or register to see this link.

    Please login or register to see this link.

     

    Maybe other HC3 users, installers, distributors and sellers on this forum knows more? ?

    • 0
    Posted

    @knuth made an effort 2 years ago to document the differences

    I say 2 years ago, because things may have changed a bit....

    • 0
    Posted

    Well, it is interesting how manuals never follow upgrades and changes made to the software.

    I think that developers worst nightmare is to write some manuals for their software and it is definitely time consuming.

    I'm not complaining just stating the obvious.

    I'm not different. :-)  UHAS is ready for publishing, but user manual is still only in my head. :-(

     

    • Like 2
    • 0
    Posted
    1 hour ago, Sankotronic said:

    developers worst nightmare is to write some manuals for their software

    You would think, the developer (or developers) is the best person to write the docs, but there are indeed several challenges. IMHO the most obvious is ... it is not productive. That is of course a fallacy, the problem is we cannot measure what good manuals cost, or what bad manuals cause to damage the image of a product... If we could express that in EUR then maybe it would no longer be seen as a waste of time.

     

    Second challenge, imho, is the fact that the developer can no longer "think like a new user". He/she is soaked with the product, he can dream the interface and the lines of code behind it. I think it would work to assign a tech skilled person to write manuals, and let that user write and maintain the docs. Again, the first problem still applies, it is seen as a cost and not something whcih brings money to the tabel.

     

    Open Source works around this issue: yeah the docs are old but you can open a pull request to improve it or just look at the source code

    • Like 2
    • 0
    Posted

    I believe that it is a good practice to document functions inline and autogenerate api documentation for users - easier to keep in sync than keeping documentation separate. I may do it myself one day :-) 

    Like 

    Please login or register to see this link.

     

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