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)
  • smart Power Adapter (switch on for a duration or until switched off)
  • smart Automatic Home & Garden Pump
  • SILENO robotic mowers, first generation (smart SILENO, SILENO+, city, life, also with LONA) and second generation (pro, max, free)
  • GARDENA smart Gateway as the bridge (found via mDNS)

Tested on real hardware so far: a first-generation smart Irrigation Control and a smart Sensor II; pump and power adapter have been confirmed by a user. The water controls, second-generation devices and the SILENO mowers follow GARDENA’s reference implementation but have not been run against real hardware yet - reports with a TRACE log are very welcome.

Installation

  1. Enable the local API on the gateway once. The switch is on the gateway’s own page, not in the GARDENA app:
    • Open https:// followed by the gateway’s IP address in a browser (the app shows the address under “Garden Profile”, your router’s device list has it as well) and accept the warning about the self-signed certificate.
    • Log in with the first block of the gateway ID printed on the back of the gateway (ID 1234abcd-996c-... → password 1234abcd).
    • Scroll all the way down to the card “Advanced Settings” (“Erweiterte Einstellungen”) and click the small grey arrow at its right edge.
    • Confirm GARDENA’s warning with “Continue” (“Weiter”).
    • Switch on “Local API” (“Lokale API”) under “Connectivity” (“Konnektivität”). It is saved right away. Leave “Cloud Connection” below it on if you want to keep using the app.
    • The README has more details and a curl variant.
  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.0.50", 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.7

  • changed: the binding no longer depends on Jetty, so that the same JAR should be able to run on openHAB 5.2 and on 5.3 (not tested on 5.3 yet)

Version 5.2.1.6

  • added: smart Power Adapter, smart Automatic Home & Garden Pump, SILENO mowers (first and second generation)
  • changed: a command for a device the gateway does not currently know puts the switch back to its last state
  • changed: the “gateway refused the connection” status points to the README section on enabling the WebSocket API

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

Yes! This is exactly what i need.
It was completely crazy during the last internet failure, that i cant control my garden.

I understand, that Amazon Echo is not working,
i understand, that i cant get dynamic electricity tariffs
…but i cant switch on my mower or pump??

if you have a first implementation of mowers, smart Pump, smart Power Adapter, then i am happy to test it

We can give it a try, but I have no hardware.
An alpha release ist under

Tell me what’s working and what not. And don’t forget trace-logs.

any results with the alpha (jar is under assets)?

Test-Results (v 5.2.1.5):

Installation
How to enable websocket-API was hard to find (but its gardenas fault ^^)

Discovery
Looks ugly on my side, but it was working!

Irrigation Control
5min Test: Works as expected!

Pump
Wow! Works nearly as expected!
Only question: Is there really a watertemperature-sensor? (Because a channel for this is existing)

Small things:
Pump-Stauts is still “water flows” and pressure is still 0.2bar even if i manually switched the pump off.

Power Adapter
5min Test: Works as expected!

Mowler
…is already in winter holidays :wink:

All in all a really good alpha-release!!! :tada:
I think i will use it in production to check stability.
Thanks!!!

a new alpha is released with your feedback

just added the new version 5.2.1.7. It’s without jetty so that the binding should work in OH 5.2 and 5.3.