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

How do i find ID of virtual devices


Question

Posted

I am trying to incorporate the Netatmo scrips written for HC2.

Please login or register to see this link.

Have have managed to create two virtual devices. These work fine. But i am struggling to create the lua script for calling the virtuall button. When i want to fill in the device id to call i am not sure what the ID is. Under my button it says ID and its named "button11" is this the device id? when i use that it just fucks up the lua code and it seems like it wants only a number but how do i find that number?

Can anybody assist me with this?

Please login or register to see this attachment.

Please login or register to see this attachment.

8 answers to this question

Recommended Posts

  • 0
Posted

pathduck, for that better work using label in virtual device then log, because the most of time you will seen nothing (if you use log)

  • 0
  • Inquirer
  • Posted
    pathduck, for that better work using label in virtual device then log, because the most of time you will seen nothing (if you use log)

    I am sorry but i am not quite sure what you mean here? Can i se it in a log? Where is the log?

    • 0
    Posted

    fibaro:log show message only for few seconds. That way better use label from virtual device

    • 0
  • Inquirer
  • Posted
    fibaro:log show message only for few seconds. That way better use label from virtual device

    So you mean i should use the label name in my lua script scene?

    in that case it will be like this:

    Please login or register to see this code.

    That gives me the following error: [ERROR] 17:22:48: line LuaScript:

    I am guessing that the script needs to have a device ID there as a number and not text?

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    • 0
    Posted

    you should use something like that

    Please login or register to see this code.

    • 1
    Posted

    Device ID in this case is the device ID of the virtual device, not the button.

    Please login or register to see this code.

    Easiest way to find the ID is to look in the address bar of your browser when you're editing the virtual device of your choice. The button number is the number in the top left corner when editing the virtual device under "advanced".

    Please login or register to see this code.

    • 0
  • Inquirer
  • Posted
    Device ID in this case is the device ID of the virtual device, not the button.

    Please login or register to see this code.

    Easiest way to find the ID is to look in the address bar of your browser when your editing the virtual device of your choice. The button number is the number in the top right corner when editing the virtual device under "advanced".

    Please login or register to see this code.

    I found it in the address bar. Thank you very much for the help

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    • 0
    Posted

    Also check out the last few posts of this topic for more useful info on virtual devices:

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