Zanzito User Manual
Version 2.0 · 27 November 2026 · Gianluca Barbaro
- 1. Introduction
- 2. Before you start
- 3. Settings
- 4. The home screen
- 5. Moving around the app
- 6. Licence levels
- 7. Running in the background
- 8. Android permissions
- 9. Privacy
- A1. Status messages
- A2. SSL/TLS and WebSocket
- A3. Types of Report
- A4. Pictures over MQTT
- A5. Access rules with Mosquitto
- A6. The Admin module
- A7. Remote administration
- A8. Home Assistant
1. Introduction
Zanzito is an application that acts as a bridge between your Android device and an MQTT server. MQTT is a lightweight means of communication between systems, such as your home-automation system and the sensors and devices in your home. It is based on publishing messages and subscribing to topics: clients connect to a server, called the broker, publish messages to topics, and receive the messages of the topics they subscribed to.
With Zanzito your Android device becomes one of those clients. It can send to your broker:
- its current location;
- the values of its hardware sensors (battery level, light, temperature and so on);
- pictures, taken on request or at a given interval;
- any other message, through your own custom publications (“Activities”): for example a message that switches a light on or arms your alarm system. An Activity can be given a voice command, and be sent from a Quick Settings tile or a widget on the home screen without opening the app.
And it can receive:
- notifications, with text, pictures and buttons that answer on MQTT;
- audible alarms;
- texts to be read aloud;
- any other message, through your own custom subscriptions (“Reports”).
If you use Home Assistant, Zanzito can add itself to it, with an entity for each of these functions and nothing to write in the configuration of Home Assistant (§3.1, A8).
Throughout this manual, <device-name> stands for the name of the device as set in Zanzito (§3).
2. Before you start
You need an MQTT broker that your device can reach: Zanzito does not provide one.
The broker address Zanzito comes with is a public server. test.mosquitto.org is the public test server of the Eclipse Mosquitto project. It lets you check that the app connects, and nothing more: on that server everything you send can be read by anyone, and the connection is not encrypted.
Enter the address of your own broker, as described in §3.1, before you turn on location, photos or anything else. To protect the connection over the Internet, see A2.
Nothing is sent until you start the connection, with Connect on the home screen (§4).
If you connect without changing the address, Zanzito says that the broker is public and asks you to confirm before it connects; the automatic connection (§3.5) waits for that confirmation too. Once Zanzito has connected to any broker, it does not ask again.
When it starts, Zanzito asks for the Android permissions that the functions switched on at that moment need (§8). On Android 13 and later the first one is the permission to show notifications: without it you will not see the status of the connection, nor the messages and alarms that arrive.
3. Settings
The settings are under Preferences: the button at the top right of the home screen, or More → Preferences. The first item is the Device name, which Zanzito uses to build the topics it publishes and subscribes to: all of them begin with zanzito/<device-name>/. If you leave it empty, the Android ID of the device is used. Choose a short name of your own; letters, digits, underscore and full stop are allowed.
By subscribing to zanzito/# on your broker you see every message that Zanzito sends.

3.1 MQTT connection
Under MQTT Connection you set:
- Host — the address of the broker, without any prefix such as
tcp://. Default:test.mosquitto.org(see §2); - Port — default 1883;
- MQTT over WebSocket — connects through a WebSocket:
ws://, orwss://with SSL/TLS on. Use it when the broker is reached through a web server, a reverse proxy or a tunnel; the port is then that of the web server (usually 443, with SSL/TLS) or of the WebSocket listener of the broker. Off by default (A2); - WebSocket path — the path after the address, as the web server expects it. Default:
/mqtt.
Under Security:
- Username and Password, both optional;
- SSL/TLS connection;
- Import CA certificate and Delete CA certificate, for brokers whose certificate is signed by an authority of your own (A2).
Under Home host you can give Zanzito a second address for the same broker, to be used when the device is on your home network:
- WiFi SSID(s) — the name of your home Wi-Fi network, or several names, one per line;
- Home host and Port — if left empty, those of the main connection are used;
- SSL/TLS connection, MQTT over WebSocket and WebSocket path for the home address. An empty path is that of the main connection.
When the device is connected to one of those networks Zanzito switches to the home address, and back to the main one when it leaves. A common setup is a plain MQTT connection at home and a WebSocket with SSL/TLS outside.
Android shows the name of the Wi-Fi network only to apps that hold the Location permission, with location switched on. When you enter a home network, Zanzito asks for the permission; if it is still missing when Zanzito starts, Zanzito explains why it needs it and asks again. Without location tracking, Zanzito uses the permission only to read the name of the network. If you refuse, it stays on the main address, and the log says why.
Under Update modes you decide when Zanzito sends its updates:
- Instantly — as soon as a sensor value or the location changes. Sensors that measure all the time, such as the accelerometer, the gyroscope and the magnetometer, are sent at most every 5 seconds; the others, such as light and proximity, at every change;
- Heartbeat — at regular intervals: every Interval seconds (default 90) Zanzito sends the current value of all the selected sensors, the location and its status.
You can also ask for an update by hand, with Report on the home screen, or remotely (A7).
Under Home Assistant:
- Home Assistant discovery — Zanzito publishes the configuration of the device, and Home Assistant adds it by itself, with its entities (A8). Off by default;
- Discovery prefix — the one set in the MQTT integration of Home Assistant. Default:
homeassistant.
3.2 Outbound
What Zanzito sends: location, sensors, photos.
Location
- Track Location — when on, the position of the device is sent to:
zanzito/<device-name>/location {"battery_level":87,"longitude":9.19,"latitude":45.46,"altitude":120.0,"gps_accuracy":12,"tst":1795460000}gps_accuracyis in metres,tstis the Unix time of the message, andbattery_levelis present only if Battery level is selected among the sensors. Turning this on makes Zanzito ask for the Location permission (§8); - High precision — uses GPS. More accurate, and heavier on the battery;
- Minimum distance — how many metres the device has to move before a new position is sent. Default 10; very low values drain the battery;
- Share my location — lets the other Zanzito devices on the same broker see this one on their map. At every update a second, retained message is published:
(zanzito/shared_locations/<device-name> {"battery_level":87,"longitude":9.19,"latitude":45.46,"altitude":120.0,"gps_accuracy":12,"user":"<device-name>","tst":1795460000}battery_levelonly if Battery level is selected). Sharing works both ways: this device shows the others on its map only while it shares its own position. Who sees whom can be restricted with the access rules of the broker (A5). When you turn sharing off, Zanzito clears that message at the next update.
FIND integration. FIND is an indoor-positioning server that tells which room a device is in from the Wi-Fi networks it sees. When enabled, Zanzito publishes the Wi-Fi fingerprint of the device — the access points in range and their signal strength — to the topics that a FIND server connected to the same broker listens to:
<group-name>/track/<device-name>
<group-name>/learn/<device-name>/<location-name>
- Enable FIND, and Group name, which is required. Android may ask you to allow Wi-Fi scanning even when Wi-Fi is off;
- Only when at home — active only while the device is on the home Wi-Fi set in §3.1; without a home network it switches itself off;
- Learn — with the connection active, enter the name of the place you are in, and Zanzito keeps sending its fingerprint as a learning sample. A notification shows the progress: touch it to stop. Leave it running for a few minutes without moving the device.
FIND and the Owntracks emulation below are available only with Track Location on. You need a FIND server of your own; refer to its documentation. Current versions of Android limit how often an app may scan for Wi-Fi networks, so the fingerprint is refreshed less often than it was on older ones.
Owntracks emulation. When on, the position is published in the format of the OwnTracks app, instead of on zanzito/<device-name>/location:
owntracks/<user>/<device>
{"_type":"location","tid":"ph","batt":87,"lon":9.19,"lat":45.46,"alt":120.0,"acc":12,"tst":1795460000}
<user>is the broker user name of §3.1, or the device name if there is no user name;<device>is the Device ID, or the device name if it is empty;- Tracker ID is the two-character
tid; if empty, the last two characters of the Device ID are used, or__if that is empty too.
Changed in version 2.0. Earlier versions built this topic the wrong way round: owntracks//<device> without a user name, and the device name in place of the user name when there was one. If you used the emulation, update the topic in your automations.
Home Assistant does not need this emulation (A8).
Sensors
The list shows Battery level and the hardware sensors your device has. Tick the ones you want. Each is published to a topic of its own, named after the sensor in lower case with underscores:
zanzito/<device-name>/battery_level 87
zanzito/<device-name>/<sensor_name> <value>
A sensor with a single value, such as light or pressure, sends a number. Sensors with several values, such as the accelerometer, the gyroscope or the magnetometer, send a JSON object:
zanzito/<device-name>/<sensor_name> {"value0":0.12,"value1":9.78,"value2":0.40}
Photos
- Enable camera — switches all the camera functions on or off. It is on by default: turn it off if you do not use them;
- Send photos — takes and sends a picture automatically, every Interval seconds (default 60). Useful for a device fixed to a wall, used as a camera for your home system;
- Shutter click — plays a sound when you take a picture by hand;
- Share photos — every picture is also published for the other Zanzito devices on the broker, which show it in their Gallery. It can generate a lot of traffic;
- Camera — which camera to use;
- Autofocus — shown only on devices that support it. If the camera gives errors, try turning it off.
Pictures taken by Zanzito are turned upright and stamped with the date and time. They are sent as JPEG, as the binary payload of the message:
zanzito/<device-name>/picture <binary data>
zanzito/shared_pictures/<device-name> <binary data> (only with Share photos; retained)
Your system must be able to take the image out of the payload: see A4, and A8 for Home Assistant, which can do it by itself. Zanzito also sends the pictures that other apps share to it.
3.3 Inbound
What Zanzito accepts from the broker. Text notifications, photos, alarms and texts to read aloud (§3.4) are received by default: switch off what you do not use, since whoever can publish on your broker can make the device ring or speak.
Push notifications
- Receive text notifications — the text published to
zanzito/<device-name>/notificationis shown in the log and, if you want, as an Android notification. The message can also be a JSON object with a title, buttons and a picture (below); - Receive photos — the same for a picture published to
zanzito/<device-name>/photonotification; - Android notification and Notification sound;
- Read notifications — reads the title and the text aloud, if text to speech is enabled (§3.4).
Notifications with buttons, pictures and channels
Instead of plain text, the notification topic accepts a JSON object. Only title or message is needed; add the other keys as you need them:
{"title": "Front door", "message": "Someone rang the bell",
"channel": "Doorbell", "priority": "high", "tag": "door",
"image": "http://192.168.1.20/snapshot.jpg",
"actions": [{"title": "Open the gate", "topic": "home/gate/set", "payload": "open"},
{"title": "Ignore"}]}

| Key | Value |
|---|---|
title | The title of the notification. |
message | The text. |
channel | The name of an Android notification channel, up to 40 characters. Zanzito creates the channel the first time a message uses it; from then on its sound and its importance are set in the Android settings of Zanzito, channel by channel, and can be different for each kind of message. |
priority | min, low, default, high or max. With high and max the notification pops up on the screen; with min and low it makes no sound. A new channel takes it as its importance; without a channel, the message goes to a channel for that priority, such as “Messages, high priority”. |
tag | A notification with the same tag replaces the one on the screen instead of adding another one. {"tag": "door", "clear": true} removes it and shows nothing. |
actions | Up to three buttons. Touching one publishes its payload to its topic (QoS 1, not retained) and closes the notification. Without topic, the payload goes to zanzito/<device-name>/action; without payload, the title is sent. If the message cannot leave, because the connection is off, the notification stays there. |
image | The http:// or https:// address of a picture, shown in the expanded notification. The device must be able to reach it without a login; up to 8 MB. If the picture cannot be downloaded, the notification arrives without it and the log says why. |
A message without channel and priority goes to the usual channel, with the Notification sound you selected. On Android 7 and earlier there are no channels: the priority applies to the single notification. A JSON message without title and message is shown as it arrived, as before.
The buttons that publish outside the topics of the device need the permission to write there on the broker (A5). For Home Assistant, see A8.
Play alarm
When Play alarm is on and a message arrives at:
zanzito/<device-name>/alarm/play <message>
Zanzito plays the Alarm sound you selected, and keeps playing it until it is stopped. A notification shows the message: touch it to stop the sound. Whenever a ringing alarm is stopped, from the notification or from the broker, Zanzito publishes:
zanzito/<device-name>/alarm ack
The alarm can also be stopped from the broker, by publishing to zanzito/<device-name>/alarm/stop. Override “silent” mode makes the alarm sound even when the device is silenced.
Earlier versions could also send an SMS on request from the broker. That function was removed in version 2.0, because Google Play no longer allows it for this kind of app.
3.4 Voice
Text to speech
Zanzito speaks through the text-to-speech engine of your device, in the language set for that engine in the Android settings. With Enable Text to speech on, it can be used for:
- push notifications, if Read notifications is on (§3.3);
- Reports, if Read the message aloud is on in the single Report;
- the spoken confirmation of voice commands.
With Say MQTT texts on, the device is also a speaker for your system: any text published to zanzito/<device-name>/say is read aloud.
Audio stream for TTS selects the channel the voice is played on (default: Notification). If you choose Multimedia, the voice is muted while continuous listening is active.
Voice commands
With Enable voice commands on, any Activity can be sent by saying its command. While the connection is active, you start listening with Voice on the home screen or Voice command in Zanzito's notification; on Android 15 and earlier with three-button navigation, also by holding Back down. Both buttons appear only while voice commands are on, and not while continuous listening is on.
The command is set in each Activity: type it in Voice command, or touch the microphone next to it and say it. If Use the spoken words as payload is on in the Activity, whatever you say after the command is sent as the payload.
With Vocal confirmation on, Zanzito answers “OK” and the name of the Activity, or “Command not found”. You can replace that answer with a sentence of your own, or with several, one per line. The log (More → View logs) shows what was understood and what was sent.
Speech recognition is done by the recognition service of your device — on most devices, Google's. See the privacy policy for what that implies.
Continuous listening
This function is experimental and may not work on your device: if it gives problems, turn it off.
With Continuous listening on, Zanzito keeps listening while the connection is active and reacts when it hears the Keyword you chose: touch Keyword and say the word. To give a command, say:
Please <keyword>, <voice command of the Activity> <optional payload>
“Please” can be any other word, as long as it is not too short. While this is active the Multimedia audio stream of the device is muted, and the battery drains quickly: Only when plugged in, on by default, suspends listening when the device runs on battery.
3.5 More settings
- Automatic connection — starts the connection as soon as Zanzito is opened;
- Autostart Zanzito — starts the connection when the device is switched on, without opening the app. It requires Automatic connection. See §7 for what Android allows after a restart;
- Remote administration — lets this device be managed through the broker: by the Admin module of another Zanzito device, or by MQTT messages (A7). Off by default. Read A7 before turning it on;
- Show Admin module — shows or hides Admin in More (A6);
- Parental control — with Enable password on and a Password set, the password is asked before opening the preferences, disconnecting and quitting Zanzito.
The parental-control password is a very basic protection, meant to keep children from changing the settings: it is not a security measure. If you forget it, the only way to reset it is to uninstall Zanzito and install it again, which erases all its settings.
4. The home screen

At the top, the name of the device; the button on the right opens the Preferences (§3).
The connection card says whether Zanzito is Connected, Connecting… or Not connected: the dragonfly is lit while the connection runs, dimmed when it is off. Under the state are the main address and the port of the broker, with WebSocket when it is used (the home address of §3.1 is not shown), and the button that starts or stops the connection: Connect or Disconnect. If the parental control is on (§3.5), Disconnect asks for the password.
Two cards follow:
- Location — Off if location tracking is switched off in the preferences, otherwise the state of the position: Not running while the connection is off, No fix until a position arrives, Fix OK, or Unavailable if the device's location is switched off. Below it, the minimum distance of §3.2;
- Sensors — how many sensors are sent, and which.
The quick actions:
- Report — sends a heartbeat now: status, sensors and position (§3.1);
- Photo — takes a picture and sends it, even if automatic sending is off. The picture is then shown full screen;
- Bookmark — saves the current position, on the device only; the map shows it;
- Voice — starts a voice command (§3.4).
All four need the connection to be active; Photo also needs Enable camera, Bookmark needs Track Location, and Voice appears only while voice commands are on (§3.4). At the bottom, Last messages shows the last one sent and the last one received; View logs opens the whole log.
Turned sideways, the home screen puts the connection card on the left and the rest on the right.
5. Moving around the app
The bar at the bottom leads to the five parts of the app: Home, Activities, Reports, Map and More.
Activities


Your list of publications. Each row shows the name, the topic and the payload, and after the first send the last payload sent. Touch the row, or its arrow, to send it. An Activity on a Quick Settings tile shows the number of the tile next to its name. The menu of the row (⋮) has Edit, Clone, Delete and Info, and Add to Quick Settings… and Add to home screen… (see Tiles and widgets). A long press starts the multiple selection, with Select all, Cut, Copy, Delete and Add to home screen; what you copy can be pasted in this list or in that of another device (A6).
The + button adds an Activity. The button at the top right opens the discovery of the topics on your broker, from which a topic can be imported (A6).
An Activity has:
- Name, Topic and Payload. In the topic you can write
%devicename%: it is replaced by the device name when the message is sent. The topic of an Activity cannot contain the#and+wildcards; - Icon — the button on the left of the name: one of twenty pictures, which tiles and widgets show;
- Voice command, and Use the spoken words as payload (§3.4);
- Retained — the broker keeps the last message and gives it to whoever subscribes later.
Under Shortcuts, the ways of sending it without opening the list:
- Send on shake — the Activity is sent every time you shake the device. Only one Activity at a time can have it: choosing another moves it there, and the row of that Activity shows a shake icon. This keeps the accelerometer on and uses more battery;
- Quick Settings tile — the tile that holds it, or None; touch it to choose;
- Add to home screen — places a widget with this Activity only;
- Allow from the lock screen — lets its tile send it while the phone is locked. Off by default.
Tiles and widgets need an Activity with a fixed payload: one that uses the spoken words cannot go there, and the screen says so. They belong to this device, so the Admin module (A6) does not show them for the Activities of another device.
Send test sends it as it is. Changes are saved when you leave the screen.
Tiles and widgets

An Activity can be sent without opening Zanzito: from a tile of Quick Settings, the panel of tiles that opens when you swipe down from the top of the screen, or from a widget on the home screen. Neither of them starts the connection: they send only while Zanzito is connected, and otherwise they say so.
Quick Settings tiles
Zanzito has three tiles (Android 7 and later), Zanzito 1, 2 and 3, each holding one Activity. To put an Activity on a tile, choose Add to Quick Settings… in the menu of its row, or Quick Settings tile in the Activity, then the tile: if it already holds another Activity, the tile switches to this one. On Android 13 and later Zanzito then asks Android to add the tile to the panel, if it is not there yet. On earlier versions, swipe down Quick Settings, touch the pencil and drag the tile among the others.
The tile shows the name and the icon of its Activity. Touch it to send the Activity: the tile lights up and says Sent for three seconds, or Not sent if the message could not leave. While Zanzito is not connected the tile is greyed out and says Zanzito offline. The texts under the name, here and below, appear from Android 10.
A tile without an Activity says Choose an Activity, and touching it opens the choice. A long press on any Zanzito tile opens the same choice, where None frees the tile.
On a locked phone the tile says Unlock to send and asks you to unlock first. To send an Activity from the lock screen too, switch on Allow from the lock screen in the Activity. Do it only for messages that anyone holding your phone may send: the tile can then be used without unlocking.
Widgets
Two widgets, in the list of widgets of the home screen under Zanzito:
- Zanzito Activity — one button for one Activity, with its icon and name; at the size of one cell, the icon over the name. When you place it, Zanzito asks which Activity it sends.
- Zanzito Activities — a grid of buttons under a header with the state of the connection: Connected, Demo when connected in Demo mode (§6), or Offline. It shows all the Activities that can be sent, in alphabetical order, or only those you choose, in your order: in its settings choose Only these, tick them and hold a row to drag it up or down. The buttons fit the size of the widget, and the grid scrolls when there are more than fit. Touch the header to open Zanzito.
The quickest way to place them is from the list of Activities: Add to home screen… in the menu of a row, or Add to home screen in the Activity, places a Zanzito Activity widget for that Activity; selecting several Activities with a long press and choosing Add to home screen places a Zanzito Activities widget with those. The home screen asks you to confirm. On Android 7 and earlier, or with a home screen that does not let apps add widgets, these items are not shown: add the widgets from the list of widgets.
Touch a button to send its Activity: it says Sent, or Not sent. While Zanzito is not connected the buttons are dimmed and open Zanzito instead. To change what a widget sends, hold it on the home screen and open its settings. If the Activity of a Zanzito Activity widget is deleted, the widget says Activity not found, and touching it opens the choice again.
Android redraws widgets when the home screen is in view: a widget may show a change of the connection only when you go back to it.
Reports


Your list of subscriptions, managed in the same way. Each row shows the last value received. Touch the row, or its i button, for the details: the last value and when it arrived; for a Report of type Picture, the picture.
A Report has a Name, a Topic and a Type (A3); a JSON key for the type JSON. It can be switched off with Enabled, show an Android notification, with the sound you choose, and Read the message aloud (§3.4). As in Activities, %devicename% in the topic is replaced by the device name. The topic of a Report can use the MQTT wildcards, as whole levels: + stands for one level, # for all the remaining ones and goes only at the end. For example home/+/temperature receives the temperature of every room. A message that matches several Reports updates all of them.
Map
Your position, the position you bookmarked, and the other Zanzito devices on the broker that share theirs, while this device shares its own (§3.2). The zoom adjusts to show them all; touch a marker and change the zoom, and the map follows that device. From the menu at the top right, Reload goes back to the automatic zoom and Screen on keeps the screen awake.
More


- Gallery — the pictures shared on your broker by the other devices, while this one has Share photos on (§3.2). They are downloaded only while this screen is open. Touch a picture to see it full screen, zoom it, share it with another app or delete it. Deleting removes it from the device only: shared pictures are retained by the broker, and come back as long as they are there.
- View logs — the messages received and sent, newest first. All, Received and Sent filter them; Pause stops the list while you read, and Copy puts it in the clipboard.
- Admin — the Zanzito devices on your broker, and the discovery of its topics (A6). It can be hidden (§3.5).
- Preferences (§3).
- Buy license — see §6. It disappears once Zanzito is fully unlocked.
- User Manual (this manual; a PDF viewer is required), About Zanzito and Quit Zanzito, which stops the connection and closes the app (§7).
6. Licence levels
Once installed, Zanzito works in Demo mode:
- the connection lasts 120 minutes from the moment it starts; after that it cannot be started again until four hours have passed since that moment. A “Zanzito Demo” notification shows the minutes left;
- you can add only one Activity and one Report;
- the Admin module manages this device only.
Two licences are available from More → Buy license:
- Base — unlocks everything except the Admin module for other devices. It is bought inside the app and is not shared with your family group. To move from Base to Full, buy Full;
- Full — unlocks everything, for good. It is a separate app on Google Play, Zanzito License: buy it, install it and leave it installed. It can be shared with your family group through Google Play Family Library.
Purchases belong to your Google account: on a new device, sign in to Google Play with the same account and Zanzito finds them.
7. Running in the background
While the connection is active, Zanzito runs as a foreground service and shows a status notification. Its buttons give a voice command, save the current position as the bookmark and publish it, and take a picture, each when the corresponding function is on; when the connection is off, Start starts it again (not in Demo mode). If the buttons are not visible, expand the notification.
Closing the app from the list of recent apps does not stop the connection: touch the notification to bring Zanzito back. To stop everything, choose More → Quit Zanzito.
Current versions of Android put limits on what an app may do when it is not on screen:
- Location. To keep sending the position with the app closed, or after a restart of the device, Zanzito needs the Location permission set to “Allow all the time”. Otherwise the position is sent only while the app is open.
- Camera and microphone. On Android 14 and later they can be switched on only while Zanzito is on screen. Once on, they stay available for as long as the connection runs, with the app closed too.
- After a restart of the device. With Autostart Zanzito, the connection, the notifications, the alarms and — with “Allow all the time” — the location start by themselves. Photos and voice commands become available again the first time you open the app.
- Battery optimisation. If your device stops the connection after a while, exclude Zanzito from battery optimisation in the Android settings.
8. Android permissions
Zanzito asks for a permission only when a function that needs it is switched on:
- Notifications (Android 13 and later) — the status notification, and the messages and alarms that arrive;
- Location — asked for when Track Location is on, or when a home network is set (§3.1). Before Android's own request, Zanzito shows a screen that explains what it is for. Choose “Allow all the time” if you want tracking in the background (§7). FIND depends on this permission too;
- Camera — the photo functions;
- Microphone — voice commands.
If you refuse a permission, Zanzito switches off the setting that needs it — Track Location, Enable camera or Enable voice commands — and says so; switch it on again to be asked again. The other functions carry on. Permissions can be changed at any time in the Android settings.
9. Privacy
Zanzito sends what it collects to the broker set in its preferences, and to nobody else: its developer cannot see your data and has no connection to your device. This also means that the security of your data is the security of your broker: make sure the connection is encrypted, and that users and permissions on the broker are set up properly.
Do not use public MQTT servers unless you know what you are doing: anyone can read your position, your pictures and anything else that Zanzito exchanges there.
Installing Zanzito on someone else's device without their knowledge and consent is forbidden by the licence, and in many countries it is a crime.
The complete privacy policy and the licence agreement are on the Zanzito website.
A1. Status messages
Every time it connects, and at each heartbeat, Zanzito publishes its state. You can use these messages on your system to follow each device and what it can do.
| Topic | Payload | Meaning |
|---|---|---|
zanzito/<device-name>/status | 1 / 0 | Connected or not. Retained. 0 is also the last-will message, so the broker publishes it by itself if the connection is lost. |
zanzito/<device-name>/version | text | The version of Zanzito. Retained. |
zanzito/<device-name>/services | JSON | The functions switched on in the device (below). Retained. |
zanzito/<device-name>/notification | 1 / 0 | Text notifications accepted or not. |
zanzito/<device-name>/alarm | 1 / 0 / ack | Alarm requests accepted or not; ack when a ringing alarm has been stopped, on the device or with alarm/stop. |
zanzito/<device-name>/say | 1 / 0 | Texts to be read aloud accepted or not. |
The services message, new in version 2.0:
{"remote_admin":false,"notifications_enabled":true,"send_sms_enabled":false,"play_alarm_enabled":true,
"find_enabled":false,"location_enabled":true,"tts_enabled":true}
send_sms_enabled is always false: it is kept for the systems that read it.
A2. SSL/TLS and WebSocket
If your broker can be reached from outside your home network, do not connect to it without encryption. Zanzito supports SSL/TLS connections with user name and password; it does not support client certificates.
If the certificate of your broker is signed by a recognised authority, enabling SSL/TLS connection under Preferences → MQTT Connection → Security, and setting the right port, is all it takes.
If it is signed by an authority of your own, copy the CA certificate (usually ca.crt) to the device and import it with Import CA certificate in the same screen, or install it among the certificates of Android. Then enable SSL/TLS connection.
For Mosquitto, the configuration of the server side is described in its documentation: mosquitto-tls.
An alternative to exposing the broker is to reach it through a VPN to your home network. In that case Zanzito needs nothing special: it connects to the address the broker has on that network.
Through a web server: MQTT over WebSocket
If you already publish Home Assistant or another site on port 443, with a reverse proxy or a tunnel, the broker can be reached the same way, without opening a port of its own. The broker needs a WebSocket listener; for Mosquitto, in mosquitto.conf:
listener 9001
protocol websockets
The web server passes a path of your choice to that listener, as a WebSocket. For example, with nginx:
location /mqtt {
proxy_pass http://127.0.0.1:9001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 300s;
}
Zanzito keeps the connection alive with a message every 90 seconds, so the web server must not close a quiet connection sooner: nginx does it after 60 seconds, hence proxy_read_timeout.
In Zanzito: Host is the name of your site, Port 443, SSL/TLS connection and MQTT over WebSocket on, WebSocket path /mqtt. The certificate is that of the web server: if it comes from a recognised authority, such as Let's Encrypt, there is nothing to import. User name and password are still those of the broker.
A3. Types of Report
- Generic text — shows the text of the payload. It reacts only when the value changes: a message equal to the previous one does not notify and is not read aloud.
- Alarm — every message plays the selected alarm sound until it is stopped from its notification. Keep Android notification on in an Alarm Report: without it, the sound stops only with
alarm/stop(with Play alarm on) or with Quit Zanzito. - Picture — for topics whose payload is an image. A preview is shown in the expanded Android notification, if notifications are enabled for the Report.
- Notification — shows a text payload, or a JSON message with the keys
titleandmessage: the title becomes the title of the Android notification. - JSON — for JSON messages: enter a name in the Key field and the value of that key is extracted from each message. Like Generic text, it reacts only when the value changes.
A4. Pictures over MQTT
The two scripts below use the Eclipse Paho client for Python, version 2 (pip install paho-mqtt). Home Assistant needs neither (A8).
Saving the pictures sent by Zanzito
Subscribes to the picture topic of a list of devices and saves each picture it receives as <device-name>.jpg.
#!/usr/bin/env python3
import os
import paho.mqtt.client as mqtt
BASE_DIR = "path-to-images-directory"
SERVER = "<server-address>"
PORT = 1883
USERNAME = "<mqtt-username>"
PASSWORD = "<mqtt-password>"
# Device names of the Zanzito devices to follow
DEVICES = ["<device-name-1>", "<device-name-2>"]
def on_connect(client, userdata, flags, reason_code, properties):
for device in DEVICES:
client.subscribe("zanzito/" + device + "/picture")
def on_message(client, userdata, msg):
device = msg.topic.split("/")[1]
with open(os.path.join(BASE_DIR, device + ".jpg"), "wb") as image:
image.write(msg.payload)
client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2)
client.username_pw_set(USERNAME, PASSWORD)
client.on_connect = on_connect
client.on_message = on_message
client.connect(SERVER, PORT, 60)
client.loop_forever()
Sending a picture to Zanzito
Publishes a JPEG file to a topic — for example zanzito/<device-name>/photonotification, or the topic of a Report of type Picture:
mqtt_send_file.py <topic> <image-file-path>
#!/usr/bin/env python3
import sys
import paho.mqtt.client as mqtt
SERVER = "<server-address>"
PORT = 1883
USERNAME = "<mqtt-username>"
PASSWORD = "<mqtt-password>"
topic = sys.argv[1]
image_path = sys.argv[2]
with open(image_path, "rb") as image:
data = image.read()
client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2)
client.username_pw_set(USERNAME, PASSWORD)
client.connect(SERVER, PORT, 60)
client.loop_start()
client.publish(topic, data, qos=1).wait_for_publish()
client.loop_stop()
client.disconnect()
Neither script checks its arguments or handles errors: they are a starting point.
A5. Access rules with Mosquitto
With the sharing functions on, every Zanzito device publishes its position and its pictures to all the others. To decide who sees whom, give each device a user of its own on the broker and limit what each user can read. With Mosquitto, add the reference to an access-control file to the configuration (usually /etc/mosquitto/mosquitto.conf):
acl_file /etc/mosquitto/local.acl
and in that file define, for example, a user that can do everything:
user myadministrator
topic readwrite #
and the ordinary users:
user normal_user
topic readwrite zanzito/<normal-user-device-name>/#
topic readwrite zanzito/shared_locations/<normal-user-device-name>
topic readwrite zanzito/shared_pictures/<normal-user-device-name>
topic read zanzito/shared_locations/Another_Device
topic read zanzito/shared_pictures/Another_Device
Here normal_user can publish and subscribe to the topics of its own device, and sees the shared position and pictures of Another_Device only. If the device uses FIND, add a line for the topics of its group (topic readwrite <group-name>/#); if it uses the Owntracks emulation or custom topics, add theirs. Restart Mosquitto for the changes to take effect.
If the device uses Home Assistant discovery (A8), it must also be able to publish its configuration and to read the status of Home Assistant, with the prefix you set if it is not the default one:
topic write homeassistant/device/zanzito_<normal-user-device-name>/config
topic read homeassistant/status
In that topic a full stop in the device name becomes an underscore.
For other brokers, refer to their documentation.
A6. The Admin module
More → Admin shows all the Zanzito devices that ever connected to your broker. It works in real time: this device and the one you want to manage must both be connected, the other one must have Remote administration switched on, and all of them should run the same version of Zanzito.
Touch a device to open its overview. Long-press it for a menu from which you can manage it or delete it: deleting a device erases from the broker all the retained messages that belong to it.
In Demo mode, and with a Base licence, you can manage the device you are using only. Managing the others requires a Full licence (§6).


Current topics discovery
Discover current topics, at the top of the Admin screen and behind the button at the top right of Activities and Reports, lists the topics that are alive on your broker. Give it some time: only retained topics appear at once, the others when something is published to them. From the menu of an item you can import the topic as an Activity or as a Report, or delete it from the broker. While this screen is open the list keeps updating and the normal functions of Zanzito are suspended; the button at the top right pauses and resumes the list.
Device overview
If the device is online and has Remote administration on, the overview shows whether it is connected, the version of Zanzito it runs and its battery level. Under Manage are its Prefs, Activities and Reports, its Logs, its position on the Map and, under Info, the details below. Further down, the remote commands:
- Restart and Reconnect — restart the connection to the broker. Since version 2.0 Restart no longer restarts the app;
- Take Picture — takes a picture, if the camera is enabled and available on that device (§7). To see it, open your Gallery if that device shares its photos, or add a Report of type Picture on
zanzito/<device-name>/picture; - Send heartbeat — makes it send a full report;
- Set bookmark — saves its current position as its bookmark, and publishes the position;
- Play Alarm and Stop Alarm — Play alarm must be on in its preferences.
Device details
With Remote administration on, at every heartbeat the device publishes, retained:
zanzito/<device-name>/device_info
| Key | Value | Description |
|---|---|---|
time | number | Unix time of the update |
device_info | text | Manufacturer, model and Android version |
battery_level | number | Battery charge, in per cent |
battery_charging | true/false | Whether the battery is charging |
charge_type | text | AC, USB, Wireless, None or N/A |
current_foreground_app | text | The app in the foreground. Current versions of Android show an app only its own processes, so this is Zanzito itself or empty |
screen_on | true/false | Whether the screen is on |
screen_locked | true/false | Whether the screen is locked |
screen_orientation | text | Portrait, Landscape or N/A |
current_wifi | text | Name (SSID) of the Wi-Fi network in use; needs the Location permission |
current_operator | text | Name of the mobile operator |
The values are read at each heartbeat: send a Send heartbeat command before opening Info if you want them fresh.
Preferences, Activities and Reports of another device
Prefs shows almost all the preferences of the remote device. Change what you need: nothing is applied until you press Upload. Copy puts all of them in the clipboard, and Paste in the preferences of another device overwrites them, cloning the first device: remember to change the Device name before uploading.
Activities and Reports show the custom topics of the remote device. The list supports multiple selection, with select all, cut, copy, paste and delete; you can copy and paste between a remote device and this one, edit, clone and add items as you do with your own, and send an Activity with its arrow button. Here too, changes are applied when you press Upload.
A7. Remote administration
With Remote administration on (§3.5), the device accepts settings and commands from the broker. The Admin module of another Zanzito device uses exactly these messages; you can send them yourself with any MQTT tool.
Whoever can publish to this device's topics on your broker controls it: can change its settings, make it take a picture, read its configuration. Turn Remote administration on only with a broker of your own, with encryption and access rules in place (A2, A5) — never on a public server.
Configuration backup and restore
With Remote administration on, at each heartbeat and shortly after the preferences change (Activities and Reports included) Zanzito publishes its configuration, retained, to:
zanzito/<device-name>/lastprefs
The payload is an encoded text. It contains every setting except the passwords: the broker password and the parental-control password never leave the device. Everything else is there — broker address and user name, home network, Activities and Reports — and it is encoded, not encrypted: keep that topic readable only by you. You can save it by subscribing to the topic with any MQTT tool.
To restore a saved configuration:
- configure Zanzito to connect to your broker and start the connection;
- turn Remote administration on;
- publish the saved text to
zanzito/<device-name>/restore_prefs.
Zanzito applies the configuration and restarts the connection. If it comes from another device, change the Device name straight away. The passwords are not in the copy: a restore leaves those already on the device as they are; on a new device, enter them again.
Setting preferences
Publish a JSON object with one or more of the keys below to:
zanzito/<device-name>/set_prefs
{"updates_heartbeat_interval":"120","location_share":false}
Zanzito applies the values and restarts the connection. It is all or nothing: if a key is unknown or a value has the wrong type, nothing is applied and the log says why. Values marked text must be sent as strings, numbers included. A preference set remotely does not grant the Android permission it depends on: that can only be done on the device.
| Key | Value | Preference |
|---|---|---|
device_name | text | Device name |
custom_topics | text | Activities and Reports, as the Admin module encodes them |
| MQTT connection | ||
host | text | Broker address |
port | text | Broker port |
username | text | Username |
password | text | Password |
tls | true/false | SSL/TLS connection |
websocket | true/false | MQTT over WebSocket |
websocket_path | text | WebSocket path |
home_ssid | text | Home Wi-Fi name(s) |
home_host | text | Home broker address |
home_port | text | Home broker port |
home_tls | true/false | SSL/TLS connection for the home address |
home_websocket | true/false | MQTT over WebSocket for the home address |
home_websocket_path | text | WebSocket path for the home address |
updates_instant | true/false | Instant updates |
updates_heartbeat | true/false | Heartbeat |
updates_heartbeat_interval | text | Heartbeat interval, in seconds |
ha_discovery_enabled | true/false | Home Assistant discovery |
ha_discovery_prefix | text | Discovery prefix |
| Location | ||
location_active | true/false | Track Location |
location_high_precision | true/false | High precision |
location_minimum_distance | text | Minimum distance, in metres |
location_share | true/false | Share my location |
find_enable | true/false | Enable FIND |
find_enable_only_home | true/false | FIND only when at home |
find_group_name | text | FIND group name |
owntracks_enabled | true/false | Emulate Owntracks |
owntracks_device_id | text | Owntracks Device ID |
owntracks_tracker_id | text | Owntracks Tracker ID |
| Photos | ||
camera_enabled | true/false | Enable camera |
camera_auto_take_pictures | true/false | Send photos automatically |
camera_auto_take_pictures_interval | text | Interval, in seconds |
camera_shutter_sound | true/false | Shutter click |
camera_share_pictures | true/false | Share photos |
camera_autofocus | true/false | Autofocus |
| Inbound | ||
inbound_notifications_enabled | true/false | Receive text notifications |
inbound_photo_notifications_enabled | true/false | Receive photos |
inbound_notifications_tts_enabled | true/false | Read notifications |
inbound_alarm_enabled | true/false | Play alarm |
inbound_alarm_override_silent | true/false | Override “silent” mode |
| Voice | ||
voice_tts_enabled | true/false | Enable Text to speech |
voice_tts_over_mqtt_enabled | true/false | Say MQTT texts |
voice_commands_enabled | true/false | Enable voice commands |
voice_commands_feedbacks | true/false | Vocal confirmation |
voice_negative_feedbacks | text | Answer(s) for a command that was not found |
voice_commands_continuous | true/false | Continuous listening |
voice_commands_continuous_plugged | true/false | Only when plugged in |
voice_commands_keyword | text | Keyword |
| More settings | ||
advanced_automatic_connection | true/false | Automatic connection |
advanced_autostart_boot | true/false | Autostart Zanzito |
advanced_parental_control_enabled | true/false | Parental control |
advanced_parental_control_password | text | Parental control password |
Commands
A message published to one of these topics, with any payload, is a command. Publish commands, set_prefs and restore_prefs without the retain flag: retained ones are ignored, and the log says so, so that they are not executed again at every connection.
| Topic | Effect |
|---|---|
zanzito/<device-name>/cmd/restart | restarts the connection to the broker, as reconnect does; the app itself is not restarted |
zanzito/<device-name>/cmd/reconnect | restarts the connection to the broker |
zanzito/<device-name>/cmd/take_picture | takes a picture and sends it, if the camera is enabled and available (§7) |
zanzito/<device-name>/cmd/send_heartbeat | sends a heartbeat |
zanzito/<device-name>/cmd/set_bookmark | saves the current position as the bookmark and publishes the position |
zanzito/<device-name>/cmd/send_logs | publishes the current logs to zanzito/<device-name>/log_inbound and zanzito/<device-name>/log_outbound |
zanzito/<device-name>/cmd/send_html_logs | the same, with the HTML formatting of the log on the screen |
A8. Home Assistant
Home Assistant is an open-source home-automation platform. Connect its MQTT integration to the same broker as Zanzito, then switch on Home Assistant discovery on the device (§3.1). At the next connection the device appears in Home Assistant, under Settings → Devices & services → MQTT, with its entities: there is nothing to write in configuration.yaml.
The entities
Each function that is switched on in Zanzito becomes an entity:
| Entity | Type | Present when | Topic |
|---|---|---|---|
| Connection | binary sensor | always | status |
| the device name | device tracker | Track Location is on | location, or the Owntracks topic with the emulation on |
| Battery | sensor | Battery level is selected | battery_level |
| the name of each sensor | sensor | the sensor is selected | <sensor_name> |
| Camera | camera | Enable camera is on | picture |
| Notification | notify | Receive text notifications is on | notification |
| Say | notify | Say MQTT texts is on | say |
| Alarm | notify | Play alarm is on | alarm/play |
| Stop alarm | button | Play alarm is on | alarm/stop |
| Send heartbeat | button | Remote administration is on | cmd/send_heartbeat |
| Take picture | button | Remote administration and the camera are on | cmd/take_picture |
All the topics begin with zanzito/<device-name>/. Light, pressure, temperature, humidity and proximity sensors have their unit; the others show their value as text. The camera shows the last picture the device sent: on request, from the home screen, or with Take picture.
When Zanzito disconnects, Connection goes off, the position stays at the last one known, and the other entities become unavailable until it connects again.
Home Assistant builds the entity IDs from the device name: notify.<device-name>_notification, button.<device-name>_stop_alarm and so on, with a full stop in the name turned into an underscore. You can rename them in Home Assistant.
Activities as triggers
Each Activity is a device trigger: in an automation, add a trigger of type Device, choose the Zanzito device and then “<name of the Activity>” pressed. The automation starts when the message of the Activity reaches the broker, with its topic and its payload; for an Activity that sends the spoken words or a file, any payload on its topic. The trigger is fired by the message, whoever sends it. Two Activities with the same name get “(2)”, “(3)” and so on.
With Receive text notifications on there is one more trigger, “Notification button” pressed, for the buttons of the notifications (below).
Sending notifications
A notification, a sentence to say aloud or an alarm are sent with the notify.send_message action:
action: notify.send_message
target:
entity_id: notify.<device-name>_notification
data:
message: "The washing machine has finished"
The notify entities send the text only: Home Assistant does not pass a title on. For a title, and for the buttons, the picture and the other keys of §3.3, publish a JSON message to the notification topic:
action: mqtt.publish
data:
topic: "zanzito/<device-name>/notification"
payload: '{"title": "Laundry", "message": "The washing machine has finished"}'
qos: 1
Notifications with a picture and buttons
When someone rings at the door, the phone shows the picture of the camera and a button that opens the gate. The picture is saved first in the www folder of Home Assistant, which serves it under /local/ without a login. Anyone who can reach Home Assistant can read what is in that folder, so use it only on your home network.
actions:
- action: camera.snapshot
target:
entity_id: camera.front_door
data:
filename: /config/www/front_door.jpg
- action: mqtt.publish
data:
topic: "zanzito/<device-name>/notification"
payload: >-
{"title": "Front door", "message": "Someone rang the bell",
"tag": "door", "priority": "high",
"image": "http://<home-assistant-address>:8123/local/front_door.jpg",
"actions": [{"title": "Open the gate", "payload": "open_gate"},
{"title": "Ignore", "payload": "ignore"}]}
qos: 1
The buttons have no topic, so they publish to zanzito/<device-name>/action. In an automation, that is the device trigger “Notification button” pressed, with the payload of the button in {{ trigger.payload }}; in YAML, an MQTT trigger on the same topic:
automation:
- alias: "Gate opened from the phone"
triggers:
- trigger: mqtt
topic: "zanzito/<device-name>/action"
payload: "open_gate"
actions:
- action: cover.open_cover
target:
entity_id: cover.gate
The button closes the notification on the phone where it was touched. To remove it when it is no longer needed, for example from the other phones that received it, publish {"tag": "door", "clear": true} to their notification topics.
An alarm switched on and off from Home Assistant
An alarm that is switched on from Home Assistant and switches itself off when someone stops it on the phone. It needs a switch and, since the acknowledgement of Zanzito is not one of the entities above, a sensor for it, both in configuration.yaml:
input_boolean:
zanzito_play_alarm:
name: "Zanzito Alarm"
icon: mdi:alarm-multiple
mqtt:
- binary_sensor:
name: "Alarm ack Zanzito"
state_topic: "zanzito/<device-name>/alarm"
payload_on: "ack"
payload_off: "1"
If you already have an mqtt: key, add the sensor to its list. Then three automations, which use the Alarm and Stop alarm entities of the device:
automation:
- alias: "Zanzito alarm switch goes on"
triggers:
- trigger: state
entity_id: input_boolean.zanzito_play_alarm
from: "off"
to: "on"
actions:
- action: notify.send_message
target:
entity_id: notify.<device-name>_alarm
data:
message: "Wake up!"
- alias: "Zanzito alarm switch goes off"
triggers:
- trigger: state
entity_id: input_boolean.zanzito_play_alarm
from: "on"
to: "off"
actions:
- action: button.press
target:
entity_id: button.<device-name>_stop_alarm
- alias: "Zanzito alarm acknowledged"
triggers:
- trigger: state
entity_id: binary_sensor.alarm_ack_zanzito
to: "on"
actions:
- action: input_boolean.turn_off
target:
entity_id: input_boolean.zanzito_play_alarm
The alarm is now controlled from anywhere in Home Assistant by turning input_boolean.zanzito_play_alarm on and off.
How discovery works
Zanzito publishes the configuration of the device, retained, to:
homeassistant/device/zanzito_<device-name>/config
with the prefix of §3.1 in place of homeassistant, every time it connects, and again when Home Assistant starts and announces itself on homeassistant/status. The configuration names the device, its make and model, and the version of Zanzito; it publishes no other data, since the entities use the topics described in this manual.
When you switch a function off, its entity is removed. When you switch discovery off, or change the device name or the prefix, the device is removed from Home Assistant at the next connection; with a new name it comes back as a new device. If your broker has access rules, see A5.
Without discovery, the same entities can be written by hand in configuration.yaml with the MQTT integration, on the topics of the table above. Check the examples against the Home Assistant documentation for the version you run.