Tags in the output?

Discussion in 'C-Bus Toolkit and C-Gate Software' started by jackaroos, Apr 14, 2014.

  1. jackaroos

    jackaroos

    Joined:
    Apr 8, 2014
    Messages:
    17
    Likes Received:
    0
    Location:
    New Zealand
    I have a third party app that works well, however I would like to be able to use tag names rather than group addresses for both input and output.

    I am having difficulty getting the tags names into the output - I think I should be able to:

    303 use-tags=yes
    303 tag-name-output=true

    But none of the received data has tag names:
    300 //TEMPLATE/254/56/31: level=0

    I assume if tag names are in the output tag names can be used in the input commands instead of group addresses? I get Bad object id?s when I try this:
    401 Bad object or device ID: //TEMPLATE/254/56/D1-2Lounge (Invalid group address)


    Can you please tell me
    1. Is it possible to use tag names in input commands and in output received from CBus?
    2. How do I make it so? :)
     
    jackaroos, Apr 14, 2014
    #1
  2. jackaroos

    Roosta

    Joined:
    Nov 22, 2011
    Messages:
    560
    Likes Received:
    1
    Location:
    Australia
    I would be very surprised if this was possible.. Infact I am pretty confident it is not..
     
    Roosta, Apr 14, 2014
    #2
  3. jackaroos

    jackaroos

    Joined:
    Apr 8, 2014
    Messages:
    17
    Likes Received:
    0
    Location:
    New Zealand
    I got the idea I should be able to from the CGate Manual, under configuration commands, page 234:
    4.4.6.81 _______________ tag-name-output
    Parameter Name_________ tag-name-output
    Description_____________ If set to yes, this parameter causes tag names to be output in place of addresses in events, and the config and status ports.
    Default Value____________ no
    Scope _________________ Global
    Effective________________Restart

    I can set this as can be seen by the feedback: 303 tag-name-output=true

    But it does not seem to make any material difference, and when I re-start CGate it goes back to being 303 tag-name-output=false
     
    jackaroos, Apr 15, 2014
    #3
  4. jackaroos

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    770
    Likes Received:
    21
    Location:
    Adelaide
    Hi jackaroos, tag-name referencing was possible in C-Gate a long, long time ago. However it caused many problems in the field because projects would get configured with a "Kitchen" group on floor 2 and another on floor 3, and then applications would send "ON Kitchen". Hilarity ensued, but not for the site owners nor for our Tech Support who had to track down the cause of these problems by poring through project files.

    For this reason tag-name referencing was gradually deprecated in C-Gate and the other Clipsal software, but we haven't yet removed all the latent config options. I apologise for the confusion here.

    It is strongly recommended that you restore the default config options and use group address referencing for a more robust installation.

    Your third party app can easily retrieve the tag names or other pieces of data to present in the UI, for example:

    Code:
    dbget 254/56/2/TagName
    342 254/56/2/TagName=Group 2
    
    dbget 254/56/Group[*]/Address
    342-254/56/Group[1]/Address=255
    342-254/56/Group[2]/Address=0
    342-254/56/Group[3]/Address=1
    342-254/56/Group[4]/Address=2
    342-254/56/Group[5]/Address=10
    342-254/56/Group[6]/Address=12
    
    dbget 254/56/Group[*]/TagName
    342-254/56/Group[1]/TagName=<Unused>
    342-254/56/Group[2]/TagName=Group 0
    342-254/56/Group[3]/TagName=Group 1
    342-254/56/Group[4]/TagName=Group 2
    342-254/56/Group[5]/TagName=Group 10
    342-254/56/Group[6]/TagName=Group 12
    
    dbget 254/56/Group
    342-254/56/Group[1]/OID=3e9e2e40-a65f-1031-b04a-fb4b2c6dccaf
    342-254/56/Group[1]/TagName=<Unused>
    342-254/56/Group[1]/Address=255
    ..
    342-254/56/Group[6]/Snapshot=null
    342-254/56/Group[6]/Level[0]={}
    342-254/56/Group[6]/TagsDLT=null
    
    Note the array index is arbitrary, it is not the group address.
     
    Last edited by a moderator: Apr 15, 2014
    daniel, Apr 15, 2014
    #4
  5. jackaroos

    jackaroos

    Joined:
    Apr 8, 2014
    Messages:
    17
    Likes Received:
    0
    Location:
    New Zealand
    Thanks

    Hi Daniel - thanks for the information :) I can work with what you have given me, much appreciated :)
     
    jackaroos, Apr 24, 2014
    #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.