diff --git a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py index ec9b4702de0a3d..dc721b24268447 100644 --- a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py +++ b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/decoder.py @@ -303,6 +303,22 @@ def run(self, specs, value, cluster_name: str, typename: str, array: bool): ) del value[str(field_code)] + # darwin-framework-tool returns the field name but with a different casing than what + # the test suite expects. + # To not confuse the test suite, the field name is replaced by its field name + # equivalent from the spec and then removed. + wrong_casing_field_name = field_name[0].lower( + ) + field_name[1:] + if field_name not in value and field_name[0].upper() == field_name[0] and wrong_casing_field_name in value: + value[field_name] = self.run( + specs, + value[wrong_casing_field_name], + cluster_name, + field_type, + field_array + ) + del value[wrong_casing_field_name] + if specs.is_fabric_scoped(struct): value[_FABRIC_INDEX_FIELD_NAME] = self.run( specs, diff --git a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py index 7a3735e213e049..355a2b18433e31 100644 --- a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py +++ b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py @@ -14,7 +14,9 @@ import base64 import json +import os import re +import sys _ANY_COMMANDS_LIST = [ 'ReadById', @@ -208,6 +210,12 @@ class Encoder: def __init__(self, specifications): self.__specs = specifications + # This is not the best way to toggle this flag. But for now it prevents having + # to build a new adapter for the very small differences that exists... + is_darwin_framework_tool = os.path.basename( + sys.argv[0]) == 'darwinframeworktool.py' + self.__is_darwin_framework_tool = is_darwin_framework_tool + def encode(self, request): cluster = self.__get_cluster_name(request) command, command_specifier = self.__get_command_name(request) @@ -305,7 +313,10 @@ def __maybe_add_destination(self, rv, request): if not self._supports_destination(request): return rv - destination_argument_name = 'destination-id' + if self.__is_darwin_framework_tool: + destination_argument_name = 'node-id' + else: + destination_argument_name = 'destination-id' destination_argument_value = None if request.group_id: @@ -333,6 +344,9 @@ def __maybe_add_endpoint(self, rv, request): if (request.is_attribute and not request.command == "writeAttribute") or request.is_event or (request.command in _ANY_COMMANDS_LIST and not request.command == "WriteById"): endpoint_argument_name = 'endpoint-ids' + if self.__is_darwin_framework_tool: + endpoint_argument_name = 'endpoint-id' + if rv: rv += ', ' rv += f'"{endpoint_argument_name}": "{endpoint_argument_value}"' @@ -378,7 +392,10 @@ def __get_argument_name(self, request, entry): if request.is_attribute: if command_name == 'writeAttribute': - argument_name = 'attribute-values' + if self.__is_darwin_framework_tool: + argument_name = 'attr-value' + else: + argument_name = 'attribute-values' else: argument_name = 'value' diff --git a/examples/darwin-framework-tool/BUILD.gn b/examples/darwin-framework-tool/BUILD.gn index c32fda585f7cca..1c792dfbd605ee 100644 --- a/examples/darwin-framework-tool/BUILD.gn +++ b/examples/darwin-framework-tool/BUILD.gn @@ -14,6 +14,7 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") +import("//build_overrides/jsoncpp.gni") import("${chip_root}/build/chip/tools.gni") import("${chip_root}/build/config/compiler/compiler.gni") @@ -132,6 +133,7 @@ action("build-darwin-framework") { config("config") { include_dirs = [ ".", + "${chip_root}/examples/common", "${chip_root}/examples/darwin-framework-tool/commands/common", "${chip_root}/zzz_generated/darwin-framework-tool", "${chip_root}/zzz_generated/controller-clusters", @@ -178,6 +180,13 @@ executable("darwin-framework-tool") { "commands/common/MTRError.mm", "commands/common/MTRError_Utils.h", "commands/common/MTRLogging.h", + "commands/common/RemoteDataModelLogger.h", + "commands/common/RemoteDataModelLogger.mm", + "commands/delay/Commands.h", + "commands/delay/SleepCommand.h", + "commands/delay/SleepCommand.mm", + "commands/delay/WaitForCommissioneeCommand.h", + "commands/delay/WaitForCommissioneeCommand.mm", "commands/discover/Commands.h", "commands/discover/DiscoverCommissionablesCommand.h", "commands/discover/DiscoverCommissionablesCommand.mm", @@ -200,12 +209,16 @@ executable("darwin-framework-tool") { deps = [ ":build-darwin-framework", - "${chip_root}/third_party/jsoncpp", + jsoncpp_root, ] if (config_use_interactive_mode) { sources += [ "commands/interactive/InteractiveCommands.mm" ] - deps += [ "${editline_root}:editline" ] + + deps += [ + "${chip_root}/examples/common/websocket-server", + "${editline_root}:editline", + ] } ldflags = [ @@ -240,6 +253,7 @@ executable("darwin-framework-tool") { # pics is needed by tests "${chip_root}/src/app/tests/suites/pics", + "${chip_root}/src/protocols:im_status", ] defines = [] @@ -248,6 +262,8 @@ executable("darwin-framework-tool") { "${chip_root}/config/standalone/", "${chip_root}/src/", "${chip_root}/src/include/", + "${chip_root}/src/protocols/", + "${chip_root}/src/protocols/interaction_model", "${chip_root}/third_party/nlassert/repo/include/", "${chip_root}/third_party/nlio/repo/include/", "${chip_root}/zzz_generated/app-common/", diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm index 55f429caeca981..eb938c2abb0614 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm @@ -40,6 +40,12 @@ ChipLogProgress(chipTool, "Running Command"); ReturnErrorOnFailure(MaybeSetUpStack()); SetIdentity(mCommissionerName.HasValue() ? mCommissionerName.Value() : kIdentityAlpha); + + { + std::lock_guard lk(cvWaitingForResponseMutex); + mWaitingForResponse = YES; + } + ReturnLogErrorOnFailure(RunCommand()); auto err = StartWaiting(GetWaitDuration()); diff --git a/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.h b/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.h new file mode 100644 index 00000000000000..d8130143e20d8c --- /dev/null +++ b/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#import + +#include + +class RemoteDataModelLoggerDelegate { +public: + CHIP_ERROR virtual LogJSON(const char *) = 0; + virtual ~RemoteDataModelLoggerDelegate() {}; +}; + +namespace RemoteDataModelLogger { +CHIP_ERROR LogAttributeAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, id result); +CHIP_ERROR LogCommandAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, id result); +CHIP_ERROR LogAttributeErrorAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, NSError * error); +CHIP_ERROR LogCommandErrorAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, NSError * error); +void SetDelegate(RemoteDataModelLoggerDelegate * delegate); +}; // namespace RemoteDataModelLogger diff --git a/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm b/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm new file mode 100644 index 00000000000000..679dca5bd3be83 --- /dev/null +++ b/examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm @@ -0,0 +1,195 @@ +/* + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "RemoteDataModelLogger.h" + +#import "MTRError_Utils.h" +#import + +#include +#include +#include + +#include + +constexpr const char * kClusterIdKey = "clusterId"; +constexpr const char * kEndpointIdKey = "endpointId"; +constexpr const char * kAttributeIdKey = "attributeId"; +constexpr const char * kCommandIdKey = "commandId"; +constexpr const char * kErrorIdKey = "error"; +constexpr const char * kClusterErrorIdKey = "clusterError"; +constexpr const char * kValueKey = "value"; + +constexpr const char kBase64Header[] = "base64:"; + +namespace { +RemoteDataModelLoggerDelegate * gDelegate; + +std::string JsonToString(Json::Value & json) +{ + Json::FastWriter writer; + writer.omitEndingLineFeed(); + return writer.write(json); +} + +CHIP_ERROR LogError(Json::Value & value, const chip::app::StatusIB & status) +{ + if (status.mClusterStatus.HasValue()) { + auto statusValue = status.mClusterStatus.Value(); + value[kClusterErrorIdKey] = statusValue; + } + +#if CHIP_CONFIG_IM_STATUS_CODE_VERBOSE_FORMAT + auto statusName = chip::Protocols::InteractionModel::StatusName(status.mStatus); + value[kErrorIdKey] = statusName; +#else + auto statusName = status.mStatus; + value[kErrorIdKey] = chip::to_underlying(statusName); +#endif // CHIP_CONFIG_IM_STATUS_CODE_VERBOSE_FORMAT + + auto valueStr = JsonToString(value); + return gDelegate->LogJSON(valueStr.c_str()); +} + +CHIP_ERROR AsJsonValue(id value, Json::Value & jsonValue) +{ + if (value == nil) { + jsonValue = Json::nullValue; + } else if ([value isKindOfClass:[NSNumber class]]) { + if (CFNumberIsFloatType((CFNumberRef) value)) { + jsonValue = [value doubleValue]; + } else if ([[value stringValue] hasPrefix:@"-"]) { + jsonValue = [value longLongValue]; + } else { + jsonValue = [value unsignedLongLongValue]; + } + } else if ([value isKindOfClass:[NSArray class]]) { + jsonValue = Json::arrayValue; + + NSArray * array = value; + for (id element in array) { + Json::Value jsonElement; + VerifyOrDie(CHIP_NO_ERROR == AsJsonValue(element, jsonElement)); + jsonValue.append(jsonElement); + } + } else if ([value isKindOfClass:[NSDictionary class]]) { + jsonValue = Json::ValueType::objectValue; + + NSDictionary * dict = value; + for (id key in dict) { + Json::Value jsonElement; + VerifyOrDie(CHIP_NO_ERROR == AsJsonValue([dict objectForKey:key], jsonElement)); + jsonValue[[key UTF8String]] = jsonElement; + } + } else if ([value isKindOfClass:[NSData class]]) { + NSData * data = value; + data = [data base64EncodedDataWithOptions:0]; + auto base64Str = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + auto prefix = [NSString stringWithUTF8String:kBase64Header]; + auto base64PrefixedStr = [prefix stringByAppendingString:base64Str]; + jsonValue = [base64PrefixedStr UTF8String]; + } else if ([value isKindOfClass:[NSString class]]) { + jsonValue = [value UTF8String]; + } else if ([value isKindOfClass:[NSObject class]]) { + jsonValue = Json::ValueType::objectValue; + + unsigned int numberOfProperties; + objc_property_t * properties = class_copyPropertyList([value class], &numberOfProperties); + for (NSUInteger i = 0; i < numberOfProperties; i++) { + objc_property_t property = properties[i]; + NSString * key = [[NSString alloc] initWithUTF8String:property_getName(property)]; + + Json::Value jsonElement; + VerifyOrDie(CHIP_NO_ERROR == AsJsonValue([value valueForKey:key], jsonElement)); + jsonValue[[key UTF8String]] = jsonElement; + } + free(properties); + } else { + return CHIP_ERROR_NOT_IMPLEMENTED; + } + + return CHIP_NO_ERROR; +} + +} // namespace + +namespace RemoteDataModelLogger { +CHIP_ERROR LogAttributeAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, id result) +{ + VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR); + + Json::Value value; + value[kEndpointIdKey] = [endpointId unsignedLongLongValue]; + value[kClusterIdKey] = [clusterId unsignedLongLongValue]; + value[kAttributeIdKey] = [attributeId unsignedLongLongValue]; + + Json::Value jsonValue; + VerifyOrDie(CHIP_NO_ERROR == AsJsonValue(result, jsonValue)); + value[kValueKey] = jsonValue; + + auto valueStr = JsonToString(value); + return gDelegate->LogJSON(valueStr.c_str()); +} + +CHIP_ERROR LogCommandAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, id result) +{ + VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR); + + Json::Value value; + value[kEndpointIdKey] = [endpointId unsignedLongLongValue]; + value[kClusterIdKey] = [clusterId unsignedLongLongValue]; + value[kCommandIdKey] = [commandId unsignedLongLongValue]; + + Json::Value jsonValue; + VerifyOrDie(CHIP_NO_ERROR == AsJsonValue(result, jsonValue)); + value[kValueKey] = jsonValue; + + auto valueStr = JsonToString(value); + return gDelegate->LogJSON(valueStr.c_str()); +} + +CHIP_ERROR LogAttributeErrorAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, NSError * error) +{ + VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR); + + Json::Value value; + value[kEndpointIdKey] = [endpointId unsignedLongLongValue]; + value[kClusterIdKey] = [clusterId unsignedLongLongValue]; + value[kAttributeIdKey] = [attributeId unsignedLongLongValue]; + + auto err = MTRErrorToCHIPErrorCode(error); + auto status = chip::app::StatusIB(err); + return LogError(value, status); +} + +CHIP_ERROR LogCommandErrorAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, NSError * error) +{ + VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR); + + Json::Value value; + value[kEndpointIdKey] = [endpointId unsignedLongLongValue]; + value[kClusterIdKey] = [clusterId unsignedLongLongValue]; + value[kCommandIdKey] = [commandId unsignedLongLongValue]; + + auto err = MTRErrorToCHIPErrorCode(error); + auto status = chip::app::StatusIB(err); + return LogError(value, status); +} + +void SetDelegate(RemoteDataModelLoggerDelegate * delegate) { gDelegate = delegate; } +}; // namespace RemoteDataModelLogger diff --git a/examples/darwin-framework-tool/commands/delay/Commands.h b/examples/darwin-framework-tool/commands/delay/Commands.h new file mode 100644 index 00000000000000..1f0ecfb8e997a4 --- /dev/null +++ b/examples/darwin-framework-tool/commands/delay/Commands.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#pragma once + +#include "commands/common/Commands.h" +#include "commands/delay/SleepCommand.h" +#include "commands/delay/WaitForCommissioneeCommand.h" + +void registerCommandsDelay(Commands & commands) +{ + const char * clusterName = "Delay"; + commands_list clusterCommands = { + make_unique(), // + make_unique(), // + }; + + commands.RegisterCommandSet(clusterName, clusterCommands, "Commands for waiting for something to happen."); +} diff --git a/examples/darwin-framework-tool/commands/delay/SleepCommand.h b/examples/darwin-framework-tool/commands/delay/SleepCommand.h new file mode 100644 index 00000000000000..417bc59688b2d5 --- /dev/null +++ b/examples/darwin-framework-tool/commands/delay/SleepCommand.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "../common/CHIPCommandBridge.h" + +/** + * This command blocks the event loop processing for a given amount of time. + * + * For example when the event loop is blocked the messages coming-in will not be acked, + * forcing a retransmission on the other side. + * + */ + +class SleepCommand : public CHIPCommandBridge +{ +public: + SleepCommand() : CHIPCommandBridge("sleep") + { + AddArgument("duration-in-ms", 0, UINT32_MAX, &mDurationInMs, + "Block the event loop processing for duration-in-ms milliseconds."); + } + + /////////// CHIPCommandBridge Interface ///////// + CHIP_ERROR RunCommand() override; + chip::System::Clock::Timeout GetWaitDuration() const override + { + // The allowed duration of this method is at least as long as the time specified for blocking the + // event loop. In order to not fail on some small delays in processing some extra time before + // failing is added. + constexpr uint16_t mExtraTimeForFailure = 1000; + + return chip::System::Clock::Milliseconds32(mDurationInMs + mExtraTimeForFailure); + } + +private: + uint32_t mDurationInMs; +}; diff --git a/examples/darwin-framework-tool/commands/delay/SleepCommand.mm b/examples/darwin-framework-tool/commands/delay/SleepCommand.mm new file mode 100644 index 00000000000000..8fefd145e8acee --- /dev/null +++ b/examples/darwin-framework-tool/commands/delay/SleepCommand.mm @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "SleepCommand.h" +#include +#include + +CHIP_ERROR SleepCommand::RunCommand() +{ + std::this_thread::sleep_for(std::chrono::milliseconds(mDurationInMs)); + SetCommandExitStatus(CHIP_NO_ERROR); + return CHIP_NO_ERROR; +} diff --git a/examples/darwin-framework-tool/commands/delay/WaitForCommissioneeCommand.h b/examples/darwin-framework-tool/commands/delay/WaitForCommissioneeCommand.h new file mode 100644 index 00000000000000..053d8c04247493 --- /dev/null +++ b/examples/darwin-framework-tool/commands/delay/WaitForCommissioneeCommand.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#pragma once + +#include "../common/CHIPCommandBridge.h" +#include +#include + +NS_ASSUME_NONNULL_BEGIN +@interface MTRDeviceTestDelegate : NSObject +@property CHIPCommandBridge * commandBridge; +- (instancetype)initWithCommandBridge:(CHIPCommandBridge *)commandBridge; +- (instancetype)init NS_UNAVAILABLE; +@end +NS_ASSUME_NONNULL_END + +class WaitForCommissioneeCommand : public CHIPCommandBridge { +public: + WaitForCommissioneeCommand() + : CHIPCommandBridge("wait-for-commissionee") + , mDeviceDelegate([[MTRDeviceTestDelegate alloc] initWithCommandBridge:this]) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("expire-existing-session", 0, 1, &mExpireExistingSession); + AddArgument( + "timeout", 0, UINT64_MAX, &mTimeoutSecs, "Time, in seconds, before this command is considered to have timed out."); + } + + /////////// CHIPCommandBridge Interface ///////// + CHIP_ERROR RunCommand() override; + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeoutSecs.ValueOr(10)); + } + +private: + chip::NodeId mNodeId; + chip::Optional mTimeoutSecs; + chip::Optional mExpireExistingSession; + id _Nullable mDeviceDelegate; +}; diff --git a/examples/darwin-framework-tool/commands/delay/WaitForCommissioneeCommand.mm b/examples/darwin-framework-tool/commands/delay/WaitForCommissioneeCommand.mm new file mode 100644 index 00000000000000..a806757ac1eb85 --- /dev/null +++ b/examples/darwin-framework-tool/commands/delay/WaitForCommissioneeCommand.mm @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "WaitForCommissioneeCommand.h" + +#import "MTRDevice_Externs.h" + +@implementation MTRDeviceTestDelegate +- (instancetype)initWithCommandBridge:(CHIPCommandBridge *)commandBridge +{ + if (!(self = [super init])) { + return nil; + } + + _commandBridge = commandBridge; + return self; +} + +- (void)device:(MTRDevice *)device stateChanged:(MTRDeviceState)state +{ + if (state == MTRDeviceStateReachable) { + _commandBridge->SetCommandExitStatus(CHIP_NO_ERROR); + } else if (state == MTRDeviceStateUnreachable) { + _commandBridge->SetCommandExitStatus(CHIP_ERROR_NOT_FOUND); + } else if (state == MTRDeviceStateUnknown) { + _commandBridge->SetCommandExitStatus(CHIP_ERROR_NOT_FOUND); + } else { + // This should not happens. + chipDie(); + } +} + +- (void)device:(MTRDevice *)device receivedAttributeReport:(NSArray *> *)attributeReport +{ +} + +- (void)device:(MTRDevice *)device receivedEventReport:(NSArray *> *)eventReport +{ +} +@end + +CHIP_ERROR WaitForCommissioneeCommand::RunCommand() +{ + MTRDeviceController * commissioner = CurrentCommissioner(); + + auto * base_device = [MTRBaseDevice deviceWithNodeID:@(mNodeId) controller:commissioner]; + VerifyOrReturnError(base_device != nil, CHIP_ERROR_INCORRECT_STATE); + + if (mExpireExistingSession.ValueOr(true)) { + [base_device invalidateCASESession]; + } + base_device = nil; + + auto * device = [MTRDevice deviceWithNodeID:@(mNodeId) controller:commissioner]; + VerifyOrReturnError(device != nil, CHIP_ERROR_INCORRECT_STATE); + + auto queue = dispatch_queue_create("com.chip.wait_for_commissionee", DISPATCH_QUEUE_SERIAL); + [device setDelegate:mDeviceDelegate queue:queue]; + + return CHIP_NO_ERROR; +} diff --git a/examples/darwin-framework-tool/commands/interactive/Commands.h b/examples/darwin-framework-tool/commands/interactive/Commands.h index fdc92f45579725..96cc657048899a 100644 --- a/examples/darwin-framework-tool/commands/interactive/Commands.h +++ b/examples/darwin-framework-tool/commands/interactive/Commands.h @@ -32,6 +32,7 @@ void registerCommandsInteractive(Commands & commands) commands_list clusterCommands = { #if CONFIG_USE_INTERACTIVE_MODE make_unique(&commands), + make_unique(&commands), #endif // CONFIG_USE_INTERACTIVE_MODE }; diff --git a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.h b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.h index cff524a1c0650e..15f1303f0fe54f 100644 --- a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.h +++ b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.h @@ -21,28 +21,63 @@ #import #include "../common/CHIPCommandBridge.h" +#include "../common/RemoteDataModelLogger.h" #include "commands/common/Commands.h" #include "InteractiveCommands.h" +#include + class Commands; -class InteractiveStartCommand : public CHIPCommandBridge +class InteractiveCommand : public CHIPCommandBridge { public: - InteractiveStartCommand(Commands * commandsHandler) : CHIPCommandBridge("start"), mHandler(commandsHandler) + InteractiveCommand(const char * name, Commands * commandsHandler) : CHIPCommandBridge(name), mHandler(commandsHandler) { AddArgument( "additional-prompt", &mAdditionalPrompt, "Force printing of an additional prompt that can then be detected by something trying to script interactive mode"); } - CHIP_ERROR RunCommand() override; - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(0); } + bool ParseCommand(char * command, int * status); + +protected: + chip::Optional mAdditionalPrompt; + private: - bool ParseCommand(char * command); Commands * mHandler = nullptr; - chip::Optional mAdditionalPrompt; +}; + +class InteractiveStartCommand : public InteractiveCommand +{ +public: + InteractiveStartCommand(Commands * commandsHandler) : InteractiveCommand("start", commandsHandler) {} + + /////////// CHIPCommandBridge Interface ///////// + CHIP_ERROR RunCommand() override; +}; + +class InteractiveServerCommand : public InteractiveCommand, public WebSocketServerDelegate, public RemoteDataModelLoggerDelegate +{ +public: + InteractiveServerCommand(Commands * commandsHandler) : InteractiveCommand("server", commandsHandler) + { + AddArgument("port", 0, UINT16_MAX, &mPort, "Port the websocket will listen to. Defaults to 9002."); + } + + /////////// CHIPCommandBridge Interface ///////// + CHIP_ERROR RunCommand() override; + + /////////// WebSocketServerDelegate Interface ///////// + bool OnWebSocketMessageReceived(char * msg) override; + + /////////// RemoteDataModelLoggerDelegate interface ///////// + CHIP_ERROR LogJSON(const char * json) override; + +private: + WebSocketServer mWebSocketServer; + chip::Optional mPort; }; diff --git a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm index a3db301d6529ee..ab55be5a245cfe 100644 --- a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm +++ b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm @@ -18,6 +18,7 @@ #include "InteractiveCommands.h" +#include #include #include @@ -25,6 +26,9 @@ constexpr const char * kInteractiveModePrompt = "Stop and restart stack: [Ctrl+_] & [Ctrl+^] \nQuit Interactive: 'quit()'\n>>> "; constexpr const char * kInteractiveModeHistoryFilePath = "/tmp/darwin_framework_tool_history"; constexpr const char * kInteractiveModeStopCommand = "quit()"; +constexpr const char * kCategoryError = "Error"; +constexpr const char * kCategoryProgress = "Info"; +constexpr const char * kCategoryDetail = "Debug"; namespace { @@ -71,6 +75,187 @@ void ENFORCE_FORMAT(3, 0) LoggingCallback(const char * module, uint8_t category, chip::Logging::Platform::LogV(module, category, msg, args); ClearLine(); } + +class ScopedLock { +public: + ScopedLock(std::mutex & mutex) + : mMutex(mutex) + { + mMutex.lock(); + } + + ~ScopedLock() { mMutex.unlock(); } + +private: + std::mutex & mMutex; +}; + +struct InteractiveServerResultLog { + std::string module; + std::string message; + std::string messageType; +}; + +struct InteractiveServerResult { + bool mEnabled = false; + uint16_t mTimeout = 0; + int mStatus = EXIT_SUCCESS; + bool mIsAsyncReport = false; + std::vector mResults; + std::vector mLogs; + + // The InteractiveServerResult instance (gInteractiveServerResult) is initially + // accessed on the main thread in InteractiveServerCommand::RunCommand, which is + // when chip-tool starts in 'interactive server' mode. + // + // Then command results are normally sent over the wire onto the main thread too + // when a command is received over WebSocket in InteractiveServerCommand::OnWebSocketMessageReceived + // which for most cases runs a command onto the chip thread and block until + // it is resolved (or until it timeouts). + // + // But in the meantime, when some parts of the command result happens, it is appended + // to the mResults vector onto the chip thread. + // + // For empty commands, which means that the test suite is *waiting* for some events + // (e.g a subscription report), the command results are sent over the chip thread + // (this is the isAsyncReport use case). + // + // Finally, logs can be appended from either the chip thread or the main thread. + // + // This class should be refactored to abstract that properly and reduce the scope of + // of the mutex, but in the meantime, the access to the members of this class are + // protected by a mutex. + std::mutex mMutex; + + void Setup(bool isAsyncReport, uint16_t timeout) + { + auto lock = ScopedLock(mMutex); + mEnabled = true; + mIsAsyncReport = isAsyncReport; + mTimeout = timeout; + } + + void Reset() + { + auto lock = ScopedLock(mMutex); + + mEnabled = false; + mIsAsyncReport = false; + mTimeout = 0; + mStatus = EXIT_SUCCESS; + mResults.clear(); + mLogs.clear(); + } + + bool IsAsyncReport() + { + auto lock = ScopedLock(mMutex); + return mIsAsyncReport; + } + + void MaybeAddLog(const char * module, uint8_t category, const char * base64Message) + { + auto lock = ScopedLock(mMutex); + VerifyOrReturn(mEnabled); + + const char * messageType = nullptr; + switch (category) { + case chip::Logging::kLogCategory_Error: + messageType = kCategoryError; + break; + case chip::Logging::kLogCategory_Progress: + messageType = kCategoryProgress; + break; + case chip::Logging::kLogCategory_Detail: + messageType = kCategoryDetail; + break; + default: + // This should not happen. + chipDie(); + break; + } + + mLogs.push_back(InteractiveServerResultLog({ module, base64Message, messageType })); + } + + void MaybeAddResult(const char * result) + { + auto lock = ScopedLock(mMutex); + VerifyOrReturn(mEnabled); + + mResults.push_back(result); + } + + std::string AsJsonString() + { + auto lock = ScopedLock(mMutex); + + std::stringstream content; + content << "{"; + + content << " \"results\": ["; + if (mResults.size()) { + for (const auto & result : mResults) { + content << result << ","; + } + + // Remove last comma. + content.seekp(-1, std::ios_base::end); + } + + if (mStatus != EXIT_SUCCESS) { + if (mResults.size()) { + content << ","; + } + content << "{ \"error\": \"FAILURE\" }"; + } + content << "],"; + + content << "\"logs\": ["; + if (mLogs.size()) { + for (const auto & log : mLogs) { + content << "{" + " \"module\": \"" + + log.module + + "\"," + " \"category\": \"" + + log.messageType + + "\"," + " \"message\": \"" + + log.message + + "\"" + "},"; + } + + // Remove last comma. + content.seekp(-1, std::ios_base::end); + } + content << "]"; + + content << "}"; + return content.str(); + } +}; + +InteractiveServerResult gInteractiveServerResult; + +void ENFORCE_FORMAT(3, 0) InteractiveServerLoggingCallback(const char * module, uint8_t category, const char * msg, va_list args) +{ + va_list args_copy; + va_copy(args_copy, args); + + chip::Logging::Platform::LogV(module, category, msg, args); + + char message[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; + vsnprintf(message, sizeof(message), msg, args_copy); + va_end(args_copy); + + char base64Message[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE * 2] = {}; + chip::Base64Encode(chip::Uint8::from_char(message), static_cast(strlen(message)), base64Message); + + gInteractiveServerResult.MaybeAddLog(module, category, base64Message); +} + } // namespace char * GetCommand(const chip::Optional & mAdditionalPrompt, char * command) @@ -122,9 +307,10 @@ el_status_t StopFunction() el_bind_key(CTL('_'), StopFunction); char * command = nullptr; + int status; while (YES) { command = GetCommand(mAdditionalPrompt, command); - if (command != nullptr && !ParseCommand(command)) { + if (command != nullptr && !ParseCommand(command, &status)) { break; } } @@ -138,7 +324,54 @@ el_status_t StopFunction() return CHIP_NO_ERROR; } -bool InteractiveStartCommand::ParseCommand(char * command) +CHIP_ERROR InteractiveServerCommand::RunCommand() +{ + read_history(kInteractiveModeHistoryFilePath); + + // Logs needs to be redirected in order to refresh the screen appropriately when something + // is dumped to stdout while the user is typing a command. + chip::Logging::SetLogRedirectCallback(InteractiveServerLoggingCallback); + + RemoteDataModelLogger::SetDelegate(this); + ReturnErrorOnFailure(mWebSocketServer.Run(mPort, this)); + + gInteractiveServerResult.Reset(); + SetCommandExitStatus(CHIP_NO_ERROR); + return CHIP_NO_ERROR; +} + +bool InteractiveServerCommand::OnWebSocketMessageReceived(char * msg) +{ + bool isAsyncReport = strlen(msg) == 0; + uint16_t timeout = 0; + if (!isAsyncReport && strlen(msg) <= 5 /* Only look for numeric values <= 65535 */) { + std::stringstream ss; + ss << msg; + ss >> timeout; + if (!ss.fail()) { + isAsyncReport = true; + } + } + gInteractiveServerResult.Setup(isAsyncReport, timeout); + VerifyOrReturnValue(!isAsyncReport, true); + + auto shouldStop = ParseCommand(msg, &gInteractiveServerResult.mStatus); + mWebSocketServer.Send(gInteractiveServerResult.AsJsonString().c_str()); + gInteractiveServerResult.Reset(); + return shouldStop; +} + +CHIP_ERROR InteractiveServerCommand::LogJSON(const char * json) +{ + gInteractiveServerResult.MaybeAddResult(json); + if (gInteractiveServerResult.IsAsyncReport()) { + mWebSocketServer.Send(gInteractiveServerResult.AsJsonString().c_str()); + gInteractiveServerResult.Reset(); + } + return CHIP_NO_ERROR; +} + +bool InteractiveCommand::ParseCommand(char * command, int * status) { if (strcmp(command, kInteractiveModeStopCommand) == 0) { ExecuteDeferredCleanups(); @@ -146,6 +379,8 @@ el_status_t StopFunction() } ClearLine(); - mHandler->RunInteractive(command); + + *status = mHandler->RunInteractive(command); + return YES; } diff --git a/examples/darwin-framework-tool/main.mm b/examples/darwin-framework-tool/main.mm index 51325001e59c2e..8c96d490dc5ed8 100644 --- a/examples/darwin-framework-tool/main.mm +++ b/examples/darwin-framework-tool/main.mm @@ -21,6 +21,7 @@ #import "logging/logging.h" #include "commands/common/Commands.h" +#include "commands/delay/Commands.h" #include "commands/discover/Commands.h" #include "commands/interactive/Commands.h" #include "commands/pairing/Commands.h" @@ -38,6 +39,7 @@ int main(int argc, const char * argv[]) Commands commands; registerCommandsPairing(commands); + registerCommandsDelay(commands); registerCommandsDiscover(commands); registerCommandsInteractive(commands); registerCommandsPayload(commands); diff --git a/examples/darwin-framework-tool/templates/commands.zapt b/examples/darwin-framework-tool/templates/commands.zapt index f572311a53c2c5..9d1c98e1d1d06f 100644 --- a/examples/darwin-framework-tool/templates/commands.zapt +++ b/examples/darwin-framework-tool/templates/commands.zapt @@ -74,6 +74,10 @@ public: {{#if hasSpecificResponse}} ^(MTR{{asUpperCamelCase parent.name preserveAcronyms=true}}Cluster{{asUpperCamelCase responseName}}Params * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase responseName}}::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } {{else}} ^(NSError * _Nullable error) { {{/if}} @@ -81,6 +85,12 @@ public: if (error != nil) { mError = error; LogNSError("Error", error); + {{#if hasSpecificResponse}} + constexpr chip::CommandId responseId = chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase responseName}}::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + {{else}} + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + {{/if}} } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -153,8 +163,11 @@ public: {{~/if_is_fabric_scoped_struct~}} ^({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error) { NSLog(@"{{asUpperCamelCase parent.name preserveAcronyms=true}}.{{asUpperCamelCase name preserveAcronyms=true}} response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("{{asUpperCamelCase parent.name preserveAcronyms=true}} {{asUpperCamelCase name preserveAcronyms=true}} read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -200,17 +213,33 @@ public: {{#if_chip_complex}} {{asObjectiveCType type parent.name}} value; {{>decodable_value target="value" source="mValue" cluster=parent.name errorCode="return err;" depth=0}} - {{else if (isOctetString type)}} - {{asObjectiveCType type parent.name}} value = [[NSData alloc] initWithBytes:mValue.data() length:mValue.size()]; - {{else if (isString type)}} - {{asObjectiveCType type parent.name}} value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; {{else}} - {{asObjectiveCType type parent.name}} value = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:mValue]; + {{#if isNullable}} + {{asObjectiveCType type parent.name}} value = nil; + if (!mValue.IsNull()) { + {{#if (isOctetString type)}} + value = [[NSData alloc] initWithBytes:mValue.Value().data() length:mValue.Value().size()]; + {{else if (isString type)}} + value = [[NSString alloc] initWithBytes:mValue.Value().data() length:mValue.Value().size() encoding:NSUTF8StringEncoding]; + {{else}} + value = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:mValue.Value()]; + {{/if}} + } + {{else}} + {{#if (isOctetString type)}} + {{asObjectiveCType type parent.name}} value = [[NSData alloc] initWithBytes:mValue.data() length:mValue.size()]; + {{else if (isString type)}} + {{asObjectiveCType type parent.name}} value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + {{else}} + {{asObjectiveCType type parent.name}} value = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:mValue{{#if isNullable}}.Value(){{/if}}]; + {{/if}} + {{/if}} {{/if_chip_complex}} [cluster write{{>attribute}}WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("{{asUpperCamelCase parent.name preserveAcronyms=true}} {{asUpperCamelCase name preserveAcronyms=true}} write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -222,11 +251,11 @@ private: {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotOptional=true}} mValue; TypedComplexArgument<{{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotOptional=true}}> mComplex; {{else if (isOctetString type)}} - chip::ByteSpan mValue; + {{#if isNullable}}chip::app::DataModel::Nullable{{else}}chip::ByteSpan{{/if}} mValue; {{else if (isCharString type)}} - chip::ByteSpan mValue; + {{#if isNullable}}chip::app::DataModel::Nullable{{else}}chip::ByteSpan{{/if}} mValue; {{else}} - {{as_underlying_zcl_type type}} mValue; + {{#if isNullable}}chip::app::DataModel::Nullable<{{as_underlying_zcl_type type}}>{{else}}{{as_underlying_zcl_type type}}{{/if}} mValue; {{/if_chip_complex}} }; @@ -265,6 +294,11 @@ public: subscriptionEstablished:^(){ mSubscriptionEstablished=YES; } reportHandler:^({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error) { NSLog(@"{{asUpperCamelCase parent.name preserveAcronyms=true}}.{{asUpperCamelCase name preserveAcronyms=true}} response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; diff --git a/scripts/tests/yaml/chiptool.py b/scripts/tests/yaml/chiptool.py index 757d304312d77b..60fc542d572311 100755 --- a/scripts/tests/yaml/chiptool.py +++ b/scripts/tests/yaml/chiptool.py @@ -16,64 +16,15 @@ import relative_importer # isort: split # noqa: F401 -import asyncio -import json import sys from typing import List import click -from matter_chip_tool_adapter.decoder import MatterLog -from matter_yamltests.websocket_runner import WebSocketRunner, WebSocketRunnerConfig from paths_finder import PathsFinder -from runner import CONTEXT_SETTINGS, chiptool, runner_base -from tests_logger import TestColoredLogPrinter, WebSocketRunnerLogger +from runner import CONTEXT_SETTINGS, chiptool +from tests_tool import send_raw_command, send_yaml_command _DEFAULT_EXTENSIONS_DIR = 'scripts/tests/yaml/extensions' - - -@click.pass_context -def send_yaml_command(ctx, test_name: str, server_path: str, server_arguments: str, show_adapter_logs: bool, pics: str, additional_pseudo_clusters_directory: str, commands: List[str]): - kwargs = {'test_name': test_name, 'show_adapter_logs': show_adapter_logs, 'pics': pics, - 'additional_pseudo_clusters_directory': additional_pseudo_clusters_directory} - - index = 0 - while len(commands) - index > 1: - kwargs[commands[index].replace('--', '')] = commands[index+1] - index += 2 - ctx.invoke(runner_base, **kwargs) - - del ctx.params['commands'] - del ctx.params['pics'] - del ctx.params['additional_pseudo_clusters_directory'] - - return ctx.forward(chiptool) - - -def send_raw_command(command: str, server_path: str, server_arguments: str): - websocket_runner_hooks = WebSocketRunnerLogger() - websocket_runner_config = WebSocketRunnerConfig( - server_path=server_path, server_arguments=server_arguments, hooks=websocket_runner_hooks) - runner = WebSocketRunner(websocket_runner_config) - - async def send_over_websocket(): - payload = None - try: - await runner.start() - payload = await runner.execute(command) - finally: - await runner.stop() - return payload - - payload = asyncio.run(send_over_websocket()) - json_payload = json.loads(payload) - - log_printer = TestColoredLogPrinter() - log_printer.print(MatterLog.decode_logs(json_payload.get('logs'))) - - success = not bool(len([lambda x: x.get('error') for x in json_payload.get('results')])) - return success - - _DEFAULT_PICS_FILE = 'src/app/tests/suites/certification/ci-pics-values' @@ -136,7 +87,7 @@ def chiptool_py(ctx, commands: List[str], server_path: str, server_name: str, se maybe_update_stop_on_error(ctx) if len(commands) > 1 and commands[0] == 'tests': - success = send_yaml_command(commands[1], server_path, server_arguments, show_adapter_logs, pics, + success = send_yaml_command(chiptool, commands[1], server_path, server_arguments, show_adapter_logs, pics, additional_pseudo_clusters_directory, commands[2:]) else: if server_path is None and server_name: diff --git a/scripts/tests/yaml/darwinframeworktool.py b/scripts/tests/yaml/darwinframeworktool.py new file mode 100755 index 00000000000000..77ab3d8b813716 --- /dev/null +++ b/scripts/tests/yaml/darwinframeworktool.py @@ -0,0 +1,85 @@ +#!/usr/bin/env -S python3 -B + +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import relative_importer # isort: split # noqa: F401 + +import sys +from typing import List + +import click +from paths_finder import PathsFinder +from runner import CONTEXT_SETTINGS, darwinframeworktool +from tests_tool import send_raw_command, send_yaml_command + +_DEFAULT_EXTENSIONS_DIR = 'scripts/tests/yaml/extensions' +_DEFAULT_PICS_FILE = 'src/app/tests/suites/certification/ci-pics-values' + + +def darwinframeworktool_runner_options(f): + f = click.option('--server_path', type=click.Path(exists=True), default=None, + help='Path to an websocket server to run at launch.')(f) + f = click.option('--server_name', type=str, default='darwin-framework-tool', + help='Name of a websocket server to run at launch.')(f) + f = click.option('--server_arguments', type=str, default='interactive server', + help='Optional arguments to pass to the websocket server at launch.')(f) + f = click.option('--show_adapter_logs', type=bool, default=False, show_default=True, + help='Show additional logs provided by the adapter.')(f) + f = click.option('--delay-in-ms', '--delayInMs', type=int, default=0, show_default=True, + help='Add a delay between each test suite steps.')(f) + f = click.option('--continueOnFailure', type=bool, default=False, show_default=True, + help='Do not stop running the test suite on first error.')(f) + f = click.option('--PICS', type=click.Path(exists=True), show_default=True, default=_DEFAULT_PICS_FILE, + help='Path to the PICS file to use.')(f) + f = click.option('--additional_pseudo_clusters_directory', type=click.Path(), show_default=True, default=_DEFAULT_EXTENSIONS_DIR, + help='Path to a directory containing additional pseudo clusters.')(f) + return f + + +CONTEXT_SETTINGS['ignore_unknown_options'] = True +CONTEXT_SETTINGS['default_map']['darwinframeworktool']['use_test_harness_log_format'] = True + + +def maybe_update_stop_on_error(ctx): + if ctx.params['continueonfailure']: + ctx.params['stop_on_error'] = False + + del ctx.params['continueonfailure'] + + +@click.command(context_settings=CONTEXT_SETTINGS) +@click.argument('commands', nargs=-1) +@darwinframeworktool_runner_options +@click.pass_context +def darwinframeworktool_py(ctx, commands: List[str], server_path: str, server_name: str, server_arguments: str, show_adapter_logs: bool, delay_in_ms: int, continueonfailure: bool, pics: str, additional_pseudo_clusters_directory: str): + success = False + + server_arguments = ctx.params['server_arguments'] + maybe_update_stop_on_error(ctx) + + if len(commands) > 1 and commands[0] == 'tests': + success = send_yaml_command(darwinframeworktool, commands[1], server_path, server_arguments, show_adapter_logs, pics, + additional_pseudo_clusters_directory, commands[2:]) + else: + if server_path is None and server_name: + paths_finder = PathsFinder() + server_path = paths_finder.get(server_name) + success = send_raw_command(' '.join(commands), server_path, server_arguments) + + sys.exit(0 if success else 1) + + +if __name__ == '__main__': + darwinframeworktool_py() diff --git a/scripts/tests/yaml/runner.py b/scripts/tests/yaml/runner.py index 04f30401eb1b02..073726fa7e4813 100755 --- a/scripts/tests/yaml/runner.py +++ b/scripts/tests/yaml/runner.py @@ -224,6 +224,11 @@ def __add_custom_params(self, ctx): 'server_name': 'chip-tool', 'server_arguments': 'interactive server', }, + 'darwinframeworktool': { + 'adapter': 'matter_chip_tool_adapter.adapter', + 'server_name': 'darwin-framework-tool', + 'server_arguments': 'interactive server', + }, 'app1': { 'configuration_directory': 'examples/placeholder/linux/apps/app1', 'adapter': 'matter_placeholder_adapter.adapter', @@ -349,6 +354,15 @@ def chiptool(ctx, *args, **kwargs): return ctx.forward(websocket) +@runner_base.command() +@test_runner_options +@websocket_runner_options +@click.pass_context +def darwinframeworktool(ctx, *args, **kwargs): + """Run the test suite using darwin-framework-tool.""" + return ctx.forward(websocket) + + @runner_base.command() @test_runner_options @websocket_runner_options diff --git a/scripts/tests/yaml/tests_tool.py b/scripts/tests/yaml/tests_tool.py new file mode 100644 index 00000000000000..65883a4bf8def5 --- /dev/null +++ b/scripts/tests/yaml/tests_tool.py @@ -0,0 +1,68 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import relative_importer # isort: split # noqa: F401 + +import asyncio +import json +from typing import List + +import click +from matter_chip_tool_adapter.decoder import MatterLog +from matter_yamltests.websocket_runner import WebSocketRunner, WebSocketRunnerConfig +from runner import runner_base +from tests_logger import TestColoredLogPrinter, WebSocketRunnerLogger + + +@click.pass_context +def send_yaml_command(ctx, test_tool, test_name: str, server_path: str, server_arguments: str, show_adapter_logs: bool, pics: str, additional_pseudo_clusters_directory: str, commands: List[str]): + kwargs = {'test_name': test_name, 'show_adapter_logs': show_adapter_logs, 'pics': pics, + 'additional_pseudo_clusters_directory': additional_pseudo_clusters_directory} + + index = 0 + while len(commands) - index > 1: + kwargs[commands[index].replace('--', '')] = commands[index+1] + index += 2 + ctx.invoke(runner_base, **kwargs) + + del ctx.params['commands'] + del ctx.params['pics'] + del ctx.params['additional_pseudo_clusters_directory'] + + return ctx.forward(test_tool) + + +def send_raw_command(command: str, server_path: str, server_arguments: str): + websocket_runner_hooks = WebSocketRunnerLogger() + websocket_runner_config = WebSocketRunnerConfig( + server_path=server_path, server_arguments=server_arguments, hooks=websocket_runner_hooks) + runner = WebSocketRunner(websocket_runner_config) + + async def send_over_websocket(): + payload = None + try: + await runner.start() + payload = await runner.execute(command) + finally: + await runner.stop() + return payload + + payload = asyncio.run(send_over_websocket()) + json_payload = json.loads(payload) + + log_printer = TestColoredLogPrinter() + log_printer.print(MatterLog.decode_logs(json_payload.get('logs'))) + + success = not bool(len([lambda x: x.get('error') for x in json_payload.get('results')])) + return success diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index fc6fcc5c7f2c13..6f901de32ab3d5 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -259,6 +259,49 @@ B2E0D7B8245B0B5C003C5B48 /* MTRSetupPayload.h in Headers */ = {isa = PBXBuildFile; fileRef = B2E0D7AF245B0B5C003C5B48 /* MTRSetupPayload.h */; settings = {ATTRIBUTES = (Public, ); }; }; B2E0D7B9245B0B5C003C5B48 /* MTRSetupPayload.mm in Sources */ = {isa = PBXBuildFile; fileRef = B2E0D7B0245B0B5C003C5B48 /* MTRSetupPayload.mm */; }; B2F53AF2245B0DCF0010745E /* MTRSetupPayloadParserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B2F53AF1245B0DCF0010745E /* MTRSetupPayloadParserTests.m */; }; + B45373AA2A9FE73400807602 /* WebSocketServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B45373A92A9FE73400807602 /* WebSocketServer.cpp */; }; + B45373BD2A9FEA9100807602 /* service.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B22A9FEA9000807602 /* service.c */; }; + B45373BE2A9FEA9100807602 /* network.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B32A9FEA9000807602 /* network.c */; }; + B45373BF2A9FEA9100807602 /* adopt.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B42A9FEA9000807602 /* adopt.c */; }; + B45373C02A9FEA9100807602 /* output.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B52A9FEA9000807602 /* output.c */; }; + B45373C12A9FEA9100807602 /* close.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B62A9FEA9000807602 /* close.c */; }; + B45373C22A9FEA9100807602 /* vhost.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B72A9FEA9000807602 /* vhost.c */; }; + B45373C32A9FEA9100807602 /* wsi.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B82A9FEA9000807602 /* wsi.c */; }; + B45373C42A9FEA9100807602 /* dummy-callback.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373B92A9FEA9000807602 /* dummy-callback.c */; }; + B45373C52A9FEA9100807602 /* wsi-timeout.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373BA2A9FEA9000807602 /* wsi-timeout.c */; }; + B45373C62A9FEA9100807602 /* sorted-usec-list.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373BB2A9FEA9100807602 /* sorted-usec-list.c */; }; + B45373C72A9FEA9100807602 /* pollfd.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373BC2A9FEA9100807602 /* pollfd.c */; }; + B45373D12A9FEB0C00807602 /* alloc.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373CA2A9FEB0C00807602 /* alloc.c */; }; + B45373D22A9FEB0C00807602 /* buflist.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373CB2A9FEB0C00807602 /* buflist.c */; }; + B45373D32A9FEB0C00807602 /* libwebsockets.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373CC2A9FEB0C00807602 /* libwebsockets.c */; }; + B45373D42A9FEB0C00807602 /* context.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373CD2A9FEB0C00807602 /* context.c */; }; + B45373D52A9FEB0C00807602 /* logs.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373CE2A9FEB0C00807602 /* logs.c */; }; + B45373D72A9FEB0C00807602 /* lws_dll2.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373D02A9FEB0C00807602 /* lws_dll2.c */; }; + B45373D92A9FEB3800807602 /* poll.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373D82A9FEB3800807602 /* poll.c */; }; + B45373DC2A9FEB5300807602 /* sha-1.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373DA2A9FEB5300807602 /* sha-1.c */; }; + B45373DD2A9FEB5300807602 /* base64-decode.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373DB2A9FEB5300807602 /* base64-decode.c */; }; + B45373DF2A9FEB6F00807602 /* system.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373DE2A9FEB6F00807602 /* system.c */; }; + B45373E12A9FEB7F00807602 /* ops-h1.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373E02A9FEB7F00807602 /* ops-h1.c */; }; + B45373E52A9FEBA400807602 /* date.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373E22A9FEBA400807602 /* date.c */; }; + B45373E62A9FEBA400807602 /* header.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373E32A9FEBA400807602 /* header.c */; }; + B45373E72A9FEBA400807602 /* parsers.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373E42A9FEBA400807602 /* parsers.c */; }; + B45373E92A9FEBC100807602 /* server.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373E82A9FEBC100807602 /* server.c */; }; + B45373EB2A9FEBDB00807602 /* ops-listen.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373EA2A9FEBDB00807602 /* ops-listen.c */; }; + B45373ED2A9FEBEC00807602 /* ops-pipe.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373EC2A9FEBEC00807602 /* ops-pipe.c */; }; + B45373EF2A9FEBFE00807602 /* ops-raw-skt.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373EE2A9FEBFE00807602 /* ops-raw-skt.c */; }; + B45373F22A9FEC1A00807602 /* ops-ws.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F02A9FEC1A00807602 /* ops-ws.c */; }; + B45373F32A9FEC1A00807602 /* server-ws.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F12A9FEC1A00807602 /* server-ws.c */; }; + B45373FB2A9FEC4F00807602 /* unix-service.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F42A9FEC4F00807602 /* unix-service.c */; }; + B45373FC2A9FEC4F00807602 /* unix-caps.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F52A9FEC4F00807602 /* unix-caps.c */; }; + B45373FD2A9FEC4F00807602 /* unix-pipe.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F62A9FEC4F00807602 /* unix-pipe.c */; }; + B45373FE2A9FEC4F00807602 /* unix-fds.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F72A9FEC4F00807602 /* unix-fds.c */; }; + B45373FF2A9FEC4F00807602 /* unix-misc.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F82A9FEC4F00807602 /* unix-misc.c */; }; + B45374002A9FEC4F00807602 /* unix-init.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373F92A9FEC4F00807602 /* unix-init.c */; }; + B45374012A9FEC4F00807602 /* unix-sockets.c in Sources */ = {isa = PBXBuildFile; fileRef = B45373FA2A9FEC4F00807602 /* unix-sockets.c */; }; + B4E262162AA0CF1C00DBA5BC /* RemoteDataModelLogger.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4E262122AA0C7A300DBA5BC /* RemoteDataModelLogger.mm */; }; + B4E262172AA0CF2000DBA5BC /* RemoteDataModelLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = B4E262132AA0C7A300DBA5BC /* RemoteDataModelLogger.h */; }; + B4E2621B2AA0D02000DBA5BC /* SleepCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4E262192AA0D01D00DBA5BC /* SleepCommand.mm */; }; + B4E2621E2AA0D02D00DBA5BC /* WaitForCommissioneeCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4E2621C2AA0D02A00DBA5BC /* WaitForCommissioneeCommand.mm */; }; BA09EB43247477BA00605257 /* libCHIP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BA09EB3F2474762900605257 /* libCHIP.a */; }; D4772A46285AE98400383630 /* MTRClusterConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = D4772A45285AE98300383630 /* MTRClusterConstants.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ @@ -581,6 +624,49 @@ B2E0D7AF245B0B5C003C5B48 /* MTRSetupPayload.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRSetupPayload.h; sourceTree = ""; }; B2E0D7B0245B0B5C003C5B48 /* MTRSetupPayload.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRSetupPayload.mm; sourceTree = ""; }; B2F53AF1245B0DCF0010745E /* MTRSetupPayloadParserTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRSetupPayloadParserTests.m; sourceTree = ""; }; + B45373A92A9FE73400807602 /* WebSocketServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebSocketServer.cpp; sourceTree = ""; }; + B45373B22A9FEA9000807602 /* service.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = service.c; path = "repo/lib/core-net/service.c"; sourceTree = ""; }; + B45373B32A9FEA9000807602 /* network.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = network.c; path = "repo/lib/core-net/network.c"; sourceTree = ""; }; + B45373B42A9FEA9000807602 /* adopt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = adopt.c; path = "repo/lib/core-net/adopt.c"; sourceTree = ""; }; + B45373B52A9FEA9000807602 /* output.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = output.c; path = "repo/lib/core-net/output.c"; sourceTree = ""; }; + B45373B62A9FEA9000807602 /* close.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = close.c; path = "repo/lib/core-net/close.c"; sourceTree = ""; }; + B45373B72A9FEA9000807602 /* vhost.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vhost.c; path = "repo/lib/core-net/vhost.c"; sourceTree = ""; }; + B45373B82A9FEA9000807602 /* wsi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wsi.c; path = "repo/lib/core-net/wsi.c"; sourceTree = ""; }; + B45373B92A9FEA9000807602 /* dummy-callback.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "dummy-callback.c"; path = "repo/lib/core-net/dummy-callback.c"; sourceTree = ""; }; + B45373BA2A9FEA9000807602 /* wsi-timeout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "wsi-timeout.c"; path = "repo/lib/core-net/wsi-timeout.c"; sourceTree = ""; }; + B45373BB2A9FEA9100807602 /* sorted-usec-list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "sorted-usec-list.c"; path = "repo/lib/core-net/sorted-usec-list.c"; sourceTree = ""; }; + B45373BC2A9FEA9100807602 /* pollfd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pollfd.c; path = "repo/lib/core-net/pollfd.c"; sourceTree = ""; }; + B45373CA2A9FEB0C00807602 /* alloc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = alloc.c; path = repo/lib/core/alloc.c; sourceTree = ""; }; + B45373CB2A9FEB0C00807602 /* buflist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = buflist.c; path = repo/lib/core/buflist.c; sourceTree = ""; }; + B45373CC2A9FEB0C00807602 /* libwebsockets.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = libwebsockets.c; path = repo/lib/core/libwebsockets.c; sourceTree = ""; }; + B45373CD2A9FEB0C00807602 /* context.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = context.c; path = repo/lib/core/context.c; sourceTree = ""; }; + B45373CE2A9FEB0C00807602 /* logs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = logs.c; path = repo/lib/core/logs.c; sourceTree = ""; }; + B45373D02A9FEB0C00807602 /* lws_dll2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lws_dll2.c; path = repo/lib/core/lws_dll2.c; sourceTree = ""; }; + B45373D82A9FEB3800807602 /* poll.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = poll.c; path = "repo/lib/event-libs/poll/poll.c"; sourceTree = ""; }; + B45373DA2A9FEB5300807602 /* sha-1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "sha-1.c"; path = "repo/lib/misc/sha-1.c"; sourceTree = ""; }; + B45373DB2A9FEB5300807602 /* base64-decode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "base64-decode.c"; path = "repo/lib/misc/base64-decode.c"; sourceTree = ""; }; + B45373DE2A9FEB6F00807602 /* system.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = system.c; path = repo/lib/system/system.c; sourceTree = ""; }; + B45373E02A9FEB7F00807602 /* ops-h1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ops-h1.c"; path = "repo/lib/roles/h1/ops-h1.c"; sourceTree = ""; }; + B45373E22A9FEBA400807602 /* date.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = date.c; path = repo/lib/roles/http/date.c; sourceTree = ""; }; + B45373E32A9FEBA400807602 /* header.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = header.c; path = repo/lib/roles/http/header.c; sourceTree = ""; }; + B45373E42A9FEBA400807602 /* parsers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = parsers.c; path = repo/lib/roles/http/parsers.c; sourceTree = ""; }; + B45373E82A9FEBC100807602 /* server.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = server.c; path = repo/lib/roles/http/server/server.c; sourceTree = ""; }; + B45373EA2A9FEBDB00807602 /* ops-listen.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ops-listen.c"; path = "repo/lib/roles/listen/ops-listen.c"; sourceTree = ""; }; + B45373EC2A9FEBEC00807602 /* ops-pipe.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ops-pipe.c"; path = "repo/lib/roles/pipe/ops-pipe.c"; sourceTree = ""; }; + B45373EE2A9FEBFE00807602 /* ops-raw-skt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ops-raw-skt.c"; path = "repo/lib/roles/raw-skt/ops-raw-skt.c"; sourceTree = ""; }; + B45373F02A9FEC1A00807602 /* ops-ws.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "ops-ws.c"; path = "repo/lib/roles/ws/ops-ws.c"; sourceTree = ""; }; + B45373F12A9FEC1A00807602 /* server-ws.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "server-ws.c"; path = "repo/lib/roles/ws/server-ws.c"; sourceTree = ""; }; + B45373F42A9FEC4F00807602 /* unix-service.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-service.c"; path = "repo/lib/plat/unix/unix-service.c"; sourceTree = ""; }; + B45373F52A9FEC4F00807602 /* unix-caps.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-caps.c"; path = "repo/lib/plat/unix/unix-caps.c"; sourceTree = ""; }; + B45373F62A9FEC4F00807602 /* unix-pipe.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-pipe.c"; path = "repo/lib/plat/unix/unix-pipe.c"; sourceTree = ""; }; + B45373F72A9FEC4F00807602 /* unix-fds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-fds.c"; path = "repo/lib/plat/unix/unix-fds.c"; sourceTree = ""; }; + B45373F82A9FEC4F00807602 /* unix-misc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-misc.c"; path = "repo/lib/plat/unix/unix-misc.c"; sourceTree = ""; }; + B45373F92A9FEC4F00807602 /* unix-init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-init.c"; path = "repo/lib/plat/unix/unix-init.c"; sourceTree = ""; }; + B45373FA2A9FEC4F00807602 /* unix-sockets.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "unix-sockets.c"; path = "repo/lib/plat/unix/unix-sockets.c"; sourceTree = ""; }; + B4E262122AA0C7A300DBA5BC /* RemoteDataModelLogger.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteDataModelLogger.mm; sourceTree = ""; }; + B4E262132AA0C7A300DBA5BC /* RemoteDataModelLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteDataModelLogger.h; sourceTree = ""; }; + B4E262192AA0D01D00DBA5BC /* SleepCommand.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SleepCommand.mm; sourceTree = ""; }; + B4E2621C2AA0D02A00DBA5BC /* WaitForCommissioneeCommand.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WaitForCommissioneeCommand.mm; sourceTree = ""; }; BA09EB3F2474762900605257 /* libCHIP.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCHIP.a; path = lib/libCHIP.a; sourceTree = BUILT_PRODUCTS_DIR; }; BA107AEE2470CFBB004287EB /* chip_xcode_build_connector.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = chip_xcode_build_connector.sh; sourceTree = ""; }; D437613E285BDC0D0051FEA2 /* MTRErrorTestUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRErrorTestUtils.h; sourceTree = ""; }; @@ -639,6 +725,8 @@ 039546872991C400006D42A8 /* chip-tool */, 037C3D7B2991BD4F00B7EEE2 /* commands */, 037C3DAA2991BD4F00B7EEE2 /* logging */, + B45373AD2A9FE9BF00807602 /* libwebsockets */, + B4551B352A9FE53800331CD1 /* websocket-server */, ); name = "darwin-framework-tool"; path = "../../../examples/darwin-framework-tool"; @@ -647,6 +735,7 @@ 037C3D7B2991BD4F00B7EEE2 /* commands */ = { isa = PBXGroup; children = ( + B4E262182AA0CFFE00DBA5BC /* delay */, 03FB93DA2A46200A0048CB35 /* discover */, 037C3D7C2991BD4F00B7EEE2 /* pairing */, 037C3D852991BD4F00B7EEE2 /* clusters */, @@ -732,6 +821,8 @@ 037C3D9B2991BD4F00B7EEE2 /* common */ = { isa = PBXGroup; children = ( + B4E262132AA0C7A300DBA5BC /* RemoteDataModelLogger.h */, + B4E262122AA0C7A300DBA5BC /* RemoteDataModelLogger.mm */, 037C3D9C2991BD4F00B7EEE2 /* CHIPCommandBridge.mm */, 037C3D9D2991BD4F00B7EEE2 /* CHIPToolKeypair.mm */, 037C3D9E2991BD4F00B7EEE2 /* CHIPToolKeypair.h */, @@ -1173,6 +1264,70 @@ path = CHIPTests; sourceTree = ""; }; + B45373AD2A9FE9BF00807602 /* libwebsockets */ = { + isa = PBXGroup; + children = ( + B45373F52A9FEC4F00807602 /* unix-caps.c */, + B45373F72A9FEC4F00807602 /* unix-fds.c */, + B45373F92A9FEC4F00807602 /* unix-init.c */, + B45373F82A9FEC4F00807602 /* unix-misc.c */, + B45373F62A9FEC4F00807602 /* unix-pipe.c */, + B45373F42A9FEC4F00807602 /* unix-service.c */, + B45373FA2A9FEC4F00807602 /* unix-sockets.c */, + B45373F02A9FEC1A00807602 /* ops-ws.c */, + B45373F12A9FEC1A00807602 /* server-ws.c */, + B45373EE2A9FEBFE00807602 /* ops-raw-skt.c */, + B45373EC2A9FEBEC00807602 /* ops-pipe.c */, + B45373EA2A9FEBDB00807602 /* ops-listen.c */, + B45373E82A9FEBC100807602 /* server.c */, + B45373E22A9FEBA400807602 /* date.c */, + B45373E32A9FEBA400807602 /* header.c */, + B45373E42A9FEBA400807602 /* parsers.c */, + B45373E02A9FEB7F00807602 /* ops-h1.c */, + B45373DE2A9FEB6F00807602 /* system.c */, + B45373DB2A9FEB5300807602 /* base64-decode.c */, + B45373DA2A9FEB5300807602 /* sha-1.c */, + B45373D82A9FEB3800807602 /* poll.c */, + B45373CA2A9FEB0C00807602 /* alloc.c */, + B45373CB2A9FEB0C00807602 /* buflist.c */, + B45373CD2A9FEB0C00807602 /* context.c */, + B45373CC2A9FEB0C00807602 /* libwebsockets.c */, + B45373CE2A9FEB0C00807602 /* logs.c */, + B45373D02A9FEB0C00807602 /* lws_dll2.c */, + B45373B42A9FEA9000807602 /* adopt.c */, + B45373B62A9FEA9000807602 /* close.c */, + B45373B92A9FEA9000807602 /* dummy-callback.c */, + B45373B32A9FEA9000807602 /* network.c */, + B45373B52A9FEA9000807602 /* output.c */, + B45373BC2A9FEA9100807602 /* pollfd.c */, + B45373B22A9FEA9000807602 /* service.c */, + B45373BB2A9FEA9100807602 /* sorted-usec-list.c */, + B45373B72A9FEA9000807602 /* vhost.c */, + B45373BA2A9FEA9000807602 /* wsi-timeout.c */, + B45373B82A9FEA9000807602 /* wsi.c */, + ); + name = libwebsockets; + path = ../../third_party/libwebsockets; + sourceTree = ""; + }; + B4551B352A9FE53800331CD1 /* websocket-server */ = { + isa = PBXGroup; + children = ( + B45373A92A9FE73400807602 /* WebSocketServer.cpp */, + ); + name = "websocket-server"; + path = "../common/websocket-server"; + sourceTree = ""; + }; + B4E262182AA0CFFE00DBA5BC /* delay */ = { + isa = PBXGroup; + children = ( + B4E2621C2AA0D02A00DBA5BC /* WaitForCommissioneeCommand.mm */, + B4E262192AA0D01D00DBA5BC /* SleepCommand.mm */, + ); + path = delay; + sourceTree = ""; + }; BA09EB3E2474762900605257 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -1216,6 +1371,7 @@ 037C3DBD2991BD5000B7EEE2 /* OTAProviderDelegate.h in Headers */, 037C3DB02991BD4F00B7EEE2 /* Commands.h in Headers */, 037C3DC02991BD5100B7EEE2 /* Commands.h in Headers */, + B4E262172AA0CF2000DBA5BC /* RemoteDataModelLogger.h in Headers */, 037C3DCB2991BD5100B7EEE2 /* CHIPCommandStorageDelegate.h in Headers */, 037C3DD32991BD5200B7EEE2 /* logging.h in Headers */, 037C3DB72991BD5000B7EEE2 /* ModelCommandBridge.h in Headers */, @@ -1468,22 +1624,53 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + B45373C32A9FEA9100807602 /* wsi.c in Sources */, + B45373D42A9FEB0C00807602 /* context.c in Sources */, + B45373D32A9FEB0C00807602 /* libwebsockets.c in Sources */, + B45373C12A9FEA9100807602 /* close.c in Sources */, 039546A62991E151006D42A8 /* InteractionModel.cpp in Sources */, + B45373E72A9FEBA400807602 /* parsers.c in Sources */, + B45373BF2A9FEA9100807602 /* adopt.c in Sources */, + B45373F32A9FEC1A00807602 /* server-ws.c in Sources */, 03F430AA2994113500166449 /* sysunix.c in Sources */, + B45373C42A9FEA9100807602 /* dummy-callback.c in Sources */, 039145E82993179300257B3E /* GetCommissionerNodeIdCommand.mm in Sources */, 0395469F2991DFC5006D42A8 /* json_reader.cpp in Sources */, + B45373D22A9FEB0C00807602 /* buflist.c in Sources */, + B45373D72A9FEB0C00807602 /* lws_dll2.c in Sources */, + B45373FE2A9FEC4F00807602 /* unix-fds.c in Sources */, + B45373C72A9FEA9100807602 /* pollfd.c in Sources */, + B45373BE2A9FEA9100807602 /* network.c in Sources */, + B45373BD2A9FEA9100807602 /* service.c in Sources */, 0395469E2991DFC5006D42A8 /* json_writer.cpp in Sources */, 03FB93E02A46200A0048CB35 /* DiscoverCommissionablesCommand.mm in Sources */, + B45373EF2A9FEBFE00807602 /* ops-raw-skt.c in Sources */, 037C3DD52991C2E200B7EEE2 /* CHIPCommandBridge.mm in Sources */, 039546BC2991E1CB006D42A8 /* LogCommands.cpp in Sources */, 039547042992D9BF006D42A8 /* ota-provider.cpp in Sources */, 039547022992D952006D42A8 /* privilege-storage.cpp in Sources */, + B45373E12A9FEB7F00807602 /* ops-h1.c in Sources */, + B45373EB2A9FEBDB00807602 /* ops-listen.c in Sources */, 0382FA2C2992F06C00247BBB /* Commands.cpp in Sources */, + B45373FD2A9FEC4F00807602 /* unix-pipe.c in Sources */, + B45373C52A9FEA9100807602 /* wsi-timeout.c in Sources */, + B4E2621E2AA0D02D00DBA5BC /* WaitForCommissioneeCommand.mm in Sources */, 03F430A7299410C000166449 /* ExamplePersistentStorage.cpp in Sources */, + B45373AA2A9FE73400807602 /* WebSocketServer.cpp in Sources */, + B45373E62A9FEBA400807602 /* header.c in Sources */, + B45374002A9FEC4F00807602 /* unix-init.c in Sources */, + B45373DF2A9FEB6F00807602 /* system.c in Sources */, 039547032992D991006D42A8 /* MTRIMDispatch.mm in Sources */, 039546BD2991E1CB006D42A8 /* SystemCommands.cpp in Sources */, + B45373FC2A9FEC4F00807602 /* unix-caps.c in Sources */, + B4E262162AA0CF1C00DBA5BC /* RemoteDataModelLogger.mm in Sources */, + B45373ED2A9FEBEC00807602 /* ops-pipe.c in Sources */, + B45373C02A9FEA9100807602 /* output.c in Sources */, 0395470F2992DB37006D42A8 /* complete.c in Sources */, 039546BE2991E1CB006D42A8 /* DelayCommands.cpp in Sources */, + B4E2621B2AA0D02000DBA5BC /* SleepCommand.mm in Sources */, + B45373FF2A9FEC4F00807602 /* unix-misc.c in Sources */, + B45373D92A9FEB3800807602 /* poll.c in Sources */, 037C3DC12991BD5100B7EEE2 /* SetupPayloadParseCommand.mm in Sources */, 037C3DBF2991BD5100B7EEE2 /* OTAProviderDelegate.mm in Sources */, 037C3DD02991BD5200B7EEE2 /* InteractiveCommands.mm in Sources */, @@ -1493,17 +1680,28 @@ 039546A12991DFC5006D42A8 /* json_value.cpp in Sources */, 0382FA322992FDCE00247BBB /* MTRFramework.mm in Sources */, 0382FA302992F40C00247BBB /* ComplexArgumentParser.cpp in Sources */, + B45373DD2A9FEB5300807602 /* base64-decode.c in Sources */, 039145E12993102B00257B3E /* main.mm in Sources */, 037C3DD42991BD5200B7EEE2 /* logging.mm in Sources */, + B45374012A9FEC4F00807602 /* unix-sockets.c in Sources */, 03F430A82994112B00166449 /* editline.c in Sources */, + B45373E92A9FEBC100807602 /* server.c in Sources */, 037C3DB32991BD5000B7EEE2 /* OpenCommissioningWindowCommand.mm in Sources */, 037C3DAE2991BD4F00B7EEE2 /* PairingCommandBridge.mm in Sources */, + B45373FB2A9FEC4F00807602 /* unix-service.c in Sources */, + B45373F22A9FEC1A00807602 /* ops-ws.c in Sources */, 037C3DCA2991BD5100B7EEE2 /* CHIPCommandStorageDelegate.mm in Sources */, 037C3DCF2991BD5200B7EEE2 /* MTRError.mm in Sources */, 037C3DC72991BD5100B7EEE2 /* CHIPToolKeypair.mm in Sources */, + B45373E52A9FEBA400807602 /* date.c in Sources */, + B45373DC2A9FEB5300807602 /* sha-1.c in Sources */, + B45373D12A9FEB0C00807602 /* alloc.c in Sources */, + B45373C62A9FEA9100807602 /* sorted-usec-list.c in Sources */, 037C3DB62991BD5000B7EEE2 /* ModelCommandBridge.mm in Sources */, + B45373C22A9FEA9100807602 /* vhost.c in Sources */, 037C3DB42991BD5000B7EEE2 /* DeviceControllerDelegateBridge.mm in Sources */, 039547012992D461006D42A8 /* generic-callback-stubs.cpp in Sources */, + B45373D52A9FEB0C00807602 /* logs.c in Sources */, 0382FA312992FD6E00247BBB /* MTRLogging.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1659,8 +1857,22 @@ "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/gen/include", "$(CHIP_ROOT)/third_party/inipp/repo/inipp", "$(CHIP_ROOT)/third_party/editline/include", + "$(CHIP_ROOT)/third_party/libwebsockets/", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/include", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/core", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/core-net", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/plat/unix", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/secure-streams", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/event-libs", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/system/metrics", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles/http", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles/h1", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles/ws", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/system/async-dns", "$(CHIP_ROOT)/examples/chip-tool", "$(CHIP_ROOT)/examples/chip-tool/commands/clusters", + "$(CHIP_ROOT)/examples/common", "$(CHIP_ROOT)/zzz_generated/chip-tool", ); LD_RUNPATH_SEARCH_PATHS = ( @@ -1671,6 +1883,8 @@ "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/lib", "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/obj/src/app/lib", ); + OTHER_CFLAGS = "-DLWS_PLAT_UNIX"; + OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; @@ -1709,6 +1923,19 @@ "$(CHIP_ROOT)/third_party/jsoncpp/repo/include", "$(CHIP_ROOT)/config/ios", "$(CHIP_ROOT)/third_party/editline/repo/include", + "$(CHIP_ROOT)/third_party/libwebsockets", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/include", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/core", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/core-net", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/plat/unix", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/secure-streams", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/event-libs", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/system/metrics", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles/http", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles/h1", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/roles/ws", + "$(CHIP_ROOT)/third_party/libwebsockets/repo/lib/system/async-dns", "$(CHIP_ROOT)/src/include", "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/gen/include", "$(SRCROOT)/darwin-framework-tool", @@ -1716,6 +1943,7 @@ "$(CHIP_ROOT)/third_party/editline/include", "$(CHIP_ROOT)/examples/chip-tool/commands/clusters", "$(CHIP_ROOT)/examples/chip-tool", + "$(CHIP_ROOT)/examples/common", "$(CHIP_ROOT)/zzz_generated/chip-tool", ); LD_RUNPATH_SEARCH_PATHS = ( @@ -1726,6 +1954,8 @@ "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/lib", "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/obj/src/app/lib", ); + OTHER_CFLAGS = "-DLWS_PLAT_UNIX"; + OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 83b5c849f16e53..ecdb4adc9b032f 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -191,6 +191,7 @@ class IdentifyIdentify : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -235,17 +236,19 @@ class IdentifyTriggerEffect : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster triggerEffectWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + triggerEffectWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -278,8 +281,11 @@ class ReadIdentifyIdentifyTime : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeIdentifyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify IdentifyTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -319,6 +325,8 @@ class WriteIdentifyIdentifyTime : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Identify IdentifyTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -363,6 +371,11 @@ class SubscribeAttributeIdentifyIdentifyTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -394,8 +407,11 @@ class ReadIdentifyIdentifyType : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeIdentifyTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify IdentifyType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -437,6 +453,11 @@ class SubscribeAttributeIdentifyIdentifyType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.IdentifyType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -468,8 +489,11 @@ class ReadIdentifyGeneratedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -511,6 +535,11 @@ class SubscribeAttributeIdentifyGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -542,8 +571,11 @@ class ReadIdentifyAcceptedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -585,6 +617,11 @@ class SubscribeAttributeIdentifyAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -618,8 +655,11 @@ class ReadIdentifyEventList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -661,6 +701,11 @@ class SubscribeAttributeIdentifyEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -694,8 +739,11 @@ class ReadIdentifyAttributeList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -737,6 +785,11 @@ class SubscribeAttributeIdentifyAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -768,8 +821,11 @@ class ReadIdentifyFeatureMap : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -811,6 +867,11 @@ class SubscribeAttributeIdentifyFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -842,8 +903,11 @@ class ReadIdentifyClusterRevision : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Identify ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -885,6 +949,11 @@ class SubscribeAttributeIdentifyClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Identify.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -948,18 +1017,25 @@ class GroupsAddGroup : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster addGroupWithParams:params - completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + addGroupWithParams:params + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::Groups::Commands::AddGroupResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::Groups::Commands::AddGroupResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -997,18 +1073,27 @@ class GroupsViewGroup : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster viewGroupWithParams:params - completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + viewGroupWithParams:params + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Groups::Commands::ViewGroupResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Groups::Commands::ViewGroupResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1059,10 +1144,20 @@ class GroupsGetGroupMembership : public ClusterCommand { completion:^(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -1110,10 +1205,18 @@ class GroupsRemoveGroup : public ClusterCommand { removeGroupWithParams:params completion:^(MTRGroupsClusterRemoveGroupResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Groups::Commands::RemoveGroupResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Groups::Commands::RemoveGroupResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -1160,6 +1263,8 @@ class GroupsRemoveAllGroups : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -1211,6 +1316,8 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -1248,8 +1355,11 @@ class ReadGroupsNameSupport : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNameSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.NameSupport response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Groups NameSupport read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -1291,6 +1401,11 @@ class SubscribeAttributeGroupsNameSupport : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.NameSupport response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -1322,8 +1437,11 @@ class ReadGroupsGeneratedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Groups GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -1365,6 +1483,11 @@ class SubscribeAttributeGroupsGeneratedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -1396,8 +1519,11 @@ class ReadGroupsAcceptedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Groups AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -1439,6 +1565,11 @@ class SubscribeAttributeGroupsAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -1472,8 +1603,11 @@ class ReadGroupsEventList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Groups EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -1515,6 +1649,11 @@ class SubscribeAttributeGroupsEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -1548,8 +1687,11 @@ class ReadGroupsAttributeList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Groups AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -1591,6 +1733,11 @@ class SubscribeAttributeGroupsAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -1622,8 +1769,11 @@ class ReadGroupsFeatureMap : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Groups FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -1665,6 +1815,11 @@ class SubscribeAttributeGroupsFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -1696,8 +1851,11 @@ class ReadGroupsClusterRevision : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Groups ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -1739,6 +1897,11 @@ class SubscribeAttributeGroupsClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Groups.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -1840,18 +2003,25 @@ class ScenesAddScene : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster addSceneWithParams:params - completion:^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + addSceneWithParams:params + completion:^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::AddSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::Scenes::Commands::AddSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1893,18 +2063,27 @@ class ScenesViewScene : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster viewSceneWithParams:params - completion:^(MTRScenesClusterViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + viewSceneWithParams:params + completion:^(MTRScenesClusterViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::ViewSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::ViewSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -1948,10 +2127,18 @@ class ScenesRemoveScene : public ClusterCommand { removeSceneWithParams:params completion:^(MTRScenesClusterRemoveSceneResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -1994,19 +2181,29 @@ class ScenesRemoveAllScenes : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster removeAllScenesWithParams:params - completion:^(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + removeAllScenesWithParams:params + completion:^( + MTRScenesClusterRemoveAllScenesResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2050,10 +2247,18 @@ class ScenesStoreScene : public ClusterCommand { storeSceneWithParams:params completion:^(MTRScenesClusterStoreSceneResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::StoreSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::StoreSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -2108,17 +2313,19 @@ class ScenesRecallScene : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster recallSceneWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + recallSceneWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2160,10 +2367,20 @@ class ScenesGetSceneMembership : public ClusterCommand { completion:^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -2237,19 +2454,29 @@ class ScenesEnhancedAddScene : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster enhancedAddSceneWithParams:params - completion:^(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + enhancedAddSceneWithParams:params + completion:^( + MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2295,10 +2522,20 @@ class ScenesEnhancedViewScene : public ClusterCommand { completion:^(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -2349,18 +2586,27 @@ class ScenesCopyScene : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster copySceneWithParams:params - completion:^(MTRScenesClusterCopySceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + copySceneWithParams:params + completion:^(MTRScenesClusterCopySceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::CopySceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Scenes::Commands::CopySceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -2393,8 +2639,11 @@ class ReadScenesSceneCount : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSceneCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes SceneCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2436,6 +2685,11 @@ class SubscribeAttributeScenesSceneCount : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2467,8 +2721,11 @@ class ReadScenesCurrentScene : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentSceneWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentScene response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes CurrentScene read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2510,6 +2767,11 @@ class SubscribeAttributeScenesCurrentScene : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentScene response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2541,8 +2803,11 @@ class ReadScenesCurrentGroup : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentGroupWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentGroup response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes CurrentGroup read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2584,6 +2849,11 @@ class SubscribeAttributeScenesCurrentGroup : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.CurrentGroup response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2615,8 +2885,11 @@ class ReadScenesSceneValid : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSceneValidWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneValid response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes SceneValid read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2658,6 +2931,11 @@ class SubscribeAttributeScenesSceneValid : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneValid response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2689,8 +2967,11 @@ class ReadScenesNameSupport : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNameSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.NameSupport response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes NameSupport read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2732,6 +3013,11 @@ class SubscribeAttributeScenesNameSupport : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.NameSupport response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2763,8 +3049,11 @@ class ReadScenesLastConfiguredBy : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeLastConfiguredByWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.LastConfiguredBy response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes LastConfiguredBy read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2806,6 +3095,11 @@ class SubscribeAttributeScenesLastConfiguredBy : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.LastConfiguredBy response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2839,8 +3133,11 @@ class ReadScenesSceneTableSize : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSceneTableSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneTableSize response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes SceneTableSize read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2882,6 +3179,11 @@ class SubscribeAttributeScenesSceneTableSize : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.SceneTableSize response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2916,8 +3218,11 @@ class ReadScenesRemainingCapacity : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeRemainingCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.RemainingCapacity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes RemainingCapacity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -2959,6 +3264,11 @@ class SubscribeAttributeScenesRemainingCapacity : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.RemainingCapacity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -2992,8 +3302,11 @@ class ReadScenesGeneratedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3035,6 +3348,11 @@ class SubscribeAttributeScenesGeneratedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3066,8 +3384,11 @@ class ReadScenesAcceptedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3109,6 +3430,11 @@ class SubscribeAttributeScenesAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3142,8 +3468,11 @@ class ReadScenesEventList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3185,6 +3514,11 @@ class SubscribeAttributeScenesEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3218,8 +3552,11 @@ class ReadScenesAttributeList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3261,6 +3598,11 @@ class SubscribeAttributeScenesAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3292,8 +3634,11 @@ class ReadScenesFeatureMap : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3335,6 +3680,11 @@ class SubscribeAttributeScenesFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3366,8 +3716,11 @@ class ReadScenesClusterRevision : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Scenes ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3409,6 +3762,11 @@ class SubscribeAttributeScenesClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Scenes.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3476,6 +3834,7 @@ class OnOffOff : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -3521,6 +3880,7 @@ class OnOffOn : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -3566,6 +3926,7 @@ class OnOffToggle : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -3609,17 +3970,19 @@ class OnOffOffWithEffect : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster offWithEffectWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + offWithEffectWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -3661,6 +4024,8 @@ class OnOffOnWithRecallGlobalScene : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -3712,6 +4077,8 @@ class OnOffOnWithTimedOff : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -3749,8 +4116,11 @@ class ReadOnOffOnOff : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnOff response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff OnOff read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3792,6 +4162,11 @@ class SubscribeAttributeOnOffOnOff : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnOff response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3823,8 +4198,11 @@ class ReadOnOffGlobalSceneControl : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGlobalSceneControlWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GlobalSceneControl response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff GlobalSceneControl read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3866,6 +4244,11 @@ class SubscribeAttributeOnOffGlobalSceneControl : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GlobalSceneControl response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -3897,8 +4280,11 @@ class ReadOnOffOnTime : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOnTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff OnTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3938,6 +4324,8 @@ class WriteOnOffOnTime : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("OnOff OnTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -3982,6 +4370,11 @@ class SubscribeAttributeOnOffOnTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OnTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4013,8 +4406,11 @@ class ReadOnOffOffWaitTime : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOffWaitTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OffWaitTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff OffWaitTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4054,6 +4450,8 @@ class WriteOnOffOffWaitTime : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("OnOff OffWaitTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4098,6 +4496,11 @@ class SubscribeAttributeOnOffOffWaitTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.OffWaitTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4129,8 +4532,11 @@ class ReadOnOffStartUpOnOff : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeStartUpOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.StartUpOnOff response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff StartUpOnOff read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4163,13 +4569,18 @@ class WriteOnOffStartUpOnOff : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpOnOffWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("OnOff StartUpOnOff write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4177,7 +4588,7 @@ class WriteOnOffStartUpOnOff : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeOnOffStartUpOnOff : public SubscribeAttribute { @@ -4214,6 +4625,11 @@ class SubscribeAttributeOnOffStartUpOnOff : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.StartUpOnOff response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4245,8 +4661,11 @@ class ReadOnOffGeneratedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4288,6 +4707,11 @@ class SubscribeAttributeOnOffGeneratedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4319,8 +4743,11 @@ class ReadOnOffAcceptedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4362,6 +4789,11 @@ class SubscribeAttributeOnOffAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4395,8 +4827,11 @@ class ReadOnOffEventList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4438,6 +4873,11 @@ class SubscribeAttributeOnOffEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4471,8 +4911,11 @@ class ReadOnOffAttributeList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4514,6 +4957,11 @@ class SubscribeAttributeOnOffAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4545,8 +4993,11 @@ class ReadOnOffFeatureMap : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4588,6 +5039,11 @@ class SubscribeAttributeOnOffFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4619,8 +5075,11 @@ class ReadOnOffClusterRevision : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOff ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4662,6 +5121,11 @@ class SubscribeAttributeOnOffClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOff.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4713,8 +5177,11 @@ class ReadOnOffSwitchConfigurationSwitchType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSwitchTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration SwitchType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4758,6 +5225,11 @@ class SubscribeAttributeOnOffSwitchConfigurationSwitchType : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4791,8 +5263,11 @@ class ReadOnOffSwitchConfigurationSwitchActions : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSwitchActionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchActions response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration SwitchActions read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4834,6 +5309,8 @@ class WriteOnOffSwitchConfigurationSwitchActions : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("OnOffSwitchConfiguration SwitchActions write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4880,6 +5357,11 @@ class SubscribeAttributeOnOffSwitchConfigurationSwitchActions : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.SwitchActions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4914,8 +5396,11 @@ class ReadOnOffSwitchConfigurationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -4959,6 +5444,11 @@ class SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -4993,8 +5483,11 @@ class ReadOnOffSwitchConfigurationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5038,6 +5531,11 @@ class SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList : public Sub } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -5073,8 +5571,11 @@ class ReadOnOffSwitchConfigurationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5118,6 +5619,11 @@ class SubscribeAttributeOnOffSwitchConfigurationEventList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -5153,8 +5659,11 @@ class ReadOnOffSwitchConfigurationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5198,6 +5707,11 @@ class SubscribeAttributeOnOffSwitchConfigurationAttributeList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -5231,8 +5745,11 @@ class ReadOnOffSwitchConfigurationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5276,6 +5793,11 @@ class SubscribeAttributeOnOffSwitchConfigurationFeatureMap : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -5309,8 +5831,11 @@ class ReadOnOffSwitchConfigurationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OnOffSwitchConfiguration ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5354,6 +5879,11 @@ class SubscribeAttributeOnOffSwitchConfigurationClusterRevision : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OnOffSwitchConfiguration.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -5441,17 +5971,19 @@ class LevelControlMoveToLevel : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster moveToLevelWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + moveToLevelWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -5507,6 +6039,7 @@ class LevelControlMove : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -5569,6 +6102,7 @@ class LevelControlStep : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -5621,6 +6155,7 @@ class LevelControlStop : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -5681,6 +6216,8 @@ class LevelControlMoveToLevelWithOnOff : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -5735,17 +6272,19 @@ class LevelControlMoveWithOnOff : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster moveWithOnOffWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + moveWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -5797,17 +6336,19 @@ class LevelControlStepWithOnOff : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stepWithOnOffWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + stepWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -5849,17 +6390,19 @@ class LevelControlStopWithOnOff : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stopWithOnOffWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + stopWithOnOffWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -5905,6 +6448,8 @@ class LevelControlMoveToClosestFrequency : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -5944,8 +6489,11 @@ class ReadLevelControlCurrentLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl CurrentLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -5989,6 +6537,11 @@ class SubscribeAttributeLevelControlCurrentLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6022,8 +6575,11 @@ class ReadLevelControlRemainingTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.RemainingTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl RemainingTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6067,6 +6623,11 @@ class SubscribeAttributeLevelControlRemainingTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.RemainingTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6100,8 +6661,11 @@ class ReadLevelControlMinLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl MinLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6145,6 +6709,11 @@ class SubscribeAttributeLevelControlMinLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6178,8 +6747,11 @@ class ReadLevelControlMaxLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl MaxLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6223,6 +6795,11 @@ class SubscribeAttributeLevelControlMaxLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6256,8 +6833,11 @@ class ReadLevelControlCurrentFrequency : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentFrequency response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl CurrentFrequency read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6301,6 +6881,11 @@ class SubscribeAttributeLevelControlCurrentFrequency : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.CurrentFrequency response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6334,8 +6919,11 @@ class ReadLevelControlMinFrequency : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinFrequency response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl MinFrequency read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6379,6 +6967,11 @@ class SubscribeAttributeLevelControlMinFrequency : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MinFrequency response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6412,8 +7005,11 @@ class ReadLevelControlMaxFrequency : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxFrequency response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl MaxFrequency read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6457,6 +7053,11 @@ class SubscribeAttributeLevelControlMaxFrequency : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.MaxFrequency response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6490,8 +7091,11 @@ class ReadLevelControlOptions : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.Options response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl Options read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6533,6 +7137,8 @@ class WriteLevelControlOptions : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LevelControl Options write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6579,6 +7185,11 @@ class SubscribeAttributeLevelControlOptions : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.Options response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6612,8 +7223,11 @@ class ReadLevelControlOnOffTransitionTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnOffTransitionTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl OnOffTransitionTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6655,6 +7269,8 @@ class WriteLevelControlOnOffTransitionTime : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LevelControl OnOffTransitionTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6701,6 +7317,11 @@ class SubscribeAttributeLevelControlOnOffTransitionTime : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnOffTransitionTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6734,8 +7355,11 @@ class ReadLevelControlOnLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl OnLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6770,13 +7394,18 @@ class WriteLevelControlOnLevel : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOnLevelWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LevelControl OnLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6784,7 +7413,7 @@ class WriteLevelControlOnLevel : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLevelControlOnLevel : public SubscribeAttribute { @@ -6823,6 +7452,11 @@ class SubscribeAttributeLevelControlOnLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6856,8 +7490,11 @@ class ReadLevelControlOnTransitionTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnTransitionTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl OnTransitionTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6892,13 +7529,18 @@ class WriteLevelControlOnTransitionTime : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeOnTransitionTimeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LevelControl OnTransitionTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -6906,7 +7548,7 @@ class WriteLevelControlOnTransitionTime : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLevelControlOnTransitionTime : public SubscribeAttribute { @@ -6945,6 +7587,11 @@ class SubscribeAttributeLevelControlOnTransitionTime : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OnTransitionTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -6978,8 +7625,11 @@ class ReadLevelControlOffTransitionTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOffTransitionTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OffTransitionTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl OffTransitionTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7014,13 +7664,18 @@ class WriteLevelControlOffTransitionTime : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeOffTransitionTimeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LevelControl OffTransitionTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7028,7 +7683,7 @@ class WriteLevelControlOffTransitionTime : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLevelControlOffTransitionTime : public SubscribeAttribute { @@ -7067,6 +7722,11 @@ class SubscribeAttributeLevelControlOffTransitionTime : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.OffTransitionTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7100,8 +7760,11 @@ class ReadLevelControlDefaultMoveRate : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDefaultMoveRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.DefaultMoveRate response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl DefaultMoveRate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7136,13 +7799,18 @@ class WriteLevelControlDefaultMoveRate : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeDefaultMoveRateWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LevelControl DefaultMoveRate write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7150,7 +7818,7 @@ class WriteLevelControlDefaultMoveRate : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLevelControlDefaultMoveRate : public SubscribeAttribute { @@ -7189,6 +7857,11 @@ class SubscribeAttributeLevelControlDefaultMoveRate : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.DefaultMoveRate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7222,8 +7895,11 @@ class ReadLevelControlStartUpCurrentLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartUpCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.StartUpCurrentLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl StartUpCurrentLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7258,13 +7934,18 @@ class WriteLevelControlStartUpCurrentLevel : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpCurrentLevelWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LevelControl StartUpCurrentLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7272,7 +7953,7 @@ class WriteLevelControlStartUpCurrentLevel : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLevelControlStartUpCurrentLevel : public SubscribeAttribute { @@ -7311,6 +7992,11 @@ class SubscribeAttributeLevelControlStartUpCurrentLevel : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.StartUpCurrentLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7344,8 +8030,11 @@ class ReadLevelControlGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7389,6 +8078,11 @@ class SubscribeAttributeLevelControlGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7422,8 +8116,11 @@ class ReadLevelControlAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7467,6 +8164,11 @@ class SubscribeAttributeLevelControlAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7502,8 +8204,11 @@ class ReadLevelControlEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7547,6 +8252,11 @@ class SubscribeAttributeLevelControlEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7582,8 +8292,11 @@ class ReadLevelControlAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7627,6 +8340,11 @@ class SubscribeAttributeLevelControlAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7660,8 +8378,11 @@ class ReadLevelControlFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7705,6 +8426,11 @@ class SubscribeAttributeLevelControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7738,8 +8464,11 @@ class ReadLevelControlClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LevelControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7783,6 +8512,11 @@ class SubscribeAttributeLevelControlClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LevelControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7841,8 +8575,11 @@ class ReadBinaryInputBasicActiveText : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ActiveText response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic ActiveText read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7886,6 +8623,8 @@ class WriteBinaryInputBasicActiveText : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BinaryInputBasic ActiveText write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -7932,6 +8671,11 @@ class SubscribeAttributeBinaryInputBasicActiveText : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ActiveText response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -7965,8 +8709,11 @@ class ReadBinaryInputBasicDescription : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Description response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic Description read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8010,6 +8757,8 @@ class WriteBinaryInputBasicDescription : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BinaryInputBasic Description write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8056,6 +8805,11 @@ class SubscribeAttributeBinaryInputBasicDescription : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Description response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8089,8 +8843,11 @@ class ReadBinaryInputBasicInactiveText : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInactiveTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.InactiveText response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic InactiveText read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8134,6 +8891,8 @@ class WriteBinaryInputBasicInactiveText : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BinaryInputBasic InactiveText write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8180,6 +8939,11 @@ class SubscribeAttributeBinaryInputBasicInactiveText : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.InactiveText response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8213,8 +8977,11 @@ class ReadBinaryInputBasicOutOfService : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOutOfServiceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.OutOfService response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic OutOfService read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8256,6 +9023,8 @@ class WriteBinaryInputBasicOutOfService : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BinaryInputBasic OutOfService write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8302,6 +9071,11 @@ class SubscribeAttributeBinaryInputBasicOutOfService : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.OutOfService response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8335,8 +9109,11 @@ class ReadBinaryInputBasicPolarity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePolarityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Polarity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic Polarity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8380,6 +9157,11 @@ class SubscribeAttributeBinaryInputBasicPolarity : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Polarity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8413,8 +9195,11 @@ class ReadBinaryInputBasicPresentValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePresentValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.PresentValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic PresentValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8456,6 +9241,8 @@ class WriteBinaryInputBasicPresentValue : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BinaryInputBasic PresentValue write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8502,6 +9289,11 @@ class SubscribeAttributeBinaryInputBasicPresentValue : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.PresentValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8535,8 +9327,11 @@ class ReadBinaryInputBasicReliability : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReliabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Reliability response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic Reliability read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8578,6 +9373,8 @@ class WriteBinaryInputBasicReliability : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BinaryInputBasic Reliability write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8624,6 +9421,11 @@ class SubscribeAttributeBinaryInputBasicReliability : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.Reliability response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8657,8 +9459,11 @@ class ReadBinaryInputBasicStatusFlags : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStatusFlagsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.StatusFlags response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic StatusFlags read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8702,6 +9507,11 @@ class SubscribeAttributeBinaryInputBasicStatusFlags : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.StatusFlags response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8735,8 +9545,11 @@ class ReadBinaryInputBasicApplicationType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeApplicationTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ApplicationType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic ApplicationType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8780,6 +9593,11 @@ class SubscribeAttributeBinaryInputBasicApplicationType : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ApplicationType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8813,8 +9631,11 @@ class ReadBinaryInputBasicGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8858,6 +9679,11 @@ class SubscribeAttributeBinaryInputBasicGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8891,8 +9717,11 @@ class ReadBinaryInputBasicAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -8936,6 +9765,11 @@ class SubscribeAttributeBinaryInputBasicAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -8971,8 +9805,11 @@ class ReadBinaryInputBasicEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9016,6 +9853,11 @@ class SubscribeAttributeBinaryInputBasicEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9051,8 +9893,11 @@ class ReadBinaryInputBasicAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9096,6 +9941,11 @@ class SubscribeAttributeBinaryInputBasicAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9129,8 +9979,11 @@ class ReadBinaryInputBasicFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9174,6 +10027,11 @@ class SubscribeAttributeBinaryInputBasicFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9207,8 +10065,11 @@ class ReadBinaryInputBasicClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BinaryInputBasic ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9252,6 +10113,11 @@ class SubscribeAttributeBinaryInputBasicClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BinaryInputBasic.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9304,8 +10170,11 @@ class ReadPulseWidthModulationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PulseWidthModulation GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9349,6 +10218,11 @@ class SubscribeAttributePulseWidthModulationGeneratedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9385,8 +10259,11 @@ class ReadPulseWidthModulationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PulseWidthModulation AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9430,6 +10307,11 @@ class SubscribeAttributePulseWidthModulationAcceptedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9466,8 +10348,11 @@ class ReadPulseWidthModulationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PulseWidthModulation EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9511,6 +10396,11 @@ class SubscribeAttributePulseWidthModulationEventList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9547,8 +10437,11 @@ class ReadPulseWidthModulationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PulseWidthModulation AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9592,6 +10485,11 @@ class SubscribeAttributePulseWidthModulationAttributeList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9628,8 +10526,11 @@ class ReadPulseWidthModulationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PulseWidthModulation FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9673,6 +10574,11 @@ class SubscribeAttributePulseWidthModulationFeatureMap : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9709,8 +10615,11 @@ class ReadPulseWidthModulationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PulseWidthModulation ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9754,6 +10663,11 @@ class SubscribeAttributePulseWidthModulationClusterRevision : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PulseWidthModulation.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9810,8 +10724,11 @@ class ReadDescriptorDeviceTypeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDeviceTypeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.DeviceTypeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor DeviceTypeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9855,6 +10772,11 @@ class SubscribeAttributeDescriptorDeviceTypeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.DeviceTypeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9888,8 +10810,11 @@ class ReadDescriptorServerList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeServerListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ServerList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor ServerList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -9933,6 +10858,11 @@ class SubscribeAttributeDescriptorServerList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ServerList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -9966,8 +10896,11 @@ class ReadDescriptorClientList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClientListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClientList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor ClientList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10011,6 +10944,11 @@ class SubscribeAttributeDescriptorClientList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClientList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10044,8 +10982,11 @@ class ReadDescriptorPartsList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePartsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.PartsList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor PartsList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10089,6 +11030,11 @@ class SubscribeAttributeDescriptorPartsList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.PartsList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10124,8 +11070,11 @@ class ReadDescriptorTagList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTagListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.TagList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor TagList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10169,6 +11118,11 @@ class SubscribeAttributeDescriptorTagList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.TagList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10204,8 +11158,11 @@ class ReadDescriptorGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10249,6 +11206,11 @@ class SubscribeAttributeDescriptorGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10282,8 +11244,11 @@ class ReadDescriptorAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10327,6 +11292,11 @@ class SubscribeAttributeDescriptorAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10362,8 +11332,11 @@ class ReadDescriptorEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10407,6 +11380,11 @@ class SubscribeAttributeDescriptorEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10442,8 +11420,11 @@ class ReadDescriptorAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10487,6 +11468,11 @@ class SubscribeAttributeDescriptorAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10520,8 +11506,11 @@ class ReadDescriptorFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10565,6 +11554,11 @@ class SubscribeAttributeDescriptorFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10598,8 +11592,11 @@ class ReadDescriptorClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Descriptor ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10643,6 +11640,11 @@ class SubscribeAttributeDescriptorClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Descriptor.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10696,8 +11698,13 @@ class ReadBindingBinding : public ReadAttribute { [cluster readAttributeBindingWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.Binding response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Binding Binding read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10768,6 +11775,8 @@ class WriteBindingBinding : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Binding Binding write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10813,6 +11822,11 @@ class SubscribeAttributeBindingBinding : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.Binding response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10844,8 +11858,11 @@ class ReadBindingGeneratedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Binding GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10887,6 +11904,11 @@ class SubscribeAttributeBindingGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10918,8 +11940,11 @@ class ReadBindingAcceptedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Binding AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -10961,6 +11986,11 @@ class SubscribeAttributeBindingAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -10994,8 +12024,11 @@ class ReadBindingEventList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Binding EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11037,6 +12070,11 @@ class SubscribeAttributeBindingEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11070,8 +12108,11 @@ class ReadBindingAttributeList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Binding AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11113,6 +12154,11 @@ class SubscribeAttributeBindingAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11144,8 +12190,11 @@ class ReadBindingFeatureMap : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Binding FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11187,6 +12236,11 @@ class SubscribeAttributeBindingFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11218,8 +12272,11 @@ class ReadBindingClusterRevision : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Binding ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11261,6 +12318,11 @@ class SubscribeAttributeBindingClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Binding.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11319,14 +12381,19 @@ class ReadAccessControlAcl : public ReadAttribute { if (mFabricFiltered.HasValue()) { params.filterByFabric = mFabricFiltered.Value(); } - [cluster readAttributeACLWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.ACL response %@", [value description]); - if (error != nil) { - LogNSError("AccessControl ACL read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeACLWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.ACL response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("AccessControl ACL read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -11419,6 +12486,8 @@ class WriteAccessControlAcl : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("AccessControl ACL write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11468,6 +12537,11 @@ class SubscribeAttributeAccessControlAcl : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.ACL response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11506,8 +12580,13 @@ class ReadAccessControlExtension : public ReadAttribute { [cluster readAttributeExtensionWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.Extension response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl Extension read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11561,6 +12640,8 @@ class WriteAccessControlExtension : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("AccessControl Extension write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11610,6 +12691,11 @@ class SubscribeAttributeAccessControlExtension : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.Extension response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11643,8 +12729,11 @@ class ReadAccessControlSubjectsPerAccessControlEntry : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSubjectsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.SubjectsPerAccessControlEntry response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl SubjectsPerAccessControlEntry read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11688,6 +12777,11 @@ class SubscribeAttributeAccessControlSubjectsPerAccessControlEntry : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.SubjectsPerAccessControlEntry response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11721,8 +12815,11 @@ class ReadAccessControlTargetsPerAccessControlEntry : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTargetsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.TargetsPerAccessControlEntry response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl TargetsPerAccessControlEntry read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11766,6 +12863,11 @@ class SubscribeAttributeAccessControlTargetsPerAccessControlEntry : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.TargetsPerAccessControlEntry response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11799,8 +12901,11 @@ class ReadAccessControlAccessControlEntriesPerFabric : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAccessControlEntriesPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AccessControlEntriesPerFabric response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl AccessControlEntriesPerFabric read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11844,6 +12949,11 @@ class SubscribeAttributeAccessControlAccessControlEntriesPerFabric : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AccessControlEntriesPerFabric response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11877,8 +12987,11 @@ class ReadAccessControlGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -11922,6 +13035,11 @@ class SubscribeAttributeAccessControlGeneratedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -11955,8 +13073,11 @@ class ReadAccessControlAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12000,6 +13121,11 @@ class SubscribeAttributeAccessControlAcceptedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12035,8 +13161,11 @@ class ReadAccessControlEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12080,6 +13209,11 @@ class SubscribeAttributeAccessControlEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12115,8 +13249,11 @@ class ReadAccessControlAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12160,6 +13297,11 @@ class SubscribeAttributeAccessControlAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12193,8 +13335,11 @@ class ReadAccessControlFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12238,6 +13383,11 @@ class SubscribeAttributeAccessControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12271,8 +13421,11 @@ class ReadAccessControlClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccessControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -12316,6 +13469,11 @@ class SubscribeAttributeAccessControlClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccessControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -12391,17 +13549,19 @@ class ActionsInstantAction : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster instantActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + instantActionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -12453,6 +13613,8 @@ class ActionsInstantActionWithTransition : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -12501,17 +13663,19 @@ class ActionsStartAction : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster startActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + startActionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -12563,6 +13727,8 @@ class ActionsStartActionWithDuration : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -12611,17 +13777,19 @@ class ActionsStopAction : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stopActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + stopActionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -12665,17 +13833,19 @@ class ActionsPauseAction : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster pauseActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + pauseActionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -12727,6 +13897,8 @@ class ActionsPauseActionWithDuration : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -12775,17 +13947,19 @@ class ActionsResumeAction : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resumeActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + resumeActionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -12829,17 +14003,19 @@ class ActionsEnableAction : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster enableActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + enableActionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -12891,6 +14067,8 @@ class ActionsEnableActionWithDuration : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -12939,17 +14117,19 @@ class ActionsDisableAction : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster disableActionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + disableActionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -13001,6 +14181,8 @@ class ActionsDisableActionWithDuration : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -13038,8 +14220,11 @@ class ReadActionsActionList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeActionListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.ActionList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions ActionList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13081,6 +14266,11 @@ class SubscribeAttributeActionsActionList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.ActionList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13112,8 +14302,11 @@ class ReadActionsEndpointLists : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEndpointListsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.EndpointLists response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions EndpointLists read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13155,6 +14348,11 @@ class SubscribeAttributeActionsEndpointLists : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.EndpointLists response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13186,8 +14384,11 @@ class ReadActionsSetupURL : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSetupURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.SetupURL response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions SetupURL read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13229,6 +14430,11 @@ class SubscribeAttributeActionsSetupURL : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.SetupURL response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13260,8 +14466,11 @@ class ReadActionsGeneratedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13303,6 +14512,11 @@ class SubscribeAttributeActionsGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13334,8 +14548,11 @@ class ReadActionsAcceptedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13377,6 +14594,11 @@ class SubscribeAttributeActionsAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13410,8 +14632,11 @@ class ReadActionsEventList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13453,6 +14678,11 @@ class SubscribeAttributeActionsEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13486,8 +14716,11 @@ class ReadActionsAttributeList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13529,6 +14762,11 @@ class SubscribeAttributeActionsAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13560,8 +14798,11 @@ class ReadActionsFeatureMap : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13603,6 +14844,11 @@ class SubscribeAttributeActionsFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13634,8 +14880,11 @@ class ReadActionsClusterRevision : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Actions ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13677,6 +14926,11 @@ class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Actions.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13752,8 +15006,11 @@ class ReadBasicInformationDataModelRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDataModelRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.DataModelRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation DataModelRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13797,6 +15054,11 @@ class SubscribeAttributeBasicInformationDataModelRevision : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.DataModelRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13830,8 +15092,11 @@ class ReadBasicInformationVendorName : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.VendorName response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation VendorName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13875,6 +15140,11 @@ class SubscribeAttributeBasicInformationVendorName : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.VendorName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13908,8 +15178,11 @@ class ReadBasicInformationVendorID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.VendorID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation VendorID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -13953,6 +15226,11 @@ class SubscribeAttributeBasicInformationVendorID : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.VendorID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -13986,8 +15264,11 @@ class ReadBasicInformationProductName : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductName response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation ProductName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14031,6 +15312,11 @@ class SubscribeAttributeBasicInformationProductName : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14064,8 +15350,11 @@ class ReadBasicInformationProductID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation ProductID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14109,6 +15398,11 @@ class SubscribeAttributeBasicInformationProductID : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14142,8 +15436,11 @@ class ReadBasicInformationNodeLabel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.NodeLabel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation NodeLabel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14187,6 +15484,8 @@ class WriteBasicInformationNodeLabel : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BasicInformation NodeLabel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14233,6 +15532,11 @@ class SubscribeAttributeBasicInformationNodeLabel : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.NodeLabel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14266,8 +15570,11 @@ class ReadBasicInformationLocation : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLocationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.Location response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation Location read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14311,6 +15618,8 @@ class WriteBasicInformationLocation : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BasicInformation Location write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14357,6 +15666,11 @@ class SubscribeAttributeBasicInformationLocation : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.Location response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14390,8 +15704,11 @@ class ReadBasicInformationHardwareVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.HardwareVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation HardwareVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14435,6 +15752,11 @@ class SubscribeAttributeBasicInformationHardwareVersion : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.HardwareVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14468,8 +15790,11 @@ class ReadBasicInformationHardwareVersionString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.HardwareVersionString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation HardwareVersionString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14513,6 +15838,11 @@ class SubscribeAttributeBasicInformationHardwareVersionString : public Subscribe } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.HardwareVersionString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14546,8 +15876,11 @@ class ReadBasicInformationSoftwareVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.SoftwareVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation SoftwareVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14591,6 +15924,11 @@ class SubscribeAttributeBasicInformationSoftwareVersion : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.SoftwareVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14624,8 +15962,11 @@ class ReadBasicInformationSoftwareVersionString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.SoftwareVersionString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation SoftwareVersionString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14669,6 +16010,11 @@ class SubscribeAttributeBasicInformationSoftwareVersionString : public Subscribe } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.SoftwareVersionString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14702,8 +16048,11 @@ class ReadBasicInformationManufacturingDate : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ManufacturingDate response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation ManufacturingDate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14747,6 +16096,11 @@ class SubscribeAttributeBasicInformationManufacturingDate : public SubscribeAttr } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ManufacturingDate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14780,8 +16134,11 @@ class ReadBasicInformationPartNumber : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.PartNumber response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation PartNumber read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14825,6 +16182,11 @@ class SubscribeAttributeBasicInformationPartNumber : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.PartNumber response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14858,8 +16220,11 @@ class ReadBasicInformationProductURL : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductURL response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation ProductURL read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14903,6 +16268,11 @@ class SubscribeAttributeBasicInformationProductURL : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductURL response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -14936,8 +16306,11 @@ class ReadBasicInformationProductLabel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductLabel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation ProductLabel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -14981,6 +16354,11 @@ class SubscribeAttributeBasicInformationProductLabel : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductLabel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15014,8 +16392,11 @@ class ReadBasicInformationSerialNumber : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.SerialNumber response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation SerialNumber read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15059,6 +16440,11 @@ class SubscribeAttributeBasicInformationSerialNumber : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.SerialNumber response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15092,8 +16478,11 @@ class ReadBasicInformationLocalConfigDisabled : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLocalConfigDisabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.LocalConfigDisabled response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation LocalConfigDisabled read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15135,6 +16524,8 @@ class WriteBasicInformationLocalConfigDisabled : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BasicInformation LocalConfigDisabled write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15181,6 +16572,11 @@ class SubscribeAttributeBasicInformationLocalConfigDisabled : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.LocalConfigDisabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15214,8 +16610,11 @@ class ReadBasicInformationReachable : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.Reachable response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation Reachable read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15259,6 +16658,11 @@ class SubscribeAttributeBasicInformationReachable : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.Reachable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15292,8 +16696,11 @@ class ReadBasicInformationUniqueID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.UniqueID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation UniqueID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15337,6 +16744,11 @@ class SubscribeAttributeBasicInformationUniqueID : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.UniqueID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15371,8 +16783,11 @@ class ReadBasicInformationCapabilityMinima : public ReadAttribute { [cluster readAttributeCapabilityMinimaWithCompletion:^( MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.CapabilityMinima response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation CapabilityMinima read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15416,6 +16831,11 @@ class SubscribeAttributeBasicInformationCapabilityMinima : public SubscribeAttri } reportHandler:^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.CapabilityMinima response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15450,8 +16870,11 @@ class ReadBasicInformationProductAppearance : public ReadAttribute { [cluster readAttributeProductAppearanceWithCompletion:^( MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductAppearance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation ProductAppearance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15495,6 +16918,11 @@ class SubscribeAttributeBasicInformationProductAppearance : public SubscribeAttr } reportHandler:^(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ProductAppearance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15528,8 +16956,11 @@ class ReadBasicInformationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15573,6 +17004,11 @@ class SubscribeAttributeBasicInformationGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15606,8 +17042,11 @@ class ReadBasicInformationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15651,6 +17090,11 @@ class SubscribeAttributeBasicInformationAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15686,8 +17130,11 @@ class ReadBasicInformationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15731,6 +17178,11 @@ class SubscribeAttributeBasicInformationEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15766,8 +17218,11 @@ class ReadBasicInformationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15811,6 +17266,11 @@ class SubscribeAttributeBasicInformationAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15844,8 +17304,11 @@ class ReadBasicInformationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15889,6 +17352,11 @@ class SubscribeAttributeBasicInformationFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -15922,8 +17390,11 @@ class ReadBasicInformationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BasicInformation ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -15967,6 +17438,11 @@ class SubscribeAttributeBasicInformationClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BasicInformation.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16066,19 +17542,28 @@ class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster queryImageWithParams:params - completion:^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + queryImageWithParams:params + completion:^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -16122,19 +17607,30 @@ class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster applyUpdateRequestWithParams:params - completion:^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + applyUpdateRequestWithParams:params + completion:^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -16182,6 +17678,8 @@ class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -16222,8 +17720,11 @@ class ReadOtaSoftwareUpdateProviderGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateProvider GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16268,6 +17769,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16302,8 +17808,11 @@ class ReadOtaSoftwareUpdateProviderAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateProvider AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16347,6 +17856,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16382,8 +17896,11 @@ class ReadOtaSoftwareUpdateProviderEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateProvider EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16427,6 +17944,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderEventList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16462,8 +17984,11 @@ class ReadOtaSoftwareUpdateProviderAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateProvider AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16507,6 +18032,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16540,8 +18070,11 @@ class ReadOtaSoftwareUpdateProviderFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateProvider FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16585,6 +18118,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16618,8 +18156,11 @@ class ReadOtaSoftwareUpdateProviderClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateProvider ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16663,6 +18204,11 @@ class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateProvider.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16744,6 +18290,8 @@ class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -16791,8 +18339,13 @@ class ReadOtaSoftwareUpdateRequestorDefaultOTAProviders : public ReadAttribute { completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.DefaultOTAProviders response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor DefaultOTAProviders read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16849,6 +18402,8 @@ class WriteOtaSoftwareUpdateRequestorDefaultOTAProviders : public WriteAttribute completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("OTASoftwareUpdateRequestor DefaultOTAProviders write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16899,6 +18454,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.DefaultOTAProviders response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -16932,8 +18492,11 @@ class ReadOtaSoftwareUpdateRequestorUpdatePossible : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUpdatePossibleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.UpdatePossible response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor UpdatePossible read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -16977,6 +18540,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.UpdatePossible response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17010,8 +18578,11 @@ class ReadOtaSoftwareUpdateRequestorUpdateState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUpdateStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.UpdateState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor UpdateState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17055,6 +18626,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.UpdateState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17089,8 +18665,11 @@ class ReadOtaSoftwareUpdateRequestorUpdateStateProgress : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUpdateStateProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor UpdateStateProgress read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17135,6 +18714,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17169,8 +18753,11 @@ class ReadOtaSoftwareUpdateRequestorGeneratedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17215,6 +18802,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17249,8 +18841,11 @@ class ReadOtaSoftwareUpdateRequestorAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17295,6 +18890,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17330,8 +18930,11 @@ class ReadOtaSoftwareUpdateRequestorEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17375,6 +18978,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorEventList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17410,8 +19018,11 @@ class ReadOtaSoftwareUpdateRequestorAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17455,6 +19066,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17488,8 +19104,11 @@ class ReadOtaSoftwareUpdateRequestorFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17533,6 +19152,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17566,8 +19190,11 @@ class ReadOtaSoftwareUpdateRequestorClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OTASoftwareUpdateRequestor ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17611,6 +19238,11 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OTASoftwareUpdateRequestor.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17662,8 +19294,11 @@ class ReadLocalizationConfigurationActiveLocale : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveLocaleWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration ActiveLocale read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17707,6 +19342,8 @@ class WriteLocalizationConfigurationActiveLocale : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LocalizationConfiguration ActiveLocale write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17753,6 +19390,11 @@ class SubscribeAttributeLocalizationConfigurationActiveLocale : public Subscribe } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17786,8 +19428,11 @@ class ReadLocalizationConfigurationSupportedLocales : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedLocalesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration SupportedLocales read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17831,6 +19476,11 @@ class SubscribeAttributeLocalizationConfigurationSupportedLocales : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17865,8 +19515,11 @@ class ReadLocalizationConfigurationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17911,6 +19564,11 @@ class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -17945,8 +19603,11 @@ class ReadLocalizationConfigurationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -17990,6 +19651,11 @@ class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18025,8 +19691,11 @@ class ReadLocalizationConfigurationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18070,6 +19739,11 @@ class SubscribeAttributeLocalizationConfigurationEventList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18105,8 +19779,11 @@ class ReadLocalizationConfigurationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18150,6 +19827,11 @@ class SubscribeAttributeLocalizationConfigurationAttributeList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18183,8 +19865,11 @@ class ReadLocalizationConfigurationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18228,6 +19913,11 @@ class SubscribeAttributeLocalizationConfigurationFeatureMap : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18261,8 +19951,11 @@ class ReadLocalizationConfigurationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LocalizationConfiguration ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18306,6 +19999,11 @@ class SubscribeAttributeLocalizationConfigurationClusterRevision : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18358,8 +20056,11 @@ class ReadTimeFormatLocalizationHourFormat : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeHourFormatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization HourFormat read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18401,6 +20102,8 @@ class WriteTimeFormatLocalizationHourFormat : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("TimeFormatLocalization HourFormat write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18447,6 +20150,11 @@ class SubscribeAttributeTimeFormatLocalizationHourFormat : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18480,8 +20188,11 @@ class ReadTimeFormatLocalizationActiveCalendarType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveCalendarTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization ActiveCalendarType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18523,6 +20234,8 @@ class WriteTimeFormatLocalizationActiveCalendarType : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("TimeFormatLocalization ActiveCalendarType write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18569,6 +20282,11 @@ class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18603,8 +20321,11 @@ class ReadTimeFormatLocalizationSupportedCalendarTypes : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedCalendarTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization SupportedCalendarTypes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18648,6 +20369,11 @@ class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18681,8 +20407,11 @@ class ReadTimeFormatLocalizationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18726,6 +20455,11 @@ class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18759,8 +20493,11 @@ class ReadTimeFormatLocalizationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18804,6 +20541,11 @@ class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18839,8 +20581,11 @@ class ReadTimeFormatLocalizationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18884,6 +20629,11 @@ class SubscribeAttributeTimeFormatLocalizationEventList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18919,8 +20669,11 @@ class ReadTimeFormatLocalizationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -18964,6 +20717,11 @@ class SubscribeAttributeTimeFormatLocalizationAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -18997,8 +20755,11 @@ class ReadTimeFormatLocalizationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19042,6 +20803,11 @@ class SubscribeAttributeTimeFormatLocalizationFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19075,8 +20841,11 @@ class ReadTimeFormatLocalizationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeFormatLocalization ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19120,6 +20889,11 @@ class SubscribeAttributeTimeFormatLocalizationClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19170,8 +20944,11 @@ class ReadUnitLocalizationTemperatureUnit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitLocalization TemperatureUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19213,6 +20990,8 @@ class WriteUnitLocalizationTemperatureUnit : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitLocalization TemperatureUnit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19259,6 +21038,11 @@ class SubscribeAttributeUnitLocalizationTemperatureUnit : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19292,8 +21076,11 @@ class ReadUnitLocalizationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitLocalization GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19337,6 +21124,11 @@ class SubscribeAttributeUnitLocalizationGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19370,8 +21162,11 @@ class ReadUnitLocalizationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitLocalization AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19415,6 +21210,11 @@ class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19450,8 +21250,11 @@ class ReadUnitLocalizationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitLocalization EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19495,6 +21298,11 @@ class SubscribeAttributeUnitLocalizationEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19530,8 +21338,11 @@ class ReadUnitLocalizationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitLocalization AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19575,6 +21386,11 @@ class SubscribeAttributeUnitLocalizationAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19608,8 +21424,11 @@ class ReadUnitLocalizationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitLocalization FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19653,6 +21472,11 @@ class SubscribeAttributeUnitLocalizationFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19686,8 +21510,11 @@ class ReadUnitLocalizationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitLocalization ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19731,6 +21558,11 @@ class SubscribeAttributeUnitLocalizationClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19781,8 +21613,11 @@ class ReadPowerSourceConfigurationSources : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSourcesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSourceConfiguration Sources read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19826,6 +21661,11 @@ class SubscribeAttributePowerSourceConfigurationSources : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19860,8 +21700,11 @@ class ReadPowerSourceConfigurationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSourceConfiguration GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19905,6 +21748,11 @@ class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -19939,8 +21787,11 @@ class ReadPowerSourceConfigurationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSourceConfiguration AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -19984,6 +21835,11 @@ class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public Sub } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20019,8 +21875,11 @@ class ReadPowerSourceConfigurationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSourceConfiguration EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20064,6 +21923,11 @@ class SubscribeAttributePowerSourceConfigurationEventList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20099,8 +21963,11 @@ class ReadPowerSourceConfigurationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSourceConfiguration AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20144,6 +22011,11 @@ class SubscribeAttributePowerSourceConfigurationAttributeList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20177,8 +22049,11 @@ class ReadPowerSourceConfigurationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSourceConfiguration FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20222,6 +22097,11 @@ class SubscribeAttributePowerSourceConfigurationFeatureMap : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20255,8 +22135,11 @@ class ReadPowerSourceConfigurationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSourceConfiguration ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20300,6 +22183,11 @@ class SubscribeAttributePowerSourceConfigurationClusterRevision : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20384,8 +22272,11 @@ class ReadPowerSourceStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Status response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource Status read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20429,6 +22320,11 @@ class SubscribeAttributePowerSourceStatus : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Status response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20462,8 +22358,11 @@ class ReadPowerSourceOrder : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOrderWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Order response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource Order read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20507,6 +22406,11 @@ class SubscribeAttributePowerSourceOrder : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Order response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20540,8 +22444,11 @@ class ReadPowerSourceDescription : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Description response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource Description read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20585,6 +22492,11 @@ class SubscribeAttributePowerSourceDescription : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.Description response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20618,8 +22530,11 @@ class ReadPowerSourceWiredAssessedInputVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiredAssessedInputVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource WiredAssessedInputVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20663,6 +22578,11 @@ class SubscribeAttributePowerSourceWiredAssessedInputVoltage : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20696,8 +22616,11 @@ class ReadPowerSourceWiredAssessedInputFrequency : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiredAssessedInputFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource WiredAssessedInputFrequency read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20741,6 +22664,11 @@ class SubscribeAttributePowerSourceWiredAssessedInputFrequency : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20774,8 +22702,11 @@ class ReadPowerSourceWiredCurrentType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiredCurrentTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource WiredCurrentType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20819,6 +22750,11 @@ class SubscribeAttributePowerSourceWiredCurrentType : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20852,8 +22788,11 @@ class ReadPowerSourceWiredAssessedCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiredAssessedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource WiredAssessedCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20897,6 +22836,11 @@ class SubscribeAttributePowerSourceWiredAssessedCurrent : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -20930,8 +22874,11 @@ class ReadPowerSourceWiredNominalVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiredNominalVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource WiredNominalVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -20975,6 +22922,11 @@ class SubscribeAttributePowerSourceWiredNominalVoltage : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21008,8 +22960,11 @@ class ReadPowerSourceWiredMaximumCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiredMaximumCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource WiredMaximumCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21053,6 +23008,11 @@ class SubscribeAttributePowerSourceWiredMaximumCurrent : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21086,8 +23046,11 @@ class ReadPowerSourceWiredPresent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiredPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredPresent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource WiredPresent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21131,6 +23094,11 @@ class SubscribeAttributePowerSourceWiredPresent : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.WiredPresent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21164,8 +23132,11 @@ class ReadPowerSourceActiveWiredFaults : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveWiredFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource ActiveWiredFaults read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21209,6 +23180,11 @@ class SubscribeAttributePowerSourceActiveWiredFaults : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21242,8 +23218,11 @@ class ReadPowerSourceBatVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21287,6 +23266,11 @@ class SubscribeAttributePowerSourceBatVoltage : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21320,8 +23304,11 @@ class ReadPowerSourceBatPercentRemaining : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatPercentRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatPercentRemaining response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatPercentRemaining read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21365,6 +23352,11 @@ class SubscribeAttributePowerSourceBatPercentRemaining : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatPercentRemaining response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21398,8 +23390,11 @@ class ReadPowerSourceBatTimeRemaining : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatTimeRemaining response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatTimeRemaining read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21443,6 +23438,11 @@ class SubscribeAttributePowerSourceBatTimeRemaining : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatTimeRemaining response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21476,8 +23476,11 @@ class ReadPowerSourceBatChargeLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatChargeLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatChargeLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21521,6 +23524,11 @@ class SubscribeAttributePowerSourceBatChargeLevel : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21554,8 +23562,11 @@ class ReadPowerSourceBatReplacementNeeded : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatReplacementNeededWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatReplacementNeeded read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21599,6 +23610,11 @@ class SubscribeAttributePowerSourceBatReplacementNeeded : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21632,8 +23648,11 @@ class ReadPowerSourceBatReplaceability : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatReplaceabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplaceability response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatReplaceability read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21677,6 +23696,11 @@ class SubscribeAttributePowerSourceBatReplaceability : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplaceability response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21710,8 +23734,11 @@ class ReadPowerSourceBatPresent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatPresent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatPresent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21755,6 +23782,11 @@ class SubscribeAttributePowerSourceBatPresent : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatPresent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21788,8 +23820,11 @@ class ReadPowerSourceActiveBatFaults : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveBatFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatFaults response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource ActiveBatFaults read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21833,6 +23868,11 @@ class SubscribeAttributePowerSourceActiveBatFaults : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatFaults response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21866,8 +23906,11 @@ class ReadPowerSourceBatReplacementDescription : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatReplacementDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatReplacementDescription read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21911,6 +23954,11 @@ class SubscribeAttributePowerSourceBatReplacementDescription : public SubscribeA } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -21944,8 +23992,11 @@ class ReadPowerSourceBatCommonDesignation : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatCommonDesignationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatCommonDesignation read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -21989,6 +24040,11 @@ class SubscribeAttributePowerSourceBatCommonDesignation : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22022,8 +24078,11 @@ class ReadPowerSourceBatANSIDesignation : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatANSIDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatANSIDesignation read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22067,6 +24126,11 @@ class SubscribeAttributePowerSourceBatANSIDesignation : public SubscribeAttribut } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22100,8 +24164,11 @@ class ReadPowerSourceBatIECDesignation : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatIECDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatIECDesignation read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22145,6 +24212,11 @@ class SubscribeAttributePowerSourceBatIECDesignation : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22178,8 +24250,11 @@ class ReadPowerSourceBatApprovedChemistry : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatApprovedChemistryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatApprovedChemistry read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22223,6 +24298,11 @@ class SubscribeAttributePowerSourceBatApprovedChemistry : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22256,8 +24336,11 @@ class ReadPowerSourceBatCapacity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatCapacity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatCapacity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22301,6 +24384,11 @@ class SubscribeAttributePowerSourceBatCapacity : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatCapacity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22334,8 +24422,11 @@ class ReadPowerSourceBatQuantity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatQuantity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatQuantity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22379,6 +24470,11 @@ class SubscribeAttributePowerSourceBatQuantity : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatQuantity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22412,8 +24508,11 @@ class ReadPowerSourceBatChargeState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatChargeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargeState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatChargeState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22457,6 +24556,11 @@ class SubscribeAttributePowerSourceBatChargeState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargeState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22490,8 +24594,11 @@ class ReadPowerSourceBatTimeToFullCharge : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatTimeToFullChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatTimeToFullCharge read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22535,6 +24642,11 @@ class SubscribeAttributePowerSourceBatTimeToFullCharge : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22568,8 +24680,11 @@ class ReadPowerSourceBatFunctionalWhileCharging : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatFunctionalWhileChargingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatFunctionalWhileCharging read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22613,6 +24728,11 @@ class SubscribeAttributePowerSourceBatFunctionalWhileCharging : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22646,8 +24766,11 @@ class ReadPowerSourceBatChargingCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatChargingCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource BatChargingCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22691,6 +24814,11 @@ class SubscribeAttributePowerSourceBatChargingCurrent : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22724,8 +24852,11 @@ class ReadPowerSourceActiveBatChargeFaults : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveBatChargeFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource ActiveBatChargeFaults read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22769,6 +24900,11 @@ class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22804,8 +24940,11 @@ class ReadPowerSourceEndpointList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEndpointListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.EndpointList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource EndpointList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22849,6 +24988,11 @@ class SubscribeAttributePowerSourceEndpointList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.EndpointList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22884,8 +25028,11 @@ class ReadPowerSourceGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -22929,6 +25076,11 @@ class SubscribeAttributePowerSourceGeneratedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -22962,8 +25114,11 @@ class ReadPowerSourceAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23007,6 +25162,11 @@ class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23042,8 +25202,11 @@ class ReadPowerSourceEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23087,6 +25250,11 @@ class SubscribeAttributePowerSourceEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23122,8 +25290,11 @@ class ReadPowerSourceAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23167,6 +25338,11 @@ class SubscribeAttributePowerSourceAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23200,8 +25376,11 @@ class ReadPowerSourceFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23245,6 +25424,11 @@ class SubscribeAttributePowerSourceFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23278,8 +25462,11 @@ class ReadPowerSourceClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PowerSource ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23323,6 +25510,11 @@ class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PowerSource.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23387,19 +25579,28 @@ class GeneralCommissioningArmFailSafe : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster armFailSafeWithParams:params - completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + armFailSafeWithParams:params + completion:^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -23450,10 +25651,20 @@ class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand { completion:^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning:: + Commands::SetRegulatoryConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning:: + Commands::SetRegulatoryConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -23501,10 +25712,20 @@ class GeneralCommissioningCommissioningComplete : public ClusterCommand { MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning:: + Commands::CommissioningCompleteResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning:: + Commands::CommissioningCompleteResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -23543,8 +25764,11 @@ class ReadGeneralCommissioningBreadcrumb : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning Breadcrumb read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23586,6 +25810,8 @@ class WriteGeneralCommissioningBreadcrumb : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("GeneralCommissioning Breadcrumb write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23632,6 +25858,11 @@ class SubscribeAttributeGeneralCommissioningBreadcrumb : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23666,8 +25897,11 @@ class ReadGeneralCommissioningBasicCommissioningInfo : public ReadAttribute { [cluster readAttributeBasicCommissioningInfoWithCompletion:^( MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning BasicCommissioningInfo read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23711,6 +25945,11 @@ class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public Subs } reportHandler:^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23744,8 +25983,11 @@ class ReadGeneralCommissioningRegulatoryConfig : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRegulatoryConfigWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning RegulatoryConfig read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23789,6 +26031,11 @@ class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23822,8 +26069,11 @@ class ReadGeneralCommissioningLocationCapability : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLocationCapabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning LocationCapability read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23867,6 +26117,11 @@ class SubscribeAttributeGeneralCommissioningLocationCapability : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23901,8 +26156,11 @@ class ReadGeneralCommissioningSupportsConcurrentConnection : public ReadAttribut queue:callbackQueue]; [cluster readAttributeSupportsConcurrentConnectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning SupportsConcurrentConnection read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -23947,6 +26205,11 @@ class SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -23980,8 +26243,11 @@ class ReadGeneralCommissioningGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24025,6 +26291,11 @@ class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24058,8 +26329,11 @@ class ReadGeneralCommissioningAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24103,6 +26377,11 @@ class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24138,8 +26417,11 @@ class ReadGeneralCommissioningEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24183,6 +26465,11 @@ class SubscribeAttributeGeneralCommissioningEventList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24218,8 +26505,11 @@ class ReadGeneralCommissioningAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24263,6 +26553,11 @@ class SubscribeAttributeGeneralCommissioningAttributeList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24296,8 +26591,11 @@ class ReadGeneralCommissioningFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24341,6 +26639,11 @@ class SubscribeAttributeGeneralCommissioningFeatureMap : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24374,8 +26677,11 @@ class ReadGeneralCommissioningClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralCommissioning ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24419,6 +26725,11 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24502,19 +26813,28 @@ class NetworkCommissioningScanNetworks : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster scanNetworksWithParams:params - completion:^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + scanNetworksWithParams:params + completion:^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -24567,10 +26887,20 @@ class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand { completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -24627,10 +26957,20 @@ class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand { completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning:: + Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning:: + Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -24681,19 +27021,29 @@ class NetworkCommissioningRemoveNetwork : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster removeNetworkWithParams:params - completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + removeNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -24739,19 +27089,29 @@ class NetworkCommissioningConnectNetwork : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster connectNetworkWithParams:params - completion:^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + connectNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -24799,19 +27159,29 @@ class NetworkCommissioningReorderNetwork : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster reorderNetworkWithParams:params - completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + reorderNetworkWithParams:params + completion:^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -24846,8 +27216,11 @@ class ReadNetworkCommissioningMaxNetworks : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxNetworksWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning MaxNetworks read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24891,6 +27264,11 @@ class SubscribeAttributeNetworkCommissioningMaxNetworks : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -24924,8 +27302,11 @@ class ReadNetworkCommissioningNetworks : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNetworksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.Networks response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning Networks read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -24969,6 +27350,11 @@ class SubscribeAttributeNetworkCommissioningNetworks : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.Networks response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25002,8 +27388,11 @@ class ReadNetworkCommissioningScanMaxTimeSeconds : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeScanMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning ScanMaxTimeSeconds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25047,6 +27436,11 @@ class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25080,8 +27474,11 @@ class ReadNetworkCommissioningConnectMaxTimeSeconds : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeConnectMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning ConnectMaxTimeSeconds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25125,6 +27522,11 @@ class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25158,8 +27560,11 @@ class ReadNetworkCommissioningInterfaceEnabled : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInterfaceEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning InterfaceEnabled read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25201,6 +27606,8 @@ class WriteNetworkCommissioningInterfaceEnabled : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("NetworkCommissioning InterfaceEnabled write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25247,6 +27654,11 @@ class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25280,8 +27692,11 @@ class ReadNetworkCommissioningLastNetworkingStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLastNetworkingStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning LastNetworkingStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25325,6 +27740,11 @@ class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25358,8 +27778,11 @@ class ReadNetworkCommissioningLastNetworkID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLastNetworkIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning LastNetworkID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25403,6 +27826,11 @@ class SubscribeAttributeNetworkCommissioningLastNetworkID : public SubscribeAttr } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25436,8 +27864,11 @@ class ReadNetworkCommissioningLastConnectErrorValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLastConnectErrorValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning LastConnectErrorValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25481,6 +27912,11 @@ class SubscribeAttributeNetworkCommissioningLastConnectErrorValue : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25514,8 +27950,11 @@ class ReadNetworkCommissioningGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25559,6 +27998,11 @@ class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25592,8 +28036,11 @@ class ReadNetworkCommissioningAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25637,6 +28084,11 @@ class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25672,8 +28124,11 @@ class ReadNetworkCommissioningEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25717,6 +28172,11 @@ class SubscribeAttributeNetworkCommissioningEventList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25752,8 +28212,11 @@ class ReadNetworkCommissioningAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25797,6 +28260,11 @@ class SubscribeAttributeNetworkCommissioningAttributeList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25830,8 +28298,11 @@ class ReadNetworkCommissioningFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25875,6 +28346,11 @@ class SubscribeAttributeNetworkCommissioningFeatureMap : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -25908,8 +28384,11 @@ class ReadNetworkCommissioningClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NetworkCommissioning ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -25953,6 +28432,11 @@ class SubscribeAttributeNetworkCommissioningClusterRevision : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26022,10 +28506,20 @@ class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand { completion:^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -26065,8 +28559,11 @@ class ReadDiagnosticLogsGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DiagnosticLogs GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26110,6 +28607,11 @@ class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26143,8 +28645,11 @@ class ReadDiagnosticLogsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DiagnosticLogs AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26188,6 +28693,11 @@ class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26223,8 +28733,11 @@ class ReadDiagnosticLogsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DiagnosticLogs EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26268,6 +28781,11 @@ class SubscribeAttributeDiagnosticLogsEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26303,8 +28821,11 @@ class ReadDiagnosticLogsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DiagnosticLogs AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26348,6 +28869,11 @@ class SubscribeAttributeDiagnosticLogsAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26381,8 +28907,11 @@ class ReadDiagnosticLogsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DiagnosticLogs FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26426,6 +28955,11 @@ class SubscribeAttributeDiagnosticLogsFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26459,8 +28993,11 @@ class ReadDiagnosticLogsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DiagnosticLogs ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26504,6 +29041,11 @@ class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26580,6 +29122,8 @@ class GeneralDiagnosticsTestEventTrigger : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -26619,8 +29163,11 @@ class ReadGeneralDiagnosticsNetworkInterfaces : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNetworkInterfacesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics NetworkInterfaces read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26664,6 +29211,11 @@ class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26697,8 +29249,11 @@ class ReadGeneralDiagnosticsRebootCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRebootCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics RebootCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26742,6 +29297,11 @@ class SubscribeAttributeGeneralDiagnosticsRebootCount : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26775,8 +29335,11 @@ class ReadGeneralDiagnosticsUpTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUpTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics UpTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26820,6 +29383,11 @@ class SubscribeAttributeGeneralDiagnosticsUpTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26853,8 +29421,11 @@ class ReadGeneralDiagnosticsTotalOperationalHours : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTotalOperationalHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics TotalOperationalHours read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26898,6 +29469,11 @@ class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -26931,8 +29507,11 @@ class ReadGeneralDiagnosticsBootReason : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBootReasonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.BootReason response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics BootReason read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -26976,6 +29555,11 @@ class SubscribeAttributeGeneralDiagnosticsBootReason : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.BootReason response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27009,8 +29593,11 @@ class ReadGeneralDiagnosticsActiveHardwareFaults : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveHardwareFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics ActiveHardwareFaults read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27054,6 +29641,11 @@ class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27087,8 +29679,11 @@ class ReadGeneralDiagnosticsActiveRadioFaults : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveRadioFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics ActiveRadioFaults read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27132,6 +29727,11 @@ class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27165,8 +29765,11 @@ class ReadGeneralDiagnosticsActiveNetworkFaults : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveNetworkFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics ActiveNetworkFaults read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27210,6 +29813,11 @@ class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27243,8 +29851,11 @@ class ReadGeneralDiagnosticsTestEventTriggersEnabled : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTestEventTriggersEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics TestEventTriggersEnabled read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27288,6 +29899,11 @@ class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27321,8 +29937,11 @@ class ReadGeneralDiagnosticsGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27366,6 +29985,11 @@ class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27399,8 +30023,11 @@ class ReadGeneralDiagnosticsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27444,6 +30071,11 @@ class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27479,8 +30111,11 @@ class ReadGeneralDiagnosticsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27524,6 +30159,11 @@ class SubscribeAttributeGeneralDiagnosticsEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27559,8 +30199,11 @@ class ReadGeneralDiagnosticsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27604,6 +30247,11 @@ class SubscribeAttributeGeneralDiagnosticsAttributeList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27637,8 +30285,11 @@ class ReadGeneralDiagnosticsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27682,6 +30333,11 @@ class SubscribeAttributeGeneralDiagnosticsFeatureMap : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27715,8 +30371,11 @@ class ReadGeneralDiagnosticsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GeneralDiagnostics ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27760,6 +30419,11 @@ class SubscribeAttributeGeneralDiagnosticsClusterRevision : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27824,6 +30488,8 @@ class SoftwareDiagnosticsResetWatermarks : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -27862,8 +30528,11 @@ class ReadSoftwareDiagnosticsThreadMetrics : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeThreadMetricsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics ThreadMetrics read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27907,6 +30576,11 @@ class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -27940,8 +30614,11 @@ class ReadSoftwareDiagnosticsCurrentHeapFree : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentHeapFreeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics CurrentHeapFree read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -27985,6 +30662,11 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28018,8 +30700,11 @@ class ReadSoftwareDiagnosticsCurrentHeapUsed : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentHeapUsedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics CurrentHeapUsed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28063,6 +30748,11 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28097,8 +30787,11 @@ class ReadSoftwareDiagnosticsCurrentHeapHighWatermark : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentHeapHighWatermarkWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics CurrentHeapHighWatermark read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28142,6 +30835,11 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28175,8 +30873,11 @@ class ReadSoftwareDiagnosticsGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28220,6 +30921,11 @@ class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28253,8 +30959,11 @@ class ReadSoftwareDiagnosticsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28298,6 +31007,11 @@ class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28333,8 +31047,11 @@ class ReadSoftwareDiagnosticsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28378,6 +31095,11 @@ class SubscribeAttributeSoftwareDiagnosticsEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28413,8 +31135,11 @@ class ReadSoftwareDiagnosticsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28458,6 +31183,11 @@ class SubscribeAttributeSoftwareDiagnosticsAttributeList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28491,8 +31221,11 @@ class ReadSoftwareDiagnosticsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28536,6 +31269,11 @@ class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28569,8 +31307,11 @@ class ReadSoftwareDiagnosticsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SoftwareDiagnostics ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28614,6 +31355,11 @@ class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28732,17 +31478,19 @@ class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetCountsWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -28776,8 +31524,11 @@ class ReadThreadNetworkDiagnosticsChannel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeChannelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics Channel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28821,6 +31572,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannel : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28854,8 +31610,11 @@ class ReadThreadNetworkDiagnosticsRoutingRole : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRoutingRoleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RoutingRole read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28899,6 +31658,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -28932,8 +31696,11 @@ class ReadThreadNetworkDiagnosticsNetworkName : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNetworkNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics NetworkName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -28977,6 +31744,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public SubscribeAt } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29010,8 +31782,11 @@ class ReadThreadNetworkDiagnosticsPanId : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics PanId read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29055,6 +31830,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsPanId : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29088,8 +31868,11 @@ class ReadThreadNetworkDiagnosticsExtendedPanId : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeExtendedPanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics ExtendedPanId read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29133,6 +31916,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29166,8 +31954,11 @@ class ReadThreadNetworkDiagnosticsMeshLocalPrefix : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeshLocalPrefixWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics MeshLocalPrefix read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29211,6 +32002,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public Subscri } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29244,8 +32040,11 @@ class ReadThreadNetworkDiagnosticsOverrunCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics OverrunCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29289,6 +32088,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29322,8 +32126,11 @@ class ReadThreadNetworkDiagnosticsNeighborTable : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNeighborTableWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NeighborTable response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics NeighborTable read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29367,6 +32174,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsNeighborTable : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.NeighborTable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29400,8 +32212,11 @@ class ReadThreadNetworkDiagnosticsRouteTable : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRouteTableWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouteTable response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RouteTable read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29445,6 +32260,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouteTable : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouteTable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29478,8 +32298,11 @@ class ReadThreadNetworkDiagnosticsPartitionId : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePartitionIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics PartitionId read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29523,6 +32346,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29556,8 +32384,11 @@ class ReadThreadNetworkDiagnosticsWeighting : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWeightingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics Weighting read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29601,6 +32432,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29634,8 +32470,11 @@ class ReadThreadNetworkDiagnosticsDataVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics DataVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29679,6 +32518,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29712,8 +32556,11 @@ class ReadThreadNetworkDiagnosticsStableDataVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStableDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics StableDataVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29757,6 +32604,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29790,8 +32642,11 @@ class ReadThreadNetworkDiagnosticsLeaderRouterId : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLeaderRouterIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics LeaderRouterId read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29835,6 +32690,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29868,8 +32728,11 @@ class ReadThreadNetworkDiagnosticsDetachedRoleCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDetachedRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics DetachedRoleCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29913,6 +32776,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -29946,8 +32814,11 @@ class ReadThreadNetworkDiagnosticsChildRoleCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeChildRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics ChildRoleCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -29991,6 +32862,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30024,8 +32900,11 @@ class ReadThreadNetworkDiagnosticsRouterRoleCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRouterRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RouterRoleCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30069,6 +32948,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30102,8 +32986,11 @@ class ReadThreadNetworkDiagnosticsLeaderRoleCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLeaderRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics LeaderRoleCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30147,6 +33034,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30180,8 +33072,11 @@ class ReadThreadNetworkDiagnosticsAttachAttemptCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics AttachAttemptCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30225,6 +33120,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30259,8 +33159,11 @@ class ReadThreadNetworkDiagnosticsPartitionIdChangeCount : public ReadAttribute queue:callbackQueue]; [cluster readAttributePartitionIdChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics PartitionIdChangeCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30305,6 +33208,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30340,8 +33248,11 @@ class ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public Rea [cluster readAttributeBetterPartitionAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics BetterPartitionAttachAttemptCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30386,6 +33297,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCoun } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30419,8 +33335,11 @@ class ReadThreadNetworkDiagnosticsParentChangeCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeParentChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics ParentChangeCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30464,6 +33383,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30497,8 +33421,11 @@ class ReadThreadNetworkDiagnosticsTxTotalCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxTotalCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30542,6 +33469,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30575,8 +33507,11 @@ class ReadThreadNetworkDiagnosticsTxUnicastCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxUnicastCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30620,6 +33555,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30653,8 +33593,11 @@ class ReadThreadNetworkDiagnosticsTxBroadcastCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxBroadcastCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30698,6 +33641,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30732,8 +33680,11 @@ class ReadThreadNetworkDiagnosticsTxAckRequestedCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxAckRequestedCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30777,6 +33728,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30810,8 +33766,11 @@ class ReadThreadNetworkDiagnosticsTxAckedCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxAckedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxAckedCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30855,6 +33814,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30889,8 +33853,11 @@ class ReadThreadNetworkDiagnosticsTxNoAckRequestedCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxNoAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxNoAckRequestedCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -30935,6 +33902,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -30968,8 +33940,11 @@ class ReadThreadNetworkDiagnosticsTxDataCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxDataCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31013,6 +33988,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31046,8 +34026,11 @@ class ReadThreadNetworkDiagnosticsTxDataPollCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxDataPollCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31091,6 +34074,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31124,8 +34112,11 @@ class ReadThreadNetworkDiagnosticsTxBeaconCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxBeaconCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31169,6 +34160,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31203,8 +34199,11 @@ class ReadThreadNetworkDiagnosticsTxBeaconRequestCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxBeaconRequestCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31248,6 +34247,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31281,8 +34285,11 @@ class ReadThreadNetworkDiagnosticsTxOtherCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxOtherCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31326,6 +34333,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31359,8 +34371,11 @@ class ReadThreadNetworkDiagnosticsTxRetryCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxRetryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxRetryCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31404,6 +34419,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31438,8 +34458,11 @@ class ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public ReadAttri queue:callbackQueue]; [cluster readAttributeTxDirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxDirectMaxRetryExpiryCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31484,6 +34507,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31518,8 +34546,11 @@ class ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public ReadAtt queue:callbackQueue]; [cluster readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxIndirectMaxRetryExpiryCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31564,6 +34595,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31597,8 +34633,11 @@ class ReadThreadNetworkDiagnosticsTxErrCcaCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxErrCcaCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxErrCcaCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31642,6 +34681,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31675,8 +34719,11 @@ class ReadThreadNetworkDiagnosticsTxErrAbortCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxErrAbortCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxErrAbortCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31720,6 +34767,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31754,8 +34806,11 @@ class ReadThreadNetworkDiagnosticsTxErrBusyChannelCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxErrBusyChannelCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics TxErrBusyChannelCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31800,6 +34855,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31833,8 +34893,11 @@ class ReadThreadNetworkDiagnosticsRxTotalCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxTotalCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31878,6 +34941,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31911,8 +34979,11 @@ class ReadThreadNetworkDiagnosticsRxUnicastCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxUnicastCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -31956,6 +35027,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -31989,8 +35065,11 @@ class ReadThreadNetworkDiagnosticsRxBroadcastCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxBroadcastCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32034,6 +35113,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32067,8 +35151,11 @@ class ReadThreadNetworkDiagnosticsRxDataCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxDataCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32112,6 +35199,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32145,8 +35237,11 @@ class ReadThreadNetworkDiagnosticsRxDataPollCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxDataPollCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32190,6 +35285,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32223,8 +35323,11 @@ class ReadThreadNetworkDiagnosticsRxBeaconCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxBeaconCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32268,6 +35371,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32302,8 +35410,11 @@ class ReadThreadNetworkDiagnosticsRxBeaconRequestCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxBeaconRequestCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32347,6 +35458,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32380,8 +35496,11 @@ class ReadThreadNetworkDiagnosticsRxOtherCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxOtherCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32425,6 +35544,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32459,8 +35583,11 @@ class ReadThreadNetworkDiagnosticsRxAddressFilteredCount : public ReadAttribute queue:callbackQueue]; [cluster readAttributeRxAddressFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxAddressFilteredCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32505,6 +35632,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32539,8 +35671,11 @@ class ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount : public ReadAttribute queue:callbackQueue]; [cluster readAttributeRxDestAddrFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxDestAddrFilteredCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32585,6 +35720,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32618,8 +35758,11 @@ class ReadThreadNetworkDiagnosticsRxDuplicatedCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxDuplicatedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxDuplicatedCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32663,6 +35806,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32696,8 +35844,11 @@ class ReadThreadNetworkDiagnosticsRxErrNoFrameCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxErrNoFrameCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxErrNoFrameCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32741,6 +35892,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32775,8 +35931,11 @@ class ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public ReadAttribu queue:callbackQueue]; [cluster readAttributeRxErrUnknownNeighborCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxErrUnknownNeighborCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32821,6 +35980,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32855,8 +36019,11 @@ class ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public ReadAttribut queue:callbackQueue]; [cluster readAttributeRxErrInvalidSrcAddrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxErrInvalidSrcAddrCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32901,6 +36068,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -32934,8 +36106,11 @@ class ReadThreadNetworkDiagnosticsRxErrSecCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxErrSecCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxErrSecCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -32979,6 +36154,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33012,8 +36192,11 @@ class ReadThreadNetworkDiagnosticsRxErrFcsCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxErrFcsCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxErrFcsCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33057,6 +36240,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33090,8 +36278,11 @@ class ReadThreadNetworkDiagnosticsRxErrOtherCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRxErrOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics RxErrOtherCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33135,6 +36326,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33168,8 +36364,11 @@ class ReadThreadNetworkDiagnosticsActiveTimestamp : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics ActiveTimestamp read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33213,6 +36412,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33246,8 +36450,11 @@ class ReadThreadNetworkDiagnosticsPendingTimestamp : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePendingTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics PendingTimestamp read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33291,6 +36498,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33324,8 +36536,11 @@ class ReadThreadNetworkDiagnosticsDelay : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics Delay read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33369,6 +36584,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsDelay : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33403,8 +36623,11 @@ class ReadThreadNetworkDiagnosticsSecurityPolicy : public ReadAttribute { [cluster readAttributeSecurityPolicyWithCompletion:^( MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics SecurityPolicy read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33448,6 +36671,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public Subscrib } reportHandler:^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33481,8 +36709,11 @@ class ReadThreadNetworkDiagnosticsChannelPage0Mask : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeChannelPage0MaskWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChannelPage0Mask response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics ChannelPage0Mask read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33526,6 +36757,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask : public Subscr } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ChannelPage0Mask response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33561,8 +36797,11 @@ class ReadThreadNetworkDiagnosticsOperationalDatasetComponents : public ReadAttr [cluster readAttributeOperationalDatasetComponentsWithCompletion:^( MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics OperationalDatasetComponents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33608,6 +36847,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : p reportHandler:^( MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33642,8 +36886,11 @@ class ReadThreadNetworkDiagnosticsActiveNetworkFaultsList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeActiveNetworkFaultsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics ActiveNetworkFaultsList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33688,6 +36935,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33722,8 +36974,11 @@ class ReadThreadNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33767,6 +37022,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33801,8 +37061,11 @@ class ReadThreadNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33846,6 +37109,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public Sub } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33881,8 +37149,11 @@ class ReadThreadNetworkDiagnosticsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -33926,6 +37197,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsEventList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -33961,8 +37237,11 @@ class ReadThreadNetworkDiagnosticsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34006,6 +37285,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34039,8 +37323,11 @@ class ReadThreadNetworkDiagnosticsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34084,6 +37371,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsFeatureMap : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34117,8 +37409,11 @@ class ReadThreadNetworkDiagnosticsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThreadNetworkDiagnostics ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34162,6 +37457,11 @@ class SubscribeAttributeThreadNetworkDiagnosticsClusterRevision : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34231,17 +37531,19 @@ class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetCountsWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -34275,8 +37577,11 @@ class ReadWiFiNetworkDiagnosticsBssid : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBSSIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BSSID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics BSSID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34320,6 +37625,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public SubscribeAttribute } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BSSID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34353,8 +37663,11 @@ class ReadWiFiNetworkDiagnosticsSecurityType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSecurityTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics SecurityType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34398,6 +37711,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34431,8 +37749,11 @@ class ReadWiFiNetworkDiagnosticsWiFiVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWiFiVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics WiFiVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34476,6 +37797,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34509,8 +37835,11 @@ class ReadWiFiNetworkDiagnosticsChannelNumber : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeChannelNumberWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics ChannelNumber read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34554,6 +37883,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34587,8 +37921,11 @@ class ReadWiFiNetworkDiagnosticsRssi : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRSSIWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.RSSI response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics RSSI read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34632,6 +37969,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.RSSI response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34665,8 +38007,11 @@ class ReadWiFiNetworkDiagnosticsBeaconLostCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics BeaconLostCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34710,6 +38055,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34743,8 +38093,11 @@ class ReadWiFiNetworkDiagnosticsBeaconRxCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics BeaconRxCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34788,6 +38141,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34822,8 +38180,11 @@ class ReadWiFiNetworkDiagnosticsPacketMulticastRxCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics PacketMulticastRxCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34867,6 +38228,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34901,8 +38267,11 @@ class ReadWiFiNetworkDiagnosticsPacketMulticastTxCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics PacketMulticastTxCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -34946,6 +38315,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -34979,8 +38353,11 @@ class ReadWiFiNetworkDiagnosticsPacketUnicastRxCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics PacketUnicastRxCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35024,6 +38401,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35057,8 +38439,11 @@ class ReadWiFiNetworkDiagnosticsPacketUnicastTxCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics PacketUnicastTxCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35102,6 +38487,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35135,8 +38525,11 @@ class ReadWiFiNetworkDiagnosticsCurrentMaxRate : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentMaxRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics CurrentMaxRate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35180,6 +38573,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35213,8 +38611,11 @@ class ReadWiFiNetworkDiagnosticsOverrunCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics OverrunCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35258,6 +38659,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35291,8 +38697,11 @@ class ReadWiFiNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35336,6 +38745,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35369,8 +38783,11 @@ class ReadWiFiNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35414,6 +38831,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35449,8 +38871,11 @@ class ReadWiFiNetworkDiagnosticsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35494,6 +38919,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsEventList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35529,8 +38959,11 @@ class ReadWiFiNetworkDiagnosticsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35574,6 +39007,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35607,8 +39045,11 @@ class ReadWiFiNetworkDiagnosticsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35652,6 +39093,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35685,8 +39131,11 @@ class ReadWiFiNetworkDiagnosticsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WiFiNetworkDiagnostics ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35730,6 +39179,11 @@ class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35792,17 +39246,19 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetCountsWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + resetCountsWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -35836,8 +39292,11 @@ class ReadEthernetNetworkDiagnosticsPHYRate : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics PHYRate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35881,6 +39340,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPHYRate : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35914,8 +39378,11 @@ class ReadEthernetNetworkDiagnosticsFullDuplex : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFullDuplexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics FullDuplex read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -35959,6 +39426,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -35992,8 +39464,11 @@ class ReadEthernetNetworkDiagnosticsPacketRxCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics PacketRxCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36037,6 +39512,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36070,8 +39550,11 @@ class ReadEthernetNetworkDiagnosticsPacketTxCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics PacketTxCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36115,6 +39598,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36148,8 +39636,11 @@ class ReadEthernetNetworkDiagnosticsTxErrCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics TxErrCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36193,6 +39684,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36226,8 +39722,11 @@ class ReadEthernetNetworkDiagnosticsCollisionCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics CollisionCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36271,6 +39770,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36304,8 +39808,11 @@ class ReadEthernetNetworkDiagnosticsOverrunCount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics OverrunCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36349,6 +39856,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36382,8 +39894,11 @@ class ReadEthernetNetworkDiagnosticsCarrierDetect : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCarrierDetectWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics CarrierDetect read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36427,6 +39942,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36460,8 +39980,11 @@ class ReadEthernetNetworkDiagnosticsTimeSinceReset : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTimeSinceResetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics TimeSinceReset read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36505,6 +40028,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36539,8 +40067,11 @@ class ReadEthernetNetworkDiagnosticsGeneratedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36585,6 +40116,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36619,8 +40155,11 @@ class ReadEthernetNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36665,6 +40204,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36700,8 +40244,11 @@ class ReadEthernetNetworkDiagnosticsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36745,6 +40292,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsEventList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36780,8 +40332,11 @@ class ReadEthernetNetworkDiagnosticsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36825,6 +40380,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36858,8 +40418,11 @@ class ReadEthernetNetworkDiagnosticsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36903,6 +40466,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -36936,8 +40504,11 @@ class ReadEthernetNetworkDiagnosticsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("EthernetNetworkDiagnostics ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -36981,6 +40552,11 @@ class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37068,17 +40644,19 @@ class TimeSynchronizationSetUTCTime : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setUTCTimeWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + setUTCTimeWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -37133,6 +40711,8 @@ class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -37200,19 +40780,28 @@ class TimeSynchronizationSetTimeZone : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setTimeZoneWithParams:params - completion:^(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + setTimeZoneWithParams:params + completion:^(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -37272,17 +40861,19 @@ class TimeSynchronizationSetDSTOffset : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setDSTOffsetWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + setDSTOffsetWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -37332,17 +40923,19 @@ class TimeSynchronizationSetDefaultNTP : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setDefaultNTPWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + setDefaultNTPWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -37381,8 +40974,11 @@ class ReadTimeSynchronizationUTCTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUTCTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.UTCTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization UTCTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37426,6 +41022,11 @@ class SubscribeAttributeTimeSynchronizationUTCTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.UTCTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37462,8 +41063,11 @@ class ReadTimeSynchronizationGranularity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGranularityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.Granularity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization Granularity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37507,6 +41111,11 @@ class SubscribeAttributeTimeSynchronizationGranularity : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.Granularity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37543,8 +41152,11 @@ class ReadTimeSynchronizationTimeSource : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTimeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeSource response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization TimeSource read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37588,6 +41200,11 @@ class SubscribeAttributeTimeSynchronizationTimeSource : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeSource response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37625,8 +41242,11 @@ class ReadTimeSynchronizationTrustedTimeSource : public ReadAttribute { [cluster readAttributeTrustedTimeSourceWithCompletion:^( MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TrustedTimeSource response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization TrustedTimeSource read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37670,6 +41290,11 @@ class SubscribeAttributeTimeSynchronizationTrustedTimeSource : public SubscribeA } reportHandler:^(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TrustedTimeSource response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37706,8 +41331,11 @@ class ReadTimeSynchronizationDefaultNTP : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDefaultNTPWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.DefaultNTP response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization DefaultNTP read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37751,6 +41379,11 @@ class SubscribeAttributeTimeSynchronizationDefaultNTP : public SubscribeAttribut } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.DefaultNTP response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37787,8 +41420,11 @@ class ReadTimeSynchronizationTimeZone : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTimeZoneWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeZone response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization TimeZone read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37832,6 +41468,11 @@ class SubscribeAttributeTimeSynchronizationTimeZone : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeZone response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37868,8 +41509,11 @@ class ReadTimeSynchronizationDSTOffset : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDSTOffsetWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.DSTOffset response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization DSTOffset read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37913,6 +41557,11 @@ class SubscribeAttributeTimeSynchronizationDSTOffset : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.DSTOffset response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -37949,8 +41598,11 @@ class ReadTimeSynchronizationLocalTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLocalTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.LocalTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization LocalTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -37994,6 +41646,11 @@ class SubscribeAttributeTimeSynchronizationLocalTime : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.LocalTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38030,8 +41687,11 @@ class ReadTimeSynchronizationTimeZoneDatabase : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTimeZoneDatabaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeZoneDatabase response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization TimeZoneDatabase read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38075,6 +41735,11 @@ class SubscribeAttributeTimeSynchronizationTimeZoneDatabase : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeZoneDatabase response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38111,8 +41776,11 @@ class ReadTimeSynchronizationNTPServerAvailable : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNTPServerAvailableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.NTPServerAvailable response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization NTPServerAvailable read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38156,6 +41824,11 @@ class SubscribeAttributeTimeSynchronizationNTPServerAvailable : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.NTPServerAvailable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38192,8 +41865,11 @@ class ReadTimeSynchronizationTimeZoneListMaxSize : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTimeZoneListMaxSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeZoneListMaxSize response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization TimeZoneListMaxSize read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38237,6 +41913,11 @@ class SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.TimeZoneListMaxSize response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38273,8 +41954,11 @@ class ReadTimeSynchronizationDSTOffsetListMaxSize : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDSTOffsetListMaxSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.DSTOffsetListMaxSize response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization DSTOffsetListMaxSize read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38318,6 +42002,11 @@ class SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.DSTOffsetListMaxSize response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38354,8 +42043,11 @@ class ReadTimeSynchronizationSupportsDNSResolve : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportsDNSResolveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.SupportsDNSResolve response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization SupportsDNSResolve read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38399,6 +42091,11 @@ class SubscribeAttributeTimeSynchronizationSupportsDNSResolve : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.SupportsDNSResolve response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38435,8 +42132,11 @@ class ReadTimeSynchronizationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38480,6 +42180,11 @@ class SubscribeAttributeTimeSynchronizationGeneratedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38516,8 +42221,11 @@ class ReadTimeSynchronizationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38561,6 +42269,11 @@ class SubscribeAttributeTimeSynchronizationAcceptedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38597,8 +42310,11 @@ class ReadTimeSynchronizationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38642,6 +42358,11 @@ class SubscribeAttributeTimeSynchronizationEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38678,8 +42399,11 @@ class ReadTimeSynchronizationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38723,6 +42447,11 @@ class SubscribeAttributeTimeSynchronizationAttributeList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38759,8 +42488,11 @@ class ReadTimeSynchronizationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38804,6 +42536,11 @@ class SubscribeAttributeTimeSynchronizationFeatureMap : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38840,8 +42577,11 @@ class ReadTimeSynchronizationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TimeSynchronization ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -38885,6 +42625,11 @@ class SubscribeAttributeTimeSynchronizationClusterRevision : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TimeSynchronization.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -38956,8 +42701,11 @@ class ReadBridgedDeviceBasicInformationVendorName : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation VendorName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39001,6 +42749,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public Subscri } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39034,8 +42787,11 @@ class ReadBridgedDeviceBasicInformationVendorID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation VendorID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39079,6 +42835,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39112,8 +42873,11 @@ class ReadBridgedDeviceBasicInformationProductName : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation ProductName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39157,6 +42921,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductName : public Subscr } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39190,8 +42959,11 @@ class ReadBridgedDeviceBasicInformationNodeLabel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation NodeLabel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39235,6 +43007,8 @@ class WriteBridgedDeviceBasicInformationNodeLabel : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BridgedDeviceBasicInformation NodeLabel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39281,6 +43055,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public Subscrib } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39315,8 +43094,11 @@ class ReadBridgedDeviceBasicInformationHardwareVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation HardwareVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39360,6 +43142,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39394,8 +43181,11 @@ class ReadBridgedDeviceBasicInformationHardwareVersionString : public ReadAttrib queue:callbackQueue]; [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation HardwareVersionString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39440,6 +43230,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString : pub } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39474,8 +43269,11 @@ class ReadBridgedDeviceBasicInformationSoftwareVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation SoftwareVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39519,6 +43317,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39553,8 +43356,11 @@ class ReadBridgedDeviceBasicInformationSoftwareVersionString : public ReadAttrib queue:callbackQueue]; [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation SoftwareVersionString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39599,6 +43405,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString : pub } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39633,8 +43444,11 @@ class ReadBridgedDeviceBasicInformationManufacturingDate : public ReadAttribute queue:callbackQueue]; [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation ManufacturingDate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39679,6 +43493,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate : public } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39712,8 +43531,11 @@ class ReadBridgedDeviceBasicInformationPartNumber : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation PartNumber read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39757,6 +43579,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationPartNumber : public Subscri } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39790,8 +43617,11 @@ class ReadBridgedDeviceBasicInformationProductURL : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation ProductURL read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39835,6 +43665,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public Subscri } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39868,8 +43703,11 @@ class ReadBridgedDeviceBasicInformationProductLabel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation ProductLabel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39913,6 +43751,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public Subsc } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -39946,8 +43789,11 @@ class ReadBridgedDeviceBasicInformationSerialNumber : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation SerialNumber read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -39991,6 +43837,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public Subsc } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40024,8 +43875,11 @@ class ReadBridgedDeviceBasicInformationReachable : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation Reachable read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40069,6 +43923,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationReachable : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40102,8 +43961,11 @@ class ReadBridgedDeviceBasicInformationUniqueID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.UniqueID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation UniqueID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40147,6 +44009,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public Subscribe } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.UniqueID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40182,8 +44049,11 @@ class ReadBridgedDeviceBasicInformationProductAppearance : public ReadAttribute [cluster readAttributeProductAppearanceWithCompletion:^( MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation ProductAppearance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40229,6 +44099,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductAppearance : public reportHandler:^( MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40263,8 +44138,11 @@ class ReadBridgedDeviceBasicInformationGeneratedCommandList : public ReadAttribu queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40309,6 +44187,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : publ } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40343,8 +44226,11 @@ class ReadBridgedDeviceBasicInformationAcceptedCommandList : public ReadAttribut queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40389,6 +44275,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : publi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40424,8 +44315,11 @@ class ReadBridgedDeviceBasicInformationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40469,6 +44363,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationEventList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40504,8 +44403,11 @@ class ReadBridgedDeviceBasicInformationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40549,6 +44451,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40582,8 +44489,11 @@ class ReadBridgedDeviceBasicInformationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40627,6 +44537,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40661,8 +44576,11 @@ class ReadBridgedDeviceBasicInformationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BridgedDeviceBasicInformation ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40706,6 +44624,11 @@ class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40763,8 +44686,11 @@ class ReadSwitchNumberOfPositions : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNumberOfPositionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.NumberOfPositions response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch NumberOfPositions read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40806,6 +44732,11 @@ class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.NumberOfPositions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40837,8 +44768,11 @@ class ReadSwitchCurrentPosition : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.CurrentPosition response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch CurrentPosition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40880,6 +44814,11 @@ class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.CurrentPosition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40911,8 +44850,11 @@ class ReadSwitchMultiPressMax : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMultiPressMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.MultiPressMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch MultiPressMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -40954,6 +44896,11 @@ class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.MultiPressMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -40985,8 +44932,11 @@ class ReadSwitchGeneratedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41028,6 +44978,11 @@ class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41059,8 +45014,11 @@ class ReadSwitchAcceptedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41102,6 +45060,11 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41135,8 +45098,11 @@ class ReadSwitchEventList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41178,6 +45144,11 @@ class SubscribeAttributeSwitchEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41211,8 +45182,11 @@ class ReadSwitchAttributeList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41254,6 +45228,11 @@ class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41285,8 +45264,11 @@ class ReadSwitchFeatureMap : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41328,6 +45310,11 @@ class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41359,8 +45346,11 @@ class ReadSwitchClusterRevision : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Switch ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41402,6 +45392,11 @@ class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Switch.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41478,6 +45473,8 @@ class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -41529,6 +45526,8 @@ class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCom if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -41577,6 +45576,8 @@ class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -41615,8 +45616,11 @@ class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning WindowStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41660,6 +45664,11 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41693,8 +45702,11 @@ class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning AdminFabricIndex read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41738,6 +45750,11 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41771,8 +45788,11 @@ class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning AdminVendorId read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41816,6 +45836,11 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41850,8 +45875,11 @@ class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41896,6 +45924,11 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -41930,8 +45963,11 @@ class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -41976,6 +46012,11 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42011,8 +46052,11 @@ class ReadAdministratorCommissioningEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42056,6 +46100,11 @@ class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42091,8 +46140,11 @@ class ReadAdministratorCommissioningAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42136,6 +46188,11 @@ class SubscribeAttributeAdministratorCommissioningAttributeList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42169,8 +46226,11 @@ class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42214,6 +46274,11 @@ class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42247,8 +46312,11 @@ class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AdministratorCommissioning ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42292,6 +46360,11 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42364,10 +46437,20 @@ class OperationalCredentialsAttestationRequest : public ClusterCommand { completion:^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -42417,10 +46500,20 @@ class OperationalCredentialsCertificateChainRequest : public ClusterCommand { MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters:: + OperationalCredentials::Commands::CertificateChainResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters:: + OperationalCredentials::Commands::CertificateChainResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -42471,19 +46564,28 @@ class OperationalCredentialsCSRRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster CSRRequestWithParams:params - completion:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + CSRRequestWithParams:params + completion:^( + MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -42539,10 +46641,18 @@ class OperationalCredentialsAddNOC : public ClusterCommand { completion:^( MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -42593,19 +46703,28 @@ class OperationalCredentialsUpdateNOC : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster updateNOCWithParams:params - completion:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + updateNOCWithParams:params + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -42651,10 +46770,20 @@ class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -42699,19 +46828,28 @@ class OperationalCredentialsRemoveFabric : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster removeFabricWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + removeFabricWithParams:params + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -42758,6 +46896,8 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -42799,14 +46939,19 @@ class ReadOperationalCredentialsNOCs : public ReadAttribute { if (mFabricFiltered.HasValue()) { params.filterByFabric = mFabricFiltered.Value(); } - [cluster readAttributeNOCsWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.NOCs response %@", [value description]); - if (error != nil) { - LogNSError("OperationalCredentials NOCs read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeNOCsWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.NOCs response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OperationalCredentials NOCs read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; @@ -42847,6 +46992,11 @@ class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.NOCs response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42885,8 +47035,13 @@ class ReadOperationalCredentialsFabrics : public ReadAttribute { [cluster readAttributeFabricsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials Fabrics read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -42930,6 +47085,11 @@ class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -42963,8 +47123,11 @@ class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials SupportedFabrics read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43008,6 +47171,11 @@ class SubscribeAttributeOperationalCredentialsSupportedFabrics : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43041,8 +47209,11 @@ class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials CommissionedFabrics read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43086,6 +47257,11 @@ class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43120,8 +47296,11 @@ class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTrustedRootCertificatesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials TrustedRootCertificates read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43166,6 +47345,11 @@ class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43199,8 +47383,11 @@ class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials CurrentFabricIndex read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43244,6 +47431,11 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43277,8 +47469,11 @@ class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43322,6 +47517,11 @@ class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43355,8 +47555,11 @@ class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43400,6 +47603,11 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43435,8 +47643,11 @@ class ReadOperationalCredentialsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43480,6 +47691,11 @@ class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43515,8 +47731,11 @@ class ReadOperationalCredentialsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43560,6 +47779,11 @@ class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43593,8 +47817,11 @@ class ReadOperationalCredentialsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43638,6 +47865,11 @@ class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43671,8 +47903,11 @@ class ReadOperationalCredentialsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalCredentials ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -43716,6 +47951,11 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -43815,17 +48055,19 @@ class GroupKeyManagementKeySetWrite : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster keySetWriteWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + keySetWriteWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -43866,19 +48108,28 @@ class GroupKeyManagementKeySetRead : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster keySetReadWithParams:params - completion:^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -43918,17 +48169,19 @@ class GroupKeyManagementKeySetRemove : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster keySetRemoveWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + keySetRemoveWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -43971,10 +48224,20 @@ class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { completion:^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement:: + Commands::KeySetReadAllIndicesResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement:: + Commands::KeySetReadAllIndicesResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -44018,8 +48281,13 @@ class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { [cluster readAttributeGroupKeyMapWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement GroupKeyMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44074,6 +48342,8 @@ class WriteGroupKeyManagementGroupKeyMap : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("GroupKeyManagement GroupKeyMap write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44123,6 +48393,11 @@ class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44161,8 +48436,13 @@ class ReadGroupKeyManagementGroupTable : public ReadAttribute { [cluster readAttributeGroupTableWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement GroupTable read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44206,6 +48486,11 @@ class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44239,8 +48524,11 @@ class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement MaxGroupsPerFabric read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44284,6 +48572,11 @@ class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44317,8 +48610,11 @@ class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement MaxGroupKeysPerFabric read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44362,6 +48658,11 @@ class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44395,8 +48696,11 @@ class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44440,6 +48744,11 @@ class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44473,8 +48782,11 @@ class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44518,6 +48830,11 @@ class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44553,8 +48870,11 @@ class ReadGroupKeyManagementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44598,6 +48918,11 @@ class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44633,8 +48958,11 @@ class ReadGroupKeyManagementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44678,6 +49006,11 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44711,8 +49044,11 @@ class ReadGroupKeyManagementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44756,6 +49092,11 @@ class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44789,8 +49130,11 @@ class ReadGroupKeyManagementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("GroupKeyManagement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44834,6 +49178,11 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44884,8 +49233,11 @@ class ReadFixedLabelLabelList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.LabelList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FixedLabel LabelList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -44929,6 +49281,11 @@ class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.LabelList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -44962,8 +49319,11 @@ class ReadFixedLabelGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FixedLabel GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45007,6 +49367,11 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45040,8 +49405,11 @@ class ReadFixedLabelAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FixedLabel AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45085,6 +49453,11 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45120,8 +49493,11 @@ class ReadFixedLabelEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FixedLabel EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45165,6 +49541,11 @@ class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45200,8 +49581,11 @@ class ReadFixedLabelAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FixedLabel AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45245,6 +49629,11 @@ class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45278,8 +49667,11 @@ class ReadFixedLabelFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FixedLabel FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45323,6 +49715,11 @@ class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45356,8 +49753,11 @@ class ReadFixedLabelClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FixedLabel ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45401,6 +49801,11 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45451,8 +49856,11 @@ class ReadUserLabelLabelList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.LabelList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UserLabel LabelList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45510,6 +49918,8 @@ class WriteUserLabelLabelList : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UserLabel LabelList write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45557,6 +49967,11 @@ class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.LabelList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45590,8 +50005,11 @@ class ReadUserLabelGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UserLabel GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45635,6 +50053,11 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45668,8 +50091,11 @@ class ReadUserLabelAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UserLabel AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45713,6 +50139,11 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45748,8 +50179,11 @@ class ReadUserLabelEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UserLabel EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45793,6 +50227,11 @@ class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45828,8 +50267,11 @@ class ReadUserLabelAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UserLabel AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45873,6 +50315,11 @@ class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45906,8 +50353,11 @@ class ReadUserLabelFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UserLabel FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -45951,6 +50401,11 @@ class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -45984,8 +50439,11 @@ class ReadUserLabelClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UserLabel ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46029,6 +50487,11 @@ class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UserLabel.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46080,8 +50543,11 @@ class ReadBooleanStateStateValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.StateValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BooleanState StateValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46125,6 +50591,11 @@ class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.StateValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46158,8 +50629,11 @@ class ReadBooleanStateGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BooleanState GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46203,6 +50677,11 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46236,8 +50715,11 @@ class ReadBooleanStateAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BooleanState AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46281,6 +50763,11 @@ class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46316,8 +50803,11 @@ class ReadBooleanStateEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BooleanState EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46361,6 +50851,11 @@ class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46396,8 +50891,11 @@ class ReadBooleanStateAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BooleanState AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46441,6 +50939,11 @@ class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46474,8 +50977,11 @@ class ReadBooleanStateFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BooleanState FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46519,6 +51025,11 @@ class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46552,8 +51063,11 @@ class ReadBooleanStateClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BooleanState ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46597,6 +51111,11 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BooleanState.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46673,19 +51192,29 @@ class IcdManagementRegisterClient : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster registerClientWithParams:params - completion:^(MTRICDManagementClusterRegisterClientResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + registerClientWithParams:params + completion:^(MTRICDManagementClusterRegisterClientResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -46740,6 +51269,8 @@ class IcdManagementUnregisterClient : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -46790,6 +51321,8 @@ class IcdManagementStayActiveRequest : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -46832,8 +51365,11 @@ class ReadIcdManagementIdleModeInterval : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeIdleModeIntervalWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.IdleModeInterval response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement IdleModeInterval read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46877,6 +51413,11 @@ class SubscribeAttributeIcdManagementIdleModeInterval : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.IdleModeInterval response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46913,8 +51454,11 @@ class ReadIcdManagementActiveModeInterval : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveModeIntervalWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ActiveModeInterval response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement ActiveModeInterval read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -46958,6 +51502,11 @@ class SubscribeAttributeIcdManagementActiveModeInterval : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ActiveModeInterval response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -46994,8 +51543,11 @@ class ReadIcdManagementActiveModeThreshold : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveModeThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ActiveModeThreshold response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement ActiveModeThreshold read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47039,6 +51591,11 @@ class SubscribeAttributeIcdManagementActiveModeThreshold : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ActiveModeThreshold response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47080,8 +51637,13 @@ class ReadIcdManagementRegisteredClients : public ReadAttribute { [cluster readAttributeRegisteredClientsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.RegisteredClients response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement RegisteredClients read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47125,6 +51687,11 @@ class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.RegisteredClients response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47161,8 +51728,11 @@ class ReadIcdManagementICDCounter : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeICDCounterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ICDCounter response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement ICDCounter read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47206,6 +51776,11 @@ class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ICDCounter response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47242,8 +51817,11 @@ class ReadIcdManagementClientsSupportedPerFabric : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClientsSupportedPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ClientsSupportedPerFabric response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement ClientsSupportedPerFabric read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47287,6 +51865,11 @@ class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ClientsSupportedPerFabric response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47323,8 +51906,11 @@ class ReadIcdManagementGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47368,6 +51954,11 @@ class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47404,8 +51995,11 @@ class ReadIcdManagementAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47449,6 +52043,11 @@ class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47485,8 +52084,11 @@ class ReadIcdManagementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47530,6 +52132,11 @@ class SubscribeAttributeIcdManagementEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47566,8 +52173,11 @@ class ReadIcdManagementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47611,6 +52221,11 @@ class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47647,8 +52262,11 @@ class ReadIcdManagementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47692,6 +52310,11 @@ class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47728,8 +52351,11 @@ class ReadIcdManagementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ICDManagement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47773,6 +52399,11 @@ class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ICDManagement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47836,17 +52467,19 @@ class ModeSelectChangeToMode : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeToModeWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + changeToModeWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -47881,8 +52514,11 @@ class ReadModeSelectDescription : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.Description response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect Description read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -47926,6 +52562,11 @@ class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.Description response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -47959,8 +52600,11 @@ class ReadModeSelectStandardNamespace : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect StandardNamespace read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48004,6 +52648,11 @@ class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48037,8 +52686,11 @@ class ReadModeSelectSupportedModes : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.SupportedModes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect SupportedModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48082,6 +52734,11 @@ class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48115,8 +52772,11 @@ class ReadModeSelectCurrentMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.CurrentMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect CurrentMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48160,6 +52820,11 @@ class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48193,8 +52858,11 @@ class ReadModeSelectStartUpMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StartUpMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect StartUpMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48229,13 +52897,18 @@ class WriteModeSelectStartUpMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ModeSelect StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48243,7 +52916,7 @@ class WriteModeSelectStartUpMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { @@ -48282,6 +52955,11 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48315,8 +52993,11 @@ class ReadModeSelectOnMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.OnMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect OnMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48351,13 +53032,18 @@ class WriteModeSelectOnMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ModeSelect OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48365,7 +53051,7 @@ class WriteModeSelectOnMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { @@ -48404,6 +53090,11 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.OnMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48437,8 +53128,11 @@ class ReadModeSelectGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48482,6 +53176,11 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48515,8 +53214,11 @@ class ReadModeSelectAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48560,6 +53262,11 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48595,8 +53302,11 @@ class ReadModeSelectEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48640,6 +53350,11 @@ class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48675,8 +53390,11 @@ class ReadModeSelectAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48720,6 +53438,11 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48753,8 +53476,11 @@ class ReadModeSelectFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48798,6 +53524,11 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48831,8 +53562,11 @@ class ReadModeSelectClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ModeSelect ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -48876,6 +53610,11 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -48937,19 +53676,28 @@ class LaundryWasherModeChangeToMode : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeToModeWithParams:params - completion:^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + changeToModeWithParams:params + completion:^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -48988,8 +53736,11 @@ class ReadLaundryWasherModeSupportedModes : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode SupportedModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49033,6 +53784,11 @@ class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49069,8 +53825,11 @@ class ReadLaundryWasherModeCurrentMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode CurrentMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49114,6 +53873,11 @@ class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49150,8 +53914,11 @@ class ReadLaundryWasherModeStartUpMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode StartUpMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49186,13 +53953,18 @@ class WriteLaundryWasherModeStartUpMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LaundryWasherMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49200,7 +53972,7 @@ class WriteLaundryWasherModeStartUpMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute { @@ -49239,6 +54011,11 @@ class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49275,8 +54052,11 @@ class ReadLaundryWasherModeOnMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode OnMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49311,13 +54091,18 @@ class WriteLaundryWasherModeOnMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LaundryWasherMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49325,7 +54110,7 @@ class WriteLaundryWasherModeOnMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { @@ -49364,6 +54149,11 @@ class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49400,8 +54190,11 @@ class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49445,6 +54238,11 @@ class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49481,8 +54279,11 @@ class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49526,6 +54327,11 @@ class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49562,8 +54368,11 @@ class ReadLaundryWasherModeEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49607,6 +54416,11 @@ class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49643,8 +54457,11 @@ class ReadLaundryWasherModeAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49688,6 +54505,11 @@ class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49724,8 +54546,11 @@ class ReadLaundryWasherModeFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49769,6 +54594,11 @@ class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49805,8 +54635,11 @@ class ReadLaundryWasherModeClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherMode ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -49850,6 +54683,11 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -49921,10 +54759,18 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters:: + RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters:: + RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -49970,8 +54816,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode SupportedModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50017,6 +54866,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupported } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50055,8 +54909,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public Re queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode CurrentMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50102,6 +54959,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMo } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50140,8 +55002,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public Re queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50178,7 +55043,10 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public W params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpModeWithValue:value @@ -50187,6 +55055,8 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public W if (error != nil) { LogNSError( "RefrigeratorAndTemperatureControlledCabinetMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50194,7 +55064,7 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public W } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public SubscribeAttribute { @@ -50235,6 +55105,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMo } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50273,8 +55148,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAtt queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50311,13 +55189,18 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteA params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50325,7 +55208,7 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteA } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : public SubscribeAttribute { @@ -50366,6 +55249,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50404,8 +55292,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50451,6 +55342,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGenerated } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50489,8 +55385,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : p queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50536,6 +55435,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedC } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50574,8 +55478,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public Read queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50621,6 +55528,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50659,8 +55571,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50706,6 +55621,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50744,8 +55664,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public Rea queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50791,6 +55714,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMa } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50829,8 +55757,11 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : publi queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAndTemperatureControlledCabinetMode ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50876,6 +55807,11 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -50934,8 +55870,11 @@ class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSpinSpeedsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls SpinSpeeds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -50979,6 +55918,11 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51015,8 +55959,11 @@ class ReadLaundryWasherControlsSpinSpeedCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls SpinSpeedCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51051,13 +55998,18 @@ class WriteLaundryWasherControlsSpinSpeedCurrent : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeSpinSpeedCurrentWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LaundryWasherControls SpinSpeedCurrent write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51065,7 +56017,7 @@ class WriteLaundryWasherControlsSpinSpeedCurrent : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public SubscribeAttribute { @@ -51104,6 +56056,11 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51140,8 +56097,11 @@ class ReadLaundryWasherControlsNumberOfRinses : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls NumberOfRinses read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51183,6 +56143,8 @@ class WriteLaundryWasherControlsNumberOfRinses : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("LaundryWasherControls NumberOfRinses write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51229,6 +56191,11 @@ class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51265,8 +56232,11 @@ class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedRinsesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls SupportedRinses read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51310,6 +56280,11 @@ class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51346,8 +56321,11 @@ class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51391,6 +56369,11 @@ class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51427,8 +56410,11 @@ class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51472,6 +56458,11 @@ class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51508,8 +56499,11 @@ class ReadLaundryWasherControlsEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51553,6 +56547,11 @@ class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51589,8 +56588,11 @@ class ReadLaundryWasherControlsAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51634,6 +56636,11 @@ class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51670,8 +56677,11 @@ class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51715,6 +56725,11 @@ class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51751,8 +56766,11 @@ class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LaundryWasherControls ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51796,6 +56814,11 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51859,19 +56882,28 @@ class RvcRunModeChangeToMode : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeToModeWithParams:params - completion:^( - MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + changeToModeWithParams:params + completion:^( + MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -51910,8 +56942,11 @@ class ReadRvcRunModeSupportedModes : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode SupportedModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -51955,6 +56990,11 @@ class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -51991,8 +57031,11 @@ class ReadRvcRunModeCurrentMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode CurrentMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52036,6 +57079,11 @@ class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52072,8 +57120,11 @@ class ReadRvcRunModeStartUpMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.StartUpMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode StartUpMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52108,13 +57159,18 @@ class WriteRvcRunModeStartUpMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("RVCRunMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52122,7 +57178,7 @@ class WriteRvcRunModeStartUpMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeRvcRunModeStartUpMode : public SubscribeAttribute { @@ -52161,6 +57217,11 @@ class SubscribeAttributeRvcRunModeStartUpMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52197,8 +57258,11 @@ class ReadRvcRunModeOnMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.OnMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode OnMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52233,13 +57297,18 @@ class WriteRvcRunModeOnMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("RVCRunMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52247,7 +57316,7 @@ class WriteRvcRunModeOnMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { @@ -52286,6 +57355,11 @@ class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.OnMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52322,8 +57396,11 @@ class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52367,6 +57444,11 @@ class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52403,8 +57485,11 @@ class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52448,6 +57533,11 @@ class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52484,8 +57574,11 @@ class ReadRvcRunModeEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52529,6 +57622,11 @@ class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52565,8 +57663,11 @@ class ReadRvcRunModeAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52610,6 +57711,11 @@ class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52646,8 +57752,11 @@ class ReadRvcRunModeFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52691,6 +57800,11 @@ class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52727,8 +57841,11 @@ class ReadRvcRunModeClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCRunMode ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52772,6 +57889,11 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52835,19 +57957,28 @@ class RvcCleanModeChangeToMode : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeToModeWithParams:params - completion:^(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + changeToModeWithParams:params + completion:^( + MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -52886,8 +58017,11 @@ class ReadRvcCleanModeSupportedModes : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode SupportedModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -52931,6 +58065,11 @@ class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -52967,8 +58106,11 @@ class ReadRvcCleanModeCurrentMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode CurrentMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53012,6 +58154,11 @@ class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53048,8 +58195,11 @@ class ReadRvcCleanModeStartUpMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.StartUpMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode StartUpMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53084,13 +58234,18 @@ class WriteRvcCleanModeStartUpMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("RVCCleanMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53098,7 +58253,7 @@ class WriteRvcCleanModeStartUpMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeRvcCleanModeStartUpMode : public SubscribeAttribute { @@ -53137,6 +58292,11 @@ class SubscribeAttributeRvcCleanModeStartUpMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53173,8 +58333,11 @@ class ReadRvcCleanModeOnMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.OnMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode OnMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53209,13 +58372,18 @@ class WriteRvcCleanModeOnMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("RVCCleanMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53223,7 +58391,7 @@ class WriteRvcCleanModeOnMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { @@ -53262,6 +58430,11 @@ class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.OnMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53298,8 +58471,11 @@ class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53343,6 +58519,11 @@ class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53379,8 +58560,11 @@ class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53424,6 +58608,11 @@ class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53460,8 +58649,11 @@ class ReadRvcCleanModeEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53505,6 +58697,11 @@ class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53541,8 +58738,11 @@ class ReadRvcCleanModeAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53586,6 +58786,11 @@ class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53622,8 +58827,11 @@ class ReadRvcCleanModeFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53667,6 +58875,11 @@ class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53703,8 +58916,11 @@ class ReadRvcCleanModeClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCCleanMode ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53748,6 +58964,11 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53829,6 +59050,8 @@ class TemperatureControlSetTemperature : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -53872,8 +59095,11 @@ class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTemperatureSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl TemperatureSetpoint read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53917,6 +59143,11 @@ class SubscribeAttributeTemperatureControlTemperatureSetpoint : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -53953,8 +59184,11 @@ class ReadTemperatureControlMinTemperature : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl MinTemperature read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -53998,6 +59232,11 @@ class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54034,8 +59273,11 @@ class ReadTemperatureControlMaxTemperature : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl MaxTemperature read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54079,6 +59321,11 @@ class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54115,8 +59362,11 @@ class ReadTemperatureControlStep : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.Step response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl Step read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54160,6 +59410,11 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.Step response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54196,8 +59451,11 @@ class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSelectedTemperatureLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl SelectedTemperatureLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54241,6 +59499,11 @@ class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54278,8 +59541,11 @@ class ReadTemperatureControlSupportedTemperatureLevels : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedTemperatureLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl SupportedTemperatureLevels read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54323,6 +59589,11 @@ class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54359,8 +59630,11 @@ class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54404,6 +59678,11 @@ class SubscribeAttributeTemperatureControlGeneratedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54440,8 +59719,11 @@ class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54485,6 +59767,11 @@ class SubscribeAttributeTemperatureControlAcceptedCommandList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54521,8 +59808,11 @@ class ReadTemperatureControlEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54566,6 +59856,11 @@ class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54602,8 +59897,11 @@ class ReadTemperatureControlAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54647,6 +59945,11 @@ class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54683,8 +59986,11 @@ class ReadTemperatureControlFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54728,6 +60034,11 @@ class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54764,8 +60075,11 @@ class ReadTemperatureControlClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54809,6 +60123,11 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54867,8 +60186,11 @@ class ReadRefrigeratorAlarmMask : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm Mask read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54912,6 +60234,11 @@ class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -54948,8 +60275,11 @@ class ReadRefrigeratorAlarmState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.State response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm State read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -54993,6 +60323,11 @@ class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.State response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55029,8 +60364,11 @@ class ReadRefrigeratorAlarmSupported : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm Supported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55074,6 +60412,11 @@ class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55110,8 +60453,11 @@ class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55155,6 +60501,11 @@ class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55191,8 +60542,11 @@ class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55236,6 +60590,11 @@ class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55272,8 +60631,11 @@ class ReadRefrigeratorAlarmEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55317,6 +60679,11 @@ class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55353,8 +60720,11 @@ class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55398,6 +60768,11 @@ class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55434,8 +60809,11 @@ class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55479,6 +60857,11 @@ class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55515,8 +60898,11 @@ class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RefrigeratorAlarm ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55560,6 +60946,11 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55623,19 +61014,28 @@ class DishwasherModeChangeToMode : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeToModeWithParams:params - completion:^(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + changeToModeWithParams:params + completion:^( + MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -55674,8 +61074,11 @@ class ReadDishwasherModeSupportedModes : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode SupportedModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55719,6 +61122,11 @@ class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55755,8 +61163,11 @@ class ReadDishwasherModeCurrentMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode CurrentMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55800,6 +61211,11 @@ class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55836,8 +61252,11 @@ class ReadDishwasherModeStartUpMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode StartUpMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55872,13 +61291,18 @@ class WriteDishwasherModeStartUpMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DishwasherMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55886,7 +61310,7 @@ class WriteDishwasherModeStartUpMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { @@ -55925,6 +61349,11 @@ class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -55961,8 +61390,11 @@ class ReadDishwasherModeOnMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.OnMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode OnMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -55997,13 +61429,18 @@ class WriteDishwasherModeOnMode : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DishwasherMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56011,7 +61448,7 @@ class WriteDishwasherModeOnMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { @@ -56050,6 +61487,11 @@ class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.OnMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56086,8 +61528,11 @@ class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56131,6 +61576,11 @@ class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56167,8 +61617,11 @@ class ReadDishwasherModeAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56212,6 +61665,11 @@ class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56248,8 +61706,11 @@ class ReadDishwasherModeEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56293,6 +61754,11 @@ class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56329,8 +61795,11 @@ class ReadDishwasherModeAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56374,6 +61843,11 @@ class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56410,8 +61884,11 @@ class ReadDishwasherModeFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56455,6 +61932,11 @@ class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56491,8 +61973,11 @@ class ReadDishwasherModeClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherMode ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56536,6 +62021,11 @@ class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56591,8 +62081,11 @@ class ReadAirQualityAirQuality : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAirQualityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.AirQuality response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AirQuality AirQuality read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56636,6 +62129,11 @@ class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.AirQuality response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56672,8 +62170,11 @@ class ReadAirQualityGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AirQuality GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56717,6 +62218,11 @@ class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56753,8 +62259,11 @@ class ReadAirQualityAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AirQuality AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56798,6 +62307,11 @@ class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56834,8 +62348,11 @@ class ReadAirQualityEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AirQuality EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56879,6 +62396,11 @@ class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56915,8 +62437,11 @@ class ReadAirQualityAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AirQuality AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -56960,6 +62485,11 @@ class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -56996,8 +62526,11 @@ class ReadAirQualityFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AirQuality FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57041,6 +62574,11 @@ class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57077,8 +62615,11 @@ class ReadAirQualityClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AirQuality ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57122,6 +62663,11 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AirQuality.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57209,6 +62755,8 @@ class SmokeCoAlarmSelfTestRequest : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -57251,8 +62799,11 @@ class ReadSmokeCoAlarmExpressedState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm ExpressedState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57296,6 +62847,11 @@ class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57332,8 +62888,11 @@ class ReadSmokeCoAlarmSmokeState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSmokeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm SmokeState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57377,6 +62936,11 @@ class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57413,8 +62977,11 @@ class ReadSmokeCoAlarmCOState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCOStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.COState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm COState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57458,6 +63025,11 @@ class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.COState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57494,8 +63066,11 @@ class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBatteryAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm BatteryAlert read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57539,6 +63114,11 @@ class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57575,8 +63155,11 @@ class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDeviceMutedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm DeviceMuted read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57620,6 +63203,11 @@ class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57656,8 +63244,11 @@ class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTestInProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm TestInProgress read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57701,6 +63292,11 @@ class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57737,8 +63333,11 @@ class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeHardwareFaultAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm HardwareFaultAlert read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57782,6 +63381,11 @@ class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57818,8 +63422,11 @@ class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEndOfServiceAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm EndOfServiceAlert read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57863,6 +63470,11 @@ class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57899,8 +63511,11 @@ class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInterconnectSmokeAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm InterconnectSmokeAlarm read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -57944,6 +63559,11 @@ class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -57980,8 +63600,11 @@ class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInterconnectCOAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm InterconnectCOAlarm read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -58025,6 +63648,11 @@ class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -58061,8 +63689,11 @@ class ReadSmokeCoAlarmContaminationState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeContaminationStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm ContaminationState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -58106,6 +63737,11 @@ class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -58142,8 +63778,11 @@ class ReadSmokeCoAlarmSmokeSensitivityLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSmokeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm SmokeSensitivityLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -58185,6 +63824,8 @@ class WriteSmokeCoAlarmSmokeSensitivityLevel : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("SmokeCOAlarm SmokeSensitivityLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -58231,6 +63872,11 @@ class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -58267,8 +63913,11 @@ class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeExpiryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm ExpiryDate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -58312,6 +63961,11 @@ class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -58348,8 +64002,11 @@ class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -58393,6 +64050,11 @@ class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -58429,8 +64091,11 @@ class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -58474,6 +64139,11 @@ class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -58510,8 +64180,11 @@ class ReadSmokeCoAlarmEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -58555,6 +64228,11 @@ class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -58591,8 +64269,11 @@ class ReadSmokeCoAlarmAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -58636,6 +64317,11 @@ class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -58672,8 +64358,11 @@ class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -58717,6 +64406,11 @@ class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -58753,8 +64447,11 @@ class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("SmokeCOAlarm ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -58798,6 +64495,11 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -58869,6 +64571,7 @@ class DishwasherAlarmReset : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -58921,6 +64624,8 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -58964,8 +64669,11 @@ class ReadDishwasherAlarmMask : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.Mask response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm Mask read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59009,6 +64717,11 @@ class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.Mask response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59045,8 +64758,11 @@ class ReadDishwasherAlarmLatch : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLatchWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.Latch response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm Latch read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59090,6 +64806,11 @@ class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.Latch response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59126,8 +64847,11 @@ class ReadDishwasherAlarmState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.State response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm State read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59171,6 +64895,11 @@ class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.State response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59207,8 +64936,11 @@ class ReadDishwasherAlarmSupported : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.Supported response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm Supported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59252,6 +64984,11 @@ class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.Supported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59288,8 +65025,11 @@ class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59333,6 +65073,11 @@ class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59369,8 +65114,11 @@ class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59414,6 +65162,11 @@ class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59450,8 +65203,11 @@ class ReadDishwasherAlarmEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59495,6 +65251,11 @@ class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59531,8 +65292,11 @@ class ReadDishwasherAlarmAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59576,6 +65340,11 @@ class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59612,8 +65381,11 @@ class ReadDishwasherAlarmFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59657,6 +65429,11 @@ class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59693,8 +65470,11 @@ class ReadDishwasherAlarmClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DishwasherAlarm ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -59738,6 +65518,11 @@ class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -59810,10 +65595,18 @@ class OperationalStatePause : public ClusterCommand { completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -59861,10 +65654,18 @@ class OperationalStateStop : public ClusterCommand { completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -59912,10 +65713,18 @@ class OperationalStateStart : public ClusterCommand { completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -59963,10 +65772,18 @@ class OperationalStateResume : public ClusterCommand { completion:^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -60009,8 +65826,11 @@ class ReadOperationalStatePhaseList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.PhaseList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState PhaseList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60054,6 +65874,11 @@ class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.PhaseList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60090,8 +65915,11 @@ class ReadOperationalStateCurrentPhase : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.CurrentPhase response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState CurrentPhase read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60135,6 +65963,11 @@ class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.CurrentPhase response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60171,8 +66004,11 @@ class ReadOperationalStateCountdownTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.CountdownTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState CountdownTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60216,6 +66052,11 @@ class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.CountdownTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60252,8 +66093,11 @@ class ReadOperationalStateOperationalStateList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.OperationalStateList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState OperationalStateList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60297,6 +66141,11 @@ class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.OperationalStateList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60333,8 +66182,11 @@ class ReadOperationalStateOperationalState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.OperationalState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState OperationalState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60378,6 +66230,11 @@ class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.OperationalState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60415,8 +66272,11 @@ class ReadOperationalStateOperationalError : public ReadAttribute { [cluster readAttributeOperationalErrorWithCompletion:^( MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.OperationalError response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState OperationalError read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60460,6 +66320,11 @@ class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttri } reportHandler:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.OperationalError response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60496,8 +66361,11 @@ class ReadOperationalStateGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60541,6 +66409,11 @@ class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60577,8 +66450,11 @@ class ReadOperationalStateAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60622,6 +66498,11 @@ class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60658,8 +66539,11 @@ class ReadOperationalStateEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60703,6 +66587,11 @@ class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60739,8 +66628,11 @@ class ReadOperationalStateAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60784,6 +66676,11 @@ class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60820,8 +66717,11 @@ class ReadOperationalStateFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60865,6 +66765,11 @@ class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -60901,8 +66806,11 @@ class ReadOperationalStateClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OperationalState ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -60946,6 +66854,11 @@ class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OperationalState.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61018,10 +66931,18 @@ class RvcOperationalStatePause : public ClusterCommand { completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -61069,10 +66990,18 @@ class RvcOperationalStateStop : public ClusterCommand { completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -61120,10 +67049,18 @@ class RvcOperationalStateStart : public ClusterCommand { completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -61171,10 +67108,18 @@ class RvcOperationalStateResume : public ClusterCommand { completion:^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -61217,8 +67162,11 @@ class ReadRvcOperationalStatePhaseList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState PhaseList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61262,6 +67210,11 @@ class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61298,8 +67251,11 @@ class ReadRvcOperationalStateCurrentPhase : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState CurrentPhase read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61343,6 +67299,11 @@ class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61379,8 +67340,11 @@ class ReadRvcOperationalStateCountdownTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState CountdownTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61424,6 +67388,11 @@ class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61460,8 +67429,11 @@ class ReadRvcOperationalStateOperationalStateList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState OperationalStateList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61505,6 +67477,11 @@ class SubscribeAttributeRvcOperationalStateOperationalStateList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61541,8 +67518,11 @@ class ReadRvcOperationalStateOperationalState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState OperationalState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61586,6 +67566,11 @@ class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61623,8 +67608,11 @@ class ReadRvcOperationalStateOperationalError : public ReadAttribute { [cluster readAttributeOperationalErrorWithCompletion:^( MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState OperationalError read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61668,6 +67656,11 @@ class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAt } reportHandler:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61704,8 +67697,11 @@ class ReadRvcOperationalStateGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61749,6 +67745,11 @@ class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61785,8 +67786,11 @@ class ReadRvcOperationalStateAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61830,6 +67834,11 @@ class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61866,8 +67875,11 @@ class ReadRvcOperationalStateEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61911,6 +67923,11 @@ class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -61947,8 +67964,11 @@ class ReadRvcOperationalStateAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -61992,6 +68012,11 @@ class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62028,8 +68053,11 @@ class ReadRvcOperationalStateFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62073,6 +68101,11 @@ class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62109,8 +68142,11 @@ class ReadRvcOperationalStateClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RVCOperationalState ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62154,6 +68190,11 @@ class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62223,6 +68264,8 @@ class HepaFilterMonitoringResetCondition : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -62265,8 +68308,11 @@ class ReadHepaFilterMonitoringCondition : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.Condition response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring Condition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62310,6 +68356,11 @@ class SubscribeAttributeHepaFilterMonitoringCondition : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.Condition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62346,8 +68397,11 @@ class ReadHepaFilterMonitoringDegradationDirection : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.DegradationDirection response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring DegradationDirection read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62391,6 +68445,11 @@ class SubscribeAttributeHepaFilterMonitoringDegradationDirection : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.DegradationDirection response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62427,8 +68486,11 @@ class ReadHepaFilterMonitoringChangeIndication : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.ChangeIndication response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring ChangeIndication read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62472,6 +68534,11 @@ class SubscribeAttributeHepaFilterMonitoringChangeIndication : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.ChangeIndication response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62508,8 +68575,11 @@ class ReadHepaFilterMonitoringInPlaceIndicator : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.InPlaceIndicator response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring InPlaceIndicator read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62553,6 +68623,11 @@ class SubscribeAttributeHepaFilterMonitoringInPlaceIndicator : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.InPlaceIndicator response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62589,8 +68664,11 @@ class ReadHepaFilterMonitoringLastChangedTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLastChangedTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.LastChangedTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring LastChangedTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62625,13 +68703,18 @@ class WriteHepaFilterMonitoringLastChangedTime : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeLastChangedTimeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("HEPAFilterMonitoring LastChangedTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62639,7 +68722,7 @@ class WriteHepaFilterMonitoringLastChangedTime : public WriteAttribute { } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeHepaFilterMonitoringLastChangedTime : public SubscribeAttribute { @@ -62678,6 +68761,11 @@ class SubscribeAttributeHepaFilterMonitoringLastChangedTime : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.LastChangedTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62714,8 +68802,11 @@ class ReadHepaFilterMonitoringReplacementProductList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReplacementProductListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.ReplacementProductList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring ReplacementProductList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62759,6 +68850,11 @@ class SubscribeAttributeHepaFilterMonitoringReplacementProductList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.ReplacementProductList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62795,8 +68891,11 @@ class ReadHepaFilterMonitoringGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62840,6 +68939,11 @@ class SubscribeAttributeHepaFilterMonitoringGeneratedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62876,8 +68980,11 @@ class ReadHepaFilterMonitoringAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -62921,6 +69028,11 @@ class SubscribeAttributeHepaFilterMonitoringAcceptedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -62957,8 +69069,11 @@ class ReadHepaFilterMonitoringEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63002,6 +69117,11 @@ class SubscribeAttributeHepaFilterMonitoringEventList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63038,8 +69158,11 @@ class ReadHepaFilterMonitoringAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63083,6 +69206,11 @@ class SubscribeAttributeHepaFilterMonitoringAttributeList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63119,8 +69247,11 @@ class ReadHepaFilterMonitoringFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63164,6 +69295,11 @@ class SubscribeAttributeHepaFilterMonitoringFeatureMap : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63200,8 +69336,11 @@ class ReadHepaFilterMonitoringClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("HEPAFilterMonitoring ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63245,6 +69384,11 @@ class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"HEPAFilterMonitoring.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63314,6 +69458,8 @@ class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -63356,8 +69502,11 @@ class ReadActivatedCarbonFilterMonitoringCondition : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.Condition response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring Condition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63401,6 +69550,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringCondition : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.Condition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63438,8 +69592,11 @@ class ReadActivatedCarbonFilterMonitoringDegradationDirection : public ReadAttri queue:callbackQueue]; [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.DegradationDirection response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring DegradationDirection read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63484,6 +69641,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.DegradationDirection response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63521,8 +69683,11 @@ class ReadActivatedCarbonFilterMonitoringChangeIndication : public ReadAttribute queue:callbackQueue]; [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.ChangeIndication response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring ChangeIndication read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63567,6 +69732,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.ChangeIndication response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63604,8 +69774,11 @@ class ReadActivatedCarbonFilterMonitoringInPlaceIndicator : public ReadAttribute queue:callbackQueue]; [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.InPlaceIndicator response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring InPlaceIndicator read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63650,6 +69823,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.InPlaceIndicator response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63687,8 +69865,11 @@ class ReadActivatedCarbonFilterMonitoringLastChangedTime : public ReadAttribute queue:callbackQueue]; [cluster readAttributeLastChangedTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.LastChangedTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring LastChangedTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63724,7 +69905,10 @@ class WriteActivatedCarbonFilterMonitoringLastChangedTime : public WriteAttribut params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeLastChangedTimeWithValue:value @@ -63732,6 +69916,8 @@ class WriteActivatedCarbonFilterMonitoringLastChangedTime : public WriteAttribut completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ActivatedCarbonFilterMonitoring LastChangedTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63739,7 +69925,7 @@ class WriteActivatedCarbonFilterMonitoringLastChangedTime : public WriteAttribut } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime : public SubscribeAttribute { @@ -63779,6 +69965,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.LastChangedTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63816,8 +70007,11 @@ class ReadActivatedCarbonFilterMonitoringReplacementProductList : public ReadAtt queue:callbackQueue]; [cluster readAttributeReplacementProductListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.ReplacementProductList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring ReplacementProductList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63862,6 +70056,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList : } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.ReplacementProductList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63899,8 +70098,11 @@ class ReadActivatedCarbonFilterMonitoringGeneratedCommandList : public ReadAttri queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -63945,6 +70147,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList : pu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -63982,8 +70189,11 @@ class ReadActivatedCarbonFilterMonitoringAcceptedCommandList : public ReadAttrib queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64028,6 +70238,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList : pub } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64064,8 +70279,11 @@ class ReadActivatedCarbonFilterMonitoringEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64109,6 +70327,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringEventList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64146,8 +70369,11 @@ class ReadActivatedCarbonFilterMonitoringAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64191,6 +70417,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList : public Su } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64227,8 +70458,11 @@ class ReadActivatedCarbonFilterMonitoringFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64272,6 +70506,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64309,8 +70548,11 @@ class ReadActivatedCarbonFilterMonitoringClusterRevision : public ReadAttribute queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ActivatedCarbonFilterMonitoring ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -64355,6 +70597,11 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ActivatedCarbonFilterMonitoring.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -64479,6 +70726,7 @@ class DoorLockLockDoor : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -64525,17 +70773,19 @@ class DoorLockUnlockDoor : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + unlockDoorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -64585,6 +70835,8 @@ class DoorLockUnlockWithTimeout : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -64645,6 +70897,8 @@ class DoorLockSetWeekDaySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -64693,10 +70947,20 @@ class DoorLockGetWeekDaySchedule : public ClusterCommand { completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -64747,6 +71011,8 @@ class DoorLockClearWeekDaySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -64801,6 +71067,8 @@ class DoorLockSetYearDaySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -64849,10 +71117,20 @@ class DoorLockGetYearDaySchedule : public ClusterCommand { completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -64903,6 +71181,8 @@ class DoorLockClearYearDaySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -64957,6 +71237,8 @@ class DoorLockSetHolidaySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -65003,10 +71285,20 @@ class DoorLockGetHolidaySchedule : public ClusterCommand { completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -65055,6 +71347,8 @@ class DoorLockClearHolidaySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -65137,6 +71431,7 @@ class DoorLockSetUser : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -65179,18 +71474,25 @@ class DoorLockGetUser : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetUserResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetUserResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -65228,17 +71530,19 @@ class DoorLockClearUser : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster clearUserWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + clearUserWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -65302,19 +71606,29 @@ class DoorLockSetCredential : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setCredentialWithParams:params - completion:^( - MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + setCredentialWithParams:params + completion:^( + MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -65361,10 +71675,20 @@ class DoorLockGetCredentialStatus : public ClusterCommand { completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -65422,6 +71746,8 @@ class DoorLockClearCredential : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -65471,17 +71797,19 @@ class DoorLockUnboltDoor : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster unboltDoorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + unboltDoorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -65516,8 +71844,11 @@ class ReadDoorLockLockState : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock LockState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65559,6 +71890,11 @@ class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65590,8 +71926,11 @@ class ReadDoorLockLockType : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeLockTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock LockType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65633,6 +71972,11 @@ class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LockType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65664,8 +72008,11 @@ class ReadDoorLockActuatorEnabled : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeActuatorEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock ActuatorEnabled read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65707,6 +72054,11 @@ class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65738,8 +72090,11 @@ class ReadDoorLockDoorState : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeDoorStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock DoorState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65781,6 +72136,11 @@ class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65812,8 +72172,11 @@ class ReadDoorLockDoorOpenEvents : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeDoorOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock DoorOpenEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65853,6 +72216,8 @@ class WriteDoorLockDoorOpenEvents : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock DoorOpenEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65897,6 +72262,11 @@ class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -65928,8 +72298,11 @@ class ReadDoorLockDoorClosedEvents : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeDoorClosedEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock DoorClosedEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -65969,6 +72342,8 @@ class WriteDoorLockDoorClosedEvents : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock DoorClosedEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66013,6 +72388,11 @@ class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66044,8 +72424,11 @@ class ReadDoorLockOpenPeriod : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OpenPeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock OpenPeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66085,6 +72468,8 @@ class WriteDoorLockOpenPeriod : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock OpenPeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66129,6 +72514,11 @@ class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OpenPeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66160,8 +72550,11 @@ class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock NumberOfTotalUsersSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66203,6 +72596,11 @@ class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66234,8 +72632,11 @@ class ReadDoorLockNumberOfPINUsersSupported : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock NumberOfPINUsersSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66277,6 +72678,11 @@ class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66308,8 +72714,11 @@ class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock NumberOfRFIDUsersSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66351,6 +72760,11 @@ class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66384,8 +72798,11 @@ class ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public ReadAttribut [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock NumberOfWeekDaySchedulesSupportedPerUser read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66428,6 +72845,11 @@ class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66461,8 +72883,11 @@ class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribut [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock NumberOfYearDaySchedulesSupportedPerUser read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66505,6 +72930,11 @@ class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66537,8 +72967,11 @@ class ReadDoorLockNumberOfHolidaySchedulesSupported : public ReadAttribute { [cluster readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock NumberOfHolidaySchedulesSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66580,6 +73013,11 @@ class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66611,8 +73049,11 @@ class ReadDoorLockMaxPINCodeLength : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock MaxPINCodeLength read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66654,6 +73095,11 @@ class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66685,8 +73131,11 @@ class ReadDoorLockMinPINCodeLength : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock MinPINCodeLength read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66728,6 +73177,11 @@ class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66759,8 +73213,11 @@ class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock MaxRFIDCodeLength read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66802,6 +73259,11 @@ class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66833,8 +73295,11 @@ class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock MinRFIDCodeLength read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66876,6 +73341,11 @@ class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66907,8 +73377,11 @@ class ReadDoorLockCredentialRulesSupport : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCredentialRulesSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock CredentialRulesSupport read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -66950,6 +73423,11 @@ class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -66983,8 +73461,11 @@ class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock NumberOfCredentialsSupportedPerUser read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67026,6 +73507,11 @@ class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67057,8 +73543,11 @@ class ReadDoorLockLanguage : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeLanguageWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.Language response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock Language read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67100,6 +73589,8 @@ class WriteDoorLockLanguage : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock Language write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67144,6 +73635,11 @@ class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.Language response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67175,8 +73671,11 @@ class ReadDoorLockLEDSettings : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeLEDSettingsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LEDSettings response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock LEDSettings read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67216,6 +73715,8 @@ class WriteDoorLockLEDSettings : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock LEDSettings write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67260,6 +73761,11 @@ class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LEDSettings response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67291,8 +73797,11 @@ class ReadDoorLockAutoRelockTime : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock AutoRelockTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67332,6 +73841,8 @@ class WriteDoorLockAutoRelockTime : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock AutoRelockTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67376,6 +73887,11 @@ class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67407,8 +73923,11 @@ class ReadDoorLockSoundVolume : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSoundVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SoundVolume response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock SoundVolume read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67448,6 +73967,8 @@ class WriteDoorLockSoundVolume : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock SoundVolume write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67492,6 +74013,11 @@ class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SoundVolume response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67523,8 +74049,11 @@ class ReadDoorLockOperatingMode : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OperatingMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock OperatingMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67564,6 +74093,8 @@ class WriteDoorLockOperatingMode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock OperatingMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67608,6 +74139,11 @@ class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.OperatingMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67639,8 +74175,11 @@ class ReadDoorLockSupportedOperatingModes : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedOperatingModesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock SupportedOperatingModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67682,6 +74221,11 @@ class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67713,8 +74257,11 @@ class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeDefaultConfigurationRegisterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock DefaultConfigurationRegister read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67756,6 +74303,11 @@ class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67787,8 +74339,11 @@ class ReadDoorLockEnableLocalProgramming : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEnableLocalProgrammingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock EnableLocalProgramming read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67828,6 +74383,8 @@ class WriteDoorLockEnableLocalProgramming : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock EnableLocalProgramming write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67872,6 +74429,11 @@ class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -67903,8 +74465,11 @@ class ReadDoorLockEnableOneTouchLocking : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEnableOneTouchLockingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock EnableOneTouchLocking read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67944,6 +74509,8 @@ class WriteDoorLockEnableOneTouchLocking : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock EnableOneTouchLocking write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -67988,6 +74555,11 @@ class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68019,8 +74591,11 @@ class ReadDoorLockEnableInsideStatusLED : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEnableInsideStatusLEDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock EnableInsideStatusLED read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68060,6 +74635,8 @@ class WriteDoorLockEnableInsideStatusLED : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock EnableInsideStatusLED write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68104,6 +74681,11 @@ class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68135,8 +74717,11 @@ class ReadDoorLockEnablePrivacyModeButton : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEnablePrivacyModeButtonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock EnablePrivacyModeButton read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68176,6 +74761,8 @@ class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock EnablePrivacyModeButton write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68220,6 +74807,11 @@ class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68251,8 +74843,11 @@ class ReadDoorLockLocalProgrammingFeatures : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeLocalProgrammingFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock LocalProgrammingFeatures read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68292,6 +74887,8 @@ class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock LocalProgrammingFeatures write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68336,6 +74933,11 @@ class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68367,8 +74969,11 @@ class ReadDoorLockWrongCodeEntryLimit : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock WrongCodeEntryLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68408,6 +75013,8 @@ class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock WrongCodeEntryLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68452,6 +75059,11 @@ class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68483,8 +75095,11 @@ class ReadDoorLockUserCodeTemporaryDisableTime : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock UserCodeTemporaryDisableTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68525,6 +75140,8 @@ class WriteDoorLockUserCodeTemporaryDisableTime : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock UserCodeTemporaryDisableTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68569,6 +75186,11 @@ class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68600,8 +75222,11 @@ class ReadDoorLockSendPINOverTheAir : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSendPINOverTheAirWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock SendPINOverTheAir read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68641,6 +75266,8 @@ class WriteDoorLockSendPINOverTheAir : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock SendPINOverTheAir write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68685,6 +75312,11 @@ class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68716,8 +75348,11 @@ class ReadDoorLockRequirePINforRemoteOperation : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock RequirePINforRemoteOperation read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68758,6 +75393,8 @@ class WriteDoorLockRequirePINforRemoteOperation : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock RequirePINforRemoteOperation write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68802,6 +75439,11 @@ class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68833,8 +75475,11 @@ class ReadDoorLockExpiringUserTimeout : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeExpiringUserTimeoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock ExpiringUserTimeout read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68874,6 +75519,8 @@ class WriteDoorLockExpiringUserTimeout : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("DoorLock ExpiringUserTimeout write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68918,6 +75565,11 @@ class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -68949,8 +75601,11 @@ class ReadDoorLockGeneratedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -68992,6 +75647,11 @@ class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69023,8 +75683,11 @@ class ReadDoorLockAcceptedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69066,6 +75729,11 @@ class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69099,8 +75767,11 @@ class ReadDoorLockEventList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69142,6 +75813,11 @@ class SubscribeAttributeDoorLockEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69175,8 +75851,11 @@ class ReadDoorLockAttributeList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69218,6 +75897,11 @@ class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69249,8 +75933,11 @@ class ReadDoorLockFeatureMap : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69292,6 +75979,11 @@ class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69323,8 +76015,11 @@ class ReadDoorLockClusterRevision : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("DoorLock ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69366,6 +76061,11 @@ class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"DoorLock.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69453,6 +76153,7 @@ class WindowCoveringUpOrOpen : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -69494,17 +76195,19 @@ class WindowCoveringDownOrClose : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster downOrCloseWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + downOrCloseWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -69541,17 +76244,19 @@ class WindowCoveringStopMotion : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stopMotionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + stopMotionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -69590,17 +76295,19 @@ class WindowCoveringGoToLiftValue : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster goToLiftValueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + goToLiftValueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -69646,6 +76353,8 @@ class WindowCoveringGoToLiftPercentage : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -69690,17 +76399,19 @@ class WindowCoveringGoToTiltValue : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster goToTiltValueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + goToTiltValueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -69746,6 +76457,8 @@ class WindowCoveringGoToTiltPercentage : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -69785,8 +76498,11 @@ class ReadWindowCoveringType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Type response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering Type read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69830,6 +76546,11 @@ class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Type response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69863,8 +76584,11 @@ class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering PhysicalClosedLimitLift read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69908,6 +76632,11 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -69941,8 +76670,11 @@ class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering PhysicalClosedLimitTilt read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -69986,6 +76718,11 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70019,8 +76756,11 @@ class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering CurrentPositionLift read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70064,6 +76804,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70097,8 +76842,11 @@ class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering CurrentPositionTilt read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70142,6 +76890,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70175,8 +76928,11 @@ class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering NumberOfActuationsLift read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70220,6 +76976,11 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70253,8 +77014,11 @@ class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering NumberOfActuationsTilt read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70298,6 +77062,11 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70331,8 +77100,11 @@ class ReadWindowCoveringConfigStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering ConfigStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70376,6 +77148,11 @@ class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70410,8 +77187,11 @@ class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering CurrentPositionLiftPercentage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70455,6 +77235,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70489,8 +77274,11 @@ class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering CurrentPositionTiltPercentage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70534,6 +77322,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70567,8 +77360,11 @@ class ReadWindowCoveringOperationalStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering OperationalStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70612,6 +77408,11 @@ class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70647,8 +77448,11 @@ class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering TargetPositionLiftPercent100ths read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70693,6 +77497,11 @@ class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70728,8 +77537,11 @@ class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering TargetPositionTiltPercent100ths read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70774,6 +77586,11 @@ class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70807,8 +77624,11 @@ class ReadWindowCoveringEndProductType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.EndProductType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering EndProductType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70852,6 +77672,11 @@ class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.EndProductType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70887,8 +77712,11 @@ class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering CurrentPositionLiftPercent100ths read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -70933,6 +77761,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -70968,8 +77801,11 @@ class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering CurrentPositionTiltPercent100ths read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71014,6 +77850,11 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71047,8 +77888,11 @@ class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering InstalledOpenLimitLift read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71092,6 +77936,11 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71125,8 +77974,11 @@ class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering InstalledClosedLimitLift read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71170,6 +78022,11 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71203,8 +78060,11 @@ class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering InstalledOpenLimitTilt read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71248,6 +78108,11 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71281,8 +78146,11 @@ class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering InstalledClosedLimitTilt read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71326,6 +78194,11 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71359,8 +78232,11 @@ class ReadWindowCoveringMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Mode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering Mode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71402,6 +78278,8 @@ class WriteWindowCoveringMode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("WindowCovering Mode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71448,6 +78326,11 @@ class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.Mode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71481,8 +78364,11 @@ class ReadWindowCoveringSafetyStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering SafetyStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71526,6 +78412,11 @@ class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71559,8 +78450,11 @@ class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71604,6 +78498,11 @@ class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71637,8 +78536,11 @@ class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71682,6 +78584,11 @@ class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71717,8 +78624,11 @@ class ReadWindowCoveringEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71762,6 +78672,11 @@ class SubscribeAttributeWindowCoveringEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71797,8 +78712,11 @@ class ReadWindowCoveringAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71842,6 +78760,11 @@ class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71875,8 +78798,11 @@ class ReadWindowCoveringFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71920,6 +78846,11 @@ class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -71953,8 +78884,11 @@ class ReadWindowCoveringClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WindowCovering ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -71998,6 +78932,11 @@ class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72070,6 +79009,8 @@ class BarrierControlBarrierControlGoToPercent : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -72118,6 +79059,8 @@ class BarrierControlBarrierControlStop : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -72156,8 +79099,11 @@ class ReadBarrierControlBarrierMovingState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierMovingStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierMovingState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72201,6 +79147,11 @@ class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72234,8 +79185,11 @@ class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierSafetyStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72279,6 +79233,11 @@ class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72312,8 +79271,11 @@ class ReadBarrierControlBarrierCapabilities : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierCapabilities read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72357,6 +79319,11 @@ class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72390,8 +79357,11 @@ class ReadBarrierControlBarrierOpenEvents : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierOpenEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72433,6 +79403,8 @@ class WriteBarrierControlBarrierOpenEvents : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BarrierControl BarrierOpenEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72479,6 +79451,11 @@ class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72512,8 +79489,11 @@ class ReadBarrierControlBarrierCloseEvents : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierCloseEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72555,6 +79535,8 @@ class WriteBarrierControlBarrierCloseEvents : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BarrierControl BarrierCloseEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72601,6 +79583,11 @@ class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72634,8 +79621,11 @@ class ReadBarrierControlBarrierCommandOpenEvents : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierCommandOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierCommandOpenEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72678,6 +79668,8 @@ class WriteBarrierControlBarrierCommandOpenEvents : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BarrierControl BarrierCommandOpenEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72724,6 +79716,11 @@ class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72757,8 +79754,11 @@ class ReadBarrierControlBarrierCommandCloseEvents : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierCommandCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierCommandCloseEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72801,6 +79801,8 @@ class WriteBarrierControlBarrierCommandCloseEvents : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BarrierControl BarrierCommandCloseEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72847,6 +79849,11 @@ class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -72880,8 +79887,11 @@ class ReadBarrierControlBarrierOpenPeriod : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierOpenPeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72923,6 +79933,8 @@ class WriteBarrierControlBarrierOpenPeriod : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BarrierControl BarrierOpenPeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -72969,6 +79981,11 @@ class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73002,8 +80019,11 @@ class ReadBarrierControlBarrierClosePeriod : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierClosePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierClosePeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73045,6 +80065,8 @@ class WriteBarrierControlBarrierClosePeriod : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BarrierControl BarrierClosePeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73091,6 +80113,11 @@ class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73124,8 +80151,11 @@ class ReadBarrierControlBarrierPosition : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBarrierPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl BarrierPosition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73169,6 +80199,11 @@ class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73202,8 +80237,11 @@ class ReadBarrierControlGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73247,6 +80285,11 @@ class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73280,8 +80323,11 @@ class ReadBarrierControlAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73325,6 +80371,11 @@ class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73360,8 +80411,11 @@ class ReadBarrierControlEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73405,6 +80459,11 @@ class SubscribeAttributeBarrierControlEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73440,8 +80499,11 @@ class ReadBarrierControlAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73485,6 +80547,11 @@ class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73518,8 +80585,11 @@ class ReadBarrierControlFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73563,6 +80633,11 @@ class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73596,8 +80671,11 @@ class ReadBarrierControlClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BarrierControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73641,6 +80719,11 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73730,8 +80813,11 @@ class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxPressure read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73775,6 +80861,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxPressure : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73808,8 +80899,11 @@ class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxSpeed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73853,6 +80947,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73886,8 +80985,11 @@ class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxFlow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -73931,6 +81033,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -73965,8 +81072,11 @@ class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MinConstPressure read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74010,6 +81120,11 @@ class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74044,8 +81159,11 @@ class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxConstPressure read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74089,6 +81207,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74122,8 +81245,11 @@ class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MinCompPressure read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74167,6 +81293,11 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74200,8 +81331,11 @@ class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxCompPressure read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74245,6 +81379,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74278,8 +81417,11 @@ class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MinConstSpeed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74323,6 +81465,11 @@ class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74356,8 +81503,11 @@ class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxConstSpeed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74401,6 +81551,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74434,8 +81589,11 @@ class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MinConstFlow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74479,6 +81637,11 @@ class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74512,8 +81675,11 @@ class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxConstFlow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74557,6 +81723,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74590,8 +81761,11 @@ class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MinConstTemp read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74635,6 +81809,11 @@ class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74668,8 +81847,11 @@ class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl MaxConstTemp read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74713,6 +81895,11 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74746,8 +81933,11 @@ class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl PumpStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74791,6 +81981,11 @@ class SubscribeAttributePumpConfigurationAndControlPumpStatus : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74825,8 +82020,11 @@ class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribu queue:callbackQueue]; [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl EffectiveOperationMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74871,6 +82069,11 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74905,8 +82108,11 @@ class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute queue:callbackQueue]; [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl EffectiveControlMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -74951,6 +82157,11 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -74984,8 +82195,11 @@ class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl Capacity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75029,6 +82243,11 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75062,8 +82281,11 @@ class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl Speed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75107,6 +82329,11 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75141,8 +82368,11 @@ class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute queue:callbackQueue]; [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl LifetimeRunningHours read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75178,7 +82408,10 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribu params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeLifetimeRunningHoursWithValue:value params:params @@ -75186,6 +82419,8 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribu if (error != nil) { LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75193,7 +82428,7 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribu } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public SubscribeAttribute { @@ -75233,6 +82468,11 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75266,8 +82506,11 @@ class ReadPumpConfigurationAndControlPower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl Power read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75311,6 +82554,11 @@ class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75345,8 +82593,11 @@ class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribu queue:callbackQueue]; [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75382,7 +82633,10 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttri params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeLifetimeEnergyConsumedWithValue:value @@ -75391,6 +82645,8 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttri if (error != nil) { LogNSError( "PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75398,7 +82654,7 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttri } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : public SubscribeAttribute { @@ -75438,6 +82694,11 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75471,8 +82732,11 @@ class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl OperationMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75514,6 +82778,8 @@ class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("PumpConfigurationAndControl OperationMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75560,6 +82826,11 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75593,8 +82864,11 @@ class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl ControlMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75636,6 +82910,8 @@ class WritePumpConfigurationAndControlControlMode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("PumpConfigurationAndControl ControlMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75682,6 +82958,11 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75716,8 +82997,11 @@ class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75762,6 +83046,11 @@ class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75796,8 +83085,11 @@ class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75842,6 +83134,11 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75877,8 +83174,11 @@ class ReadPumpConfigurationAndControlEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -75922,6 +83222,11 @@ class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -75957,8 +83262,11 @@ class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -76002,6 +83310,11 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76035,8 +83348,11 @@ class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -76080,6 +83396,11 @@ class SubscribeAttributePumpConfigurationAndControlFeatureMap : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76113,8 +83434,11 @@ class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PumpConfigurationAndControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -76158,6 +83482,11 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76273,6 +83602,8 @@ class ThermostatSetpointRaiseLower : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -76349,6 +83680,8 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -76402,10 +83735,20 @@ class ThermostatGetWeeklySchedule : public ClusterCommand { completion:^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -76454,6 +83797,8 @@ class ThermostatClearWeeklySchedule : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -76492,8 +83837,11 @@ class ReadThermostatLocalTemperature : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.LocalTemperature response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat LocalTemperature read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -76537,6 +83885,11 @@ class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.LocalTemperature response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76570,8 +83923,11 @@ class ReadThermostatOutdoorTemperature : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat OutdoorTemperature read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -76615,6 +83971,11 @@ class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76648,8 +84009,11 @@ class ReadThermostatOccupancy : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.Occupancy response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat Occupancy read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -76693,6 +84057,11 @@ class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.Occupancy response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76726,8 +84095,11 @@ class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat AbsMinHeatSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -76771,6 +84143,11 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76804,8 +84181,11 @@ class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat AbsMaxHeatSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -76849,6 +84229,11 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76882,8 +84267,11 @@ class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat AbsMinCoolSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -76927,6 +84315,11 @@ class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -76960,8 +84353,11 @@ class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat AbsMaxCoolSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77005,6 +84401,11 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77038,8 +84439,11 @@ class ReadThermostatPICoolingDemand : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat PICoolingDemand read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77083,6 +84487,11 @@ class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77116,8 +84525,11 @@ class ReadThermostatPIHeatingDemand : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat PIHeatingDemand read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77161,6 +84573,11 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77194,8 +84611,11 @@ class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77238,6 +84658,8 @@ class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77284,6 +84706,11 @@ class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77317,8 +84744,11 @@ class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat LocalTemperatureCalibration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77361,6 +84791,8 @@ class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat LocalTemperatureCalibration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77407,6 +84839,11 @@ class SubscribeAttributeThermostatLocalTemperatureCalibration : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77440,8 +84877,11 @@ class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat OccupiedCoolingSetpoint read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77483,6 +84923,8 @@ class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77529,6 +84971,11 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77562,8 +85009,11 @@ class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat OccupiedHeatingSetpoint read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77605,6 +85055,8 @@ class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77651,6 +85103,11 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77684,8 +85141,11 @@ class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat UnoccupiedCoolingSetpoint read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77728,6 +85188,8 @@ class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77774,6 +85236,11 @@ class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77807,8 +85274,11 @@ class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat UnoccupiedHeatingSetpoint read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77851,6 +85321,8 @@ class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77897,6 +85369,11 @@ class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -77930,8 +85407,11 @@ class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat MinHeatSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -77973,6 +85453,8 @@ class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat MinHeatSetpointLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78019,6 +85501,11 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78052,8 +85539,11 @@ class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat MaxHeatSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78095,6 +85585,8 @@ class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78141,6 +85633,11 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78174,8 +85671,11 @@ class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat MinCoolSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78217,6 +85717,8 @@ class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat MinCoolSetpointLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78263,6 +85765,11 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78296,8 +85803,11 @@ class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat MaxCoolSetpointLimit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78339,6 +85849,8 @@ class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78385,6 +85897,11 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78418,8 +85935,11 @@ class ReadThermostatMinSetpointDeadBand : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat MinSetpointDeadBand read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78461,6 +85981,8 @@ class WriteThermostatMinSetpointDeadBand : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat MinSetpointDeadBand write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78507,6 +86029,11 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78540,8 +86067,11 @@ class ReadThermostatRemoteSensing : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.RemoteSensing response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat RemoteSensing read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78583,6 +86113,8 @@ class WriteThermostatRemoteSensing : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat RemoteSensing write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78629,6 +86161,11 @@ class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.RemoteSensing response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78662,8 +86199,11 @@ class ReadThermostatControlSequenceOfOperation : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ControlSequenceOfOperation read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78706,6 +86246,8 @@ class WriteThermostatControlSequenceOfOperation : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ControlSequenceOfOperation write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78752,6 +86294,11 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78785,8 +86332,11 @@ class ReadThermostatSystemMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SystemMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat SystemMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78828,6 +86378,8 @@ class WriteThermostatSystemMode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat SystemMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78874,6 +86426,11 @@ class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SystemMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78907,8 +86464,11 @@ class ReadThermostatThermostatRunningMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ThermostatRunningMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -78952,6 +86512,11 @@ class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -78985,8 +86550,11 @@ class ReadThermostatStartOfWeek : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.StartOfWeek response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat StartOfWeek read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79030,6 +86598,11 @@ class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.StartOfWeek response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79063,8 +86636,11 @@ class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat NumberOfWeeklyTransitions read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79108,6 +86684,11 @@ class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79141,8 +86722,11 @@ class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat NumberOfDailyTransitions read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79186,6 +86770,11 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79219,8 +86808,11 @@ class ReadThermostatTemperatureSetpointHold : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat TemperatureSetpointHold read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79262,6 +86854,8 @@ class WriteThermostatTemperatureSetpointHold : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat TemperatureSetpointHold write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79308,6 +86902,11 @@ class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79342,8 +86941,11 @@ class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { [cluster readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat TemperatureSetpointHoldDuration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79378,7 +86980,10 @@ class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeTemperatureSetpointHoldDurationWithValue:value @@ -79387,6 +86992,8 @@ class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { if (error != nil) { LogNSError("Thermostat TemperatureSetpointHoldDuration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79394,7 +87001,7 @@ class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public SubscribeAttribute { @@ -79433,6 +87040,11 @@ class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79468,8 +87080,11 @@ class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { [cluster readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ThermostatProgrammingOperationMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79515,6 +87130,8 @@ class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute LogNSError( "Thermostat ThermostatProgrammingOperationMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79561,6 +87178,11 @@ class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79594,8 +87216,11 @@ class ReadThermostatThermostatRunningState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ThermostatRunningState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79639,6 +87264,11 @@ class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79672,8 +87302,11 @@ class ReadThermostatSetpointChangeSource : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat SetpointChangeSource read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79717,6 +87350,11 @@ class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79750,8 +87388,11 @@ class ReadThermostatSetpointChangeAmount : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat SetpointChangeAmount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79795,6 +87436,11 @@ class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79828,8 +87474,11 @@ class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat SetpointChangeSourceTimestamp read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79873,6 +87522,11 @@ class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -79906,8 +87560,11 @@ class ReadThermostatOccupiedSetback : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat OccupiedSetback read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79942,13 +87599,18 @@ class WriteThermostatOccupiedSetback : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeOccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat OccupiedSetback write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -79956,7 +87618,7 @@ class WriteThermostatOccupiedSetback : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { @@ -79995,6 +87657,11 @@ class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80028,8 +87695,11 @@ class ReadThermostatOccupiedSetbackMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat OccupiedSetbackMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80073,6 +87743,11 @@ class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80106,8 +87781,11 @@ class ReadThermostatOccupiedSetbackMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat OccupiedSetbackMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80151,6 +87829,11 @@ class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80184,8 +87867,11 @@ class ReadThermostatUnoccupiedSetback : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat UnoccupiedSetback read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80220,13 +87906,18 @@ class WriteThermostatUnoccupiedSetback : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeUnoccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat UnoccupiedSetback write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80234,7 +87925,7 @@ class WriteThermostatUnoccupiedSetback : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute { @@ -80273,6 +87964,11 @@ class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80306,8 +88002,11 @@ class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat UnoccupiedSetbackMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80351,6 +88050,11 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80384,8 +88088,11 @@ class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat UnoccupiedSetbackMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80429,6 +88136,11 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80462,8 +88174,11 @@ class ReadThermostatEmergencyHeatDelta : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat EmergencyHeatDelta read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80505,6 +88220,8 @@ class WriteThermostatEmergencyHeatDelta : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat EmergencyHeatDelta write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80551,6 +88268,11 @@ class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80584,8 +88306,11 @@ class ReadThermostatACType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80627,6 +88352,8 @@ class WriteThermostatACType : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ACType write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80673,6 +88400,11 @@ class SubscribeAttributeThermostatACType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80706,8 +88438,11 @@ class ReadThermostatACCapacity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCapacity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACCapacity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80749,6 +88484,8 @@ class WriteThermostatACCapacity : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ACCapacity write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80795,6 +88532,11 @@ class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCapacity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80828,8 +88570,11 @@ class ReadThermostatACRefrigerantType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACRefrigerantType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80871,6 +88616,8 @@ class WriteThermostatACRefrigerantType : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ACRefrigerantType write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80917,6 +88664,11 @@ class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -80950,8 +88702,11 @@ class ReadThermostatACCompressorType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCompressorType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACCompressorType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -80993,6 +88748,8 @@ class WriteThermostatACCompressorType : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ACCompressorType write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81039,6 +88796,11 @@ class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCompressorType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81072,8 +88834,11 @@ class ReadThermostatACErrorCode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACErrorCode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACErrorCode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81115,6 +88880,8 @@ class WriteThermostatACErrorCode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ACErrorCode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81161,6 +88928,11 @@ class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACErrorCode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81194,8 +88966,11 @@ class ReadThermostatACLouverPosition : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACLouverPosition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81237,6 +89012,8 @@ class WriteThermostatACLouverPosition : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ACLouverPosition write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81283,6 +89060,11 @@ class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81316,8 +89098,11 @@ class ReadThermostatACCoilTemperature : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACCoilTemperature read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81361,6 +89146,11 @@ class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81394,8 +89184,11 @@ class ReadThermostatACCapacityformat : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ACCapacityformat read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81437,6 +89230,8 @@ class WriteThermostatACCapacityformat : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("Thermostat ACCapacityformat write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81483,6 +89278,11 @@ class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81516,8 +89316,11 @@ class ReadThermostatGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81561,6 +89364,11 @@ class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81594,8 +89402,11 @@ class ReadThermostatAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81639,6 +89450,11 @@ class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81674,8 +89490,11 @@ class ReadThermostatEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81719,6 +89538,11 @@ class SubscribeAttributeThermostatEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81754,8 +89578,11 @@ class ReadThermostatAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81799,6 +89626,11 @@ class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81832,8 +89664,11 @@ class ReadThermostatFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81877,6 +89712,11 @@ class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -81910,8 +89750,11 @@ class ReadThermostatClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Thermostat ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -81955,6 +89798,11 @@ class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Thermostat.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82041,6 +89889,7 @@ class FanControlStep : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -82082,8 +89931,11 @@ class ReadFanControlFanMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl FanMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82125,6 +89977,8 @@ class WriteFanControlFanMode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("FanControl FanMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82171,6 +90025,11 @@ class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82204,8 +90063,11 @@ class ReadFanControlFanModeSequence : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanModeSequence response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl FanModeSequence read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82247,6 +90109,8 @@ class WriteFanControlFanModeSequence : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("FanControl FanModeSequence write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82293,6 +90157,11 @@ class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FanModeSequence response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82326,8 +90195,11 @@ class ReadFanControlPercentSetting : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.PercentSetting response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl PercentSetting read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82362,13 +90234,18 @@ class WriteFanControlPercentSetting : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributePercentSettingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("FanControl PercentSetting write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82376,7 +90253,7 @@ class WriteFanControlPercentSetting : public WriteAttribute { } private: - chip::Percent mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { @@ -82415,6 +90292,11 @@ class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.PercentSetting response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82448,8 +90330,11 @@ class ReadFanControlPercentCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.PercentCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl PercentCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82493,6 +90378,11 @@ class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.PercentCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82526,8 +90416,11 @@ class ReadFanControlSpeedMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl SpeedMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82571,6 +90464,11 @@ class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82604,8 +90502,11 @@ class ReadFanControlSpeedSetting : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedSetting response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl SpeedSetting read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82640,13 +90541,18 @@ class WriteFanControlSpeedSetting : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeSpeedSettingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("FanControl SpeedSetting write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82654,7 +90560,7 @@ class WriteFanControlSpeedSetting : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { @@ -82693,6 +90599,11 @@ class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedSetting response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82726,8 +90637,11 @@ class ReadFanControlSpeedCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl SpeedCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82771,6 +90685,11 @@ class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.SpeedCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82804,8 +90723,11 @@ class ReadFanControlRockSupport : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.RockSupport response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl RockSupport read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82849,6 +90771,11 @@ class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.RockSupport response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -82882,8 +90809,11 @@ class ReadFanControlRockSetting : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.RockSetting response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl RockSetting read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82925,6 +90855,8 @@ class WriteFanControlRockSetting : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("FanControl RockSetting write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -82971,6 +90903,11 @@ class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.RockSetting response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83004,8 +90941,11 @@ class ReadFanControlWindSupport : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.WindSupport response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl WindSupport read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83049,6 +90989,11 @@ class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.WindSupport response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83082,8 +91027,11 @@ class ReadFanControlWindSetting : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.WindSetting response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl WindSetting read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83125,6 +91073,8 @@ class WriteFanControlWindSetting : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("FanControl WindSetting write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83171,6 +91121,11 @@ class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.WindSetting response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83206,8 +91161,11 @@ class ReadFanControlAirflowDirection : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAirflowDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AirflowDirection response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl AirflowDirection read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83249,6 +91207,8 @@ class WriteFanControlAirflowDirection : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("FanControl AirflowDirection write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83295,6 +91255,11 @@ class SubscribeAttributeFanControlAirflowDirection : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AirflowDirection response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83330,8 +91295,11 @@ class ReadFanControlGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83375,6 +91343,11 @@ class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83408,8 +91381,11 @@ class ReadFanControlAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83453,6 +91429,11 @@ class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83488,8 +91469,11 @@ class ReadFanControlEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83533,6 +91517,11 @@ class SubscribeAttributeFanControlEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83568,8 +91557,11 @@ class ReadFanControlAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83613,6 +91605,11 @@ class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83646,8 +91643,11 @@ class ReadFanControlFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83691,6 +91691,11 @@ class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83724,8 +91729,11 @@ class ReadFanControlClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FanControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83769,6 +91777,11 @@ class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FanControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83822,8 +91835,11 @@ class ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode : public Re queue:callbackQueue]; [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83868,6 +91884,8 @@ class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public W LogNSError("ThermostatUserInterfaceConfiguration " "TemperatureDisplayMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83915,6 +91933,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMo } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -83949,8 +91972,11 @@ class ReadThermostatUserInterfaceConfigurationKeypadLockout : public ReadAttribu queue:callbackQueue]; [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -83994,6 +92020,8 @@ class WriteThermostatUserInterfaceConfigurationKeypadLockout : public WriteAttri completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84041,6 +92069,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84075,8 +92108,11 @@ class ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : pu queue:callbackQueue]; [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84121,6 +92157,8 @@ class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : p LogNSError("ThermostatUserInterfaceConfiguration " "ScheduleProgrammingVisibility write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84168,6 +92206,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingV } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84202,8 +92245,11 @@ class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public Read queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84248,6 +92294,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84282,8 +92333,11 @@ class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadA queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84328,6 +92382,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84364,8 +92423,11 @@ class ReadThermostatUserInterfaceConfigurationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84410,6 +92472,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationEventList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84446,8 +92513,11 @@ class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribu queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84492,6 +92562,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : publ } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84526,8 +92601,11 @@ class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84572,6 +92650,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84606,8 +92689,11 @@ class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttri queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ThermostatUserInterfaceConfiguration ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -84652,6 +92738,11 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -84785,17 +92876,19 @@ class ColorControlMoveToHue : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster moveToHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + moveToHueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -84847,6 +92940,7 @@ class ColorControlMoveHue : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -84905,6 +92999,7 @@ class ColorControlStepHue : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -84961,6 +93056,8 @@ class ColorControlMoveToSaturation : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -85017,6 +93114,8 @@ class ColorControlMoveSaturation : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -85075,6 +93174,8 @@ class ColorControlStepSaturation : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -85133,6 +93234,8 @@ class ColorControlMoveToHueAndSaturation : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -85185,17 +93288,19 @@ class ColorControlMoveToColor : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + moveToColorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -85241,17 +93346,19 @@ class ColorControlMoveColor : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster moveColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + moveColorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -85299,17 +93406,19 @@ class ColorControlStepColor : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stepColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + stepColorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -85361,6 +93470,8 @@ class ColorControlMoveToColorTemperature : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -85419,6 +93530,8 @@ class ColorControlEnhancedMoveToHue : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -85475,6 +93588,8 @@ class ColorControlEnhancedMoveHue : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -85533,6 +93648,8 @@ class ColorControlEnhancedStepHue : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -85591,6 +93708,8 @@ class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -85647,17 +93766,19 @@ class ColorControlColorLoopSet : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster colorLoopSetWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + colorLoopSetWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -85699,17 +93820,19 @@ class ColorControlStopMoveStep : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stopMoveStepWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + stopMoveStepWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -85765,6 +93888,8 @@ class ColorControlMoveColorTemperature : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -85827,6 +93952,8 @@ class ColorControlStepColorTemperature : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -85866,8 +93993,11 @@ class ReadColorControlCurrentHue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentHue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl CurrentHue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85911,6 +94041,11 @@ class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentHue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -85944,8 +94079,11 @@ class ReadColorControlCurrentSaturation : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl CurrentSaturation read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -85989,6 +94127,11 @@ class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86022,8 +94165,11 @@ class ReadColorControlRemainingTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.RemainingTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl RemainingTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86067,6 +94213,11 @@ class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.RemainingTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86100,8 +94251,11 @@ class ReadColorControlCurrentX : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentX response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl CurrentX read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86145,6 +94299,11 @@ class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentX response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86178,8 +94337,11 @@ class ReadColorControlCurrentY : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentY response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl CurrentY read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86223,6 +94385,11 @@ class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CurrentY response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86256,8 +94423,11 @@ class ReadColorControlDriftCompensation : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.DriftCompensation response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl DriftCompensation read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86301,6 +94471,11 @@ class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.DriftCompensation response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86334,8 +94509,11 @@ class ReadColorControlCompensationText : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CompensationText response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl CompensationText read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86379,6 +94557,11 @@ class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CompensationText response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86412,8 +94595,11 @@ class ReadColorControlColorTemperatureMireds : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorTemperatureMireds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86457,6 +94643,11 @@ class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86490,8 +94681,11 @@ class ReadColorControlColorMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86535,6 +94729,11 @@ class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86568,8 +94767,11 @@ class ReadColorControlOptions : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Options response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Options read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86611,6 +94813,8 @@ class WriteColorControlOptions : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl Options write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86657,6 +94861,11 @@ class SubscribeAttributeColorControlOptions : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Options response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86690,8 +94899,11 @@ class ReadColorControlNumberOfPrimaries : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl NumberOfPrimaries read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86735,6 +94947,11 @@ class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86768,8 +94985,11 @@ class ReadColorControlPrimary1X : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary1XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1X response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary1X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86813,6 +95033,11 @@ class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86846,8 +95071,11 @@ class ReadColorControlPrimary1Y : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary1YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Y response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary1Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86891,6 +95119,11 @@ class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -86924,8 +95157,11 @@ class ReadColorControlPrimary1Intensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary1IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary1Intensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -86969,6 +95205,11 @@ class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87002,8 +95243,11 @@ class ReadColorControlPrimary2X : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary2XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2X response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary2X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87047,6 +95291,11 @@ class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87080,8 +95329,11 @@ class ReadColorControlPrimary2Y : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary2YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Y response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary2Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87125,6 +95377,11 @@ class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87158,8 +95415,11 @@ class ReadColorControlPrimary2Intensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary2IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary2Intensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87203,6 +95463,11 @@ class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87236,8 +95501,11 @@ class ReadColorControlPrimary3X : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary3XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3X response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary3X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87281,6 +95549,11 @@ class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87314,8 +95587,11 @@ class ReadColorControlPrimary3Y : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary3YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Y response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary3Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87359,6 +95635,11 @@ class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87392,8 +95673,11 @@ class ReadColorControlPrimary3Intensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary3IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary3Intensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87437,6 +95721,11 @@ class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87470,8 +95759,11 @@ class ReadColorControlPrimary4X : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary4XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4X response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary4X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87515,6 +95807,11 @@ class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87548,8 +95845,11 @@ class ReadColorControlPrimary4Y : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary4YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Y response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary4Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87593,6 +95893,11 @@ class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87626,8 +95931,11 @@ class ReadColorControlPrimary4Intensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary4IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary4Intensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87671,6 +95979,11 @@ class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87704,8 +96017,11 @@ class ReadColorControlPrimary5X : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary5XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5X response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary5X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87749,6 +96065,11 @@ class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87782,8 +96103,11 @@ class ReadColorControlPrimary5Y : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary5YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Y response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary5Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87827,6 +96151,11 @@ class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87860,8 +96189,11 @@ class ReadColorControlPrimary5Intensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary5IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary5Intensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87905,6 +96237,11 @@ class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -87938,8 +96275,11 @@ class ReadColorControlPrimary6X : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary6XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6X response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary6X read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -87983,6 +96323,11 @@ class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6X response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88016,8 +96361,11 @@ class ReadColorControlPrimary6Y : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary6YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Y response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary6Y read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88061,6 +96409,11 @@ class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Y response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88094,8 +96447,11 @@ class ReadColorControlPrimary6Intensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePrimary6IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl Primary6Intensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88139,6 +96495,11 @@ class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88172,8 +96533,11 @@ class ReadColorControlWhitePointX : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointX response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl WhitePointX read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88215,6 +96579,8 @@ class WriteColorControlWhitePointX : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl WhitePointX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88261,6 +96627,11 @@ class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointX response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88294,8 +96665,11 @@ class ReadColorControlWhitePointY : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointY response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl WhitePointY read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88337,6 +96711,8 @@ class WriteColorControlWhitePointY : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl WhitePointY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88383,6 +96759,11 @@ class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.WhitePointY response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88416,8 +96797,11 @@ class ReadColorControlColorPointRX : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRX response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointRX read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88459,6 +96843,8 @@ class WriteColorControlColorPointRX : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointRX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88505,6 +96891,11 @@ class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRX response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88538,8 +96929,11 @@ class ReadColorControlColorPointRY : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRY response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointRY read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88581,6 +96975,8 @@ class WriteColorControlColorPointRY : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointRY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88627,6 +97023,11 @@ class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRY response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88660,8 +97061,11 @@ class ReadColorControlColorPointRIntensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointRIntensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88696,13 +97100,18 @@ class WriteColorControlColorPointRIntensity : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeColorPointRIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointRIntensity write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88710,7 +97119,7 @@ class WriteColorControlColorPointRIntensity : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttribute { @@ -88749,6 +97158,11 @@ class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88782,8 +97196,11 @@ class ReadColorControlColorPointGX : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGX response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointGX read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88825,6 +97242,8 @@ class WriteColorControlColorPointGX : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointGX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88871,6 +97290,11 @@ class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGX response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -88904,8 +97328,11 @@ class ReadColorControlColorPointGY : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGY response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointGY read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88947,6 +97374,8 @@ class WriteColorControlColorPointGY : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointGY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -88993,6 +97422,11 @@ class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGY response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89026,8 +97460,11 @@ class ReadColorControlColorPointGIntensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointGIntensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89062,13 +97499,18 @@ class WriteColorControlColorPointGIntensity : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeColorPointGIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointGIntensity write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89076,7 +97518,7 @@ class WriteColorControlColorPointGIntensity : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttribute { @@ -89115,6 +97557,11 @@ class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89148,8 +97595,11 @@ class ReadColorControlColorPointBX : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBX response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointBX read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89191,6 +97641,8 @@ class WriteColorControlColorPointBX : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointBX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89237,6 +97689,11 @@ class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBX response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89270,8 +97727,11 @@ class ReadColorControlColorPointBY : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBY response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointBY read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89313,6 +97773,8 @@ class WriteColorControlColorPointBY : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointBY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89359,6 +97821,11 @@ class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBY response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89392,8 +97859,11 @@ class ReadColorControlColorPointBIntensity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorPointBIntensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89428,13 +97898,18 @@ class WriteColorControlColorPointBIntensity : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeColorPointBIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ColorControl ColorPointBIntensity write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89442,7 +97917,7 @@ class WriteColorControlColorPointBIntensity : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttribute { @@ -89481,6 +97956,11 @@ class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89514,8 +97994,11 @@ class ReadColorControlEnhancedCurrentHue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl EnhancedCurrentHue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89559,6 +98042,11 @@ class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89592,8 +98080,11 @@ class ReadColorControlEnhancedColorMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl EnhancedColorMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89637,6 +98128,11 @@ class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89670,8 +98166,11 @@ class ReadColorControlColorLoopActive : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorLoopActive read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89715,6 +98214,11 @@ class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89748,8 +98252,11 @@ class ReadColorControlColorLoopDirection : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorLoopDirection read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89793,6 +98300,11 @@ class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89826,8 +98338,11 @@ class ReadColorControlColorLoopTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorLoopTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89871,6 +98386,11 @@ class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89904,8 +98424,11 @@ class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorLoopStartEnhancedHue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -89949,6 +98472,11 @@ class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -89982,8 +98510,11 @@ class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorLoopStoredEnhancedHue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90027,6 +98558,11 @@ class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90060,8 +98596,11 @@ class ReadColorControlColorCapabilities : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorCapabilities read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90105,6 +98644,11 @@ class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90138,8 +98682,11 @@ class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorTempPhysicalMinMireds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90183,6 +98730,11 @@ class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90216,8 +98768,11 @@ class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ColorTempPhysicalMaxMireds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90261,6 +98816,11 @@ class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90296,8 +98856,11 @@ class ReadColorControlCoupleColorTempToLevelMinMireds : public ReadAttribute { [cluster readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl CoupleColorTempToLevelMinMireds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90341,6 +98904,11 @@ class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90374,8 +98942,11 @@ class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl StartUpColorTemperatureMireds read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90410,7 +98981,10 @@ class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeStartUpColorTemperatureMiredsWithValue:value @@ -90419,6 +98993,8 @@ class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { if (error != nil) { LogNSError( "ColorControl StartUpColorTemperatureMireds write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90426,7 +99002,7 @@ class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public SubscribeAttribute { @@ -90465,6 +99041,11 @@ class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90498,8 +99079,11 @@ class ReadColorControlGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90543,6 +99127,11 @@ class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90576,8 +99165,11 @@ class ReadColorControlAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90621,6 +99213,11 @@ class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90656,8 +99253,11 @@ class ReadColorControlEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90701,6 +99301,11 @@ class SubscribeAttributeColorControlEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90736,8 +99341,11 @@ class ReadColorControlAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90781,6 +99389,11 @@ class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90814,8 +99427,11 @@ class ReadColorControlFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90859,6 +99475,11 @@ class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -90892,8 +99513,11 @@ class ReadColorControlClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ColorControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -90937,6 +99561,11 @@ class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ColorControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91000,8 +99629,11 @@ class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePhysicalMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration PhysicalMinLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91045,6 +99677,11 @@ class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91078,8 +99715,11 @@ class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePhysicalMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration PhysicalMaxLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91123,6 +99763,11 @@ class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91156,8 +99801,11 @@ class ReadBallastConfigurationBallastStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBallastStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration BallastStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91201,6 +99849,11 @@ class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91234,8 +99887,11 @@ class ReadBallastConfigurationMinLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration MinLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91277,6 +99933,8 @@ class WriteBallastConfigurationMinLevel : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration MinLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91323,6 +99981,11 @@ class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91356,8 +100019,11 @@ class ReadBallastConfigurationMaxLevel : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration MaxLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91399,6 +100065,8 @@ class WriteBallastConfigurationMaxLevel : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration MaxLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91445,6 +100113,11 @@ class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91478,8 +100151,11 @@ class ReadBallastConfigurationIntrinsicBallastFactor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeIntrinsicBallastFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration IntrinsicBallastFactor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91514,7 +100190,10 @@ class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeIntrinsicBallastFactorWithValue:value @@ -91522,6 +100201,8 @@ class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration IntrinsicBallastFactor write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91529,7 +100210,7 @@ class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public SubscribeAttribute { @@ -91568,6 +100249,11 @@ class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91602,8 +100288,11 @@ class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBallastFactorAdjustmentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration BallastFactorAdjustment read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91639,7 +100328,10 @@ class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeBallastFactorAdjustmentWithValue:value params:params @@ -91647,6 +100339,8 @@ class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { if (error != nil) { LogNSError( "BallastConfiguration BallastFactorAdjustment write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91654,7 +100348,7 @@ class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public SubscribeAttribute { @@ -91693,6 +100387,11 @@ class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91726,8 +100425,11 @@ class ReadBallastConfigurationLampQuantity : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLampQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration LampQuantity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91771,6 +100473,11 @@ class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91804,8 +100511,11 @@ class ReadBallastConfigurationLampType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLampTypeWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration LampType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91849,6 +100559,8 @@ class WriteBallastConfigurationLampType : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration LampType write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91895,6 +100607,11 @@ class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -91928,8 +100645,11 @@ class ReadBallastConfigurationLampManufacturer : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLampManufacturerWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration LampManufacturer read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -91973,6 +100693,8 @@ class WriteBallastConfigurationLampManufacturer : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration LampManufacturer write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92019,6 +100741,11 @@ class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeA } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92052,8 +100779,11 @@ class ReadBallastConfigurationLampRatedHours : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLampRatedHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration LampRatedHours read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92088,13 +100818,18 @@ class WriteBallastConfigurationLampRatedHours : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeLampRatedHoursWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration LampRatedHours write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92102,7 +100837,7 @@ class WriteBallastConfigurationLampRatedHours : public WriteAttribute { } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAttribute { @@ -92141,6 +100876,11 @@ class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92174,8 +100914,11 @@ class ReadBallastConfigurationLampBurnHours : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLampBurnHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration LampBurnHours read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92210,13 +100953,18 @@ class WriteBallastConfigurationLampBurnHours : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeLampBurnHoursWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration LampBurnHours write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92224,7 +100972,7 @@ class WriteBallastConfigurationLampBurnHours : public WriteAttribute { } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttribute { @@ -92263,6 +101011,11 @@ class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92296,8 +101049,11 @@ class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLampAlarmModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration LampAlarmMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92339,6 +101095,8 @@ class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration LampAlarmMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92385,6 +101143,11 @@ class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92418,8 +101181,11 @@ class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLampBurnHoursTripPointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration LampBurnHoursTripPoint read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92454,7 +101220,10 @@ class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeLampBurnHoursTripPointWithValue:value @@ -92462,6 +101231,8 @@ class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("BallastConfiguration LampBurnHoursTripPoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92469,7 +101240,7 @@ class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public SubscribeAttribute { @@ -92508,6 +101279,11 @@ class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92541,8 +101317,11 @@ class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92586,6 +101365,11 @@ class SubscribeAttributeBallastConfigurationGeneratedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92619,8 +101403,11 @@ class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92664,6 +101451,11 @@ class SubscribeAttributeBallastConfigurationAcceptedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92699,8 +101491,11 @@ class ReadBallastConfigurationEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92744,6 +101539,11 @@ class SubscribeAttributeBallastConfigurationEventList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92779,8 +101579,11 @@ class ReadBallastConfigurationAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92824,6 +101627,11 @@ class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92857,8 +101665,11 @@ class ReadBallastConfigurationFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92902,6 +101713,11 @@ class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -92935,8 +101751,11 @@ class ReadBallastConfigurationClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("BallastConfiguration ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -92980,6 +101799,11 @@ class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93034,8 +101858,11 @@ class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93079,6 +101906,11 @@ class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93112,8 +101944,11 @@ class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93157,6 +101992,11 @@ class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93190,8 +102030,11 @@ class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93235,6 +102078,11 @@ class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93268,8 +102116,11 @@ class ReadIlluminanceMeasurementTolerance : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement Tolerance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93313,6 +102164,11 @@ class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93346,8 +102202,11 @@ class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement LightSensorType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93391,6 +102250,11 @@ class SubscribeAttributeIlluminanceMeasurementLightSensorType : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93424,8 +102288,11 @@ class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93469,6 +102336,11 @@ class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93502,8 +102374,11 @@ class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93547,6 +102422,11 @@ class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93582,8 +102462,11 @@ class ReadIlluminanceMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93627,6 +102510,11 @@ class SubscribeAttributeIlluminanceMeasurementEventList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93662,8 +102550,11 @@ class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93707,6 +102598,11 @@ class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93740,8 +102636,11 @@ class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93785,6 +102684,11 @@ class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93818,8 +102722,11 @@ class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("IlluminanceMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93863,6 +102770,11 @@ class SubscribeAttributeIlluminanceMeasurementClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93916,8 +102828,11 @@ class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -93961,6 +102876,11 @@ class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -93994,8 +102914,11 @@ class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94039,6 +102962,11 @@ class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94072,8 +103000,11 @@ class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94117,6 +103048,11 @@ class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94150,8 +103086,11 @@ class ReadTemperatureMeasurementTolerance : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement Tolerance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94195,6 +103134,11 @@ class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94228,8 +103172,11 @@ class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94273,6 +103220,11 @@ class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94306,8 +103258,11 @@ class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94351,6 +103306,11 @@ class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94386,8 +103346,11 @@ class ReadTemperatureMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94431,6 +103394,11 @@ class SubscribeAttributeTemperatureMeasurementEventList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94466,8 +103434,11 @@ class ReadTemperatureMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94511,6 +103482,11 @@ class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94544,8 +103520,11 @@ class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94589,6 +103568,11 @@ class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94622,8 +103606,11 @@ class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TemperatureMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94667,6 +103654,11 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94725,8 +103717,11 @@ class ReadPressureMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94770,6 +103765,11 @@ class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94803,8 +103803,11 @@ class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94848,6 +103851,11 @@ class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94881,8 +103889,11 @@ class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -94926,6 +103937,11 @@ class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -94959,8 +103975,11 @@ class ReadPressureMeasurementTolerance : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement Tolerance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95004,6 +104023,11 @@ class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95037,8 +104061,11 @@ class ReadPressureMeasurementScaledValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement ScaledValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95082,6 +104109,11 @@ class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95115,8 +104147,11 @@ class ReadPressureMeasurementMinScaledValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement MinScaledValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95160,6 +104195,11 @@ class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95193,8 +104233,11 @@ class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement MaxScaledValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95238,6 +104281,11 @@ class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95271,8 +104319,11 @@ class ReadPressureMeasurementScaledTolerance : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement ScaledTolerance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95316,6 +104367,11 @@ class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95349,8 +104405,11 @@ class ReadPressureMeasurementScale : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.Scale response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement Scale read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95394,6 +104453,11 @@ class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.Scale response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95427,8 +104491,11 @@ class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95472,6 +104539,11 @@ class SubscribeAttributePressureMeasurementGeneratedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95505,8 +104577,11 @@ class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95550,6 +104625,11 @@ class SubscribeAttributePressureMeasurementAcceptedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95585,8 +104665,11 @@ class ReadPressureMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95630,6 +104713,11 @@ class SubscribeAttributePressureMeasurementEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95665,8 +104753,11 @@ class ReadPressureMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95710,6 +104801,11 @@ class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95743,8 +104839,11 @@ class ReadPressureMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95788,6 +104887,11 @@ class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95821,8 +104925,11 @@ class ReadPressureMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PressureMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95866,6 +104973,11 @@ class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95919,8 +105031,11 @@ class ReadFlowMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -95964,6 +105079,11 @@ class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -95997,8 +105117,11 @@ class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96042,6 +105165,11 @@ class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96075,8 +105203,11 @@ class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96120,6 +105251,11 @@ class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96153,8 +105289,11 @@ class ReadFlowMeasurementTolerance : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement Tolerance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96198,6 +105337,11 @@ class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96231,8 +105375,11 @@ class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96276,6 +105423,11 @@ class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96309,8 +105461,11 @@ class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96354,6 +105509,11 @@ class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96389,8 +105549,11 @@ class ReadFlowMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96434,6 +105597,11 @@ class SubscribeAttributeFlowMeasurementEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96469,8 +105637,11 @@ class ReadFlowMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96514,6 +105685,11 @@ class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96547,8 +105723,11 @@ class ReadFlowMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96592,6 +105771,11 @@ class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96625,8 +105809,11 @@ class ReadFlowMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FlowMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96670,6 +105857,11 @@ class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96723,8 +105915,11 @@ class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96768,6 +105963,11 @@ class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96802,8 +106002,11 @@ class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96847,6 +106050,11 @@ class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96881,8 +106089,11 @@ class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -96926,6 +106137,11 @@ class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -96959,8 +106175,11 @@ class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement Tolerance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97004,6 +106223,11 @@ class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97038,8 +106262,11 @@ class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97084,6 +106311,11 @@ class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97118,8 +106350,11 @@ class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97164,6 +106399,11 @@ class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97199,8 +106439,11 @@ class ReadRelativeHumidityMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97244,6 +106487,11 @@ class SubscribeAttributeRelativeHumidityMeasurementEventList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97279,8 +106527,11 @@ class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97324,6 +106575,11 @@ class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97357,8 +106613,11 @@ class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97402,6 +106661,11 @@ class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97435,8 +106699,11 @@ class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RelativeHumidityMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97480,6 +106747,11 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97541,8 +106813,11 @@ class ReadOccupancySensingOccupancy : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.Occupancy response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing Occupancy read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97586,6 +106861,11 @@ class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.Occupancy response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97619,8 +106899,11 @@ class ReadOccupancySensingOccupancySensorType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing OccupancySensorType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97664,6 +106947,11 @@ class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97697,8 +106985,11 @@ class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing OccupancySensorTypeBitmap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97742,6 +107033,11 @@ class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97776,8 +107072,11 @@ class ReadOccupancySensingPIROccupiedToUnoccupiedDelay : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97822,6 +107121,8 @@ class WriteOccupancySensingPIROccupiedToUnoccupiedDelay : public WriteAttribute if (error != nil) { LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97868,6 +107169,11 @@ class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -97902,8 +107208,11 @@ class ReadOccupancySensingPIRUnoccupiedToOccupiedDelay : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97948,6 +107257,8 @@ class WriteOccupancySensingPIRUnoccupiedToOccupiedDelay : public WriteAttribute if (error != nil) { LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -97994,6 +107305,11 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98029,8 +107345,11 @@ class ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold : public ReadAttribut [cluster readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing PIRUnoccupiedToOccupiedThreshold read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98075,6 +107394,8 @@ class WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold : public WriteAttrib LogNSError("OccupancySensing " "PIRUnoccupiedToOccupiedThreshold write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98122,6 +107443,11 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98157,8 +107483,11 @@ class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttri [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing UltrasonicOccupiedToUnoccupiedDelay read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98204,6 +107533,8 @@ class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAtt LogNSError("OccupancySensing " "UltrasonicOccupiedToUnoccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98251,6 +107582,11 @@ class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98286,8 +107622,11 @@ class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public ReadAttri [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedDelay read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98333,6 +107672,8 @@ class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAtt LogNSError("OccupancySensing " "UltrasonicUnoccupiedToOccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98380,6 +107721,11 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98415,8 +107761,11 @@ class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public ReadA [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedThreshold read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98463,6 +107812,8 @@ class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public Writ "OccupancySensing " "UltrasonicUnoccupiedToOccupiedThreshold write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98510,6 +107861,11 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98545,8 +107901,11 @@ class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public Read [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing PhysicalContactOccupiedToUnoccupiedDelay read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98593,6 +107952,8 @@ class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public Wri "OccupancySensing " "PhysicalContactOccupiedToUnoccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98640,6 +108001,11 @@ class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98675,8 +108041,11 @@ class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public Read [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedDelay read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98723,6 +108092,8 @@ class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public Wri "OccupancySensing " "PhysicalContactUnoccupiedToOccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98770,6 +108141,11 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98805,8 +108181,11 @@ class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedThreshold read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98852,6 +108231,9 @@ class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public "PhysicalContactUnoccupiedToOccupiedTh" "reshold write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), + error); } SetCommandExitStatus(error); }]; @@ -98899,6 +108281,11 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThres } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -98932,8 +108319,11 @@ class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -98977,6 +108367,11 @@ class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99010,8 +108405,11 @@ class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99055,6 +108453,11 @@ class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99090,8 +108493,11 @@ class ReadOccupancySensingEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99135,6 +108541,11 @@ class SubscribeAttributeOccupancySensingEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99170,8 +108581,11 @@ class ReadOccupancySensingAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99215,6 +108629,11 @@ class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99248,8 +108667,11 @@ class ReadOccupancySensingFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99293,6 +108715,11 @@ class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99326,8 +108753,11 @@ class ReadOccupancySensingClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OccupancySensing ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99371,6 +108801,11 @@ class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99435,8 +108870,11 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasuredValue : public ReadAttri queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99481,6 +108919,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99518,8 +108961,11 @@ class ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public ReadAt queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99564,6 +109010,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99601,8 +109052,11 @@ class ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public ReadAt queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99647,6 +109101,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99684,8 +109143,11 @@ class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public ReadA queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99730,6 +109192,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99767,8 +109234,11 @@ class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99813,6 +109283,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueW } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99850,8 +109325,11 @@ class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public Re queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99896,6 +109374,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -99933,8 +109416,11 @@ class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : pub queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -99979,6 +109465,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100016,8 +109507,11 @@ class ReadCarbonMonoxideConcentrationMeasurementUncertainty : public ReadAttribu queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100062,6 +109556,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100099,8 +109598,11 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit : public ReadAtt queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100145,6 +109647,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100182,8 +109689,11 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium : public ReadA queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100228,6 +109738,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100265,8 +109780,11 @@ class ReadCarbonMonoxideConcentrationMeasurementLevelValue : public ReadAttribut queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100311,6 +109829,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100348,8 +109871,11 @@ class ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public Re queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100394,6 +109920,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandLi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100431,8 +109962,11 @@ class ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public Rea queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100477,6 +110011,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandLis } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100514,8 +110053,11 @@ class ReadCarbonMonoxideConcentrationMeasurementEventList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100560,6 +110102,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100597,8 +110144,11 @@ class ReadCarbonMonoxideConcentrationMeasurementAttributeList : public ReadAttri queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100643,6 +110193,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList : pu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100680,8 +110235,11 @@ class ReadCarbonMonoxideConcentrationMeasurementFeatureMap : public ReadAttribut queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100726,6 +110284,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100763,8 +110326,11 @@ class ReadCarbonMonoxideConcentrationMeasurementClusterRevision : public ReadAtt queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonMonoxideConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100809,6 +110375,11 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonMonoxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100875,8 +110446,11 @@ class ReadCarbonDioxideConcentrationMeasurementMeasuredValue : public ReadAttrib queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -100921,6 +110495,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue : pub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -100958,8 +110537,11 @@ class ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue : public ReadAtt queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101004,6 +110586,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101041,8 +110628,11 @@ class ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAtt queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101087,6 +110677,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101124,8 +110719,11 @@ class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAt queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101170,6 +110768,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101207,8 +110810,11 @@ class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101253,6 +110859,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101290,8 +110901,11 @@ class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public Rea queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101336,6 +110950,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101373,8 +110992,11 @@ class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : publ queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101419,6 +111041,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101456,8 +111083,11 @@ class ReadCarbonDioxideConcentrationMeasurementUncertainty : public ReadAttribut queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101502,6 +111132,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101539,8 +111174,11 @@ class ReadCarbonDioxideConcentrationMeasurementMeasurementUnit : public ReadAttr queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101585,6 +111223,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101622,8 +111265,11 @@ class ReadCarbonDioxideConcentrationMeasurementMeasurementMedium : public ReadAt queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101668,6 +111314,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101705,8 +111356,11 @@ class ReadCarbonDioxideConcentrationMeasurementLevelValue : public ReadAttribute queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101751,6 +111405,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101788,8 +111447,11 @@ class ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList : public Rea queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101834,6 +111496,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandLis } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101871,8 +111538,11 @@ class ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList : public Read queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -101917,6 +111587,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -101954,8 +111629,11 @@ class ReadCarbonDioxideConcentrationMeasurementEventList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102000,6 +111678,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102037,8 +111720,11 @@ class ReadCarbonDioxideConcentrationMeasurementAttributeList : public ReadAttrib queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102083,6 +111769,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList : pub } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102120,8 +111811,11 @@ class ReadCarbonDioxideConcentrationMeasurementFeatureMap : public ReadAttribute queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102166,6 +111860,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102203,8 +111902,11 @@ class ReadCarbonDioxideConcentrationMeasurementClusterRevision : public ReadAttr queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("CarbonDioxideConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102249,6 +111951,11 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"CarbonDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102315,8 +112022,11 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasuredValue : public ReadAttr queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102361,6 +112071,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102398,8 +112113,11 @@ class ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public ReadA queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102444,6 +112162,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102481,8 +112204,11 @@ class ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public ReadA queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102527,6 +112253,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102564,8 +112295,11 @@ class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public Read queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102610,6 +112344,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102647,8 +112386,11 @@ class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : publi queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102693,6 +112435,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102730,8 +112477,11 @@ class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public R queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102776,6 +112526,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102813,8 +112568,11 @@ class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : pu queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102859,6 +112617,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102896,8 +112659,11 @@ class ReadNitrogenDioxideConcentrationMeasurementUncertainty : public ReadAttrib queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -102942,6 +112708,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty : pub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -102979,8 +112750,11 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit : public ReadAt queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103025,6 +112799,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103062,8 +112841,11 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium : public Read queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103108,6 +112890,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103145,8 +112932,11 @@ class ReadNitrogenDioxideConcentrationMeasurementLevelValue : public ReadAttribu queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103191,6 +112981,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103228,8 +113023,11 @@ class ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public R queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103274,6 +113072,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandL } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103311,8 +113114,11 @@ class ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public Re queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103357,6 +113163,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandLi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103394,8 +113205,11 @@ class ReadNitrogenDioxideConcentrationMeasurementEventList : public ReadAttribut queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103440,6 +113254,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList : publi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103477,8 +113296,11 @@ class ReadNitrogenDioxideConcentrationMeasurementAttributeList : public ReadAttr queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103523,6 +113345,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList : p } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103560,8 +113387,11 @@ class ReadNitrogenDioxideConcentrationMeasurementFeatureMap : public ReadAttribu queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103606,6 +113436,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103643,8 +113478,11 @@ class ReadNitrogenDioxideConcentrationMeasurementClusterRevision : public ReadAt queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("NitrogenDioxideConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103689,6 +113527,11 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"NitrogenDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103754,8 +113597,11 @@ class ReadOzoneConcentrationMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103799,6 +113645,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103836,8 +113687,11 @@ class ReadOzoneConcentrationMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103882,6 +113736,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -103919,8 +113778,11 @@ class ReadOzoneConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -103965,6 +113827,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104002,8 +113869,11 @@ class ReadOzoneConcentrationMeasurementPeakMeasuredValue : public ReadAttribute queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104048,6 +113918,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104085,8 +113960,11 @@ class ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttr queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104131,6 +114009,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104168,8 +114051,11 @@ class ReadOzoneConcentrationMeasurementAverageMeasuredValue : public ReadAttribu queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104214,6 +114100,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104251,8 +114142,11 @@ class ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow : public ReadA queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104297,6 +114191,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104333,8 +114232,11 @@ class ReadOzoneConcentrationMeasurementUncertainty : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104378,6 +114280,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementUncertainty : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104415,8 +114322,11 @@ class ReadOzoneConcentrationMeasurementMeasurementUnit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104460,6 +114370,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104497,8 +114412,11 @@ class ReadOzoneConcentrationMeasurementMeasurementMedium : public ReadAttribute queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104543,6 +114461,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104579,8 +114502,11 @@ class ReadOzoneConcentrationMeasurementLevelValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104624,6 +114550,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementLevelValue : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104661,8 +114592,11 @@ class ReadOzoneConcentrationMeasurementGeneratedCommandList : public ReadAttribu queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104707,6 +114641,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList : publ } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104744,8 +114683,11 @@ class ReadOzoneConcentrationMeasurementAcceptedCommandList : public ReadAttribut queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104790,6 +114732,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList : publi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104826,8 +114773,11 @@ class ReadOzoneConcentrationMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104871,6 +114821,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementEventList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104907,8 +114862,11 @@ class ReadOzoneConcentrationMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -104952,6 +114910,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementAttributeList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -104988,8 +114951,11 @@ class ReadOzoneConcentrationMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105033,6 +114999,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementFeatureMap : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105070,8 +115041,11 @@ class ReadOzoneConcentrationMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("OzoneConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105115,6 +115089,11 @@ class SubscribeAttributeOzoneConcentrationMeasurementClusterRevision : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"OzoneConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105180,8 +115159,11 @@ class ReadPm25ConcentrationMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105225,6 +115207,11 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasuredValue : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105262,8 +115249,11 @@ class ReadPm25ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105307,6 +115297,11 @@ class SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105344,8 +115339,11 @@ class ReadPm25ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105389,6 +115387,11 @@ class SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105426,8 +115429,11 @@ class ReadPm25ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105472,6 +115478,11 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105509,8 +115520,11 @@ class ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttri queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105555,6 +115569,11 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105592,8 +115611,11 @@ class ReadPm25ConcentrationMeasurementAverageMeasuredValue : public ReadAttribut queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105638,6 +115660,11 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105675,8 +115702,11 @@ class ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAt queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105721,6 +115751,11 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105757,8 +115792,11 @@ class ReadPm25ConcentrationMeasurementUncertainty : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105802,6 +115840,11 @@ class SubscribeAttributePm25ConcentrationMeasurementUncertainty : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105839,8 +115882,11 @@ class ReadPm25ConcentrationMeasurementMeasurementUnit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105884,6 +115930,11 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -105921,8 +115972,11 @@ class ReadPm25ConcentrationMeasurementMeasurementMedium : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -105967,6 +116021,11 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106003,8 +116062,11 @@ class ReadPm25ConcentrationMeasurementLevelValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106048,6 +116110,11 @@ class SubscribeAttributePm25ConcentrationMeasurementLevelValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106085,8 +116152,11 @@ class ReadPm25ConcentrationMeasurementGeneratedCommandList : public ReadAttribut queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106131,6 +116201,11 @@ class SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList : publi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106168,8 +116243,11 @@ class ReadPm25ConcentrationMeasurementAcceptedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106214,6 +116292,11 @@ class SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106250,8 +116333,11 @@ class ReadPm25ConcentrationMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106295,6 +116381,11 @@ class SubscribeAttributePm25ConcentrationMeasurementEventList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106331,8 +116422,11 @@ class ReadPm25ConcentrationMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106376,6 +116470,11 @@ class SubscribeAttributePm25ConcentrationMeasurementAttributeList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106412,8 +116511,11 @@ class ReadPm25ConcentrationMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106457,6 +116559,11 @@ class SubscribeAttributePm25ConcentrationMeasurementFeatureMap : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106494,8 +116601,11 @@ class ReadPm25ConcentrationMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM25ConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106539,6 +116649,11 @@ class SubscribeAttributePm25ConcentrationMeasurementClusterRevision : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM25ConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106605,8 +116720,11 @@ class ReadFormaldehydeConcentrationMeasurementMeasuredValue : public ReadAttribu queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106651,6 +116769,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106688,8 +116811,11 @@ class ReadFormaldehydeConcentrationMeasurementMinMeasuredValue : public ReadAttr queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106734,6 +116860,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106771,8 +116902,11 @@ class ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue : public ReadAttr queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106817,6 +116951,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106854,8 +116993,11 @@ class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue : public ReadAtt queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106900,6 +117042,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -106937,8 +117084,11 @@ class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public R queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -106983,6 +117133,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWin } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107020,8 +117175,11 @@ class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue : public Read queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107066,6 +117224,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107103,8 +117266,11 @@ class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : publi queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107149,6 +117315,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107186,8 +117357,11 @@ class ReadFormaldehydeConcentrationMeasurementUncertainty : public ReadAttribute queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107232,6 +117406,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107269,8 +117448,11 @@ class ReadFormaldehydeConcentrationMeasurementMeasurementUnit : public ReadAttri queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107315,6 +117497,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107352,8 +117539,11 @@ class ReadFormaldehydeConcentrationMeasurementMeasurementMedium : public ReadAtt queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107398,6 +117588,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107435,8 +117630,11 @@ class ReadFormaldehydeConcentrationMeasurementLevelValue : public ReadAttribute queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107481,6 +117679,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107518,8 +117721,11 @@ class ReadFormaldehydeConcentrationMeasurementGeneratedCommandList : public Read queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107564,6 +117770,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107601,8 +117812,11 @@ class ReadFormaldehydeConcentrationMeasurementAcceptedCommandList : public ReadA queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107647,6 +117861,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107684,8 +117903,11 @@ class ReadFormaldehydeConcentrationMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107730,6 +117952,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementEventList : public S } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107767,8 +117994,11 @@ class ReadFormaldehydeConcentrationMeasurementAttributeList : public ReadAttribu queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107813,6 +118043,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList : publ } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107850,8 +118085,11 @@ class ReadFormaldehydeConcentrationMeasurementFeatureMap : public ReadAttribute queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107896,6 +118134,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -107933,8 +118176,11 @@ class ReadFormaldehydeConcentrationMeasurementClusterRevision : public ReadAttri queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("FormaldehydeConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -107979,6 +118225,11 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"FormaldehydeConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108044,8 +118295,11 @@ class ReadPm1ConcentrationMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108089,6 +118343,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasuredValue : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108126,8 +118385,11 @@ class ReadPm1ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108171,6 +118433,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108208,8 +118475,11 @@ class ReadPm1ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108253,6 +118523,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108290,8 +118565,11 @@ class ReadPm1ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108335,6 +118613,11 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108372,8 +118655,11 @@ class ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttrib queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108418,6 +118704,11 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow : pub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108455,8 +118746,11 @@ class ReadPm1ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108501,6 +118795,11 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108538,8 +118837,11 @@ class ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAtt queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108584,6 +118886,11 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108620,8 +118927,11 @@ class ReadPm1ConcentrationMeasurementUncertainty : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108665,6 +118975,11 @@ class SubscribeAttributePm1ConcentrationMeasurementUncertainty : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108701,8 +119016,11 @@ class ReadPm1ConcentrationMeasurementMeasurementUnit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108746,6 +119064,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108783,8 +119106,11 @@ class ReadPm1ConcentrationMeasurementMeasurementMedium : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108828,6 +119154,11 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108864,8 +119195,11 @@ class ReadPm1ConcentrationMeasurementLevelValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108909,6 +119243,11 @@ class SubscribeAttributePm1ConcentrationMeasurementLevelValue : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -108946,8 +119285,11 @@ class ReadPm1ConcentrationMeasurementGeneratedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -108992,6 +119334,11 @@ class SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109029,8 +119376,11 @@ class ReadPm1ConcentrationMeasurementAcceptedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109075,6 +119425,11 @@ class SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109111,8 +119466,11 @@ class ReadPm1ConcentrationMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109156,6 +119514,11 @@ class SubscribeAttributePm1ConcentrationMeasurementEventList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109192,8 +119555,11 @@ class ReadPm1ConcentrationMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109237,6 +119603,11 @@ class SubscribeAttributePm1ConcentrationMeasurementAttributeList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109273,8 +119644,11 @@ class ReadPm1ConcentrationMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109318,6 +119692,11 @@ class SubscribeAttributePm1ConcentrationMeasurementFeatureMap : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109354,8 +119733,11 @@ class ReadPm1ConcentrationMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM1ConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109399,6 +119781,11 @@ class SubscribeAttributePm1ConcentrationMeasurementClusterRevision : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM1ConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109464,8 +119851,11 @@ class ReadPm10ConcentrationMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109509,6 +119899,11 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasuredValue : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109546,8 +119941,11 @@ class ReadPm10ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109591,6 +119989,11 @@ class SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109628,8 +120031,11 @@ class ReadPm10ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109673,6 +120079,11 @@ class SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109710,8 +120121,11 @@ class ReadPm10ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109756,6 +120170,11 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109793,8 +120212,11 @@ class ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttri queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109839,6 +120261,11 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109876,8 +120303,11 @@ class ReadPm10ConcentrationMeasurementAverageMeasuredValue : public ReadAttribut queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -109922,6 +120352,11 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -109959,8 +120394,11 @@ class ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAt queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110005,6 +120443,11 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110041,8 +120484,11 @@ class ReadPm10ConcentrationMeasurementUncertainty : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110086,6 +120532,11 @@ class SubscribeAttributePm10ConcentrationMeasurementUncertainty : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110123,8 +120574,11 @@ class ReadPm10ConcentrationMeasurementMeasurementUnit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110168,6 +120622,11 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110205,8 +120664,11 @@ class ReadPm10ConcentrationMeasurementMeasurementMedium : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110251,6 +120713,11 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110287,8 +120754,11 @@ class ReadPm10ConcentrationMeasurementLevelValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110332,6 +120802,11 @@ class SubscribeAttributePm10ConcentrationMeasurementLevelValue : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110369,8 +120844,11 @@ class ReadPm10ConcentrationMeasurementGeneratedCommandList : public ReadAttribut queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110415,6 +120893,11 @@ class SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList : publi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110452,8 +120935,11 @@ class ReadPm10ConcentrationMeasurementAcceptedCommandList : public ReadAttribute queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110498,6 +120984,11 @@ class SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList : public } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110534,8 +121025,11 @@ class ReadPm10ConcentrationMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110579,6 +121073,11 @@ class SubscribeAttributePm10ConcentrationMeasurementEventList : public Subscribe } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110615,8 +121114,11 @@ class ReadPm10ConcentrationMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110660,6 +121162,11 @@ class SubscribeAttributePm10ConcentrationMeasurementAttributeList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110696,8 +121203,11 @@ class ReadPm10ConcentrationMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110741,6 +121251,11 @@ class SubscribeAttributePm10ConcentrationMeasurementFeatureMap : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110778,8 +121293,11 @@ class ReadPm10ConcentrationMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("PM10ConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110823,6 +121341,11 @@ class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"PM10ConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110890,8 +121413,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : p queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -110937,6 +121463,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -110975,8 +121506,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111022,6 +121556,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMin } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111060,8 +121599,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111107,6 +121649,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMax } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111145,8 +121692,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111192,6 +121742,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111231,8 +121786,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog( @"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111279,6 +121837,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111317,8 +121880,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVa queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111365,6 +121931,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog( @"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111404,8 +121975,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVa [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111453,6 +122027,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111491,8 +122070,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : pub queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111538,6 +122120,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUnc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111576,8 +122163,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111623,6 +122213,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111661,8 +122256,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111708,6 +122306,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111746,8 +122349,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : publ queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111793,6 +122399,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLev } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111831,8 +122442,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandL queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111879,6 +122493,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGen reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog( @"TotalVolatileOrganicCompoundsConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -111917,8 +122536,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandLi queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -111965,6 +122587,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcc reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog( @"TotalVolatileOrganicCompoundsConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112003,8 +122630,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : publi queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112050,6 +122680,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEve } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112088,8 +122723,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : p queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112135,6 +122773,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112173,8 +122816,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : publ queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112220,6 +122866,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFea } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112258,8 +122909,11 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112305,6 +122959,11 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112370,8 +123029,11 @@ class ReadRadonConcentrationMeasurementMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112415,6 +123077,11 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasuredValue : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112452,8 +123119,11 @@ class ReadRadonConcentrationMeasurementMinMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MinMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112498,6 +123168,11 @@ class SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112535,8 +123210,11 @@ class ReadRadonConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement MaxMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112581,6 +123259,11 @@ class SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112618,8 +123301,11 @@ class ReadRadonConcentrationMeasurementPeakMeasuredValue : public ReadAttribute queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement PeakMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112664,6 +123350,11 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112701,8 +123392,11 @@ class ReadRadonConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttr queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112747,6 +123441,11 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112784,8 +123483,11 @@ class ReadRadonConcentrationMeasurementAverageMeasuredValue : public ReadAttribu queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement AverageMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112830,6 +123532,11 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112867,8 +123574,11 @@ class ReadRadonConcentrationMeasurementAverageMeasuredValueWindow : public ReadA queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112913,6 +123623,11 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -112949,8 +123664,11 @@ class ReadRadonConcentrationMeasurementUncertainty : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -112994,6 +123712,11 @@ class SubscribeAttributeRadonConcentrationMeasurementUncertainty : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113031,8 +123754,11 @@ class ReadRadonConcentrationMeasurementMeasurementUnit : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113076,6 +123802,11 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113113,8 +123844,11 @@ class ReadRadonConcentrationMeasurementMeasurementMedium : public ReadAttribute queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MeasurementMedium response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113159,6 +123893,11 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113195,8 +123934,11 @@ class ReadRadonConcentrationMeasurementLevelValue : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.LevelValue response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113240,6 +123982,11 @@ class SubscribeAttributeRadonConcentrationMeasurementLevelValue : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113277,8 +124024,11 @@ class ReadRadonConcentrationMeasurementGeneratedCommandList : public ReadAttribu queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113323,6 +124073,11 @@ class SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList : publ } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113360,8 +124115,11 @@ class ReadRadonConcentrationMeasurementAcceptedCommandList : public ReadAttribut queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113406,6 +124164,11 @@ class SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList : publi } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113442,8 +124205,11 @@ class ReadRadonConcentrationMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113487,6 +124253,11 @@ class SubscribeAttributeRadonConcentrationMeasurementEventList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113523,8 +124294,11 @@ class ReadRadonConcentrationMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113568,6 +124342,11 @@ class SubscribeAttributeRadonConcentrationMeasurementAttributeList : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113604,8 +124383,11 @@ class ReadRadonConcentrationMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113649,6 +124431,11 @@ class SubscribeAttributeRadonConcentrationMeasurementFeatureMap : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113686,8 +124473,11 @@ class ReadRadonConcentrationMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("RadonConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113731,6 +124521,11 @@ class SubscribeAttributeRadonConcentrationMeasurementClusterRevision : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"RadonConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113783,8 +124578,11 @@ class ReadWakeOnLanMACAddress : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WakeOnLAN MACAddress read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113828,6 +124626,11 @@ class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113861,8 +124664,11 @@ class ReadWakeOnLanGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WakeOnLAN GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113906,6 +124712,11 @@ class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -113939,8 +124750,11 @@ class ReadWakeOnLanAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WakeOnLAN AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -113984,6 +124798,11 @@ class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114019,8 +124838,11 @@ class ReadWakeOnLanEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WakeOnLAN EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114064,6 +124886,11 @@ class SubscribeAttributeWakeOnLanEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114099,8 +124926,11 @@ class ReadWakeOnLanAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WakeOnLAN AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114144,6 +124974,11 @@ class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114177,8 +125012,11 @@ class ReadWakeOnLanFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WakeOnLAN FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114222,6 +125060,11 @@ class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114255,8 +125098,11 @@ class ReadWakeOnLanClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("WakeOnLAN ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114300,6 +125146,11 @@ class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114360,19 +125211,29 @@ class ChannelChangeChannel : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeChannelWithParams:params - completion:^( - MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + changeChannelWithParams:params + completion:^( + MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -114418,6 +125279,8 @@ class ChannelChangeChannelByNumber : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -114460,17 +125323,19 @@ class ChannelSkipChannel : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster skipChannelWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + skipChannelWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -114503,8 +125368,11 @@ class ReadChannelChannelList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ChannelList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel ChannelList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114546,6 +125414,11 @@ class SubscribeAttributeChannelChannelList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ChannelList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114578,8 +125451,11 @@ class ReadChannelLineup : public ReadAttribute { [cluster readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.Lineup response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel Lineup read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114621,6 +125497,11 @@ class SubscribeAttributeChannelLineup : public SubscribeAttribute { } reportHandler:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.Lineup response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114653,8 +125534,11 @@ class ReadChannelCurrentChannel : public ReadAttribute { [cluster readAttributeCurrentChannelWithCompletion:^( MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.CurrentChannel response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel CurrentChannel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114696,6 +125580,11 @@ class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { } reportHandler:^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.CurrentChannel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114727,8 +125616,11 @@ class ReadChannelGeneratedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114770,6 +125662,11 @@ class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114801,8 +125698,11 @@ class ReadChannelAcceptedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114844,6 +125744,11 @@ class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114877,8 +125782,11 @@ class ReadChannelEventList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114920,6 +125828,11 @@ class SubscribeAttributeChannelEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -114953,8 +125866,11 @@ class ReadChannelAttributeList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -114996,6 +125912,11 @@ class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115027,8 +125948,11 @@ class ReadChannelFeatureMap : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115070,6 +125994,11 @@ class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115101,8 +126030,11 @@ class ReadChannelClusterRevision : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("Channel ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115144,6 +126076,11 @@ class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"Channel.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115209,19 +126146,29 @@ class TargetNavigatorNavigateTarget : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster navigateTargetWithParams:params - completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + navigateTargetWithParams:params + completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -115256,8 +126203,11 @@ class ReadTargetNavigatorTargetList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.TargetList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator TargetList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115301,6 +126251,11 @@ class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.TargetList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115334,8 +126289,11 @@ class ReadTargetNavigatorCurrentTarget : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator CurrentTarget read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115379,6 +126337,11 @@ class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115412,8 +126375,11 @@ class ReadTargetNavigatorGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115457,6 +126423,11 @@ class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115490,8 +126461,11 @@ class ReadTargetNavigatorAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115535,6 +126509,11 @@ class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115570,8 +126549,11 @@ class ReadTargetNavigatorEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115615,6 +126597,11 @@ class SubscribeAttributeTargetNavigatorEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115650,8 +126637,11 @@ class ReadTargetNavigatorAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115695,6 +126685,11 @@ class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115728,8 +126723,11 @@ class ReadTargetNavigatorFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115773,6 +126771,11 @@ class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115806,8 +126809,11 @@ class ReadTargetNavigatorClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("TargetNavigator ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -115851,6 +126857,11 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -115924,10 +126935,18 @@ class MediaPlaybackPlay : public ClusterCommand { [cluster playWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -115973,10 +126992,18 @@ class MediaPlaybackPause : public ClusterCommand { pauseWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -116021,10 +127048,18 @@ class MediaPlaybackStop : public ClusterCommand { [cluster stopWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -116070,10 +127105,18 @@ class MediaPlaybackStartOver : public ClusterCommand { startOverWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -116119,10 +127162,18 @@ class MediaPlaybackPrevious : public ClusterCommand { previousWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -116167,10 +127218,18 @@ class MediaPlaybackNext : public ClusterCommand { [cluster nextWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -116216,10 +127275,18 @@ class MediaPlaybackRewind : public ClusterCommand { rewindWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -116261,19 +127328,28 @@ class MediaPlaybackFastForward : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster fastForwardWithParams:params - completion:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + fastForwardWithParams:params + completion:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -116312,19 +127388,28 @@ class MediaPlaybackSkipForward : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster skipForwardWithParams:params - completion:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + skipForwardWithParams:params + completion:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -116364,19 +127449,28 @@ class MediaPlaybackSkipBackward : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster skipBackwardWithParams:params - completion:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + skipBackwardWithParams:params + completion:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -116419,10 +127513,18 @@ class MediaPlaybackSeek : public ClusterCommand { [cluster seekWithParams:params completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -116462,8 +127564,11 @@ class ReadMediaPlaybackCurrentState : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.CurrentState response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback CurrentState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116507,6 +127612,11 @@ class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.CurrentState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116540,8 +127650,11 @@ class ReadMediaPlaybackStartTime : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.StartTime response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback StartTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116585,6 +127698,11 @@ class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.StartTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116618,8 +127736,11 @@ class ReadMediaPlaybackDuration : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.Duration response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback Duration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116663,6 +127784,11 @@ class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.Duration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116697,8 +127823,11 @@ class ReadMediaPlaybackSampledPosition : public ReadAttribute { [cluster readAttributeSampledPositionWithCompletion:^( MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback SampledPosition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116742,6 +127871,11 @@ class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute } reportHandler:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116775,8 +127909,11 @@ class ReadMediaPlaybackPlaybackSpeed : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback PlaybackSpeed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116820,6 +127957,11 @@ class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116853,8 +127995,11 @@ class ReadMediaPlaybackSeekRangeEnd : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSeekRangeEndWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback SeekRangeEnd read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116898,6 +128043,11 @@ class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -116931,8 +128081,11 @@ class ReadMediaPlaybackSeekRangeStart : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSeekRangeStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback SeekRangeStart read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -116976,6 +128129,11 @@ class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117009,8 +128167,11 @@ class ReadMediaPlaybackGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117054,6 +128215,11 @@ class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117087,8 +128253,11 @@ class ReadMediaPlaybackAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117132,6 +128301,11 @@ class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117167,8 +128341,11 @@ class ReadMediaPlaybackEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117212,6 +128389,11 @@ class SubscribeAttributeMediaPlaybackEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117247,8 +128429,11 @@ class ReadMediaPlaybackAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117292,6 +128477,11 @@ class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117325,8 +128515,11 @@ class ReadMediaPlaybackFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117370,6 +128563,11 @@ class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117403,8 +128601,11 @@ class ReadMediaPlaybackClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaPlayback ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117448,6 +128649,11 @@ class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117508,17 +128714,19 @@ class MediaInputSelectInput : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster selectInputWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + selectInputWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -117562,6 +128770,8 @@ class MediaInputShowInputStatus : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -117609,6 +128819,8 @@ class MediaInputHideInputStatus : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -117656,17 +128868,19 @@ class MediaInputRenameInput : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster renameInputWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + renameInputWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -117701,8 +128915,11 @@ class ReadMediaInputInputList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.InputList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput InputList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117746,6 +128963,11 @@ class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.InputList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117779,8 +129001,11 @@ class ReadMediaInputCurrentInput : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.CurrentInput response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput CurrentInput read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117824,6 +129049,11 @@ class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.CurrentInput response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117857,8 +129087,11 @@ class ReadMediaInputGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117902,6 +129135,11 @@ class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -117935,8 +129173,11 @@ class ReadMediaInputAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -117980,6 +129221,11 @@ class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118015,8 +129261,11 @@ class ReadMediaInputEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118060,6 +129309,11 @@ class SubscribeAttributeMediaInputEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118095,8 +129349,11 @@ class ReadMediaInputAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118140,6 +129397,11 @@ class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118173,8 +129435,11 @@ class ReadMediaInputFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118218,6 +129483,11 @@ class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118251,8 +129521,11 @@ class ReadMediaInputClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("MediaInput ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118296,6 +129569,11 @@ class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"MediaInput.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118353,6 +129631,7 @@ class LowPowerSleep : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -118389,8 +129668,11 @@ class ReadLowPowerGeneratedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LowPower GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118432,6 +129714,11 @@ class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118463,8 +129750,11 @@ class ReadLowPowerAcceptedCommandList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LowPower AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118506,6 +129796,11 @@ class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118539,8 +129834,11 @@ class ReadLowPowerEventList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LowPower EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118582,6 +129880,11 @@ class SubscribeAttributeLowPowerEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118615,8 +129918,11 @@ class ReadLowPowerAttributeList : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LowPower AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118658,6 +129964,11 @@ class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118689,8 +130000,11 @@ class ReadLowPowerFeatureMap : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LowPower FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118732,6 +130046,11 @@ class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118763,8 +130082,11 @@ class ReadLowPowerClusterRevision : public ReadAttribute { __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("LowPower ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118806,6 +130128,11 @@ class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"LowPower.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118864,10 +130191,18 @@ class KeypadInputSendKey : public ClusterCommand { [cluster sendKeyWithParams:params completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -118907,8 +130242,11 @@ class ReadKeypadInputGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("KeypadInput GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -118952,6 +130290,11 @@ class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -118985,8 +130328,11 @@ class ReadKeypadInputAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("KeypadInput AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119030,6 +130376,11 @@ class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119065,8 +130416,11 @@ class ReadKeypadInputEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("KeypadInput EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119110,6 +130464,11 @@ class SubscribeAttributeKeypadInputEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119145,8 +130504,11 @@ class ReadKeypadInputAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("KeypadInput AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119190,6 +130552,11 @@ class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119223,8 +130590,11 @@ class ReadKeypadInputFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("KeypadInput FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119268,6 +130638,11 @@ class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119301,8 +130676,11 @@ class ReadKeypadInputClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("KeypadInput ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119346,6 +130724,11 @@ class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119447,19 +130830,29 @@ class ContentLauncherLaunchContent : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster launchContentWithParams:params - completion:^(MTRContentLauncherClusterLauncherResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + launchContentWithParams:params + completion:^( + MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -119686,19 +131079,28 @@ class ContentLauncherLaunchURL : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster launchURLWithParams:params - completion:^( - MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + launchURLWithParams:params + completion:^( + MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -119735,8 +131137,11 @@ class ReadContentLauncherAcceptHeader : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher AcceptHeader read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119780,6 +131185,11 @@ class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119813,8 +131223,11 @@ class ReadContentLauncherSupportedStreamingProtocols : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher SupportedStreamingProtocols read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119858,6 +131271,8 @@ class WriteContentLauncherSupportedStreamingProtocols : public WriteAttribute { if (error != nil) { LogNSError( "ContentLauncher SupportedStreamingProtocols write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119904,6 +131319,11 @@ class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -119937,8 +131357,11 @@ class ReadContentLauncherGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -119982,6 +131405,11 @@ class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120015,8 +131443,11 @@ class ReadContentLauncherAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120060,6 +131491,11 @@ class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120095,8 +131531,11 @@ class ReadContentLauncherEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120140,6 +131579,11 @@ class SubscribeAttributeContentLauncherEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120175,8 +131619,11 @@ class ReadContentLauncherAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120220,6 +131667,11 @@ class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120253,8 +131705,11 @@ class ReadContentLauncherFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120298,6 +131753,11 @@ class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120331,8 +131791,11 @@ class ReadContentLauncherClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ContentLauncher ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120376,6 +131839,11 @@ class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120434,17 +131902,19 @@ class AudioOutputSelectOutput : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster selectOutputWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + selectOutputWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -120488,17 +131958,19 @@ class AudioOutputRenameOutput : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster renameOutputWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + renameOutputWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -120533,8 +132005,11 @@ class ReadAudioOutputOutputList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.OutputList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput OutputList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120578,6 +132053,11 @@ class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.OutputList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120611,8 +132091,11 @@ class ReadAudioOutputCurrentOutput : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput CurrentOutput read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120656,6 +132139,11 @@ class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120689,8 +132177,11 @@ class ReadAudioOutputGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120734,6 +132225,11 @@ class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120767,8 +132263,11 @@ class ReadAudioOutputAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120812,6 +132311,11 @@ class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120847,8 +132351,11 @@ class ReadAudioOutputEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120892,6 +132399,11 @@ class SubscribeAttributeAudioOutputEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -120927,8 +132439,11 @@ class ReadAudioOutputAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -120972,6 +132487,11 @@ class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121005,8 +132525,11 @@ class ReadAudioOutputFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121050,6 +132573,11 @@ class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121083,8 +132611,11 @@ class ReadAudioOutputClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AudioOutput ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121128,6 +132659,11 @@ class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121202,19 +132738,28 @@ class ApplicationLauncherLaunchApp : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster launchAppWithParams:params - completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + launchAppWithParams:params + completion:^( + MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -121269,10 +132814,18 @@ class ApplicationLauncherStopApp : public ClusterCommand { completion:^( MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -121332,10 +132885,18 @@ class ApplicationLauncherHideApp : public ClusterCommand { completion:^( MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -121377,8 +132938,11 @@ class ReadApplicationLauncherCatalogList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher CatalogList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121422,6 +132986,11 @@ class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121456,8 +133025,11 @@ class ReadApplicationLauncherCurrentApp : public ReadAttribute { [cluster readAttributeCurrentAppWithCompletion:^( MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher CurrentApp read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121515,6 +133087,8 @@ class WriteApplicationLauncherCurrentApp : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ApplicationLauncher CurrentApp write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121564,6 +133138,11 @@ class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribut } reportHandler:^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121597,8 +133176,11 @@ class ReadApplicationLauncherGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121642,6 +133224,11 @@ class SubscribeAttributeApplicationLauncherGeneratedCommandList : public Subscri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121675,8 +133262,11 @@ class ReadApplicationLauncherAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121720,6 +133310,11 @@ class SubscribeAttributeApplicationLauncherAcceptedCommandList : public Subscrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121755,8 +133350,11 @@ class ReadApplicationLauncherEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121800,6 +133398,11 @@ class SubscribeAttributeApplicationLauncherEventList : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121835,8 +133438,11 @@ class ReadApplicationLauncherAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121880,6 +133486,11 @@ class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121913,8 +133524,11 @@ class ReadApplicationLauncherFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -121958,6 +133572,11 @@ class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribut } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -121991,8 +133610,11 @@ class ReadApplicationLauncherClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationLauncher ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -122036,6 +133658,11 @@ class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -122093,8 +133720,11 @@ class ReadApplicationBasicVendorName : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorName response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic VendorName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -122138,6 +133768,11 @@ class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -122171,8 +133806,11 @@ class ReadApplicationBasicVendorID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic VendorID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -122216,6 +133854,11 @@ class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.VendorID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -122249,8 +133892,11 @@ class ReadApplicationBasicApplicationName : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic ApplicationName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -122294,6 +133940,11 @@ class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttrib } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -122327,8 +133978,11 @@ class ReadApplicationBasicProductID : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ProductID response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic ProductID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -122372,6 +134026,11 @@ class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ProductID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -122406,8 +134065,11 @@ class ReadApplicationBasicApplication : public ReadAttribute { [cluster readAttributeApplicationWithCompletion:^( MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Application response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic Application read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -122451,6 +134113,11 @@ class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute } reportHandler:^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Application response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -122484,8 +134151,11 @@ class ReadApplicationBasicStatus : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Status response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic Status read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -122529,6 +134199,11 @@ class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.Status response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -122562,8 +134237,11 @@ class ReadApplicationBasicApplicationVersion : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic ApplicationVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -122607,6 +134285,11 @@ class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAtt } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -122640,8 +134323,11 @@ class ReadApplicationBasicAllowedVendorList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic AllowedVendorList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -122685,6 +134371,11 @@ class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -122718,8 +134409,11 @@ class ReadApplicationBasicGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -122763,6 +134457,11 @@ class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeA } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -122796,8 +134495,11 @@ class ReadApplicationBasicAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -122841,6 +134543,11 @@ class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -122876,8 +134583,11 @@ class ReadApplicationBasicEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -122921,6 +134631,11 @@ class SubscribeAttributeApplicationBasicEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -122956,8 +134671,11 @@ class ReadApplicationBasicAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123001,6 +134719,11 @@ class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribut } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123034,8 +134757,11 @@ class ReadApplicationBasicFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123079,6 +134805,11 @@ class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123112,8 +134843,11 @@ class ReadApplicationBasicClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ApplicationBasic ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123157,6 +134891,11 @@ class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123216,19 +134955,28 @@ class AccountLoginGetSetupPIN : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster getSetupPINWithParams:params - completion:^( - MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + getSetupPINWithParams:params + completion:^( + MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -123280,6 +135028,7 @@ class AccountLoginLogin : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -123328,6 +135077,7 @@ class AccountLoginLogout : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -123366,8 +135116,11 @@ class ReadAccountLoginGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccountLogin GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123411,6 +135164,11 @@ class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123444,8 +135202,11 @@ class ReadAccountLoginAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccountLogin AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123489,6 +135250,11 @@ class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123524,8 +135290,11 @@ class ReadAccountLoginEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccountLogin EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123569,6 +135338,11 @@ class SubscribeAttributeAccountLoginEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123604,8 +135378,11 @@ class ReadAccountLoginAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccountLogin AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123649,6 +135426,11 @@ class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123682,8 +135464,11 @@ class ReadAccountLoginFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccountLogin FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123727,6 +135512,11 @@ class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123760,8 +135550,11 @@ class ReadAccountLoginClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("AccountLogin ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -123805,6 +135598,11 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -123993,6 +135791,8 @@ class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -124047,6 +135847,8 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -124086,8 +135888,11 @@ class ReadElectricalMeasurementMeasurementType : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeMeasurementTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasurementType response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement MeasurementType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124131,6 +135936,11 @@ class SubscribeAttributeElectricalMeasurementMeasurementType : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasurementType response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124164,8 +135974,11 @@ class ReadElectricalMeasurementDcVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124209,6 +136022,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltage : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124242,8 +136060,11 @@ class ReadElectricalMeasurementDcVoltageMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcVoltageMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcVoltageMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124287,6 +136108,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMin : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124320,8 +136146,11 @@ class ReadElectricalMeasurementDcVoltageMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcVoltageMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcVoltageMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124365,6 +136194,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMax : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124398,8 +136232,11 @@ class ReadElectricalMeasurementDcCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124443,6 +136280,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrent : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124476,8 +136318,11 @@ class ReadElectricalMeasurementDcCurrentMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcCurrentMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcCurrentMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124521,6 +136366,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMin : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124554,8 +136404,11 @@ class ReadElectricalMeasurementDcCurrentMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcCurrentMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcCurrentMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124599,6 +136452,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMax : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124632,8 +136490,11 @@ class ReadElectricalMeasurementDcPower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcPower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124677,6 +136538,11 @@ class SubscribeAttributeElectricalMeasurementDcPower : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124710,8 +136576,11 @@ class ReadElectricalMeasurementDcPowerMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcPowerMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcPowerMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124755,6 +136624,11 @@ class SubscribeAttributeElectricalMeasurementDcPowerMin : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124788,8 +136662,11 @@ class ReadElectricalMeasurementDcPowerMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcPowerMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcPowerMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124833,6 +136710,11 @@ class SubscribeAttributeElectricalMeasurementDcPowerMax : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124866,8 +136748,11 @@ class ReadElectricalMeasurementDcVoltageMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcVoltageMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcVoltageMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124911,6 +136796,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMultiplier : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -124944,8 +136834,11 @@ class ReadElectricalMeasurementDcVoltageDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcVoltageDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcVoltageDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -124989,6 +136882,11 @@ class SubscribeAttributeElectricalMeasurementDcVoltageDivisor : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcVoltageDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125022,8 +136920,11 @@ class ReadElectricalMeasurementDcCurrentMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcCurrentMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125067,6 +136968,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMultiplier : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125100,8 +137006,11 @@ class ReadElectricalMeasurementDcCurrentDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcCurrentDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcCurrentDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125145,6 +137054,11 @@ class SubscribeAttributeElectricalMeasurementDcCurrentDivisor : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcCurrentDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125178,8 +137092,11 @@ class ReadElectricalMeasurementDcPowerMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcPowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcPowerMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125223,6 +137140,11 @@ class SubscribeAttributeElectricalMeasurementDcPowerMultiplier : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125256,8 +137178,11 @@ class ReadElectricalMeasurementDcPowerDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeDcPowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement DcPowerDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125301,6 +137226,11 @@ class SubscribeAttributeElectricalMeasurementDcPowerDivisor : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.DcPowerDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125334,8 +137264,11 @@ class ReadElectricalMeasurementAcFrequency : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequency response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcFrequency read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125379,6 +137312,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequency : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequency response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125412,8 +137350,11 @@ class ReadElectricalMeasurementAcFrequencyMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcFrequencyMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcFrequencyMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125457,6 +137398,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMin : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125490,8 +137436,11 @@ class ReadElectricalMeasurementAcFrequencyMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcFrequencyMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcFrequencyMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125535,6 +137484,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMax : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125568,8 +137522,11 @@ class ReadElectricalMeasurementNeutralCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNeutralCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.NeutralCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement NeutralCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125613,6 +137570,11 @@ class SubscribeAttributeElectricalMeasurementNeutralCurrent : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.NeutralCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125646,8 +137608,11 @@ class ReadElectricalMeasurementTotalActivePower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTotalActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalActivePower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement TotalActivePower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125691,6 +137656,11 @@ class SubscribeAttributeElectricalMeasurementTotalActivePower : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalActivePower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125724,8 +137694,11 @@ class ReadElectricalMeasurementTotalReactivePower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTotalReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalReactivePower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement TotalReactivePower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125769,6 +137742,11 @@ class SubscribeAttributeElectricalMeasurementTotalReactivePower : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalReactivePower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125802,8 +137780,11 @@ class ReadElectricalMeasurementTotalApparentPower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTotalApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalApparentPower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement TotalApparentPower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125847,6 +137828,11 @@ class SubscribeAttributeElectricalMeasurementTotalApparentPower : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.TotalApparentPower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125881,8 +137867,11 @@ class ReadElectricalMeasurementMeasured1stHarmonicCurrent : public ReadAttribute queue:callbackQueue]; [cluster readAttributeMeasured1stHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured1stHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement Measured1stHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -125927,6 +137916,11 @@ class SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured1stHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -125961,8 +137955,11 @@ class ReadElectricalMeasurementMeasured3rdHarmonicCurrent : public ReadAttribute queue:callbackQueue]; [cluster readAttributeMeasured3rdHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured3rdHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement Measured3rdHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126007,6 +138004,11 @@ class SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured3rdHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126041,8 +138043,11 @@ class ReadElectricalMeasurementMeasured5thHarmonicCurrent : public ReadAttribute queue:callbackQueue]; [cluster readAttributeMeasured5thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured5thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement Measured5thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126087,6 +138092,11 @@ class SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured5thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126121,8 +138131,11 @@ class ReadElectricalMeasurementMeasured7thHarmonicCurrent : public ReadAttribute queue:callbackQueue]; [cluster readAttributeMeasured7thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured7thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement Measured7thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126167,6 +138180,11 @@ class SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured7thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126201,8 +138219,11 @@ class ReadElectricalMeasurementMeasured9thHarmonicCurrent : public ReadAttribute queue:callbackQueue]; [cluster readAttributeMeasured9thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured9thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement Measured9thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126247,6 +138268,11 @@ class SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured9thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126281,8 +138307,11 @@ class ReadElectricalMeasurementMeasured11thHarmonicCurrent : public ReadAttribut queue:callbackQueue]; [cluster readAttributeMeasured11thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured11thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement Measured11thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126327,6 +138356,11 @@ class SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.Measured11thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126362,8 +138396,11 @@ class ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent : public ReadAttr [cluster readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase1stHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement MeasuredPhase1stHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126408,6 +138445,11 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase1stHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126443,8 +138485,11 @@ class ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : public ReadAttr [cluster readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase3rdHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement MeasuredPhase3rdHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126489,6 +138534,11 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase3rdHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126524,8 +138574,11 @@ class ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent : public ReadAttr [cluster readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase5thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement MeasuredPhase5thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126570,6 +138623,11 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase5thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126605,8 +138663,11 @@ class ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent : public ReadAttr [cluster readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase7thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement MeasuredPhase7thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126651,6 +138712,11 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase7thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126686,8 +138752,11 @@ class ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent : public ReadAttr [cluster readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase9thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement MeasuredPhase9thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126732,6 +138801,11 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent : p } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase9thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126767,8 +138841,11 @@ class ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent : public ReadAtt [cluster readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase11thHarmonicCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement MeasuredPhase11thHarmonicCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126813,6 +138890,11 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.MeasuredPhase11thHarmonicCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126846,8 +138928,11 @@ class ReadElectricalMeasurementAcFrequencyMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcFrequencyMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcFrequencyMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126891,6 +138976,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -126924,8 +139014,11 @@ class ReadElectricalMeasurementAcFrequencyDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcFrequencyDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcFrequencyDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -126969,6 +139062,11 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyDivisor : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcFrequencyDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127002,8 +139100,11 @@ class ReadElectricalMeasurementPowerMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement PowerMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127047,6 +139148,11 @@ class SubscribeAttributeElectricalMeasurementPowerMultiplier : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127080,8 +139186,11 @@ class ReadElectricalMeasurementPowerDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement PowerDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127125,6 +139234,11 @@ class SubscribeAttributeElectricalMeasurementPowerDivisor : public SubscribeAttr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127159,8 +139273,11 @@ class ReadElectricalMeasurementHarmonicCurrentMultiplier : public ReadAttribute queue:callbackQueue]; [cluster readAttributeHarmonicCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.HarmonicCurrentMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement HarmonicCurrentMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127205,6 +139322,11 @@ class SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.HarmonicCurrentMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127240,8 +139362,11 @@ class ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier : public ReadAttri [cluster readAttributePhaseHarmonicCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PhaseHarmonicCurrentMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement PhaseHarmonicCurrentMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127286,6 +139411,11 @@ class SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier : pu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PhaseHarmonicCurrentMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127319,8 +139449,11 @@ class ReadElectricalMeasurementInstantaneousVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInstantaneousVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement InstantaneousVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127364,6 +139497,11 @@ class SubscribeAttributeElectricalMeasurementInstantaneousVoltage : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127398,8 +139536,11 @@ class ReadElectricalMeasurementInstantaneousLineCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInstantaneousLineCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousLineCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement InstantaneousLineCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127444,6 +139585,11 @@ class SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent : public S } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousLineCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127478,8 +139624,11 @@ class ReadElectricalMeasurementInstantaneousActiveCurrent : public ReadAttribute queue:callbackQueue]; [cluster readAttributeInstantaneousActiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousActiveCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement InstantaneousActiveCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127524,6 +139673,11 @@ class SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousActiveCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127558,8 +139712,11 @@ class ReadElectricalMeasurementInstantaneousReactiveCurrent : public ReadAttribu queue:callbackQueue]; [cluster readAttributeInstantaneousReactiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousReactiveCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement InstantaneousReactiveCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127604,6 +139761,11 @@ class SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousReactiveCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127637,8 +139799,11 @@ class ReadElectricalMeasurementInstantaneousPower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInstantaneousPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousPower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement InstantaneousPower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127682,6 +139847,11 @@ class SubscribeAttributeElectricalMeasurementInstantaneousPower : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.InstantaneousPower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127715,8 +139885,11 @@ class ReadElectricalMeasurementRmsVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127760,6 +139933,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltage : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127793,8 +139971,11 @@ class ReadElectricalMeasurementRmsVoltageMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127838,6 +140019,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMin : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127871,8 +140057,11 @@ class ReadElectricalMeasurementRmsVoltageMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127916,6 +140105,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMax : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -127949,8 +140143,11 @@ class ReadElectricalMeasurementRmsCurrent : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrent response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -127994,6 +140191,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrent : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128027,8 +140229,11 @@ class ReadElectricalMeasurementRmsCurrentMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128072,6 +140277,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMin : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128105,8 +140315,11 @@ class ReadElectricalMeasurementRmsCurrentMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128150,6 +140363,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMax : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128183,8 +140401,11 @@ class ReadElectricalMeasurementActivePower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128228,6 +140449,11 @@ class SubscribeAttributeElectricalMeasurementActivePower : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128261,8 +140487,11 @@ class ReadElectricalMeasurementActivePowerMin : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMin response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerMin read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128306,6 +140535,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMin : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128339,8 +140573,11 @@ class ReadElectricalMeasurementActivePowerMax : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMax response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerMax read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128384,6 +140621,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMax : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128417,8 +140659,11 @@ class ReadElectricalMeasurementReactivePower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ReactivePower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128462,6 +140707,11 @@ class SubscribeAttributeElectricalMeasurementReactivePower : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128495,8 +140745,11 @@ class ReadElectricalMeasurementApparentPower : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPower response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ApparentPower read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128540,6 +140793,11 @@ class SubscribeAttributeElectricalMeasurementApparentPower : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPower response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128573,8 +140831,11 @@ class ReadElectricalMeasurementPowerFactor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePowerFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement PowerFactor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128618,6 +140879,11 @@ class SubscribeAttributeElectricalMeasurementPowerFactor : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128653,8 +140919,11 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public ReadA [cluster readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128699,6 +140968,8 @@ class WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public Writ LogNSError("ElectricalMeasurement " "AverageRmsVoltageMeasurementPeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128746,6 +141017,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128780,8 +141056,11 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounter : public ReadAttrib queue:callbackQueue]; [cluster readAttributeAverageRmsUnderVoltageCounterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounter response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounter read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128827,6 +141106,8 @@ class WriteElectricalMeasurementAverageRmsUnderVoltageCounter : public WriteAttr LogNSError( "ElectricalMeasurement AverageRmsUnderVoltageCounter write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128874,6 +141155,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter : pub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounter response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -128908,8 +141194,11 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriod : public ReadAttribut queue:callbackQueue]; [cluster readAttributeRmsExtremeOverVoltagePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -128955,6 +141244,8 @@ class WriteElectricalMeasurementRmsExtremeOverVoltagePeriod : public WriteAttrib LogNSError( "ElectricalMeasurement RmsExtremeOverVoltagePeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129002,6 +141293,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129036,8 +141332,11 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod : public ReadAttribu queue:callbackQueue]; [cluster readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129083,6 +141382,8 @@ class WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod : public WriteAttri LogNSError( "ElectricalMeasurement RmsExtremeUnderVoltagePeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129130,6 +141431,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod : publ } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129163,8 +141469,11 @@ class ReadElectricalMeasurementRmsVoltageSagPeriod : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageSagPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSagPeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129206,6 +141515,8 @@ class WriteElectricalMeasurementRmsVoltageSagPeriod : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageSagPeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129252,6 +141563,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129285,8 +141601,11 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriod : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageSwellPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriod response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129329,6 +141648,8 @@ class WriteElectricalMeasurementRmsVoltageSwellPeriod : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129375,6 +141696,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriod response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129408,8 +141734,11 @@ class ReadElectricalMeasurementAcVoltageMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcVoltageMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcVoltageMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129453,6 +141782,11 @@ class SubscribeAttributeElectricalMeasurementAcVoltageMultiplier : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129486,8 +141820,11 @@ class ReadElectricalMeasurementAcVoltageDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcVoltageDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcVoltageDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129531,6 +141868,11 @@ class SubscribeAttributeElectricalMeasurementAcVoltageDivisor : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129564,8 +141906,11 @@ class ReadElectricalMeasurementAcCurrentMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcCurrentMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129609,6 +141954,11 @@ class SubscribeAttributeElectricalMeasurementAcCurrentMultiplier : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129642,8 +141992,11 @@ class ReadElectricalMeasurementAcCurrentDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcCurrentDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcCurrentDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129687,6 +142040,11 @@ class SubscribeAttributeElectricalMeasurementAcCurrentDivisor : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129720,8 +142078,11 @@ class ReadElectricalMeasurementAcPowerMultiplier : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcPowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcPowerMultiplier response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcPowerMultiplier read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129765,6 +142126,11 @@ class SubscribeAttributeElectricalMeasurementAcPowerMultiplier : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcPowerMultiplier response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129798,8 +142164,11 @@ class ReadElectricalMeasurementAcPowerDivisor : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcPowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcPowerDivisor response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcPowerDivisor read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129843,6 +142212,11 @@ class SubscribeAttributeElectricalMeasurementAcPowerDivisor : public SubscribeAt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcPowerDivisor response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129876,8 +142250,11 @@ class ReadElectricalMeasurementOverloadAlarmsMask : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOverloadAlarmsMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.OverloadAlarmsMask response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement OverloadAlarmsMask read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129919,6 +142296,8 @@ class WriteElectricalMeasurementOverloadAlarmsMask : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ElectricalMeasurement OverloadAlarmsMask write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -129965,6 +142344,11 @@ class SubscribeAttributeElectricalMeasurementOverloadAlarmsMask : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.OverloadAlarmsMask response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -129998,8 +142382,11 @@ class ReadElectricalMeasurementVoltageOverload : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVoltageOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.VoltageOverload response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement VoltageOverload read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130043,6 +142430,11 @@ class SubscribeAttributeElectricalMeasurementVoltageOverload : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.VoltageOverload response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130076,8 +142468,11 @@ class ReadElectricalMeasurementCurrentOverload : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCurrentOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.CurrentOverload response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement CurrentOverload read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130121,6 +142516,11 @@ class SubscribeAttributeElectricalMeasurementCurrentOverload : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.CurrentOverload response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130154,8 +142554,11 @@ class ReadElectricalMeasurementAcOverloadAlarmsMask : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcOverloadAlarmsMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcOverloadAlarmsMask response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcOverloadAlarmsMask read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130198,6 +142601,8 @@ class WriteElectricalMeasurementAcOverloadAlarmsMask : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("ElectricalMeasurement AcOverloadAlarmsMask write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130244,6 +142649,11 @@ class SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcOverloadAlarmsMask response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130277,8 +142687,11 @@ class ReadElectricalMeasurementAcVoltageOverload : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcVoltageOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageOverload response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcVoltageOverload read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130322,6 +142735,11 @@ class SubscribeAttributeElectricalMeasurementAcVoltageOverload : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcVoltageOverload response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130355,8 +142773,11 @@ class ReadElectricalMeasurementAcCurrentOverload : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcCurrentOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentOverload response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcCurrentOverload read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130400,6 +142821,11 @@ class SubscribeAttributeElectricalMeasurementAcCurrentOverload : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcCurrentOverload response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130433,8 +142859,11 @@ class ReadElectricalMeasurementAcActivePowerOverload : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcActivePowerOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcActivePowerOverload response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcActivePowerOverload read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130478,6 +142907,11 @@ class SubscribeAttributeElectricalMeasurementAcActivePowerOverload : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcActivePowerOverload response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130512,8 +142946,11 @@ class ReadElectricalMeasurementAcReactivePowerOverload : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcReactivePowerOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcReactivePowerOverload response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcReactivePowerOverload read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130557,6 +142994,11 @@ class SubscribeAttributeElectricalMeasurementAcReactivePowerOverload : public Su } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcReactivePowerOverload response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130590,8 +143032,11 @@ class ReadElectricalMeasurementAverageRmsOverVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAverageRmsOverVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsOverVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130635,6 +143080,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130669,8 +143119,11 @@ class ReadElectricalMeasurementAverageRmsUnderVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAverageRmsUnderVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsUnderVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130714,6 +143167,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130747,8 +143205,11 @@ class ReadElectricalMeasurementRmsExtremeOverVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsExtremeOverVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeOverVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130792,6 +143253,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130826,8 +143292,11 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltage : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsExtremeUnderVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltage response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeUnderVoltage read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130871,6 +143340,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage : public Sub } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltage response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130904,8 +143378,11 @@ class ReadElectricalMeasurementRmsVoltageSag : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageSagWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSag response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSag read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -130949,6 +143426,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSag : public SubscribeAtt } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSag response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -130982,8 +143464,11 @@ class ReadElectricalMeasurementRmsVoltageSwell : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageSwellWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwell response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSwell read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131027,6 +143512,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwell : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwell response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131060,8 +143550,11 @@ class ReadElectricalMeasurementLineCurrentPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLineCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.LineCurrentPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement LineCurrentPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131105,6 +143598,11 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseB : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.LineCurrentPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131138,8 +143636,11 @@ class ReadElectricalMeasurementActiveCurrentPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActiveCurrentPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131183,6 +143684,11 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131216,8 +143722,11 @@ class ReadElectricalMeasurementReactiveCurrentPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReactiveCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ReactiveCurrentPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131261,6 +143770,11 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131294,8 +143808,11 @@ class ReadElectricalMeasurementRmsVoltagePhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltagePhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltagePhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltagePhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131339,6 +143856,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltagePhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131372,8 +143894,11 @@ class ReadElectricalMeasurementRmsVoltageMinPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageMinPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131417,6 +143942,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131450,8 +143980,11 @@ class ReadElectricalMeasurementRmsVoltageMaxPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageMaxPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131495,6 +144028,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131528,8 +144066,11 @@ class ReadElectricalMeasurementRmsCurrentPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131573,6 +144114,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131606,8 +144152,11 @@ class ReadElectricalMeasurementRmsCurrentMinPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentMinPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131651,6 +144200,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131684,8 +144238,11 @@ class ReadElectricalMeasurementRmsCurrentMaxPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentMaxPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131729,6 +144286,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131762,8 +144324,11 @@ class ReadElectricalMeasurementActivePowerPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131807,6 +144372,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseB : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131840,8 +144410,11 @@ class ReadElectricalMeasurementActivePowerMinPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerMinPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131885,6 +144458,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131918,8 +144496,11 @@ class ReadElectricalMeasurementActivePowerMaxPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerMaxPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -131963,6 +144544,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -131996,8 +144582,11 @@ class ReadElectricalMeasurementReactivePowerPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReactivePowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePowerPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ReactivePowerPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132041,6 +144630,11 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePowerPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132074,8 +144668,11 @@ class ReadElectricalMeasurementApparentPowerPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeApparentPowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPowerPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ApparentPowerPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132119,6 +144716,11 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseB : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPowerPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132152,8 +144754,11 @@ class ReadElectricalMeasurementPowerFactorPhaseB : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePowerFactorPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactorPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement PowerFactorPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132197,6 +144802,11 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseB : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactorPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132232,8 +144842,11 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB : public [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriodPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132278,6 +144891,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132313,8 +144931,11 @@ class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB : public ReadA [cluster readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsOverVoltageCounterPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132359,6 +144980,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132394,8 +145020,11 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB : public Read [cluster readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounterPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132440,6 +145069,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132475,8 +145109,11 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : public ReadAt [cluster readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriodPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132521,6 +145158,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132556,8 +145198,11 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB : public ReadA [cluster readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriodPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132602,6 +145247,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132636,8 +145286,11 @@ class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB : public ReadAttribute queue:callbackQueue]; [cluster readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSagPeriodPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132682,6 +145335,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132716,8 +145374,11 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB : public ReadAttribut queue:callbackQueue]; [cluster readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseB response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSwellPeriodPhaseB read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132762,6 +145423,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseB response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132795,8 +145461,11 @@ class ReadElectricalMeasurementLineCurrentPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLineCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.LineCurrentPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement LineCurrentPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132840,6 +145509,11 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseC : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.LineCurrentPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132873,8 +145547,11 @@ class ReadElectricalMeasurementActiveCurrentPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActiveCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActiveCurrentPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132918,6 +145595,11 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -132951,8 +145633,11 @@ class ReadElectricalMeasurementReactiveCurrentPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReactiveCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ReactiveCurrentPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -132996,6 +145681,11 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC : public Subs } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -133029,8 +145719,11 @@ class ReadElectricalMeasurementRmsVoltagePhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltagePhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltagePhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltagePhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -133074,6 +145767,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltagePhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -133107,8 +145805,11 @@ class ReadElectricalMeasurementRmsVoltageMinPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageMinPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -133152,6 +145853,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -133185,8 +145891,11 @@ class ReadElectricalMeasurementRmsVoltageMaxPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsVoltageMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageMaxPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -133230,6 +145939,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -133263,8 +145977,11 @@ class ReadElectricalMeasurementRmsCurrentPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -133308,6 +146025,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC : public Subscribe } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -133341,8 +146063,11 @@ class ReadElectricalMeasurementRmsCurrentMinPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentMinPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -133386,6 +146111,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -133419,8 +146149,11 @@ class ReadElectricalMeasurementRmsCurrentMaxPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRmsCurrentMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsCurrentMaxPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -133464,6 +146197,11 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -133497,8 +146235,11 @@ class ReadElectricalMeasurementActivePowerPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -133542,6 +146283,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseC : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -133575,8 +146321,11 @@ class ReadElectricalMeasurementActivePowerMinPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerMinPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -133620,6 +146369,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -133653,8 +146407,11 @@ class ReadElectricalMeasurementActivePowerMaxPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeActivePowerMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ActivePowerMaxPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -133698,6 +146455,11 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC : public Subsc } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -133731,8 +146493,11 @@ class ReadElectricalMeasurementReactivePowerPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeReactivePowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePowerPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ReactivePowerPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -133776,6 +146541,11 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ReactivePowerPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -133809,8 +146579,11 @@ class ReadElectricalMeasurementApparentPowerPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeApparentPowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPowerPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ApparentPowerPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -133854,6 +146627,11 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseC : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ApparentPowerPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -133887,8 +146665,11 @@ class ReadElectricalMeasurementPowerFactorPhaseC : public ReadAttribute { queue:callbackQueue]; [cluster readAttributePowerFactorPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactorPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement PowerFactorPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -133932,6 +146713,11 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseC : public Subscrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.PowerFactorPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -133967,8 +146753,11 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC : public [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriodPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -134013,6 +146802,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -134048,8 +146842,11 @@ class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC : public ReadA [cluster readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsOverVoltageCounterPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -134094,6 +146891,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -134129,8 +146931,11 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC : public Read [cluster readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:^( NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounterPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -134175,6 +146980,11 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -134210,8 +147020,11 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : public ReadAt [cluster readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriodPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -134256,6 +147069,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -134291,8 +147109,11 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC : public ReadA [cluster readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriodPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -134337,6 +147158,11 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -134371,8 +147197,11 @@ class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseC : public ReadAttribute queue:callbackQueue]; [cluster readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSagPeriodPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -134417,6 +147246,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC : public } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -134451,8 +147285,11 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC : public ReadAttribut queue:callbackQueue]; [cluster readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseC response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement RmsVoltageSwellPeriodPhaseC read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -134497,6 +147334,11 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC : publi } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseC response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -134530,8 +147372,11 @@ class ReadElectricalMeasurementGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -134575,6 +147420,11 @@ class SubscribeAttributeElectricalMeasurementGeneratedCommandList : public Subsc } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -134608,8 +147458,11 @@ class ReadElectricalMeasurementAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -134653,6 +147506,11 @@ class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public Subscr } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -134688,8 +147546,11 @@ class ReadElectricalMeasurementEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -134733,6 +147594,11 @@ class SubscribeAttributeElectricalMeasurementEventList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -134768,8 +147634,11 @@ class ReadElectricalMeasurementAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -134813,6 +147682,11 @@ class SubscribeAttributeElectricalMeasurementAttributeList : public SubscribeAtt } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -134846,8 +147720,11 @@ class ReadElectricalMeasurementFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -134891,6 +147768,11 @@ class SubscribeAttributeElectricalMeasurementFeatureMap : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -134924,8 +147806,11 @@ class ReadElectricalMeasurementClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("ElectricalMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -134969,6 +147854,11 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"ElectricalMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -135133,6 +148023,7 @@ class UnitTestingTest : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -135180,6 +148071,8 @@ class UnitTestingTestNotHandled : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -135221,19 +148114,28 @@ class UnitTestingTestSpecific : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testSpecificWithParams:params - completion:^(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + testSpecificWithParams:params + completion:^( + MTRUnitTestingClusterTestSpecificResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -135276,6 +148178,8 @@ class UnitTestingTestUnknownCommand : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -135321,19 +148225,29 @@ class UnitTestingTestAddArguments : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testAddArgumentsWithParams:params - completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + testAddArgumentsWithParams:params + completion:^(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -135373,19 +148287,30 @@ class UnitTestingTestSimpleArgumentRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testSimpleArgumentRequestWithParams:params - completion:^(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + testSimpleArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestSimpleArgumentResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -135546,10 +148471,20 @@ class UnitTestingTestStructArrayArgumentRequest : public ClusterCommand { MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestStructArrayArgumentResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestStructArrayArgumentResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -135615,10 +148550,20 @@ class UnitTestingTestStructArgumentRequest : public ClusterCommand { completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -135682,10 +148627,20 @@ class UnitTestingTestNestedStructArgumentRequest : public ClusterCommand { completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -135754,10 +148709,20 @@ class UnitTestingTestListStructArgumentRequest : public ClusterCommand { completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -135817,10 +148782,20 @@ class UnitTestingTestListInt8UArgumentRequest : public ClusterCommand { completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -135926,19 +148901,30 @@ class UnitTestingTestNestedStructListArgumentRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testNestedStructListArgumentRequestWithParams:params - completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + testNestedStructListArgumentRequestWithParams:params + completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -136053,10 +149039,20 @@ class UnitTestingTestListNestedStructListArgumentRequest : public ClusterCommand completion:^(MTRUnitTestingClusterBooleanResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters:: + UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters:: + UnitTesting::Commands::BooleanResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -136117,10 +149113,20 @@ class UnitTestingTestListInt8UReverseRequest : public ClusterCommand { completion:^(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestListInt8UReverseResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestListInt8UReverseResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -136168,19 +149174,29 @@ class UnitTestingTestEnumsRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testEnumsRequestWithParams:params - completion:^(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + testEnumsRequestWithParams:params + completion:^( + MTRUnitTestingClusterTestEnumsResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -136233,10 +149249,20 @@ class UnitTestingTestNullableOptionalRequest : public ClusterCommand { completion:^(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestNullableOptionalResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestNullableOptionalResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -136447,10 +149473,20 @@ class UnitTestingTestComplexNullableOptionalRequest : public ClusterCommand { MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestComplexNullableOptionalResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::UnitTesting:: + Commands::TestComplexNullableOptionalResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -136524,10 +149560,20 @@ class UnitTestingSimpleStructEchoRequest : public ClusterCommand { completion:^(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -136577,6 +149623,8 @@ class UnitTestingTimedInvokeRequest : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -136630,6 +149678,8 @@ class UnitTestingTestSimpleOptionalArgumentRequest : public ClusterCommand { if (error != nil) { mError = error; LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -136678,19 +149728,30 @@ class UnitTestingTestEmitTestEventRequest : public ClusterCommand { uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testEmitTestEventRequestWithParams:params - completion:^(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster + testEmitTestEventRequestWithParams:params + completion:^(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId + = chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -136736,10 +149797,20 @@ class UnitTestingTestEmitTestFabricScopedEventRequest : public ClusterCommand { MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters:: + UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON( + @(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters:: + UnitTesting::Commands::TestEmitTestFabricScopedEventResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON( + @(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -136779,8 +149850,11 @@ class ReadUnitTestingBoolean : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Boolean response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Boolean read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -136822,6 +149896,8 @@ class WriteUnitTestingBoolean : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Boolean write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -136868,6 +149944,11 @@ class SubscribeAttributeUnitTestingBoolean : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Boolean response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -136901,8 +149982,11 @@ class ReadUnitTestingBitmap8 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap8 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Bitmap8 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -136944,6 +150028,8 @@ class WriteUnitTestingBitmap8 : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Bitmap8 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -136990,6 +150076,11 @@ class SubscribeAttributeUnitTestingBitmap8 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap8 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -137023,8 +150114,11 @@ class ReadUnitTestingBitmap16 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap16 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Bitmap16 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137066,6 +150160,8 @@ class WriteUnitTestingBitmap16 : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Bitmap16 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137112,6 +150208,11 @@ class SubscribeAttributeUnitTestingBitmap16 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap16 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -137145,8 +150246,11 @@ class ReadUnitTestingBitmap32 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap32 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Bitmap32 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137188,6 +150292,8 @@ class WriteUnitTestingBitmap32 : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Bitmap32 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137234,6 +150340,11 @@ class SubscribeAttributeUnitTestingBitmap32 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap32 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -137267,8 +150378,11 @@ class ReadUnitTestingBitmap64 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap64 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Bitmap64 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137310,6 +150424,8 @@ class WriteUnitTestingBitmap64 : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Bitmap64 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137356,6 +150472,11 @@ class SubscribeAttributeUnitTestingBitmap64 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Bitmap64 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -137389,8 +150510,11 @@ class ReadUnitTestingInt8u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int8u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int8u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137432,6 +150556,8 @@ class WriteUnitTestingInt8u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int8u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137478,6 +150604,11 @@ class SubscribeAttributeUnitTestingInt8u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int8u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -137511,8 +150642,11 @@ class ReadUnitTestingInt16u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int16u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int16u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137554,6 +150688,8 @@ class WriteUnitTestingInt16u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int16u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137600,6 +150736,11 @@ class SubscribeAttributeUnitTestingInt16u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int16u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -137633,8 +150774,11 @@ class ReadUnitTestingInt24u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt24uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int24u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int24u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137676,6 +150820,8 @@ class WriteUnitTestingInt24u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int24u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137722,6 +150868,11 @@ class SubscribeAttributeUnitTestingInt24u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int24u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -137755,8 +150906,11 @@ class ReadUnitTestingInt32u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int32u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int32u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137798,6 +150952,8 @@ class WriteUnitTestingInt32u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int32u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137844,6 +151000,11 @@ class SubscribeAttributeUnitTestingInt32u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int32u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -137877,8 +151038,11 @@ class ReadUnitTestingInt40u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt40uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int40u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int40u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137920,6 +151084,8 @@ class WriteUnitTestingInt40u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int40u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -137966,6 +151132,11 @@ class SubscribeAttributeUnitTestingInt40u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int40u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -137999,8 +151170,11 @@ class ReadUnitTestingInt48u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt48uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int48u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int48u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138042,6 +151216,8 @@ class WriteUnitTestingInt48u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int48u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138088,6 +151264,11 @@ class SubscribeAttributeUnitTestingInt48u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int48u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -138121,8 +151302,11 @@ class ReadUnitTestingInt56u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt56uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int56u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int56u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138164,6 +151348,8 @@ class WriteUnitTestingInt56u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int56u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138210,6 +151396,11 @@ class SubscribeAttributeUnitTestingInt56u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int56u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -138243,8 +151434,11 @@ class ReadUnitTestingInt64u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int64u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int64u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138286,6 +151480,8 @@ class WriteUnitTestingInt64u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int64u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138332,6 +151528,11 @@ class SubscribeAttributeUnitTestingInt64u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int64u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -138365,8 +151566,11 @@ class ReadUnitTestingInt8s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int8s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int8s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138408,6 +151612,8 @@ class WriteUnitTestingInt8s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int8s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138454,6 +151660,11 @@ class SubscribeAttributeUnitTestingInt8s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int8s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -138487,8 +151698,11 @@ class ReadUnitTestingInt16s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int16s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int16s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138530,6 +151744,8 @@ class WriteUnitTestingInt16s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int16s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138576,6 +151792,11 @@ class SubscribeAttributeUnitTestingInt16s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int16s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -138609,8 +151830,11 @@ class ReadUnitTestingInt24s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt24sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int24s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int24s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138652,6 +151876,8 @@ class WriteUnitTestingInt24s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int24s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138698,6 +151924,11 @@ class SubscribeAttributeUnitTestingInt24s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int24s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -138731,8 +151962,11 @@ class ReadUnitTestingInt32s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int32s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int32s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138774,6 +152008,8 @@ class WriteUnitTestingInt32s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int32s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138820,6 +152056,11 @@ class SubscribeAttributeUnitTestingInt32s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int32s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -138853,8 +152094,11 @@ class ReadUnitTestingInt40s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt40sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int40s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int40s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138896,6 +152140,8 @@ class WriteUnitTestingInt40s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int40s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -138942,6 +152188,11 @@ class SubscribeAttributeUnitTestingInt40s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int40s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -138975,8 +152226,11 @@ class ReadUnitTestingInt48s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt48sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int48s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int48s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139018,6 +152272,8 @@ class WriteUnitTestingInt48s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int48s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139064,6 +152320,11 @@ class SubscribeAttributeUnitTestingInt48s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int48s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -139097,8 +152358,11 @@ class ReadUnitTestingInt56s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt56sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int56s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int56s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139140,6 +152404,8 @@ class WriteUnitTestingInt56s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int56s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139186,6 +152452,11 @@ class SubscribeAttributeUnitTestingInt56s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int56s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -139219,8 +152490,11 @@ class ReadUnitTestingInt64s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int64s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Int64s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139262,6 +152536,8 @@ class WriteUnitTestingInt64s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Int64s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139308,6 +152584,11 @@ class SubscribeAttributeUnitTestingInt64s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Int64s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -139341,8 +152622,11 @@ class ReadUnitTestingEnum8 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Enum8 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Enum8 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139384,6 +152668,8 @@ class WriteUnitTestingEnum8 : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Enum8 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139430,6 +152716,11 @@ class SubscribeAttributeUnitTestingEnum8 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Enum8 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -139463,8 +152754,11 @@ class ReadUnitTestingEnum16 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Enum16 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Enum16 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139506,6 +152800,8 @@ class WriteUnitTestingEnum16 : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Enum16 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139552,6 +152848,11 @@ class SubscribeAttributeUnitTestingEnum16 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Enum16 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -139585,8 +152886,11 @@ class ReadUnitTestingFloatSingle : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.FloatSingle response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting FloatSingle read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139628,6 +152932,8 @@ class WriteUnitTestingFloatSingle : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting FloatSingle write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139674,6 +152980,11 @@ class SubscribeAttributeUnitTestingFloatSingle : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.FloatSingle response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -139707,8 +153018,11 @@ class ReadUnitTestingFloatDouble : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.FloatDouble response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting FloatDouble read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139750,6 +153064,8 @@ class WriteUnitTestingFloatDouble : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting FloatDouble write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139796,6 +153112,11 @@ class SubscribeAttributeUnitTestingFloatDouble : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.FloatDouble response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -139829,8 +153150,11 @@ class ReadUnitTestingOctetString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.OctetString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting OctetString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139872,6 +153196,8 @@ class WriteUnitTestingOctetString : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting OctetString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -139918,6 +153244,11 @@ class SubscribeAttributeUnitTestingOctetString : public SubscribeAttribute { } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.OctetString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -139951,8 +153282,11 @@ class ReadUnitTestingListInt8u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeListInt8uWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListInt8u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ListInt8u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140004,6 +153338,8 @@ class WriteUnitTestingListInt8u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting ListInt8u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140051,6 +153387,11 @@ class SubscribeAttributeUnitTestingListInt8u : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListInt8u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -140084,8 +153425,11 @@ class ReadUnitTestingListOctetString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeListOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListOctetString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ListOctetString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140137,6 +153481,8 @@ class WriteUnitTestingListOctetString : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting ListOctetString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140184,6 +153530,11 @@ class SubscribeAttributeUnitTestingListOctetString : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListOctetString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -140217,8 +153568,11 @@ class ReadUnitTestingListStructOctetString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeListStructOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListStructOctetString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ListStructOctetString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140272,6 +153626,8 @@ class WriteUnitTestingListStructOctetString : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting ListStructOctetString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140320,6 +153676,11 @@ class SubscribeAttributeUnitTestingListStructOctetString : public SubscribeAttri } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListStructOctetString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -140353,8 +153714,11 @@ class ReadUnitTestingLongOctetString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLongOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.LongOctetString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting LongOctetString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140396,6 +153760,8 @@ class WriteUnitTestingLongOctetString : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting LongOctetString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140442,6 +153808,11 @@ class SubscribeAttributeUnitTestingLongOctetString : public SubscribeAttribute { } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.LongOctetString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -140475,8 +153846,11 @@ class ReadUnitTestingCharString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.CharString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting CharString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140520,6 +153894,8 @@ class WriteUnitTestingCharString : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting CharString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140566,6 +153942,11 @@ class SubscribeAttributeUnitTestingCharString : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.CharString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -140599,8 +153980,11 @@ class ReadUnitTestingLongCharString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeLongCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.LongCharString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting LongCharString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140644,6 +154028,8 @@ class WriteUnitTestingLongCharString : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting LongCharString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140690,6 +154076,11 @@ class SubscribeAttributeUnitTestingLongCharString : public SubscribeAttribute { } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.LongCharString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -140723,8 +154114,11 @@ class ReadUnitTestingEpochUs : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEpochUsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EpochUs response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting EpochUs read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140766,6 +154160,8 @@ class WriteUnitTestingEpochUs : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting EpochUs write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140812,6 +154208,11 @@ class SubscribeAttributeUnitTestingEpochUs : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EpochUs response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -140845,8 +154246,11 @@ class ReadUnitTestingEpochS : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEpochSWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EpochS response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting EpochS read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140888,6 +154292,8 @@ class WriteUnitTestingEpochS : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting EpochS write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -140934,6 +154340,11 @@ class SubscribeAttributeUnitTestingEpochS : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EpochS response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -140967,8 +154378,11 @@ class ReadUnitTestingVendorId : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.VendorId response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting VendorId read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -141010,6 +154424,8 @@ class WriteUnitTestingVendorId : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting VendorId write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -141056,6 +154472,11 @@ class SubscribeAttributeUnitTestingVendorId : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.VendorId response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -141090,8 +154511,11 @@ class ReadUnitTestingListNullablesAndOptionalsStruct : public ReadAttribute { [cluster readAttributeListNullablesAndOptionalsStructWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListNullablesAndOptionalsStruct response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ListNullablesAndOptionalsStruct read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -141296,6 +154720,8 @@ class WriteUnitTestingListNullablesAndOptionalsStruct : public WriteAttribute { LogNSError( "UnitTesting ListNullablesAndOptionalsStruct write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -141345,6 +154771,11 @@ class SubscribeAttributeUnitTestingListNullablesAndOptionalsStruct : public Subs } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListNullablesAndOptionalsStruct response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -141378,8 +154809,11 @@ class ReadUnitTestingEnumAttr : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EnumAttr response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting EnumAttr read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -141421,6 +154855,8 @@ class WriteUnitTestingEnumAttr : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting EnumAttr write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -141467,6 +154903,11 @@ class SubscribeAttributeUnitTestingEnumAttr : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EnumAttr response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -141501,8 +154942,11 @@ class ReadUnitTestingStructAttr : public ReadAttribute { [cluster readAttributeStructAttrWithCompletion:^( MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.StructAttr response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting StructAttr read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -141554,6 +154998,8 @@ class WriteUnitTestingStructAttr : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting StructAttr write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -141601,6 +155047,11 @@ class SubscribeAttributeUnitTestingStructAttr : public SubscribeAttribute { } reportHandler:^(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.StructAttr response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -141634,8 +155085,11 @@ class ReadUnitTestingRangeRestrictedInt8u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt8u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting RangeRestrictedInt8u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -141677,6 +155131,8 @@ class WriteUnitTestingRangeRestrictedInt8u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting RangeRestrictedInt8u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -141723,6 +155179,11 @@ class SubscribeAttributeUnitTestingRangeRestrictedInt8u : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt8u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -141756,8 +155217,11 @@ class ReadUnitTestingRangeRestrictedInt8s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt8s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting RangeRestrictedInt8s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -141799,6 +155263,8 @@ class WriteUnitTestingRangeRestrictedInt8s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting RangeRestrictedInt8s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -141845,6 +155311,11 @@ class SubscribeAttributeUnitTestingRangeRestrictedInt8s : public SubscribeAttrib } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt8s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -141878,8 +155349,11 @@ class ReadUnitTestingRangeRestrictedInt16u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt16u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting RangeRestrictedInt16u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -141921,6 +155395,8 @@ class WriteUnitTestingRangeRestrictedInt16u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting RangeRestrictedInt16u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -141967,6 +155443,11 @@ class SubscribeAttributeUnitTestingRangeRestrictedInt16u : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt16u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -142000,8 +155481,11 @@ class ReadUnitTestingRangeRestrictedInt16s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt16s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting RangeRestrictedInt16s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142043,6 +155527,8 @@ class WriteUnitTestingRangeRestrictedInt16s : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting RangeRestrictedInt16s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142089,6 +155575,11 @@ class SubscribeAttributeUnitTestingRangeRestrictedInt16s : public SubscribeAttri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.RangeRestrictedInt16s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -142122,8 +155613,11 @@ class ReadUnitTestingListLongOctetString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeListLongOctetStringWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListLongOctetString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ListLongOctetString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142175,6 +155669,8 @@ class WriteUnitTestingListLongOctetString : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting ListLongOctetString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142222,6 +155718,11 @@ class SubscribeAttributeUnitTestingListLongOctetString : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListLongOctetString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -142260,8 +155761,13 @@ class ReadUnitTestingListFabricScoped : public ReadAttribute { [cluster readAttributeListFabricScopedWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListFabricScoped response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON( + @(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ListFabricScoped read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142362,6 +155868,8 @@ class WriteUnitTestingListFabricScoped : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting ListFabricScoped write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142410,6 +155918,11 @@ class SubscribeAttributeUnitTestingListFabricScoped : public SubscribeAttribute } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ListFabricScoped response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -142443,8 +155956,11 @@ class ReadUnitTestingTimedWriteBoolean : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeTimedWriteBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.TimedWriteBoolean response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting TimedWriteBoolean read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142486,6 +156002,8 @@ class WriteUnitTestingTimedWriteBoolean : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting TimedWriteBoolean write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142532,6 +156050,11 @@ class SubscribeAttributeUnitTestingTimedWriteBoolean : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.TimedWriteBoolean response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -142565,8 +156088,11 @@ class ReadUnitTestingGeneralErrorBoolean : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneralErrorBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.GeneralErrorBoolean response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting GeneralErrorBoolean read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142608,6 +156134,8 @@ class WriteUnitTestingGeneralErrorBoolean : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting GeneralErrorBoolean write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142654,6 +156182,11 @@ class SubscribeAttributeUnitTestingGeneralErrorBoolean : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.GeneralErrorBoolean response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -142687,8 +156220,11 @@ class ReadUnitTestingClusterErrorBoolean : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterErrorBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ClusterErrorBoolean response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ClusterErrorBoolean read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142730,6 +156266,8 @@ class WriteUnitTestingClusterErrorBoolean : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting ClusterErrorBoolean write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142776,6 +156314,11 @@ class SubscribeAttributeUnitTestingClusterErrorBoolean : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ClusterErrorBoolean response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -142809,8 +156352,11 @@ class ReadUnitTestingUnsupported : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeUnsupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Unsupported response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting Unsupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142852,6 +156398,8 @@ class WriteUnitTestingUnsupported : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting Unsupported write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142898,6 +156446,11 @@ class SubscribeAttributeUnitTestingUnsupported : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.Unsupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -142931,8 +156484,11 @@ class ReadUnitTestingNullableBoolean : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableBooleanWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBoolean response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableBoolean read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142967,13 +156523,18 @@ class WriteUnitTestingNullableBoolean : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithBool:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithBool:mValue.Value()]; + } [cluster writeAttributeNullableBooleanWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableBoolean write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -142981,7 +156542,7 @@ class WriteUnitTestingNullableBoolean : public WriteAttribute { } private: - bool mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableBoolean : public SubscribeAttribute { @@ -143020,6 +156581,11 @@ class SubscribeAttributeUnitTestingNullableBoolean : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBoolean response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -143053,8 +156619,11 @@ class ReadUnitTestingNullableBitmap8 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableBitmap8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap8 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableBitmap8 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143089,13 +156658,18 @@ class WriteUnitTestingNullableBitmap8 : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeNullableBitmap8WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableBitmap8 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143103,7 +156677,7 @@ class WriteUnitTestingNullableBitmap8 : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableBitmap8 : public SubscribeAttribute { @@ -143142,6 +156716,11 @@ class SubscribeAttributeUnitTestingNullableBitmap8 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap8 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -143175,8 +156754,11 @@ class ReadUnitTestingNullableBitmap16 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableBitmap16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap16 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableBitmap16 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143211,13 +156793,18 @@ class WriteUnitTestingNullableBitmap16 : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeNullableBitmap16WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableBitmap16 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143225,7 +156812,7 @@ class WriteUnitTestingNullableBitmap16 : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableBitmap16 : public SubscribeAttribute { @@ -143264,6 +156851,11 @@ class SubscribeAttributeUnitTestingNullableBitmap16 : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap16 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -143297,8 +156889,11 @@ class ReadUnitTestingNullableBitmap32 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableBitmap32WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap32 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableBitmap32 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143333,13 +156928,18 @@ class WriteUnitTestingNullableBitmap32 : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeNullableBitmap32WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableBitmap32 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143347,7 +156947,7 @@ class WriteUnitTestingNullableBitmap32 : public WriteAttribute { } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableBitmap32 : public SubscribeAttribute { @@ -143386,6 +156986,11 @@ class SubscribeAttributeUnitTestingNullableBitmap32 : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap32 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -143419,8 +157024,11 @@ class ReadUnitTestingNullableBitmap64 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableBitmap64WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap64 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableBitmap64 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143455,13 +157063,18 @@ class WriteUnitTestingNullableBitmap64 : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedLongLong:mValue.Value()]; + } [cluster writeAttributeNullableBitmap64WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableBitmap64 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143469,7 +157082,7 @@ class WriteUnitTestingNullableBitmap64 : public WriteAttribute { } private: - uint64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableBitmap64 : public SubscribeAttribute { @@ -143508,6 +157121,11 @@ class SubscribeAttributeUnitTestingNullableBitmap64 : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableBitmap64 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -143541,8 +157159,11 @@ class ReadUnitTestingNullableInt8u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt8u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt8u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143577,13 +157198,18 @@ class WriteUnitTestingNullableInt8u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeNullableInt8uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt8u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143591,7 +157217,7 @@ class WriteUnitTestingNullableInt8u : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt8u : public SubscribeAttribute { @@ -143630,6 +157256,11 @@ class SubscribeAttributeUnitTestingNullableInt8u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt8u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -143663,8 +157294,11 @@ class ReadUnitTestingNullableInt16u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt16u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt16u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143699,13 +157333,18 @@ class WriteUnitTestingNullableInt16u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeNullableInt16uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt16u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143713,7 +157352,7 @@ class WriteUnitTestingNullableInt16u : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt16u : public SubscribeAttribute { @@ -143752,6 +157391,11 @@ class SubscribeAttributeUnitTestingNullableInt16u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt16u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -143785,8 +157429,11 @@ class ReadUnitTestingNullableInt24u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt24uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt24u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt24u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143821,13 +157468,18 @@ class WriteUnitTestingNullableInt24u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeNullableInt24uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt24u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143835,7 +157487,7 @@ class WriteUnitTestingNullableInt24u : public WriteAttribute { } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt24u : public SubscribeAttribute { @@ -143874,6 +157526,11 @@ class SubscribeAttributeUnitTestingNullableInt24u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt24u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -143907,8 +157564,11 @@ class ReadUnitTestingNullableInt32u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt32uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt32u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt32u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143943,13 +157603,18 @@ class WriteUnitTestingNullableInt32u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } [cluster writeAttributeNullableInt32uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt32u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -143957,7 +157622,7 @@ class WriteUnitTestingNullableInt32u : public WriteAttribute { } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt32u : public SubscribeAttribute { @@ -143996,6 +157661,11 @@ class SubscribeAttributeUnitTestingNullableInt32u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt32u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -144029,8 +157699,11 @@ class ReadUnitTestingNullableInt40u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt40uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt40u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt40u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144065,13 +157738,18 @@ class WriteUnitTestingNullableInt40u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt40uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt40u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144079,7 +157757,7 @@ class WriteUnitTestingNullableInt40u : public WriteAttribute { } private: - uint64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt40u : public SubscribeAttribute { @@ -144118,6 +157796,11 @@ class SubscribeAttributeUnitTestingNullableInt40u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt40u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -144151,8 +157834,11 @@ class ReadUnitTestingNullableInt48u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt48uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt48u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt48u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144187,13 +157873,18 @@ class WriteUnitTestingNullableInt48u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt48uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt48u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144201,7 +157892,7 @@ class WriteUnitTestingNullableInt48u : public WriteAttribute { } private: - uint64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt48u : public SubscribeAttribute { @@ -144240,6 +157931,11 @@ class SubscribeAttributeUnitTestingNullableInt48u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt48u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -144273,8 +157969,11 @@ class ReadUnitTestingNullableInt56u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt56uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt56u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt56u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144309,13 +158008,18 @@ class WriteUnitTestingNullableInt56u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt56uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt56u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144323,7 +158027,7 @@ class WriteUnitTestingNullableInt56u : public WriteAttribute { } private: - uint64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt56u : public SubscribeAttribute { @@ -144362,6 +158066,11 @@ class SubscribeAttributeUnitTestingNullableInt56u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt56u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -144395,8 +158104,11 @@ class ReadUnitTestingNullableInt64u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt64uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt64u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt64u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144431,13 +158143,18 @@ class WriteUnitTestingNullableInt64u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt64uWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt64u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144445,7 +158162,7 @@ class WriteUnitTestingNullableInt64u : public WriteAttribute { } private: - uint64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt64u : public SubscribeAttribute { @@ -144484,6 +158201,11 @@ class SubscribeAttributeUnitTestingNullableInt64u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt64u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -144517,8 +158239,11 @@ class ReadUnitTestingNullableInt8s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt8s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt8s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144553,13 +158278,18 @@ class WriteUnitTestingNullableInt8s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithChar:mValue.Value()]; + } [cluster writeAttributeNullableInt8sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt8s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144567,7 +158297,7 @@ class WriteUnitTestingNullableInt8s : public WriteAttribute { } private: - int8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt8s : public SubscribeAttribute { @@ -144606,6 +158336,11 @@ class SubscribeAttributeUnitTestingNullableInt8s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt8s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -144639,8 +158374,11 @@ class ReadUnitTestingNullableInt16s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt16s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt16s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144675,13 +158413,18 @@ class WriteUnitTestingNullableInt16s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithShort:mValue.Value()]; + } [cluster writeAttributeNullableInt16sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt16s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144689,7 +158432,7 @@ class WriteUnitTestingNullableInt16s : public WriteAttribute { } private: - int16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt16s : public SubscribeAttribute { @@ -144728,6 +158471,11 @@ class SubscribeAttributeUnitTestingNullableInt16s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt16s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -144761,8 +158509,11 @@ class ReadUnitTestingNullableInt24s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt24sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt24s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt24s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144797,13 +158548,18 @@ class WriteUnitTestingNullableInt24s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithInt:mValue.Value()]; + } [cluster writeAttributeNullableInt24sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt24s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144811,7 +158567,7 @@ class WriteUnitTestingNullableInt24s : public WriteAttribute { } private: - int32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt24s : public SubscribeAttribute { @@ -144850,6 +158606,11 @@ class SubscribeAttributeUnitTestingNullableInt24s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt24s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -144883,8 +158644,11 @@ class ReadUnitTestingNullableInt32s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt32sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt32s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt32s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144919,13 +158683,18 @@ class WriteUnitTestingNullableInt32s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithInt:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithInt:mValue.Value()]; + } [cluster writeAttributeNullableInt32sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt32s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -144933,7 +158702,7 @@ class WriteUnitTestingNullableInt32s : public WriteAttribute { } private: - int32_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt32s : public SubscribeAttribute { @@ -144972,6 +158741,11 @@ class SubscribeAttributeUnitTestingNullableInt32s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt32s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -145005,8 +158779,11 @@ class ReadUnitTestingNullableInt40s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt40sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt40s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt40s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145041,13 +158818,18 @@ class WriteUnitTestingNullableInt40s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt40sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt40s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145055,7 +158837,7 @@ class WriteUnitTestingNullableInt40s : public WriteAttribute { } private: - int64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt40s : public SubscribeAttribute { @@ -145094,6 +158876,11 @@ class SubscribeAttributeUnitTestingNullableInt40s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt40s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -145127,8 +158914,11 @@ class ReadUnitTestingNullableInt48s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt48sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt48s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt48s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145163,13 +158953,18 @@ class WriteUnitTestingNullableInt48s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt48sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt48s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145177,7 +158972,7 @@ class WriteUnitTestingNullableInt48s : public WriteAttribute { } private: - int64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt48s : public SubscribeAttribute { @@ -145216,6 +159011,11 @@ class SubscribeAttributeUnitTestingNullableInt48s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt48s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -145249,8 +159049,11 @@ class ReadUnitTestingNullableInt56s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt56sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt56s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt56s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145285,13 +159088,18 @@ class WriteUnitTestingNullableInt56s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt56sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt56s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145299,7 +159107,7 @@ class WriteUnitTestingNullableInt56s : public WriteAttribute { } private: - int64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt56s : public SubscribeAttribute { @@ -145338,6 +159146,11 @@ class SubscribeAttributeUnitTestingNullableInt56s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt56s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -145371,8 +159184,11 @@ class ReadUnitTestingNullableInt64s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableInt64sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt64s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableInt64s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145407,13 +159223,18 @@ class WriteUnitTestingNullableInt64s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithLongLong:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithLongLong:mValue.Value()]; + } [cluster writeAttributeNullableInt64sWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableInt64s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145421,7 +159242,7 @@ class WriteUnitTestingNullableInt64s : public WriteAttribute { } private: - int64_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableInt64s : public SubscribeAttribute { @@ -145460,6 +159281,11 @@ class SubscribeAttributeUnitTestingNullableInt64s : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableInt64s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -145493,8 +159319,11 @@ class ReadUnitTestingNullableEnum8 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableEnum8WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableEnum8 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableEnum8 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145529,13 +159358,18 @@ class WriteUnitTestingNullableEnum8 : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeNullableEnum8WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableEnum8 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145543,7 +159377,7 @@ class WriteUnitTestingNullableEnum8 : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableEnum8 : public SubscribeAttribute { @@ -145582,6 +159416,11 @@ class SubscribeAttributeUnitTestingNullableEnum8 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableEnum8 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -145615,8 +159454,11 @@ class ReadUnitTestingNullableEnum16 : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableEnum16WithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableEnum16 response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableEnum16 read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145651,13 +159493,18 @@ class WriteUnitTestingNullableEnum16 : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeNullableEnum16WithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableEnum16 write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145665,7 +159512,7 @@ class WriteUnitTestingNullableEnum16 : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableEnum16 : public SubscribeAttribute { @@ -145704,6 +159551,11 @@ class SubscribeAttributeUnitTestingNullableEnum16 : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableEnum16 response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -145737,8 +159589,11 @@ class ReadUnitTestingNullableFloatSingle : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableFloatSingleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableFloatSingle response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableFloatSingle read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145773,13 +159628,18 @@ class WriteUnitTestingNullableFloatSingle : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithFloat:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithFloat:mValue.Value()]; + } [cluster writeAttributeNullableFloatSingleWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableFloatSingle write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145787,7 +159647,7 @@ class WriteUnitTestingNullableFloatSingle : public WriteAttribute { } private: - float mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableFloatSingle : public SubscribeAttribute { @@ -145826,6 +159686,11 @@ class SubscribeAttributeUnitTestingNullableFloatSingle : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableFloatSingle response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -145859,8 +159724,11 @@ class ReadUnitTestingNullableFloatDouble : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableFloatDoubleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableFloatDouble response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableFloatDouble read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145895,13 +159763,18 @@ class WriteUnitTestingNullableFloatDouble : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithDouble:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithDouble:mValue.Value()]; + } [cluster writeAttributeNullableFloatDoubleWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableFloatDouble write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -145909,7 +159782,7 @@ class WriteUnitTestingNullableFloatDouble : public WriteAttribute { } private: - double mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableFloatDouble : public SubscribeAttribute { @@ -145948,6 +159821,11 @@ class SubscribeAttributeUnitTestingNullableFloatDouble : public SubscribeAttribu } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableFloatDouble response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -145981,8 +159859,11 @@ class ReadUnitTestingNullableOctetString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableOctetStringWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableOctetString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableOctetString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146017,13 +159898,18 @@ class WriteUnitTestingNullableOctetString : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSData * _Nullable value = [[NSData alloc] initWithBytes:mValue.data() length:mValue.size()]; + NSData * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [[NSData alloc] initWithBytes:mValue.Value().data() length:mValue.Value().size()]; + } [cluster writeAttributeNullableOctetStringWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableOctetString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146031,7 +159917,7 @@ class WriteUnitTestingNullableOctetString : public WriteAttribute { } private: - chip::ByteSpan mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableOctetString : public SubscribeAttribute { @@ -146070,6 +159956,11 @@ class SubscribeAttributeUnitTestingNullableOctetString : public SubscribeAttribu } reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableOctetString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -146103,8 +159994,11 @@ class ReadUnitTestingNullableCharString : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableCharStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableCharString response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableCharString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146139,15 +160033,20 @@ class WriteUnitTestingNullableCharString : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nullable value = [[NSString alloc] initWithBytes:mValue.data() - length:mValue.size() - encoding:NSUTF8StringEncoding]; + NSString * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [[NSString alloc] initWithBytes:mValue.Value().data() + length:mValue.Value().size() + encoding:NSUTF8StringEncoding]; + } [cluster writeAttributeNullableCharStringWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableCharString write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146155,7 +160054,7 @@ class WriteUnitTestingNullableCharString : public WriteAttribute { } private: - chip::ByteSpan mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableCharString : public SubscribeAttribute { @@ -146194,6 +160093,11 @@ class SubscribeAttributeUnitTestingNullableCharString : public SubscribeAttribut } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableCharString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -146227,8 +160131,11 @@ class ReadUnitTestingNullableEnumAttr : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableEnumAttrWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableEnumAttr response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableEnumAttr read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146263,13 +160170,18 @@ class WriteUnitTestingNullableEnumAttr : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeNullableEnumAttrWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableEnumAttr write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146277,7 +160189,7 @@ class WriteUnitTestingNullableEnumAttr : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableEnumAttr : public SubscribeAttribute { @@ -146316,6 +160228,11 @@ class SubscribeAttributeUnitTestingNullableEnumAttr : public SubscribeAttribute } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableEnumAttr response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -146350,8 +160267,11 @@ class ReadUnitTestingNullableStruct : public ReadAttribute { [cluster readAttributeNullableStructWithCompletion:^( MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableStruct response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableStruct read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146409,6 +160329,8 @@ class WriteUnitTestingNullableStruct : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting NullableStruct write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146456,6 +160378,11 @@ class SubscribeAttributeUnitTestingNullableStruct : public SubscribeAttribute { } reportHandler:^(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableStruct response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -146489,8 +160416,11 @@ class ReadUnitTestingNullableRangeRestrictedInt8u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableRangeRestrictedInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt8u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableRangeRestrictedInt8u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146525,7 +160455,10 @@ class WriteUnitTestingNullableRangeRestrictedInt8u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:value params:params @@ -146533,6 +160466,8 @@ class WriteUnitTestingNullableRangeRestrictedInt8u : public WriteAttribute { if (error != nil) { LogNSError("UnitTesting NullableRangeRestrictedInt8u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146540,7 +160475,7 @@ class WriteUnitTestingNullableRangeRestrictedInt8u : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableRangeRestrictedInt8u : public SubscribeAttribute { @@ -146579,6 +160514,11 @@ class SubscribeAttributeUnitTestingNullableRangeRestrictedInt8u : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt8u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -146612,8 +160552,11 @@ class ReadUnitTestingNullableRangeRestrictedInt8s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableRangeRestrictedInt8sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt8s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableRangeRestrictedInt8s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146648,7 +160591,10 @@ class WriteUnitTestingNullableRangeRestrictedInt8s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithChar:mValue.Value()]; + } [cluster writeAttributeNullableRangeRestrictedInt8sWithValue:value params:params @@ -146656,6 +160602,8 @@ class WriteUnitTestingNullableRangeRestrictedInt8s : public WriteAttribute { if (error != nil) { LogNSError("UnitTesting NullableRangeRestrictedInt8s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146663,7 +160611,7 @@ class WriteUnitTestingNullableRangeRestrictedInt8s : public WriteAttribute { } private: - int8_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableRangeRestrictedInt8s : public SubscribeAttribute { @@ -146702,6 +160650,11 @@ class SubscribeAttributeUnitTestingNullableRangeRestrictedInt8s : public Subscri } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt8s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -146735,8 +160688,11 @@ class ReadUnitTestingNullableRangeRestrictedInt16u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableRangeRestrictedInt16uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt16u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableRangeRestrictedInt16u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146771,7 +160727,10 @@ class WriteUnitTestingNullableRangeRestrictedInt16u : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } [cluster writeAttributeNullableRangeRestrictedInt16uWithValue:value @@ -146780,6 +160739,8 @@ class WriteUnitTestingNullableRangeRestrictedInt16u : public WriteAttribute { if (error != nil) { LogNSError( "UnitTesting NullableRangeRestrictedInt16u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146787,7 +160748,7 @@ class WriteUnitTestingNullableRangeRestrictedInt16u : public WriteAttribute { } private: - uint16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableRangeRestrictedInt16u : public SubscribeAttribute { @@ -146826,6 +160787,11 @@ class SubscribeAttributeUnitTestingNullableRangeRestrictedInt16u : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt16u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -146859,8 +160825,11 @@ class ReadUnitTestingNullableRangeRestrictedInt16s : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeNullableRangeRestrictedInt16sWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt16s response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting NullableRangeRestrictedInt16s read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146895,7 +160864,10 @@ class WriteUnitTestingNullableRangeRestrictedInt16s : public WriteAttribute { params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithShort:mValue.Value()]; + } [cluster writeAttributeNullableRangeRestrictedInt16sWithValue:value @@ -146904,6 +160876,8 @@ class WriteUnitTestingNullableRangeRestrictedInt16s : public WriteAttribute { if (error != nil) { LogNSError( "UnitTesting NullableRangeRestrictedInt16s write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -146911,7 +160885,7 @@ class WriteUnitTestingNullableRangeRestrictedInt16s : public WriteAttribute { } private: - int16_t mValue; + chip::app::DataModel::Nullable mValue; }; class SubscribeAttributeUnitTestingNullableRangeRestrictedInt16s : public SubscribeAttribute { @@ -146950,6 +160924,11 @@ class SubscribeAttributeUnitTestingNullableRangeRestrictedInt16s : public Subscr } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.NullableRangeRestrictedInt16s response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -146983,8 +160962,11 @@ class ReadUnitTestingWriteOnlyInt8u : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeWriteOnlyInt8uWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.WriteOnlyInt8u response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting WriteOnlyInt8u read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -147026,6 +161008,8 @@ class WriteUnitTestingWriteOnlyInt8u : public WriteAttribute { completion:^(NSError * _Nullable error) { if (error != nil) { LogNSError("UnitTesting WriteOnlyInt8u write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON( + @(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -147072,6 +161056,11 @@ class SubscribeAttributeUnitTestingWriteOnlyInt8u : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.WriteOnlyInt8u response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -147105,8 +161094,11 @@ class ReadUnitTestingGeneratedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.GeneratedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -147150,6 +161142,11 @@ class SubscribeAttributeUnitTestingGeneratedCommandList : public SubscribeAttrib } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -147183,8 +161180,11 @@ class ReadUnitTestingAcceptedCommandList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.AcceptedCommandList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -147228,6 +161228,11 @@ class SubscribeAttributeUnitTestingAcceptedCommandList : public SubscribeAttribu } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -147263,8 +161268,11 @@ class ReadUnitTestingEventList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EventList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -147308,6 +161316,11 @@ class SubscribeAttributeUnitTestingEventList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -147343,8 +161356,11 @@ class ReadUnitTestingAttributeList : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.AttributeList response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -147388,6 +161404,11 @@ class SubscribeAttributeUnitTestingAttributeList : public SubscribeAttribute { } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -147421,8 +161442,11 @@ class ReadUnitTestingFeatureMap : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.FeatureMap response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -147466,6 +161490,11 @@ class SubscribeAttributeUnitTestingFeatureMap : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }]; @@ -147499,8 +161528,11 @@ class ReadUnitTestingClusterRevision : public ReadAttribute { queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ClusterRevision response %@", [value description]); - if (error != nil) { + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { LogNSError("UnitTesting ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; @@ -147544,6 +161576,11 @@ class SubscribeAttributeUnitTestingClusterRevision : public SubscribeAttribute { } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { NSLog(@"UnitTesting.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } SetCommandExitStatus(error); }];