diff --git a/source/pza/core/client.cxx b/source/pza/core/client.cxx index 4095c79..1286c07 100644 --- a/source/pza/core/client.cxx +++ b/source/pza/core/client.cxx @@ -359,6 +359,8 @@ device::ptr client::create_device(const std::string &topic_str) return nullptr; } + _unsubscribe(topic_str + "/device/atts/identity"); + if (json::get_string(identify_msg->get_payload_str(), "identity", "family", family) == -1) { spdlog::error("Failed to get family from device"); return nullptr; diff --git a/source/pza/core/device.cxx b/source/pza/core/device.cxx index 0de2bf2..7e8422e 100644 --- a/source/pza/core/device.cxx +++ b/source/pza/core/device.cxx @@ -19,6 +19,7 @@ void device::reset() _manufacturer = ""; } + int device::_set_identity(const std::string &payload) { std::string family;