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

Change Label Virtual Device through API


Richard

Question

Hello, 

 

I would like to ask wheter I can change a label of virtual device through an API?

 

Regards,

Richard

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • 7 hours ago, spazpeker said:

    By using a global variable for the label Yes

    Thank you for your answer.

    This is indeed what I figured out. But is it possible to directly change it without use of global variable?

     

    Thanks again!

    Link to comment
    Share on other sites

    • 0

    Please login or register to see this attachment.

    or simple

     

    Please login or register to see this code.

    Please login or register to see this image.

    Link to comment
    Share on other sites

    • 0

    if I add a second label under eacheother and would like to change the second label, what do I need to change in the code?

     

    jsonTable.properties.rows[1].elements[1].caption="Checkin"; -- WHAT SHOULD I CHANGE HERE ??

     

    see photo below: The label named "test" I would like to change to "Checkout" ??

    Please login or register to see this code.

    Please login or register to see this image.

    /monthly_2018_08/checkin.PNG.de98f9ec300f03f19551d99490ffe44e.PNG" />

     

     

    Edited by samuel
    Link to comment
    Share on other sites

    • 0

    counting... 1, 2, 3....

     

    Please login or register to see this code.

    btw,. 

     

    Please login or register to see this code.

     

    and look to json response 

    rows and elements...

     

     

    Link to comment
    Share on other sites

    • 0

    i tried this:

     

    element 2

    Please login or register to see this code.

    or 

     

    with row 2 and element 2

    Please login or register to see this code.

    but that gives me an error on this line

     

     

     

    Link to comment
    Share on other sites

    • 0

    Please login or register to see this code.

    in the api it said: row 1 > in lua = 2

    same with elements 0 > in lua = 1

     

    the above is for the second label from the above picture with label "test" becomes "Checkout"

    Link to comment
    Share on other sites

    • 0

    Hi have tried the the code. The json table update for the required element. I can change it. No problems there.

    However the virtual devise label is not "refreshing". Only when I reload the page I can see the change.

    Any idea ?

     

     

    Link to comment
    Share on other sites

    • 0
    9 hours ago, maygel said:

    However the virtual devise label is not "refreshing". Only when I reload the page I can see the change.

    FIBARO said about FAD

    Link to comment
    Share on other sites

    • 0

    @10der -  Thanks for reply, not sure what you mean "FAD". Could please outline ?  thank you 

    Link to comment
    Share on other sites

    • 0

    ok. Thank you. My understanding is that you indicated the fact that the label is not refreshing was designed as such by Fibaro. Thus in order to display, one must find another way to refresh the VD.

    Link to comment
    Share on other sites

    • 0
    Just now, maygel said:

    Thus in order to display, one must find another way to refresh the VD.

    this designed by FIBARO.  I am not a FIBARo developer. ask FIBARO directly via ticket to support :)

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