NAC - Using Custom Level Tags

Discussion in 'C-Bus Automation Controllers' started by sjfp, Jan 13, 2026 at 5:43 PM.

  1. sjfp

    sjfp

    Joined:
    Oct 31, 2004
    Messages:
    147
    Likes Received:
    1
    Location:
    UK
    I look for a method to use the Custom Level Tags rather than the actual object level.
    We are using an MQTT to send messages.
    But need to send on or off rather than 255 or 0. we could use
    if value == 1 or value == 255 then
    send_val = "on"
    elseif value == 0 then
    send_val = "off"
    end

    But also want to be able to send dimming command so still need the 0-255 as a value.
    Thought if using the Custom level Tag we could mark object we want with Custom Levels Tags 0=off and 255=on and if there is no Custom Level Tag we can simply use the object value.

    Any suggestions would be gratefully appreciated
     
    sjfp, Jan 13, 2026 at 5:43 PM
    #1
  2. sjfp

    Pie Boy

    Joined:
    Nov 21, 2012
    Messages:
    253
    Likes Received:
    31
    Location:
    New Zealand
    Can you explain a bit more, do you mean when value is 0, it would send only “OFF” or 0 as well, initially I’m thinking you can’t combine the off and on and also have the 0-255. do you mean the sent message range would be “OFF 1….254 ON” ? Is this an obj to one MQTT topic, or could you possibly have 2 topics one for the on/off state and one for the dinning level?
     
    Pie Boy, Jan 13, 2026 at 6:50 PM
    #2
  3. sjfp

    sjfp

    Joined:
    Oct 31, 2004
    Messages:
    147
    Likes Received:
    1
    Location:
    UK
    for example
    object 0/56/93 has custom level tags set with 0=off and 255=on
    object 0/56/94 has NO custom level tags set.

    if 0/56/93 is triggered by vis or wall switch to 255 then mqtt payload would be "on" if switch is toggled to 0 then payload would be "off"
    if 0/56/94 is set by a slider to a certain level like 127 then the payload would be 127 because there is NO custom level tags set
     
    sjfp, Jan 13, 2026 at 7:22 PM
    #3
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.