Connecting phones
Your phone connects to the Mosquitto broker, not to LemmeKnow Server directly. Once connected, it picks up the server's heartbeat and config and starts receiving logs from your scripts.
Connecting to a server needs LemmeKnow Premium. See Premium.
Before you start
- LemmeKnow Server is running and connected to the broker. See Installing the server.
- The broker has a listener your phone can reach, and your PC's firewall allows it. See Setting up Mosquitto.
- You know the PC's address on your network (or externally if configured for it), for example
192.168.1.10. - For a signed-in broker, you have a username and access key. See Users and authentication.
Add the server in the app
On the phone, add the server from the Dashboard with the broker's address as host:port, for example 192.168.1.10:1883. Leave Username and Access Key empty for an open broker, or enter the user's username and access key for a signed-in broker. The form, the TLS switch and the certificate check are described in Connecting to a server in the app guide.
Within a few seconds of connecting, the server's status dot turns green and its Status tab shows "LemmeKnow Standalone".
What the phone receives
| From the server | In the app |
|---|---|
| Heartbeat | Drives the status dot: green while heartbeats arrive, red once none arrives within the Heartbeat Timeout. |
| Config | Sets the Heartbeat Timeout automatically (twice the server's heartbeat interval) if none is set, and fills in the Hub URL when HUB_URL is set to an https:// address. |
| Logs | Appear in the Monitor tab and Server Monitor widget, and can trigger rules. |
| Pings | Acted on only when the code has a label from a LemmeSee Hub. See Pings. |
Several phones and several users
Any number of phones can connect to the same broker. On an open broker they all receive the same messages. With signed-in phones, give each person their own user so you can rotate or delete one key without affecting the others.
You can also add more than one server to the app. Each gets its own row, status dot, and log stream.
Related pages
- Connecting to a server in the app guide
- Troubleshooting