GARDENA Binding (local) [5.2.0.0;6.0.0.0)

Control GARDENA smart irrigation controls, water controls and sensors locally through the WebSocket API of the GARDENA smart Gateway - no GARDENA cloud, no developer account, no API key. It complements the cloud-based official GARDENA binding for people who want local control; the binding ID is gardenalocal, so both can be installed side by side. Valve states and sensor values are pushed by the gateway, there is no polling.

Created with AI assistance: this binding was written with the help of an AI coding assistant (Claude by Anthropic). Use at your own risk.

Independent project, not affiliated with or endorsed by GARDENA or Husqvarna.

Supported devices

  • smart Irrigation Control (6 valves, generation 1 and 2)
  • smart Water Control, Pipeline Water Control, Dual Water Control (generation 1 and 2)
  • smart Sensor and smart Sensor II (soil moisture, soil/air temperature, light, battery, frost warning)
  • GARDENA smart Gateway as the bridge (found via mDNS)

Not supported yet: mowers, smart Pump, smart Power Adapter.

Tested on real hardware so far: a first-generation smart Irrigation Control and a smart Sensor II. The water controls and second-generation devices follow GARDENA’s reference implementation but have not been run against real hardware yet - reports are very welcome.

Installation

  1. Enable the WebSocket API on the gateway once (web interface of the gateway, advanced options; the README has a curl variant). The password is the first block of the gateway ID printed on its back.
  2. Install the binding from the Marketplace, or copy the JAR to the addons folder.
  3. Add the GARDENA smart Gateway from the Inbox and enter the password.
  4. Press Scan in the Inbox to add your devices.

Example

Bridge gardenalocal:gateway:garden "GARDENA Gateway" [ host="192.168.1.20", password="1234abcd" ] {

Thing irrigation-control irrigation "Irrigation" [ deviceId="3034F8EE90126D400001737D", wateringDuration=20 ]

}

Switch      Valve1         "Lawn front"          { channel="gardenalocal:irrigation-control:garden:irrigation:valve1#state" }

Number:Time Valve1Duration "Lawn front duration" { channel="gardenalocal:irrigation-control:garden:irrigation:valve1#duration", unit="min" }

Set the duration first, then switch the valve on. The device closes the valve by itself when the time is up, so a lost connection never leaves the water running.

Troubleshooting

DEBUG/TRACE logging for io.github.larsenlocke.binding.gardena shows the connection life cycle and every message exchanged with the gateway (the password is never logged). Please post TRACE excerpts and your device models when reporting problems.

Credits

The local API and its message format are documented by GARDENA’s own open-source library gardena-smart-local-api. This binding is an independent Java implementation of the same protocol and contains no code from it.

Changelog

Version 5.2.1.4

  • changed: license and maintainer are declared in the bundle metadata; copyright and NOTICE clarified

Version 5.2.1.3

  • changed: package/bundle renamed to io.github.larsenlocke.binding.gardena (the binding ID gardenalocal is unchanged); remove older gardenalocal JARs before installing

Version 5.2.1.1

  • fixed: no more Inbox noise every 10 minutes; configured devices are never proposed again
  • changed: devices are proposed only during a scan

Version 5.2.1

  • first release for openHAB 5.2.1; versions follow the openHAB release from now on

Resources

1 Like