tictrick
9 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
1 deletions
-
src/plugins/zeroExport/zeroExport.h
|
@ -474,11 +474,12 @@ class ZeroExport { |
|
|
*/ |
|
|
*/ |
|
|
void onMqttMessage(JsonObject obj) { |
|
|
void onMqttMessage(JsonObject obj) { |
|
|
if (!mIsInitialized) return; |
|
|
if (!mIsInitialized) return; |
|
|
mLog["t"] = "onMqttMessage"; |
|
|
|
|
|
|
|
|
|
|
|
String topic = String(obj["topic"]); |
|
|
String topic = String(obj["topic"]); |
|
|
if (!topic.indexOf("/zero/set/")) return; |
|
|
if (!topic.indexOf("/zero/set/")) return; |
|
|
|
|
|
|
|
|
|
|
|
mLog["t"] = "onMqttMessage"; |
|
|
|
|
|
|
|
|
if (obj["path"] == "zero" && obj["cmd"] == "set") { |
|
|
if (obj["path"] == "zero" && obj["cmd"] == "set") { |
|
|
int8_t topicGroup = getGroupFromTopic(topic.c_str()); |
|
|
int8_t topicGroup = getGroupFromTopic(topic.c_str()); |
|
|
mLog["topicGroup"] = topicGroup; |
|
|
mLog["topicGroup"] = topicGroup; |
|
|