Gardena bluetooth lawn mower

Hi,
I have a Gardena lawn mower but not integrated into their system, simply communicating via bluetooth.
I can find him via the bluetoothctl and have teh MAC address.

Is there some integration available or do you have a hint to get some information from the device to check it’s status ?

Thanks, Oliver

9 Likes

Following this thread cause I’m thinking of getting the Gardena Sileno Minimo.

The same, I have a new Minimo running :slight_smile:

Very interesting, I am probably getting a minimo soon and would of course like to integrate it with HA if possible.

Just bought the Sileno City Bluetooth version (as the smart version wasn’t available), and looking for a solution to integrate it into HA as well. Maybe there are more opportunities now that Bluetooth support is built-in to HA. :slight_smile:

Also interested - any news?

It might be easy to add support to Add support for gardena bluetooth by elupus · Pull Request #95179 · home-assistant/core · GitHub once that goes in. Somebody would have to add all bluetooth characteristics of the device there: gardena-bluetooth/gardena_bluetooth/const.py at 6e4d90b520e54e477a463b20a73467c8e0d603b4 · elupus/gardena-bluetooth · GitHub then add sensors in home assistant.

Generally you should be able to extract needed information by disassembling the android app.

Ps. Since i don’t have any mower, i wont work on it myself, but i will review and accept contributions for support.

Hi! I’m about to pickup a bluetooth variant of a gardena mower and I would love to help out with adding the capabilities!

Since I’m a web developer by trade I have no experience decompiling android apps and extracting bluetooth characteristics. Could you point me in the right direction, perhaps a link to a guide or maybe you could write down a small how-to-guide for people wanting to add to your integration? :slight_smile:

Start by seeing if you can connect to the device with the library. It should be possible on linux/osx systems at least to just pip install gardena-bluetooth, then do python -m gardena_bluetooth scan to see if it finds any devices.

If it finds one, you can do python -m gardena_bluetooth connect [UUID_OF_DEVICE] for it to try to grab all data from the device.

If it connects, you need to try to figure out the data it contains. You can grab the gardena app from: https://apkpure.com/gardena-bluetooth®-app/com.gardena.apps.gardenabluetoothapp then run it through APK decompiler - decompile Android .apk ✓ ONLINE ✓ dissassebler. It will get you java:ish code, where you can find how the characteristics are to be parsed.

1 Like

Hej elupus,

I have a Gardena Sileno Minimo 500 mower and thought I would give this a try.
I’ve installed your gardena_bluetooth library and found my mower via the scan command.

Output:

Device: 12:34:45:EX:AM:PL: Name of device
 - Service: 00001800-0000-1000-8000-00805f9b34fb Generic Access Profile
 - Service: 00001801-0000-1000-8000-00805f9b34fb Generic Attribute Profile
 - Service: 98bd0001-0b0e-421a-84e5-ddbf75dc6de4 Husqvarna
 - Data: {}
 - Manu: {1062: b'\x02\x05\x00\x04\x06\n\x1d\x03'}
 - RSSI: -87

I’ve tried connecting to it using both the generic values and the Husqvarna uuid (which is the same as in your code). Unfortunately I get a BleakDeviceNotFoundError: Device with address 00001801-0000-1000-8000-00805f9b34fb was not found.

I’ve tried rebooting the device to get it into pairing mode (supposed to last for three minutes) but have not been successful so far. Any other tips you might have?

check out robonect - https://www.robonect-shop.de/

They have a wifi board that intercepts the commands coming to and from the screen on the mower and transmit those via MQTT. I have a mower using the board and it can be controlled via HA.

The wifi board also serves a webpage to control the mower directly and integrates with weather API’s so it will only mow when it hasn’t or won’t be raining.

1 Like

What OS are you trying on? That looks like a timeout for the scanning during connection.

I’m on Linux (Ubuntu 20.04).

I have tried factory resetting as well but could not connect. I’m willing to experiment this summer if you want a guinea pig :smiley:

Thanks for the link, it seems the Minimo versions are not supported?

@lfg_home You are connecting to the wrong address in you example above. The device address is “12:34:45:EX:AM:PL”

Ps. I assume you redacted that, since that looks strange :slight_smile:

Yeah, changed it :slight_smile:
Thanks for the hint, tried it first but got a BleakDBusError: [org.bluez.Error.Failed] Software caused connection abort so I figured I would try the uuids instead.

Now I can connect and receive this output:

Service: 98bd0001-0b0e-421a-84e5-ddbf75dc6de4 (Handle: 9): Husqvarna
 -  98bd0002-0b0e-421a-84e5-ddbf75dc6de4 (Handle: 10): Unknown
 -  ['write-without-response']
 -  98bd0004-0b0e-421a-84e5-ddbf75dc6de4 (Handle: 17): Unknown
 -  ['read']
 -  98bd0003-0b0e-421a-84e5-ddbf75dc6de4 (Handle: 13): Unknown
 -  ['read', 'notify']
Service: 00001801-0000-1000-8000-00805f9b34fb (Handle: 8): Generic Attribute Profile

You also wrote this:

If it connects, you need to try to figure out the data it contains. You can grab the gardena app from: https://apkpure.com/gardena-bluetooth®-app/com.gardena.apps.gardenabluetoothapp then run it through APK decompiler - decompile Android .apk ✓ ONLINE ✓ dissassebler. It will get you java:ish code, where you can find how the characteristics are to be parsed.

Any other guidance here? What should I be looking for?

In a file called MowerCapablities.java there is a section with the following code (don’t want to post the whole thing, not sure if OK?).

    private MowerCapabilities(MowerModel mowerModel2, MowerVariant mowerVariant2, int i, int i2, boolean z, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6, int i3, int i4, int i5, int i6, boolean z7, boolean z8, boolean z9, boolean z10, boolean z11, boolean z12, boolean z13, boolean z14, boolean z15, boolean z16, boolean z17, boolean z18, boolean z19, boolean z20, MowerPlatform mowerPlatform, boolean z21, boolean z22, boolean z23, boolean z24, boolean z25, boolean z26, boolean z27, int i7, int i8, boolean z28) {
        this.mowerModel = mowerModel2;
        this.mowerVariant = mowerVariant2;
        this.numberOfGuides = i;
        this.numberOfAreas = i2;
        this.gpsAssistance = z;
        this.isUltrasonic = z2;
        this.headlights = z3;
        this.cuttingHeightInSettings = z4;
        this.isCuttingHeightAvailable = z5;
        this.isWeatherTimer = z6;
        this.minDrivePastWire = i3;
        this.maxDrivePastWire = i4;
        this.minReversingDistance = i5;
        this.maxReversingDistance = i6;
        this.extendedBluetoothSettings = z7;
        this.isReversingOut = z8;
        this.exitAngles = z9;
        this.searchBoundary = z10;
        this.searchDirect = z11;
        this.searchGuide = z12;
        this.corridorWidth = z13;
        this.spiralCutting = z14;
        this.settableGeoFenceRange = z15;
        this.sensorData = z16;
        this.liftAlarm = z17;
        this.tiltAlarm = z18;
        this.motionAlarm = z19;
        this.testFollowInOut = z20;
        this.platform = mowerPlatform;
        this.mowerHouse = z21;
        this.hmi = z22;
        this.isPinCodeRequired = z23;
        this.isPinRequiredForAlarm = z24;
        this.passageCutting = z25;
        this.profilesAvailable = z26;
        this.wifiSupport = z27;
        this.maxNumberOfTasksRaw = i7;
        this.maxNumberOfTasksPerDayRaw = i8;
        this.eposAvailable = z28;
    }

Does the Minimo have a screen/lcd?

Unfortunately no. There are physical buttons on the mower itself but everything is configured via the app. I’m going to try snooping Bluetooth data instead via the app.

Hmm. That was less characteristics than i expected. My guess is one need to authenticate/pair to it in some way to get all fields.

Its hard to tell what to look for. For the water computer, the UUID numbers are listed in the client/connection classes. Ive not found the same for the mower. It seems it is using some lib from husqvarnagroup for the communication, so we:d need to understand that yo figure out how to speak to the device.