Skip to content
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

Pairing issue with Gardena Sileno Minimo 250 #63

Closed
andiburger opened this issue Jun 10, 2024 · 10 comments
Closed

Pairing issue with Gardena Sileno Minimo 250 #63

andiburger opened this issue Jun 10, 2024 · 10 comments

Comments

@andiburger
Copy link

Hello there,

maybe someone else has the issue or a solution, I continously receiving the following error :

[org.bluez.Error.AuthenticationFailed] Authentication Failed

when connecting to the automower via the library, by using the following code:

m = mower.Mower(1197489078, address)
asyncio.run(connect(m))

It looks like this could be an issue with the bleak library, see here: issue 1100

Any thoughts how to solve this?

@alistair23
Copy link
Owner

Are you sure the mower is in pairing mode and the PIN has been entered o the mower?

@andiburger
Copy link
Author

Hi,

yes the mower is in pairing mode and the PIN has been entered on the mower.
The mower is for 3 minutes in pairing mode once it has been switched on. During that time period the code works like a charme.
Once the mower left the pairing mode (after 3 minutes) the error shows up.

At least I thought that once the mower is paired, the pairing will be persistent and not a restart of the mower is necessary to set the mower back in pairing mode.

@larsvinc
Copy link

Hi @andiburger ,

I also have the minimo 250. I had to use the --pin to successfully connect during the pairing window. I had the same challenge regarding that there were errors after 3 minutes, regardless of pin. There is likely some pairing that is broken when you disconnect?

Let me know how I can help debugging.

@andiburger
Copy link
Author

Hi @larsvinc ,

thanks for your response.
Just to sort that out and to be sure that I understood you right, you pass the pin via the commandline option --pin.
How did you translate the symbols the gardena sileno minimo uses into a numeric pin?

After the 3 minutes what kind of errors did you get and can you post them here?
Might be an indication what goes wrong.

@larsvinc
Copy link

I made a guess that the top button was '1', mid-left was '2', mid-right was '3' and bottom was '4'. It seemed to work.

I did not hold the connection, but re-ran the script after 3 minutes. I guess that by then the pairing is lost. After the 3 min I get this
bleak.exc.BleakDBusError: [org.bluez.Error.AuthenticationFailed] Authentication Failed

@andyb2000
Copy link
Contributor

Hi,
This is possibly similar to an issue I've got on an EasyLife GO 500.
If you use the library built-in test commands:
python3 -m automower_ble.mower --address 60:98:XX:XX:XX:XX
(After the 3 minutes)
And keep repeating that, occasionally I suspect you'll get auth/pair failed, what I'm curious about is if occasionally you get a connection? This is what happens for mine, it seems hit and miss as to whether it connects/'pairs' (I'm not convinced it pairs fully). So after the 3 minutes keep retrying and see if you occasionally get a reply back and get attributes back from it.

If it is the same, then I think there is a key/channelID that is exchanged or stored by the app and used for future communications, so regardless of the bluetooth layer pairing, this additional key is needed to remain operational after the 3minutes. This is a premise I'm working on trying to confirm/deny with my unit. If I leave the script retrying it does get me back data but I cannot control which further makes me think there is the key that needs to be in place for it to accept these commands.

Regarding the PIN, yes the keys translate to: 1=power 2=calendar 3=start 4=home

@andiburger
Copy link
Author

Hi @andyb2000 ,
after running a small test over the last 24h I can conclude that I never got any connection to the mower despite the first 3 minutes within the pairing window. I also added the pin in the python script but it made no difference.
Looks like the pairing process uses some different kind of identification mechanism, as you guessed.

I also tried the Home Assistant custom integration but failed as well either with an "unknown error" or a NoneType exception at the Model.decode function.

@larsvinc
Copy link

Hi all.

I have now discovered that I have indeed the Gardena Minimo 380 (not the 250). I expanded the script to make it interactive, i.e. to issue one of the commands and kept the connection in a while(True). What I realize is that the sensor readings (state, battery etc.) works, but the commands does not. Here is the debug trace:
Enter command (start, stop, park, override, status, exit): stop
2024-06-13 19:53:26,962 automower_ble.protocol INFO: Writing: b'02fd1000b63b604701a100afea1105000000ec03'
2024-06-13 19:53:27,022 automower_ble.protocol INFO: Received: b'02fd1100b63b6047019c01afea110500050000db'
2024-06-13 19:53:27,024 automower_ble.protocol INFO: Received: b'03'
2024-06-13 19:53:27,026 automower_ble.protocol INFO: Final response: b'02fd1100b63b6047019c01afea110500050000db03'
Mower stopped.
Enter command (start, stop, park, override, status, exit): park
2024-06-13 19:53:46,844 automower_ble.protocol INFO: Writing: b'02fd1000b63b604701a100af321205000000c703'
2024-06-13 19:53:46,961 automower_ble.protocol INFO: Received: b'02fd1100b63b6047019c01af32120500050000d8'
2024-06-13 19:53:46,964 automower_ble.protocol INFO: Received: b'03'
2024-06-13 19:53:46,965 automower_ble.protocol INFO: Final response: b'02fd1100b63b6047019c01af32120500050000d803'
Mower parked.
Enter command (start, stop, park, override, status, exit): stop
2024-06-13 19:53:51,013 automower_ble.protocol INFO: Writing: b'02fd1000b63b604701a100afea1105000000ec03'
2024-06-13 19:53:51,105 automower_ble.protocol INFO: Received: b'02fd1100b63b6047019c01afea110500050000db'
2024-06-13 19:53:51,107 automower_ble.protocol INFO: Received: b'03'
2024-06-13 19:53:51,108 automower_ble.protocol INFO: Final response: b'02fd1100b63b6047019c01afea110500050000db03'
Mower stopped.

@larsvinc
Copy link

If I pair /connect within the 3 min window, and do not run mower.disconnect(), I can keep the connection way beyond the 3 min window.

Hence, it seems like when you "disconnect", you also loose the pairing.

@andiburger
Copy link
Author

Yes, you are right.
I was also now able to identify the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants