GetCBusState / SetCBusState implementation details

Discussion in 'C-Bus Automation Controllers' started by ashields, Feb 9, 2019.

  1. ashields

    ashields

    Joined:
    Feb 2, 2011
    Messages:
    20
    Likes Received:
    1
    Location:
    Nottinghamshire,UK
    Do these functions and there brethren always result in network traffic?

    For instance is a call to GetCBusState served from an in memory state built from previous messages or does it send a network request?

    And likewise If I call SetCBusState to the value that is currently set does it send a network message?

    Thanks
    Alan
     
    ashields, Feb 9, 2019
    #1
  2. ashields

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    Cbus does not poll. It maintains an internal state and returns the data from there when you read it.

    It always sends out a setCbusState command irrespective of the current state. That is because some devices work on the reception of the command as well as the value. For example the shutter relay uses a fixed value for a toggle command so each time you issue the same command it alternates between open/stop etc. This is why you need to use the ONCE statement rather than IF in logic to stop flooding the bus with continuous messages.
     
    Ashley, Feb 10, 2019
    #2
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.