How do I use MQTT with my Thinka?
Your Thinka can share your devices over MQTT. It connects to your own MQTT broker on your local network, for example the Mosquitto add-on in Home Assistant. It uses the Home Assistant MQTT format, so Home Assistant finds your devices by itself. Other MQTT apps can use them too.
MQTT is available on the Pro and Secure Pro editions and is still in beta.
MQTT is available on the Pro and Secure Pro editions and is still in beta.
How do I set it up?

- Go to Settings → Integrations → MQTT.
- Host: the IP address or name of your broker, for example 192.168.1.10. Do not add mqtt:// or ws:// in front.
- Port: usually 1883.
- Username and password: only if your broker needs them.
- Discovery prefix: the first part of all MQTT topics. You can choose your own (without # or +). The default is homeassistant, which is also the default in Home Assistant. If you use Home Assistant, set the same prefix there.
- Click Save, then Turn on MQTT
After a few seconds the status shows Connected.

It says "Not connected to the broker". What can I check?

- The Host field has only the IP address or name, nothing in front of it.
- Your broker accepts normal MQTT connections on that port. A broker that only offers WebSocket does not work.
- The username and password are correct.
- The Thinka can reach the broker. There is no firewall in between.
- No other MQTT client uses the Thinka's serial number as its client ID.
Which connection types are supported?
Only plain MQTT (MQTT 3.1.1 over TCP). Secure connections (TLS) and WebSocket are not supported yet.
Which devices are shared?
- Lights: on/off and dimming. Color and color temperature can't be changed over MQTT.
- Switches and outlets
- Thermostats
- Blinds and curtains
- Sensors: temperature, humidity, light, motion, presence, door/window contact, water leak, smoke, CO, CO2 and energy
These devices are not shared over MQTT yet: locks, garage doors, doors, windows, alarm systems, fans, heaters and coolers, humidifiers, valves, weather stations, buttons and scenes. P1 energy meter readings are not shared either.
Do I need Home Assistant?
No. Any MQTT client can read and control your devices.
How do I find my devices?
Subscribe to homeassistant/+/+/+/config. You get one message for each device. It tells you the name, the room, and the topics to read and control the device.
Did you change the discovery prefix? Then use yours instead of homeassistant, here and in all topics below.
Example:
mosquitto_sub -h 192.168.1.10 -t 'homeassistant/+/+/+/config' -v
For a switch called "Garden light" in the room "Garden", you get this message (shortened). <serial> is the serial number of your Thinka, and <id> is the id of the device.
homeassistant/switch/<id>/switch/config
{
"name": "Garden light",
"device": { "suggested_area": "Garden" },
"state_topic": "homeassistant/thinka/<serial>/<id>/switch",
"command_topic": "homeassistant/thinka/<serial>/<id>/switch/set"
}To turn the light on, send true to its command_topic.
How do I control a device?
Send a message to the command topic of the device. Command topics look like this:
homeassistant/thinka/<serial>/<id>/<type>/<action>
- Switch, outlet or light: /set with true or false
- Light brightness: /brightness with 0 to 100
- Thermostat mode: /mode with, for example, off or heat
- Thermostat temperature: /temperature with, for example, 21.5
- Blind or curtain: /set with OPEN, CLOSE or STOP
- Blind position: /position with 0 (closed) to 100 (open)
Example:
mosquitto_pub -h 192.168.1.10 -t 'homeassistant/thinka/<serial>/<id>/switch/set' -m 'true'
What happens when I turn MQTT off?
The Thinka stops sending and receiving messages. Your devices stay in Home Assistant until you delete them there.