Skip to content

Commit

Permalink
Missed on instance for NO_MQTT_CATEGORY
Browse files Browse the repository at this point in the history
  • Loading branch information
fredlcore committed Dec 4, 2024
1 parent 5ad80d9 commit 4823257
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions BSB_LAN/include/mqtt_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,11 @@ void mqtt_callback(char* topic, byte* passed_payload, unsigned int length) {

// New get/set hierarchy topic: BSB-LAN/<device id>/<category>/<parameter>/set|inf|poll
// Optional payload will be used for set command
#if defined(NO_MQTT_HIERARCHY)
if (sscanf(topic+topic_len, "/%d/%g/%s", &parsed_device, &parsed_parameter, parsed_command) == 3) {
#else
if (sscanf(topic+topic_len, "/%d/%d/%g/%s", &parsed_device, &parsed_category, &parsed_parameter, parsed_command) == 4) {
#endif
param.dest_addr = parsed_device;
param.number = parsed_parameter;
if (!strcmp(parsed_command, "poll")) {
Expand Down

0 comments on commit 4823257

Please sign in to comment.