anchor.diff:    attrib_utils:merge_attribute_lists(
       block_common:outputs(),
       [
  -      {connected, {not_active, []}},
         {sub_values, [{not_active, []}]}
       ]). 
   
  
positive.code: 
  execute({Config, Inputs, Outputs, Private}) ->
  
    {ok, Client} = attrib_utils:get_value(Private, client),
  
    % Update connected status
    case attrib_utils:get_value(Private, conn_state) of
      {ok, true} ->
        {ok, Outputs1} = attrib_utils:set_value(Outputs, connected, true),
        % Read inputs, publish values to corresponding topics
        pub_topics(Config, Inputs, Client);
      
      {ok, false} ->
        {ok, Outputs1} = attrib_utils:set_value(Outputs, connected, false);
        % Don't bother publishing input values, if disconnected.
  
      _ ->
        {ok, Outputs1} = attrib_utils:set_value(Outputs, connected, not_active)
    end,
  
    % Read received publish messages and update subscribed output values
    {Outputs2, Private1} = process_pub_msgs(Config, Outputs1, Private),
    
    % Return updated block state
    {Config, Inputs, Outputs2, Private1}.
  
  
  %% 
  
negative.code:   Private1 = attrib_utils:merge_attribute_lists(Private, 
                                                  [{client, {not_active}}, 
                                                   {pub_msgs, {[]}}, 
                                                   {conn_state, {not_active}},
                                                   {subscribed, {false}}]),
    case config_pubs(Config, Inputs) of
      {ok, Config1, Inputs1} ->
  
        case config_subs(Config1, Outputs) of
          {ok, Config2, Outputs1} ->
  
            % if host name config is invalid, or zero length, this is a config error
            case config_utils:get_string(Config2, host) of
              {ok, Host} ->
                case string:len(Host) > 0 of
                  true ->
  
                    case input_utils:get_boolean(Inputs, disable) of
                      {ok, false} ->
                        % block is already enabled, start MQTT client
                        Options = get_options(Config2),
                        case emqttc:start_link(Options) of 
                          {ok, Client} ->
                            {ok, Private2} = attrib_utils:set_value(Private1, client, Client),
                            log_server:info(started_MQTT_client),
                            Status = initialed,
                            Value = not_active;
  
                          {error, Reason} ->
                            log_server:error(err_starting_MQTT_client, [Reason]),
                            Status = proc_err,
                            Value = not_active,
                            Private2 = Private1
                        end;
  
                      {ok, true} ->
                        % block is currently disabled, don't start MQTT client
                        Status = initialed,
                        Value = not_active,
                        Config2 = Config1,
                        Outputs1 = Outputs,
                        Private2 = Private1;
                      
                      {error, Reason} ->
                        % Bad disable input value
                        Status = input_err,
                        Value = not_active,
                        Config2 = Config1,
                        Outputs1 = Outputs,
                        Private2 = Private1,
                        input_utils:log_error(Config, disable, Reason)
                    end;
  
                  false ->
  