Skip to content

Commit

Permalink
Set QoS and retained when publishing to /on (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
KraPete authored Dec 26, 2024
1 parent f038988 commit 5df4436
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
wb-mqtt-mbgate (1.8.4) stable; urgency=medium

* Fix writing to coils

-- Petr Krasnoshchekov <[email protected]> Thu, 26 Dec 2024 11:34:12 +0500

wb-mqtt-mbgate (1.8.3) stable; urgency=medium

* Fix service restart on CRC error
Expand Down
4 changes: 1 addition & 3 deletions src/observer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ TReplyState TGatewayObserver::OnSetValue(TStoreType type,
const void* data)
{

TMqttMessage msg;
msg.Payload = Conv->Unpack(data, count);
msg.Topic = Topic + "/on";
TMqttMessage msg(Topic + "/on", Conv->Unpack(data, count), 1, false);

Mqtt->Publish(msg);

Expand Down

0 comments on commit 5df4436

Please sign in to comment.