-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
itegration: husqvarna_automower_ble: Initial commit #30921
itegration: husqvarna_automower_ble: Initial commit #30921
Conversation
eaca255
to
510af0c
Compare
As people have been asking for this feature and this PR seems to have stalled. If you would like to manually install this component you can follow these steps Add version to manifestYou need to add a version to the manifest, you can apply this diff diff --git a/homeassistant/components/husqvarna_automower_ble/manifest.json b/homeassistant/components/husqvarna_automower_ble/manifest.json
index cb3ee2a502..bd7db5f1f1 100644
--- a/homeassistant/components/husqvarna_automower_ble/manifest.json
+++ b/homeassistant/components/husqvarna_automower_ble/manifest.json
@@ -12,5 +12,6 @@
"dependencies": ["bluetooth_adapters"],
"documentation": "https://www.home-assistant.io/integrations/???",
"iot_class": "local_polling",
- "requirements": ["automower-ble==0.1.32"]
+ "requirements": ["automower-ble==0.1.32"],
+ "version": "0.1.0"
} Install componentThen just rsync the entire Enable logging for debuggingYou will also want to enable debug logging by adding this to your
Then reboot. ESPHome setupMake sure you don't have a After that it should work. If you have any issues please file an issue on either the HA GitHub instance or at https://github.com/alistair23/AutoMower-BLE. Please include the logs of any issues If this works for you maybe comment here, that might help convince someone to review this |
Hello, Does a device have to run with ESP Home? Can i klick anywhere to make a like or a WANT IT, that can help you ? |
Can you help me installing the integration? Thank you so much alistair23/AutoMower-BLE#43 |
HI @alistair23 I cannot get the Integration working again in HA. I have removed it from custom_components and re-added the latest version. I didn't have a manifest.json file, so have created one, but when I try to add the integration it says it needs manual configuration. If I add config flow: true it fails with an unexpected handling error reporting that config_flow.py does not exist. Should this be set and if so, I can't find the .py in the current files listing.
Also, do I need to re-do anything in my ESP YAML? I note that the instructions say to not have a ble_client entry, but it isn't clear whether this gets automatically populated when pairing or not.
Many thanks! |
And for the lazy people (like myself 😆) Oneliner, be inside the
|
FABULOUS!! Thank You! I've got a manifest file which I was missing now! Don't forget to add "version": "0.1.0" to the end of the manifest file.
|
I am really struggling to get my mower paired after replacing my ESP32. What I do is:
From my early experiences, PIN security is turned off and I have tried pairing several times. I get the following errors - any ideas?
Here's my ESP32 code:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected, without issue.
I commented out the ble_client in the ESP32 yaml and paired successfully. Now removed comments, so that it will force a scan on disconnect. |
Can you help me installing the integration? Thank you so much alistair23/AutoMower-BLE#43 |
I can try, but I've had issues and happy to try and help. Firstly, have you got your Bluetooth proxy ESP32 set up? If not, I can share my ESP32 code. Comment out anything you have under ble_client for now (we'll need it later). Secondly, go to a terminal session in HA via the SSH / Terminal add on and change directory to the ./config/custom_components folder. Delete anything you may currently have for husqvarna-Automower and rub the curl command as above to copy the correct files. Find the MAC address of the mower which is easiest done with an android device, or an app on IOS device to scan for BT devices. Then, edit the manifest file and add a version entry at the end of the file: Check that the mower security level is set to low (no pin required other than power on) and put it into New Pairing mode from the accessories menu. Restart HA and go to Integrations and ADD. You should see husqvarna BLE as a new integration. With the mower still in pairing mode, add an entry and enter the Mac address with the colons between each address pair. It's worth having a second window open to view the ESP logs as it's connecting. You should see green entries for success messages and yellow for any issues. Back in the integration, your mower should be connected and you'll see two entries for the device name and the battery level. If that hasn't worked, try the pairing again, paying attention to the logs in the ESP window. If it has worked, remove the comments from the ESP code for the ble_client so that in the event of a disconnect, it will force a scan and reconnect. Hope this help you get further. |
I've been using code from this repo, which is using a slightly newer version of the lib. Note that I'm in a specific commit to avoid some issues as the repo is for testing purposes: https://github.com/erikmol/hass-automower-ble-hacs/tree/f95f5e1e0e955e74a5ee6c468b82b33670abfed3/custom_components/husqvarna_automower_ble For ESPHome I only have this configuration as a minimal for bluetooth. Not sure if it's the best, but it works except a bit unstable.
|
Brands PR is incorrect. Please open a new one where you move the current logos to the husqvarna brand and then symlink them to the 2 core integrations |
📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughA new documentation file, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant HomeAssistant
participant Automower
User->>HomeAssistant: Add Husqvarna Automower BLE integration
HomeAssistant->>User: Prompt for BLE MAC address
User->>HomeAssistant: Enter BLE MAC address
HomeAssistant->>Automower: Initiate pairing mode
Automower-->>HomeAssistant: Confirm connection
HomeAssistant-->>User: Connection successful
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (2)
source/_integrations/husqvarna_automower_ble.markdown (2)
28-28
: Clarify ESPHome requirements.Based on user comments in the PR, there's confusion about whether ESPHome is required. Consider clarifying if ESPHome is optional or required.
-1. Setup a [Bluetooth controller](https://www.home-assistant.io/integrations/bluetooth/), an ESPHome Bluetooth proxy works well and allows locating a device close to the mower. +1. Setup a [Bluetooth controller](https://www.home-assistant.io/integrations/bluetooth/). While any Bluetooth controller will work, an ESPHome Bluetooth proxy is recommended as it allows placing the device close to the mower.
30-30
: Improve readability with proper punctuation.Add missing commas to improve readability in the setup instructions.
-For the 305 for example the mower will enter pairing mode for the first 3 minutes after power on. +For the 305, for example, the mower will enter pairing mode for the first 3 minutes after power on. -Even when using the official Android application it can be tricky to get the first pair to succeed. If you are having issues reboot the mower and try again. +Even when using the official Android application, it can be tricky to get the first pair to succeed. If you are having issues, reboot the mower and try again.Also applies to: 39-39
🧰 Tools
🪛 LanguageTool
[uncategorized] ~30-~30: A comma might be missing here.
Context: ...will do this in different ways. For the 305 for example the mower will enter pairin...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[uncategorized] ~30-~30: A comma might be missing here.
Context: ...this in different ways. For the 305 for example the mower will enter pairing mode for t...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- source/_integrations/husqvarna_automower_ble.markdown (1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/husqvarna_automower_ble.markdown
[misspelling] ~19-~19: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...//github.com/alistair23/AutoMower-BLE), a unofficial reverse engineered Husqvarna...(EN_A_VS_AN)
[grammar] ~21-~21: The plural noun “mowers” cannot be used with the article “an”. Did you mean “an verified mower” or “verified mowers”?
Context: ...omower Connect BLE library. ### Tested an verified mowers This has been tested against the follo...(A_NNS)
[uncategorized] ~30-~30: A comma might be missing here.
Context: ...will do this in different ways. For the 305 for example the mower will enter pairin...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[uncategorized] ~30-~30: A comma might be missing here.
Context: ...this in different ways. For the 305 for example the mower will enter pairing mode for t...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[uncategorized] ~39-~39: A comma might be missing here.
Context: ...s. Even when using the official Android application it can be tricky to get the first pair ...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[uncategorized] ~39-~39: A comma might be missing here.
Context: ...irst pair to succeed. If you are having issues reboot the mower and try again. {% inc...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
🪛 Markdownlint
source/_integrations/husqvarna_automower_ble.markdown
24-24: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
24-24: null
Lists should be surrounded by blank lines(MD032, blanks-around-lists)
🔇 Additional comments (2)
source/_integrations/husqvarna_automower_ble.markdown (2)
1-15
: LGTM! Front matter is well-structured.The metadata follows Home Assistant documentation standards and includes all required fields.
43-46
: LGTM! Device type support is clearly documented.The supported device types are well-documented and properly formatted.
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thank you for contributing, @alistair23 🎉 I took some liberties with the docs and restructured a bit. Could you take a look and check, if it is still correct? |
Updated! New PR is here: home-assistant/brands#6032 |
Signed-off-by: Alistair Francis <[email protected]>
ec75667
to
724d25a
Compare
Thanks! My GitHub page wasn't updating, so I missed this and addressed your comments manually. This should still include the improvements and restructures you were looking for. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @alistair23 👍
Proposed change
This PR adds documentation for the Husqvarna Automower BLE integration.
The Husqvarna Automower BLE integration provides connectivity with Husqvarna Automowers lawn mowers via a local Bluetooth connection. This allows connecting and controlling an Automower without any accounts, cloud or network connection.
The integration is based on AutoMower-BLE, a unofficial reverse engineered Husqvarna Automower Connect BLE library.
Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit