Skip to main content

AutoMower-BLE

This is an unofficial reverse engineered Husqvarna Automower Connect BLE library. This allows connecting and controlling an Automower without any accounts, cloud or network connection.

<a href="https://liberapay.com/alistair23/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a>

This library is written with the intent of integrating into Home Assistant, but it can be used independently as well.

Details on how this was developed are available at: https://www.alistair23.me/2024/01/06/reverse-engineering-automower-ble

This was developed and tested against a Automower 305, but it should work on all Automowers. If you are able to test on different models please do and report any results back.

Installation

This library can be installed by

pip3 install automower-ble

Please note that the library is under active development and that the code on github might not be released for pip.

Testing Connections

You can test querying data with the following

python3 ./mower.py --address D8:B6:73:40:07:37

You can uncomment parts of async def main(mower) to send commands, or send commands using parameters:

python3 ./mower.py --address D8:B6:73:40:07:37 --command park

Where command is one of: park pause override resume

(override will run for 3hrs)

To get the address, the ble_scanner.py script can be run.

Unit testing for developers

Unit tests are found in the /tests/ folder.

You can run the unit tests with pytest. Install it by pip3 install pytest. In the root path, just run

pytest

PIN codes with Flymo or similar

Some models (Easilife Go and other brands that use Husqvarna internal boards) don't have an option to disable PIN. They accept the pin by pressing the sequence of buttons on the mower and on the app when setting up the pairing. The PIN sequence is translated to digits like this:

On/OFF Power button = 1

Go/Schedule button = 2

Go button = 3

Park button = 4

See below image from operators manual. Which indicates the default pin would be 1234

image

This is specific to Flymo units, so PIN mapping may be different.

Debugging logs on an Android phone

You can get Bluetooth debug logs from an Android phone which will help development for new features, unknown codes or implementation of extra devices. To debug you need to enable developer mode on your Android handset/tablet (and have the manufacturer app installed to communicate with your mower)

To enable debug mode on Android:

  • Go into settings and System (Sometimes this is in About phone). Look for the "Build number" entry.
  • Tap this several times, onscreen you should then see a note confirming by tapping 7 times developer mode will be enabled.
  • Once enabled, click BACK and you'll see a "Developer Options" menu. In there scroll to find "Enable Bluetooth HCI snoop log".
  • Set "Enable Bluetooth HCI snoop log" to "Enabled"
  • Turn bluetooth OFF then back ON to enable the logging.

Go into your mower app and carry out the commands, making a note of precise time you send the command to the mower. Once you've captured the commands, to retrieve the log you can either grab it using your phones file browser. The file location is /data/misc/bluetooth/logs The filename is btsnoop_hci.log (This varies, for example Samsung phones store them elsewhere)

An alternative is to use the adb via usb to retrieve the log. Plug your phone in via usb and use adb to download your bug report: adb bugreport MyFilename (This will generate a bugreport and save it as MyFilename.zip) Extract that zip file and the bluetooth HCI snoop file is in FS/data/log/bt/btsnoop_hci.log

These bluetooth hci snoop files (btsnoop_hci.log) are in wireshark file format so use wireshark to view them. You can then see the commands sent and received from your mower and can then decode/investigate the commands.

Metadata

Release files for automower-ble 0.2.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for automower-ble 0.2.9
File Size Uploaded
automower_ble-0.2.9.tar.gz 35.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for automower-ble 0.2.9
File Interpreter ABI Platform
automower_ble-0.2.9-py3-none-any.whl Python 3 none any Details

Total release size: 65.2 kB

Release files / automower_ble-0.2.9.tar.gz

Download URL automower_ble-0.2.9.tar.gz
Size 35.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6684f155bffc9656a8b7246a96aa2d452d04bf69db22771e94c065cd2fdab8e3
BLAKE2b-256 checksum
How to use checksums
bfba1fff17ccb621b6bb567c5a0457004aae6e7f15742b4fd51528e6e431c5c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / automower_ble-0.2.9-py3-none-any.whl

Download URL automower_ble-0.2.9-py3-none-any.whl
Size 30.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d308d3c5c86ef818e37c0ec0a1f01f612ccbe9d74b5cd4d9ddfc3f8ffcfdab1f
BLAKE2b-256 checksum
How to use checksums
0a642fa69faa061c13efaebdd82385d13028d7ce63a7361d0077ac70aa813593
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.2.9 This release

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.35

2 release files

0.1.34

2 release files

0.1.33

2 release files

0.1.31

2 release files

0.1.30

2 release files

0.1.29

2 release files

0.1.26

2 release files

0.1.25

2 release files

0.1.24

2 release files

0.1.23

2 release files

0.1.22

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page