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

VD bug (??) Label ID with underscores


AutoFrank

Question

Hi,

Is this is new bug or a feature for a while

 

If I try and create a label ID with a _ it reverts back to the preset label even though the preset ID has an _

 

Take VD label...

 

Please login or register to see this attachment.

 

change the ID

 

Please login or register to see this attachment.

 

and click save and the label ID reverts back 

 

Please login or register to see this attachment.

 

trying the with a simpler ID with no underscore

 

Please login or register to see this attachment.

 

and success...

 

new bug, old bug or just the way it is  ?

 

Thanks

 

 

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Hi @AutoFrank,

 

Now when you mentioned it I remember that I had same situation, but as I'm somehow used to have such things with HC2 i just give name without underscore. I think that this is definitely 'feature' same as that one with destroying table values in global variables :-P 

 

Anyway, we can live just fine with label names without underscore so I take it as a feature ;-) 

Link to comment
Share on other sites

  • 0

 

@AutoFrank

Do you mean this is not correct as you state "_" cannot be used?

 

This is from my docs of the DSC alarm to HC2 integration that I have tested and documented...

 

--snip--

As global variables and VD labels have different naming rules and we have code chunks that write the same name to both a VD label and a global variable, we must therefor use a naming convention that applies to both. That is...

Name your zones according to these rules:

• NO spaces or “-“. Use “_” instead!
• Max 15 characters
• Start with a letter

• Use only letters and numbers plus “_”

 

From a regex perspective the rule could be written like this: [A-Za-z][A-Za-z0-9_]{2,15} 

--snip--

 

 

Peo

Link to comment
Share on other sites

  • 0
  • Inquirer
  • @pos

     

    I'm not sure to be honest...

    It won't seem to accept my  user of an underscore but when it creates its own label ID, this has an underscore

     

    I'm a bit confused...

    Link to comment
    Share on other sites

    • 0

    Hi @AutoFrank,

     

    but I wrote that this is feature and here is why: 

    I again try to make label ID with underscore "lbl_guest_state" but after saving VD label change ID to "label_0_0" and that happened two times in a row. Since HC2 renames label ID to "label_0_0" or button label ID to "button_1_0" I wrote that it is feature because it gives type and position of the object on VD, row and column. Hope that now is more clear what is happening.

     

    BTW I don't know if this remained form previous versions or it is new and to what purpose development team done it but it is definitely not bug fin my humble opinion.

     

    Link to comment
    Share on other sites

    • 0

    I auto create labels from LUA and seems to have no problem with "_". This is maybe a web guide based bug. Oh sorry @Sankotronic, I of course mean a web based "feature"  :)

     

    Peo

    Link to comment
    Share on other sites

    • 0
    1 minute ago, pos said:

    I auto create labels from LUA and seems to have no problem with "_". This is maybe a web guide based bug. Oh sorry @Sankotronic, I of course mean a web based "feature"  :)

     

    Peo

     

    Hi @pos,

     

    Yes you are right, this is only web GUI feature because if you use other method like VD auto-creation then part of code that changes label ID with underscore is not executed therefore label stays intact. Thanks for additional information.

     

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