CBUS messages I cant seem to decipher

Discussion in 'C-Bus Serial Protocols' started by ievolve, Feb 6, 2013.

  1. ievolve

    ievolve

    Joined:
    Mar 20, 2010
    Messages:
    112
    Likes Received:
    1
    Location:
    Idaho
    I am trying to understand a message coming from my CNI, and cant seem to figure out where it is coming from. I have a very small and basic clipsal setup, commands look like:

    0508FF001EFFE7966F8B8AD6
    0505FF001EFFE7966452CED9
    050DFF001EFFE7897BA76FD1

    So 05 means it is a lighting command. I would expect the next to to be the origination address, and the next 2 to be the app address ("FF" in the above messages, which doesnt jive with what I would have expected from standard lighting commands)

    Below is a command that I do recognize:
    052B3800015F38

    Which translates to:
    { messagetype: '05',
    originator: '2B',
    appaddress: '38',
    fbyte: '00',
    command: '01',
    group: 95,
    commandtext: 'off',
    status: 'off',
    level: 0 }

    Anyone seen these kind of messages before? Any help you could give would be greatly appreciated.
     
    ievolve, Feb 6, 2013
    #1
    1. Advertisements

  2. ievolve

    ievolve

    Joined:
    Mar 20, 2010
    Messages:
    112
    Likes Received:
    1
    Location:
    Idaho
    In the manual I found this note:

    "Application address $FF is reserved for network management functions and must not be used."

    Does anyone know if I can safely just ignore these messages intended for app address FF, like the ones I am receiving above? I just dont want to go dropping messages if they have data I should be aware of or need to do something with?
     
    ievolve, Feb 6, 2013
    #2
    1. Advertisements

  3. ievolve

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,321
    Likes Received:
    18
    Location:
    Adelaide
    You can safely ignore messages on application FF. BTW.. The 05 header doesn't mean it's a lighting message, it means its a point to multipoint message... Not all of these are lighting (for example, measurement or multi room audio)

    Nick
     
    NickD, Feb 6, 2013
    #3
  4. ievolve

    ievolve

    Joined:
    Mar 20, 2010
    Messages:
    112
    Likes Received:
    1
    Location:
    Idaho
    Thanks Nick, and thanks for the clarification on '05', as I reviewed the full spec closer you are correct, nothing specific about 05 being only lights.

    I had originally used this doc: http://training.clipsal.com/downloads/OpenCBus/C-Bus Quick Start Guide.pdf

    In section 7.1 it states that the 05 on the front identifies the message as a lighting message, and that is where I got led astray originally.
     
    ievolve, Feb 6, 2013
    #4
  5. ievolve

    pspeirs

    Joined:
    Nov 23, 2013
    Messages:
    84
    Likes Received:
    0
    Location:
    Sydney
    An old thread, but hey, that's how I roll.

    I initially thought that the received message transmitted from the PCI to the serial interface would start with 03, 05, 06 as a means of knowing if it were a P-MP, P-P, etc but it appears not to be the case after looking at the protocol documents a little closer. So the sending command would use these different headers depending on whats being sent to where, but the received message would always be 0x05 if it were a SAL message in SMART mode or 0x86 for a CAL message.

    Would this be a correct interpretation of the protocols?

    Cheers,
    Paul
     
    pspeirs, Nov 27, 2018
    #5
  6. ievolve

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,321
    Likes Received:
    18
    Location:
    Adelaide
    The lower 3 bits of the header define the type of message... which is here the 03/05/06 comes from.

    The other bits are used for things like priority and retransmit count.

    So 0x86 is just an 0x06 (CAL) message sent with a higher priority.

    Nick
     
    NickD, Nov 27, 2018
    #6
  7. ievolve

    pspeirs

    Joined:
    Nov 23, 2013
    Messages:
    84
    Likes Received:
    0
    Location:
    Sydney
    Hi Nick,

    Thanks for the response. Are you also talking about the reply to a CAL command. The documentation on the CAL reply (4.3.3.1 CAL Reply) would suggest that the first byte for a long form reply is simply 0x86.

    Same for a SAL lighting type message (4.3.3.2 Monitored SAL) where sending a command would start with the Header byte, being message type + priority but a reply would still start with 0x05 as defined explicitly in the Serial Interface Guide.

    Regards,
    Paul
     
    pspeirs, Nov 27, 2018
    #7
  8. ievolve

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,321
    Likes Received:
    18
    Location:
    Adelaide
    To be honest all the different PCI modes do my head in... long form short form smart mode etc etc.... they are all just different levels of mangling by the PCI... what goes on on the bus is always the same. In my mind it's much simpler to think of everything in "long form", which is basically the whole message with minimal ferkling by the PCI.

    The reply to a CAL message is another CAL message... the reply is just sent with a higher priority to ensure it gets through sooner on a busy bus. (0x06 = 0b00000110, 0x86 = 0b10000110)

    As for SAL messages, there are no replies as such but if you are monitoring the bus however you will see the SAL messages sent by other units, which have an 0x05 header.

    Nick
     
    NickD, Nov 28, 2018
    #8
  9. ievolve

    pspeirs

    Joined:
    Nov 23, 2013
    Messages:
    84
    Likes Received:
    0
    Location:
    Sydney
    Yup, that's pretty much what I figured, the documentation for the protocols seems to be almost there but has gaps unfortunately. I guess an example of this would be in interpreting the 4 bytes returned for a serial number. Who'd have thought gluing the first 2.5 bytes to the last 1.5 bytes to get the serial number :)

    Have picked this up after a couple of years ignoring now that I have a web interface sorted out.

    Cheers,
    Paul
     
    pspeirs, Nov 29, 2018
    #9
    1. Advertisements

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.