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 & how to get trigger device id


Mohamed Refaat

Question

Hi,

I have HC3 with multi slaves HC3L. I created a scene that can be trigerred by multi devices.

In the scene, there is a different approach of controlling lights according to the trigger device. How can I get the trigger device id to resolve this issue. I know I can make a scene for each trigger device, but this will increase no. of scenes in a massive way.

 

I have already tried all the following with no success:
1. local Trigger_id = sourcetrigger.event.data.deviceId

2. local Trigger_id = trigger.event.data.deviceId

3. local Trigger_id = json.encode(sourceTrigger.value.deviceid)

4. local Trigger_id = json.encode(Trigger.value.deviceid)

5. local trigger = fibaro:getSourceTrigger()
    Trigger_id =  trigger['deviceID']


All above result either in errors or 'nil' value. Any clue or help is much appreciated

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
if (sourceTrigger['type']=='device')then
    ID=tonumber(sourceTrigger.id)
  • Thanks 1
Link to comment
Share on other sites

  • 0
  • Inquirer
  • 33 minutes ago, Kage said:
    if (sourceTrigger['type']=='device')then
        ID=tonumber(sourceTrigger.id)


    Worked.. Thanks

    Where can I find detailed syntax information for the HC3 ??

    Link to comment
    Share on other sites

    • 0

    @Mohamed Refaat

    Are these the links you are looking for? For some reason they are very hard to find.

    Please login or register to see this link.

    Please login or register to see this link.

    Please login or register to see this link.

    Please login or register to see this link.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 15 hours ago, RH_Dreambox said:

    @Mohamed Refaat

    Are these the links you are looking for? For some reason they are very hard to find.

    Please login or register to see this link.

    Please login or register to see this link.

    Please login or register to see this link.

    Please login or register to see this link.

    No, they are not

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