mqttagent

MQTT Lua Agent
git clone https://git.instinctive.eu/mqttagent.git
Log | Files | Refs | README | LICENSE

commit c227f20ce4516e36764537cb958b0a5148ff1eab
parent 091c217f1417289c8f819b341f18c8409a70bd61
Author: Natasha Kerensikova <natgh@instinctive.eu>
Date:   Wed,  5 Feb 2025 18:34:47 +0000

Subscriptions and unsubscriptions are logged
Diffstat:
Mmqttagent.go | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/mqttagent.go b/mqttagent.go @@ -426,8 +426,10 @@ func luaSubscribe(L *lua.LState) int { tbl := L.RawGetInt(cnx, keySubTable).(*lua.LTable) if callback == nil { + log.Println("Unsubscribed from", topic) L.SetField(tbl, topic, lua.LNil) } else { + log.Println("Subscribed to", topic) L.SetField(tbl, topic, callback) }