How to connect other systems to Thinka over MQTT
Thinka has a built-in MQTT broker. Other systems on your network, such as building management software, wall panels or your own software, can read the state of your home and control it. Each system gets its own username and password, which you can withdraw at any time.
MQTT works on your local network only. An admin password must be set on your Thinka first.
MQTT works on your local network only. An admin password must be set on your Thinka first.
Enable the MQTT broker
Open the Thinka web interface and go to Settings → Integrations → MQTT Broker. Press Enable.

The page now shows the address, the port and the certificate fingerprint of your Thinka.

Download the certificate
Press Download certificate. Give this file to the system that will connect. It uses the file to check that it is really talking to your Thinka and not to another device on the network.
Add an integrator
Type a name for the system that will connect, for example Building management, and press Add.
Thinka shows a username and a password. The password is shown only once, so copy it now. If you lose it, press New Password to get a new one.

Every integrator can read and control the whole home, including locks, garage doors and alarms. Only give these credentials to systems you trust.
Connect
Use these settings in the connecting system:
- Host: the address shown on the page, for example thinka-ABCDEF.local
- Port: 8883, with TLS enabled
- Certificate: the downloaded file
- Username and password: from the previous step
Connect by name, not by IP address, otherwise the certificate check fails.
Topics
Thinka publishes everything under thinka/v1/ABCDEF/, where ABCDEF is the serial of your Thinka:
- status tells whether Thinka is online.
- home lists all rooms, accessories and services. Each accessory and service has an ID, which you use in the topics below. Each service also lists its characteristics, such as On or Brightness, with their range and whether they can be written.
- accessories/<accessory ID>/<service ID>/state gives the current values of a service, for example {"On": true, "Brightness": 80}. The keys are the characteristic names from home.
- accessories/<accessory ID>/<service ID>/set is where you send commands, using the same keys, for example {"On": false}. Only characteristics marked writable in home can be set.
This is how a service looks in home:
{
"id": "b2242751-…",
"type": "Lightbulb",
"name": "Kitchen strips",
"characteristics": {
"On": { "writable": true },
"Brightness": { "min": 0, "max": 100, "step": 1, "writable": true }
}
}Subscribe to thinka/v1/ABCDEF/# to receive everything at once. home and all state messages arrive immediately, so you do not have to wait for a change.
Withdraw access
Go back to Settings → Integrations → MQTT Broker. Press New password to give a system a new password, or Withdraw to remove its access immediately.
