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!



Smart Home Forum by FIBARO Team

  • 0

[SOLVED] How to get scene ID within it's code



@T.Konopka, @I.Srodka, @A.Socha or anyone with advanced knowledge


For virtual devices there is function that can give us ID number within VD code: fibaro:getSelfId()


QUESTION: Is there any similar function to get scene ID within it's code?


EXPLANATION: I need to find scene ID within it's code. I don't have any references when scene is installed on user HC2. I know that I can use scene name that has to be unique and then search it within response from API call, but that solution is far from good. What if user misspell name or decide that he like to use different name?

Edited by Sankotronic
Link to comment
Share on other sites

Recommended Posts

  • 0



Need more help.
The code you sent works well.
Is out possible to use the same  scene ID (sId = __fibaroSceneId) function to also call different options in the scene you call?
That is can I trigger a scene from another scene and not only get the scene ID that triggered it but also other parameters so I can use the same (source) scene to trigger multiple events in the triggered (target) scene.
Not sure the above is very clear, hope you know what i mean.



Link to comment
Share on other sites

  • 0
  • Inquirer
  • Hi @RossA ,


    You can send more than one argument to the scene. Here is example with 3 arguments:

    Please login or register to see this code.

    Then in the scene that was started by above code you can get scene ID 'sId', 'command' and 'volume'  with this code:

    Please login or register to see this code.


    • Like 2
    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.

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