Skip to content

Commit

Permalink
#63 Message fix
Browse files Browse the repository at this point in the history
  • Loading branch information
redakker committed Dec 27, 2023
1 parent 584edcb commit aacb27a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/bluetooth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ void BlueTooth::handleDeviceChange(Device dev) {

if (detailedReport) {
String payload = "{\"name\":\"" + ((dev.name == NULL) ? "" : dev.name) + "\", \"rssi\":\"" + ((dev.rssi == NULL) ? "" : dev.rssi) + "\", \"mac\":\"" + ((dev.mac == NULL) ? "" : dev.mac) + "\", \"presence\":\"" + database -> getPresentString(dev.available) + "\", \"observed\":\"" + ((dev.observed) ? "true" : "false") + "\", \"lastSeenMs\":\"" + (millis() - dev.lastSeen) + "\"}";
mqttMessageSend->fire(MQTTMessage{"status/" + dev.mac, payload, beaconPresenceRetain});
MQTTMessage message = MQTTMessage{ String ("status/" + dev.mac), payload, beaconPresenceRetain };
mqttMessageSend->fire(message);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/webcontent.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ BLEcker
<a class="button w100" href="/">home</a>
<a class="button w100" href="/update">update</a>
<!--<a class="button w100 button-danger" id="reset" href="#">reset</a>-->
<div class="version" id="version">v1.11 - 191</div>
<div class="version" id="version">v1.11 - 192</div>
<div class="version" id="chip"></div>
<div id="footer">
<div><a href="https://github.com/redakker/blecker" target="_blank">blecker</a></div>
Expand Down Expand Up @@ -1580,7 +1580,7 @@ BLEcker
<a class="button w100" href="/">home</a>
<a class="button w100" href="/update">update</a>
<!--<a class="button w100 button-danger" id="reset" href="#">reset</a>-->
<div class="version" id="version">v1.11 - 191</div>
<div class="version" id="version">v1.11 - 192</div>
<div id="footer">
<div><a href="https://github.com/redakker/blecker" target="_blank">blecker</a></div>
</div>
Expand Down

0 comments on commit aacb27a

Please sign in to comment.