code: public void addCommand(final ICommandBehavior behavior) throws DevFailed {
          final String cmdName = behavior.getConfiguration().getName();
          xlogger.entry("adding dynamic command {}", cmdName);
          final CommandImpl commandImpl = new CommandImpl(behavior, deviceImpl.getName());
          commandImpl.setStateMachine(behavior.getStateMachine());
          deviceImpl.addCommand(commandImpl);
          dynamicCommands.put(cmdName.toLowerCase(Locale.ENGLISH), commandImpl);
          deviceImpl.pushInterfaceChangeEvent(false);
          xlogger.exit();
      }
docs: Add command. Only if not already exists on device
  
  @param behavior
  @throws DevFailed