mikey0000 / Mammotion-HA

Home Assistant integration for Luba, Luba 2 and Yuka (Mammotion) lawn mowers
159 stars 23 forks source link

Error calling the lawn_mower/start_mowing service. Unreachable #14

Closed markuslaube closed 3 months ago

markuslaube commented 5 months ago

Hello,

first of all, thank you for you amazing work so far 💙

second of all I don't have a Luba but the YUKA, the integration works great for me first of all with regard to the sensors using the BLE proxy. I get a total of 14 entities, all of which provide a meaningful value. Or actually 13, one value is not useful insofar as the YUKA cannot know which blade height is set, where it delivers a constant 50mm.

However, when I want to send actions, I get errors:

Start: Error calling the lawn_mower/start_mowing service. Unreachable Orignial "Fehler beim Aufrufen des Diensts lawn_mower/start_mowing. Unreachable"

Pause: Error when calling the service lawn_mower/pause. Unreachable

Back to Currently no message - but is ignored

Do you have any idea where I should look, does anyone have the same problem with the Luba or Luba2 or do I have to put in more work to adapt it to the Yuka?

Thank you!

markuslaube commented 5 months ago
2024-06-18 16:19:26.689 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547127100896] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 977, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1049, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/mammotion/lawn_mower.py", line 113, in async_start_mowing
    await self.coordinator.device.command("start_work_job")
  File "/usr/local/lib/python3.12/site-packages/pyluba/mammotion/devices/luba.py", line 199, in command
    return await self._send_command_with_args(key, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyluba/mammotion/devices/luba.py", line 254, in _send_command_with_args
    raise RuntimeError("Unreachable")
RuntimeError: Unreachable

I'm afraid Mammotion has done something different again. Is there any experience whether the Luba2 works with the integration? My nmap actually doesn't see any open ports despite the fact that the Yuka can be reached via ping and controlled via app.

mikey0000 commented 5 months ago

This integration is under heavy development, I'll try and see what's going on today. This integration currently only works over Bluetooth(WiFi being worked on) , there is also currently an issue where sometimes connecting doesn't work as expected. As for the mow actions, they should be working, something must have broken recently.

Thanks for letting us know that Yuka doesn't have an adjustable blade height?

markuslaube commented 5 months ago

Yes, the height adjustment on the YUKA is exclusively manual with a mechanical knob.

markuslaube commented 5 months ago

If you need more information, logs, etc.: let me know - anytime! Markus

mikey0000 commented 4 months ago

So, in short none of the devs working on this have a Yuka, however we have someone who will be able to loan one to us in the future. the unreachable message is a bit misleading and I need to change it, it means one of two things, bluetooth connection wasn't able to be made or an error occurred in sending the command (or command was wrong).

rasssta commented 4 months ago

Just to add some info to the mechanical knob. It has 8 different settings: 2, 3, 4, 5, 6, 7, 8, 9 (cm). Not sure if this is going to be reflected in the robot communication somehow. But now you know :)

jLynx commented 4 months ago

Can you see the height in the Mammotion app at all @rasssta or is it only via the mechanical knob?

rasssta commented 4 months ago

Can't find it in the app

jLynx commented 4 months ago

Ok noted, we will then need to not show that as a sensor if the bot is a Yuka

rdone2018 commented 4 months ago

Hello, great work with integration!

Reporting same error "Unreachable" for all commands (Go/Pause/Dock)

Device Mammotion Luba 2

This error originated from a custom integration.

Logger: custom_components.mammotion Source: helpers/update_coordinator.py:312 integration: Mammotion First occurred: June 27, 2024 at 2:42:50 PM (94 occurrences) Last logged: 5:57:11 AM

Unexpected error fetching Mammotion Lawn Mower data data Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/mammotion/coordinator.py", line 57, in _async_update_data return await self.device.start_sync(0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyluba/mammotion/devices/luba.py", line 201, in start_sync plan = await self._send_command_with_args("read_plan", **{'id': 2}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyluba/mammotion/devices/luba.py", line 267, in _send_command_with_args raise RuntimeError("Unreachable") RuntimeError: Unreachable

jLynx commented 4 months ago

@rdone2018 you will need to update and it should fix it

jLynx commented 4 months ago

Actually its potentially broken at the moment, so if updating doesnt work, you will just have to sit tight while we push a fix

rdone2018 commented 4 months ago

I did update of custom component now. Now I cannot connect to Luba - not even static data as before.

Logger: custom_components.mammotion Source: helpers/update_coordinator.py:312 integration: Mammotion First occurred: 7:04:38 AM (12 occurrences) Last logged: 7:18:35 AM

Unexpected error fetching Mammotion Lawn Mower data data Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/mammotion/coordinator.py", line 57, in _async_update_data return await self.device.start_sync(0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyluba/mammotion/devices/luba.py", line 201, in start_sync plan = await self._send_command_with_args("read_plan", **{'id': 2}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyluba/mammotion/devices/luba.py", line 267, in _send_command_with_args raise RuntimeError("Unreachable") RuntimeError: Unreachable

rdone2018 commented 4 months ago

Delete device + restart HA - helps Same status as yesterday - data visible, commands not working

lackr007 commented 4 months ago

I can confirm the same error "Unreachable" for all commands (Go/Pause/Dock/Resume Mowing) for Luba 2. Thanks for all the work on this!

mikey0000 commented 3 months ago

Resolved. Please open a new ticket if your still encountering this.