Documentation / LemmeKnow Server

Public and private channels

Every log and ping your scripts send goes to one of two channels: public or private. The channel is part of the MQTT topic, so the broker can decide who receives each message.

The two channels

ChannelHelper argumentTopicWho receives it
Publicpublic=Truelemmeknow/<server_id>/logs/public/<source> or .../ping/public/<code>Every phone on an open broker. Every signed-in user, unless a LemmeSee Hub has hidden that source or code from them.
Privatepublic=Falselemmeknow/<server_id>/logs/private/<source> or .../ping/private/<code>Every phone on an open broker. With sign-in, only users a LemmeSee Hub has given access to that source or code.

The helper's log functions and ping() send privately unless you pass public=True. The Logger class's ping method is the exception: it sends publicly by default.

Use public for messages anyone you share the server with should see, like "System restarting" or "Maintenance scheduled". Use private for detail meant only for you, like debug output or file paths.

What decides who receives what

The broker enforces the channels, and how it does so depends on your setup.

On an open broker (no sign-in), there's no enforcement at all. Every phone that connects receives both public and private messages. See Option 1 in Setting up Mosquitto.

With phones signing in through LemmeKnow Server, each user receives public messages only. LemmeKnow Server has no way to grant private access, so private messages reach nobody's phone.

With the LemmeSee Hub, access is per user and per source or code. Because the source (for logs) or code (for pings) is the last part of the topic, the hub can grant or hide each one separately, so it pays to give each script its own source name: a user you share the server with can get your backup logs without seeing your build logs. See Logs and pings in the hub's permissions guide.