Group Name

Discussion in 'C-Bus Automation Controllers' started by sjfp, Nov 2, 2021.

  1. sjfp

    sjfp

    Joined:
    Oct 31, 2004
    Messages:
    145
    Likes Received:
    1
    Location:
    UK
    Hi trying to extract the object name from a known object address.
    Expected to see in the table when using grp.find('0/56/1').name
    But unfortunately name is not reference in the table results. Any suggestions ?
     
    sjfp, Nov 2, 2021
    #1
  2. sjfp

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,522
    Likes Received:
    173
    Location:
    Adelaide, Australia
    Works fine for me :)

    Are you sure ga 1 exists?

    Try log(grp.find('0/56/1')) and it will print out the contents of the table for you
     
    Ashley, Nov 3, 2021
    #2
  3. sjfp

    sjfp

    Joined:
    Oct 31, 2004
    Messages:
    145
    Likes Received:
    1
    Location:
    UK
    Morning / Evening
    Yes group exists and using grp.find('0/56/1') does provide a table but it does not contain any field which contains the objects name.
    Therefore grp.find('0/56/1').name only returns nil.
     
    Last edited: Nov 3, 2021
    sjfp, Nov 3, 2021
    #3
  4. sjfp

    Pie Boy

    Joined:
    Nov 21, 2012
    Messages:
    248
    Likes Received:
    31
    Location:
    New Zealand
    I have come across this behaviour before, where name entry is nill as you have found, I believe it’s something to do with the cbus tag map and it’s disassociation from the objects in the internal database structure.

    The group.find() func is looking for the data in objects not cbus tag map. The actual cbus tag is stored in cbus tag map.

    I don’t know what causes it as some obj have name from cbus tag map in the grp.find() obj data but some do not.

    You could try

    grptag = GetCBusGroupTag(0,56,1)
    Log(grptag)
     
    Pie Boy, Nov 3, 2021
    #4
  5. sjfp

    sjfp

    Joined:
    Oct 31, 2004
    Messages:
    145
    Likes Received:
    1
    Location:
    UK
    Pie Boy,
    Many thanks for your suggestion, GetCBusGroupTag worked
     
    sjfp, Nov 3, 2021
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.