
MQTT bridge for plant sensors
BetaForward plant sensor readings from your own MQTT broker to the app.

- Image
- ghcr.io/koktaildotcom/urbanjungle-mqtt-bridge
- Runs on
- Docker with Docker Compose, next to your MQTT broker
- Gateways
- OpenMQTTGateway, Theengs Gateway or any publisher of JSON readings
- Default topic
- urbanjungle/+/state, or home/+/BTtoMQTT/+ for the gateways
- Readings
- Moisture, light, temperature, nutrition, battery
- Health check
- GET /health on port 8090
- Account
- Linked with a device code via OAuth 2.0, access to sensors only
The Urban Jungle Care MQTT bridge is a small Docker container that forwards plant sensor readings from your MQTT broker to your Urban Jungle Care account. Your plants stay up to date while your phone is away, without Homey or Home Assistant.
What the bridge does
- Subscribes to a topic on your broker and reads moisture, light, temperature, nutrition and battery from each message.
- Sends those readings to your account, so the app shows them with the rest of the history.
- Registers a sensor your account does not know yet by itself. You assign it to a plant in the app.
- Ignores everything else a gateway publishes, such as thermometers, beacons and status messages.
What you need
- An MQTT broker, for example Mosquitto.
- A gateway that reads your plant sensors over Bluetooth and publishes them to the broker, such as OpenMQTTGateway or Theengs Gateway.
- Docker with Docker Compose on a machine that reaches the broker.
- An Urban Jungle Care account, the same one as in the mobile app.
Setting it up
-
Create a
docker-compose.ymlwith the bridge:services: mqtt-bridge: image: ghcr.io/koktaildotcom/urbanjungle-mqtt-bridge:latest restart: unless-stopped environment: MQTT_URL: mqtt://192.168.1.10:1883 MQTT_TOPIC: home/+/BTtoMQTT/+ volumes: - bridge-data:/data volumes: bridge-data: -
Start it with
docker compose up -d. -
Read the device code with
docker compose logs mqtt-bridge. -
Open the address from the log, sign in with your Urban Jungle Care account and enter the code.
The log then shows that the authorization succeeded, and the readings start to arrive in the app. Add MQTT_USERNAME and MQTT_PASSWORD when your broker needs a login.
Your own publisher
The bridge is not tied to a gateway. Publish a JSON object such as {"moisture": 45, "temperature": 23} to urbanjungle/<sensor address>/state and it arrives in your account. A message may carry only some of the values.
Revoking the link
In the app, open Integrations, find MQTT Bridge under connected apps and choose Revoke access. The bridge loses access right away and logs a new code, which you enter only if you want to link it again.
Questions about this integration
An MQTT broker such as Mosquitto, a gateway that publishes your plant sensors to it, Docker with Docker Compose and an Urban Jungle Care account.
OpenMQTTGateway and Theengs Gateway on an ESP32 or a Raspberry Pi. Set MQTT_TOPIC to home/+/BTtoMQTT/+ and the bridge picks up Mi Flora sensors and other plant sensors.
On first start it writes a device code to its log. Open the address in the log on any device, sign in with your Urban Jungle Care account and enter the code. The bridge never sees your password.
Only your sensors. It reads and registers devices and sends readings. It cannot see your plants, tasks or profile.
The bridge keeps its token in /data. Mount /data as a volume, as in the example on this page, and the link survives restarts and updates.
A Mi Flora sends its battery level only on a direct connection, not in the broadcasts a gateway reads. The other readings arrive one at a time over several messages.
The bridge works, but it is new and has fewer users than the app and the Homey integration. Problems you report help it out of beta sooner.
