Giter Site home page Giter Site logo

moebot-hass-integration's Introduction

MoeBot Home Assistant Integration

Provides the following:

  • A Lawn Mower component for control of your MoeBot.
  • Further controls to manage whether the MoeBot continues to mow during rain and how long to mow for.
  • Ability to alter the multi-zone configuration of the mower (these entities are disabled by default).
  • Sensors to monitor the working state, errors and battery level of the MoeBot
  • A Vacuum component is also provided for legacy users, but will be removed in a future update.

Installation

Easiest install is via HACS

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

  1. Add the repository to your HACS install by clicking the button below:
  2. Restart HA

For manual installation for advanced users, copy custom_components/moebot to your custom_components folder in Home Assistant then continue from step 2 above.

Configuration

Once you have installed the integration (per above)...

  1. Open the Home Assistant web interface.
  2. Navigate to "Configuration" > "Integrations".
  3. Click on the "+" button in the bottom right corner to add a new integration.
  4. Search for "MoeBot" and select it from the list.
  5. Enter the required details; Device ID, IP address and Local Key
  6. Click on "Submit" to complete the integration setup.

Documentation

Lawn Mower States

The Lawn Mower component as provided by Home Assistant only provides 3 states:

  1. ERROR - Device is in error state, needs assistance.
  2. PAUSED - Paused during activity.
  3. MOWING - Device is mowing.
  4. DOCKED - Device is docked.

The MoeBot however provides many more states:

  1. STANDBY - the MoeBot is not mowing; it is either sitting idle in the mowing area or sitting in the dock fully charged.
  2. MOWING - the MoeBot is mowing.
  3. FIXED_MOWING - the MoeBot is mowing in a spiral pattern.
  4. CHARGING - the MoeBot is in the dock charging.
  5. EMERGENCY - the MoeBot is in some non-normal state, perhaps lifted off the ground.
  6. LOCKED - the MoeBot UI is asking for the PIN to be entered.
  7. PAUSED - the MoeBot is currently mowing but the job has been paused.
  8. PARK - the MoeBot is following the boundary wire to return to the dock.
  9. CHARGING_WITH_TASK_SUSPEND - the MoeBot is in the dock charging but will return to mow.
  10. ERROR - the MoeBot is in some error state, perhaps it is outside of the boundary.

The MoeBot integration maps these states per the following table:

Lawn Mower State MoeBot States
ERROR EMERGENCY, ERROR, LOCKED
PAUSED PAUSED
MOWING MOWING, FIXED_MOWING, PARK
DOCKED STANDBY, CHARGING, CHARGING_WITH_TASK_SUSPEND

Additional documentation is provided in the pymoebot repository.

Future

Unfortunately, 0.3.0 will probably be my last release of this integration since I have now purchased a new Luba 2 5000 and will be decommissioning my MoeBot.

Feel free to continue to log any issues you have an if possible, I may try and address these - though it will be difficult without a physical device to test against.

The following are a list of features I would like to have added if I continued with the MoeBot:

  • Improve the current ConfigFlow for adding a MoeBot device; maybe attempt discovery or at least use the abilities of tinytuya to identify the Local Key.
  • Provide additional sensors to show Tx/Rx message counts to the mower, including error counters (this would require an accompanying update to the pymoebot library).
  • Investigate the benefit of moving to a single coordinator for this integration, per the newer integration development guides.
  • Add statistic sensors that show the amount of time spent mowing in 24-hour and 1-week period.

moebot-hass-integration's People

Contributors

whytey avatar

Stargazers

 avatar  avatar  avatar Milan Dzuriš avatar  avatar  avatar Claudiu Bucur avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

moebot-hass-integration's Issues

Update Zone Mowing settings

Would there be a way to send Zone settings through a script, similar to how you can update zone settings through the SmartLife app?

My lawn is broken in to 3 segments and I like to focus mowing on each segment on specific days. So currently I go in to the smartlife app and set that specific zone to 100% manually. If there was a way to replicate that via a script, I could automate it in HA and it would be a game changer.

Sadly, whilst I was able to follow the instructions to install your integration in HA, messing with scripts is beyond my capability...

Not available on HACS?

Hello! I have followed the readme but can't find it in HACS. I see a whole lot of things including 4 lawnmower related services but not Moebot. Has your publish integration broken?

Critical issue after 0.2.0: blocking call to sleep inside the event loop.

I just updated to 0.2.0 and my HA won't start-up anymore.
Looking at the log I see this:

2023-06-27 22:52:32.268 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for moebot doing blocking calls at custom_components/moebot/__init__.py, line 23: moebot.listen()

More robust commands

Originally posted by @Ethan-G in #1 (comment)

          Could you not just call the right sequence of commands to get around that? For example `return_to_base` could call `pause` then `cancel` then `dock`. Depending on what happens when you call an invalid command, it might need to conditionally do those based on status, or do a try/catch.

Would it be possible to handle the necessary state transitions within the integration, when a command is given?
This would make the end-user's life much easier not to have to deal with scripts and what-not in order to get from a mowing state to park, for example.

Return to dock problem

Seems that in the mower device page "return to dock" = pauses, cancels and returns to dock so nice change.

However when choosing return to dock in an automation doesn't work. And there is no pause or cancel in automation to make it return.

If i pause and cancel in the moebot app, then return to dock in a rule in home assistant works.

Compatibilidad con Robot lawn mower PMRDA 20-Li A1

Hola. Parece que esta integracion se adapta a mi cortacesped. Robot lawn mower PMRDA 20-Li A1 comprado en cadena supermercados LIDL. Pero arroja algunos errores.
image
image
Al principio todo parece funcionar. al darle a "play" el estado cambia a "cleaning" pero cuando pulso "pause" "stop"... ya no reacciona ni siquiera el estado cambia.

Esto es lo que muestra el debuj de la integracion, he borrado algunas cosas que parece estar relacionadas:

2024-06-29 13:45:00.854 WARNING (ImportExecutor_0) [homeassistant.const] DEVICE_CLASS_BATTERY was used from moebot, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.BATTERY instead, please report it to the author of the 'moebot' custom integration
2024-06-29 13:45:06.394 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration 'edata' at custom_components/edata/coordinator.py, line 170: self._datadis.process_data() (offender: /usr/local/lib/python3.12/site-packages/dateparser/languages/loader.py, line 215: import_module("dateparser.data.date_translation_data." + lang),), please create a bug report at https://github.com/uvejota/homeassistant-edata/issues
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/config/custom_components/edata/sensor.py", line 166, in async_setup_entry
coordinator = EdataCoordinator(
File "/config/custom_components/edata/coordinator.py", line 98, in init
self._load_data(preprocess=True)
File "/config/custom_components/edata/coordinator.py", line 170, in _load_data
self._datadis.process_data()

2024-06-29 13:45:06.446 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'edata' accesses hass.components.websocket_api. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from websocket_api directly at custom_components/edata/websockets.py, line 68: hass.components.websocket_api.async_register_command(, please create a bug report at https://github.com/uvejota/homeassistant-edata/issues
2024-06-29 13:45:06.619 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.freeds_pwm_aut_man are missing or not currently available
2024-06-29 13:45:06.619 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities switch.freeds_pwm_aut_man are missing or not currently available
2024-06-29 13:45:07.907 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.helpers.event. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from event directly at custom_components/hacs/base.py, line 630: self.hass.helpers.event.async_track_time_interval(, please create a bug report at https://github.com/hacs/integration/issues
2024-06-29 13:45:19.976 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'edata' at custom_components/edata/coordinator.py, line 149: with open( (offender: /config/custom_components/edata/coordinator.py, line 149: with open(), please create a bug report at https://github.com/uvejota/homeassistant-edata/issues
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/config/custom_components/edata/sensor.py", line 181, in async_first_refresh
await coordinator.async_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 288, in async_refresh
await self._async_refresh(log_failures=True)
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/edata/coordinator.py", line 149, in _async_update_data
with open(

2024-06-29 13:46:39.245 ERROR (SyncWorker_13) [pymoebot] Error from device: None
2024-06-29 13:47:10.054 ERROR (SyncWorker_11) [pymoebot] Error from device: {'Error': 'Unexpected Payload from Device', 'Err': '904', 'Payload': None}
2024-06-29 13:47:14.989 ERROR (SyncWorker_22) [pymoebot] Error from device: None
2024-06-29 13:49:44.890 ERROR (SyncWorker_23) [pymoebot] Error from device: None
2024-06-29 14:00:01.257 WARNING (MainThread) [custom_components.localtuya.switch] [bf0...baz] Entity switch.depuradora_lt is requesting unknown DPS index 18
2024-06-29 14:00:01.257 WARNING (MainThread) [custom_components.localtuya.switch] [bf0...baz] Entity switch.depuradora_lt is requesting unknown DPS index 19
2024-06-29 14:00:01.258 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback Entity._async_write_ha_state_from_call_soon_threadsafe() (None)
Traceback (most recent call last):
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 992, in _async_write_ha_state_from_call_soon_threadsafe
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1126, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1065, in __async_calculate_state
if extra_state_attributes := self.extra_state_attributes:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/localtuya/switch.py", line 65, in extra_state_attributes
self.dps(self._config[CONF_CURRENT_CONSUMPTION]) / 10
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
2024-06-29 14:06:19.415 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:08:49.387 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:10:01.646 WARNING (MainThread) [custom_components.localtuya.switch] [bf0...baz] Entity switch.depuradora_lt is requesting unknown DPS index 18
2024-06-29 14:10:01.647 WARNING (MainThread) [custom_components.localtuya.switch] [bf0...baz] Entity switch.depuradora_lt is requesting unknown DPS index 19
2024-06-29 14:10:01.647 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback Entity._async_write_ha_state_from_call_soon_threadsafe() (None)
Traceback (most recent call last):
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 992, in _async_write_ha_state_from_call_soon_threadsafe
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1126, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1065, in __async_calculate_state
if extra_state_attributes := self.extra_state_attributes:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/localtuya/switch.py", line 65, in extra_state_attributes
self.dps(self._config[CONF_CURRENT_CONSUMPTION]) / 10
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
2024-06-29 14:11:20.478 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:13:20.556 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:18:21.503 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:22:52.561 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:23:52.416 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:25:52.379 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:27:52.598 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:28:52.360 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:29:52.358 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:30:17.592 WARNING (MainThread) [custom_components.localtuya.switch] [bf8...zv0] Entity switch.lavadora_lt is requesting unknown DPS index 18
2024-06-29 14:30:17.592 WARNING (MainThread) [custom_components.localtuya.switch] [bf8...zv0] Entity switch.lavadora_lt is requesting unknown DPS index 19
2024-06-29 14:30:17.593 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback Entity._async_write_ha_state_from_call_soon_threadsafe() (None)
Traceback (most recent call last):
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 992, in _async_write_ha_state_from_call_soon_threadsafe
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1126, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1065, in __async_calculate_state
if extra_state_attributes := self.extra_state_attributes:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/localtuya/switch.py", line 65, in extra_state_attributes
self.dps(self._config[CONF_CURRENT_CONSUMPTION]) / 10
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
2024-06-29 14:33:22.344 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:33:52.341 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:36:22.405 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:38:22.575 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:41:54.598 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:45:29.759 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'edata' at custom_components/edata/coordinator.py, line 149: with open( (offender: /config/custom_components/edata/coordinator.py, line 149: with open(), please create a bug report at https://github.com/uvejota/homeassistant-edata/issues
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 255, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
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/edata/coordinator.py", line 149, in _async_update_data
with open(

2024-06-29 14:46:56.376 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:47:56.436 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:49:26.345 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 14:53:19.972 ERROR (SyncWorker_29) [pymoebot] Error from device: {'Error': 'Unexpected Payload from Device', 'Err': '904', 'Payload': None}
2024-06-29 14:56:39.553 ERROR (SyncWorker_35) [pymoebot] Unable to pause due to current state: 'CHARGING'
2024-06-29 14:56:39.557 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140178578954784] 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 "/usr/src/homeassistant/homeassistant/components/vacuum/init.py", line 387, in async_pause
await self.hass.async_add_executor_job(self.pause)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moebot/vacuum.py", line 100, in pause
self._moebot.pause()
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 195, in pause
raise MoeBotStateException()
pymoebot.MoeBotStateException
2024-06-29 14:56:49.536 ERROR (SyncWorker_28) [pymoebot] Unable to pause due to current state: 'CHARGING'
2024-06-29 14:56:49.538 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140178578954784] 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 "/usr/src/homeassistant/homeassistant/components/vacuum/init.py", line 387, in async_pause
await self.hass.async_add_executor_job(self.pause)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moebot/vacuum.py", line 100, in pause
self._moebot.pause()
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 195, in pause
raise MoeBotStateException()
pymoebot.MoeBotStateException
2024-06-29 14:56:52.970 ERROR (SyncWorker_49) [pymoebot] Unable to cancel due to current state: 'CHARGING'
2024-06-29 14:56:52.972 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140178578954784] 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 "/usr/src/homeassistant/homeassistant/components/vacuum/init.py", line 296, in async_stop
await self.hass.async_add_executor_job(partial(self.stop, **kwargs))
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moebot/vacuum.py", line 103, in stop
self._moebot.cancel()
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 205, in cancel
raise MoeBotStateException()
pymoebot.MoeBotStateException
2024-06-29 14:57:17.578 ERROR (SyncWorker_54) [pymoebot] Error from device: None
2024-06-29 14:57:19.078 ERROR (SyncWorker_9) [pymoebot] Unable to pause due to current state: 'PAUSED'
2024-06-29 14:57:19.079 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140178578954784] 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 "/usr/src/homeassistant/homeassistant/components/vacuum/init.py", line 387, in async_pause
await self.hass.async_add_executor_job(self.pause)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moebot/vacuum.py", line 100, in pause
self._moebot.pause()
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 195, in pause
raise MoeBotStateException()
pymoebot.MoeBotStateException
2024-06-29 14:57:22.610 ERROR (SyncWorker_12) [pymoebot] Unable to pause due to current state: 'PAUSED'
2024-06-29 14:57:22.611 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140178578954784] 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 "/usr/src/homeassistant/homeassistant/components/vacuum/init.py", line 387, in async_pause
await self.hass.async_add_executor_job(self.pause)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moebot/vacuum.py", line 100, in pause
self._moebot.pause()
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 195, in pause
raise MoeBotStateException()
pymoebot.MoeBotStateException
2024-06-29 14:57:36.328 ERROR (SyncWorker_58) [pymoebot] Error from device: None
2024-06-29 14:57:38.034 ERROR (SyncWorker_5) [pymoebot] Error from device: None
2024-06-29 14:59:23.352 ERROR (SyncWorker_38) [pymoebot] Unable to pause due to current state: 'PAUSED'
2024-06-29 14:59:23.353 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140178578954784] 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 "/usr/src/homeassistant/homeassistant/components/vacuum/init.py", line 387, in async_pause
await self.hass.async_add_executor_job(self.pause)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moebot/vacuum.py", line 100, in pause
self._moebot.pause()
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 195, in pause
raise MoeBotStateException()
pymoebot.MoeBotStateException
2024-06-29 14:59:38.303 ERROR (SyncWorker_33) [pymoebot] Error from device: None
2024-06-29 14:59:41.227 ERROR (SyncWorker_1) [pymoebot] Error from device: None
2024-06-29 15:00:56.651 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 15:03:30.010 ERROR (SyncWorker_35) [pymoebot] Error from device: None
2024-06-29 15:03:33.256 ERROR (SyncWorker_45) [pymoebot] Unable to pause due to current state: 'PAUSED'
2024-06-29 15:03:33.257 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140178578954784] 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 "/usr/src/homeassistant/homeassistant/components/vacuum/init.py", line 387, in async_pause
await self.hass.async_add_executor_job(self.pause)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moebot/vacuum.py", line 100, in pause
self._moebot.pause()
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 195, in pause
raise MoeBotStateException()
pymoebot.MoeBotStateException
2024-06-29 15:04:23.460 ERROR (SyncWorker_39) [pymoebot] Error from device: {'Error': 'Check device key or version', 'Err': '914', 'Payload': None}
2024-06-29 15:04:36.692 ERROR (SyncWorker_27) [pymoebot] Unable to pause due to current state: 'PAUSED'
2024-06-29 15:04:36.695 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140178578954784] 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 "/usr/src/homeassistant/homeassistant/components/vacuum/init.py", line 387, in async_pause
await self.hass.async_add_executor_job(self.pause)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moebot/vacuum.py", line 100, in pause
self._moebot.pause()
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 195, in pause
raise MoeBotStateException()
pymoebot.MoeBotStateException
2024-06-29 15:04:44.356 ERROR (SyncWorker_61) [pymoebot] Error from device: None
2024-06-29 15:04:58.913 ERROR (SyncWorker_15) [pymoebot] Unable to pause due to current state: 'PAUSED'
2024-06-29 15:04:58.914 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140178578954784] 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 "/usr/src/homeassistant/homeassistant/components/vacuum/init.py", line 387, in async_pause
await self.hass.async_add_executor_job(self.pause)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moebot/vacuum.py", line 100, in pause
self._moebot.pause()
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 195, in pause
raise MoeBotStateException()
pymoebot.MoeBotStateException
2024-06-29 15:09:13.895 ERROR (SyncWorker_38) [pymoebot] Unable to pause due to current state: 'PAUSED'
2024-06-29 15:09:13.896 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140178578954784] 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 "/usr/src/homeassistant/homeassistant/components/vacuum/init.py", line 387, in async_pause
await self.hass.async_add_executor_job(self.pause)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moebot/vacuum.py", line 100, in pause
self._moebot.pause()
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 195, in pause
raise MoeBotStateException()
pymoebot.MoeBotStateException
2024-06-29 15:09:17.870 ERROR (SyncWorker_61) [pymoebot] Error from device: None
2024-06-29 15:09:20.713 ERROR (SyncWorker_28) [pymoebot] Error from device: None
2024-06-29 15:09:25.430 ERROR (SyncWorker_46) [pymoebot] Error from device: None
2024-06-29 15:10:27.424 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 15:12:04.808 ERROR (SyncWorker_43) [pymoebot] Error from device: {'Error': 'Check device key or version', 'Err': '914', 'Payload': None}
2024-06-29 15:12:05.247 INFO (MainThread) [custom_components.moebot] Created a moebot: [MoeBot - {id: bf136b42997205f22fdvcr, state: None, battery: None}]
2024-06-29 15:12:05.479 DEBUG (pymoebot) [custom_components.moebot] 'MoeBotVacuumEntity' got an update: {'dps': {'6': 100, '101': 'MOWING', '102': 0, '103': 'MOWER_LEAN', '104': True, '105': 3, '106': 2323, '116': False}}
2024-06-29 15:12:05.480 DEBUG (pymoebot) [custom_components.moebot] 'MowingStateSensor' got an update: {'dps': {'6': 100, '101': 'MOWING', '102': 0, '103': 'MOWER_LEAN', '104': True, '105': 3, '106': 2323, '116': False}}
2024-06-29 15:12:05.482 DEBUG (pymoebot) [custom_components.moebot] 'BatterySensor' got an update: {'dps': {'6': 100, '101': 'MOWING', '102': 0, '103': 'MOWER_LEAN', '104': True, '105': 3, '106': 2323, '116': False}}
2024-06-29 15:12:05.482 DEBUG (pymoebot) [custom_components.moebot] 'EmergencyStateSensor' got an update: {'dps': {'6': 100, '101': 'MOWING', '102': 0, '103': 'MOWER_LEAN', '104': True, '105': 3, '106': 2323, '116': False}}
2024-06-29 15:12:05.482 DEBUG (pymoebot) [custom_components.moebot] 'WorkModeSensor' got an update: {'dps': {'6': 100, '101': 'MOWING', '102': 0, '103': 'MOWER_LEAN', '104': True, '105': 3, '106': 2323, '116': False}}
2024-06-29 15:12:05.483 DEBUG (pymoebot) [custom_components.moebot] 'PyMoebotVersionSensor' got an update: {'dps': {'6': 100, '101': 'MOWING', '102': 0, '103': 'MOWER_LEAN', '104': True, '105': 3, '106': 2323, '116': False}}
2024-06-29 15:12:05.483 DEBUG (pymoebot) [custom_components.moebot] 'TuyaVersionSensor' got an update: {'dps': {'6': 100, '101': 'MOWING', '102': 0, '103': 'MOWER_LEAN', '104': True, '105': 3, '106': 2323, '116': False}}
2024-06-29 15:12:05.483 DEBUG (pymoebot) [custom_components.moebot] 'WorkingTimeNumber' got an update: {'dps': {'6': 100, '101': 'MOWING', '102': 0, '103': 'MOWER_LEAN', '104': True, '105': 3, '106': 2323, '116': False}}
2024-06-29 15:12:05.483 DEBUG (pymoebot) [custom_components.moebot] 'ParkWhenRainingSwitch' got an update: {'dps': {'6': 100, '101': 'MOWING', '102': 0, '103': 'MOWER_LEAN', '104': True, '105': 3, '106': 2323, '116': False}}
2024-06-29 15:12:05.484 DEBUG (pymoebot) [custom_components.moebot] 'PollDeviceButton' got an update: {'dps': {'6': 100, '101': 'MOWING', '102': 0, '103': 'MOWER_LEAN', '104': True, '105': 3, '106': 2323, '116': False}}
2024-06-29 15:12:36.535 ERROR (SyncWorker_35) [pymoebot] Error from device: None
2024-06-29 15:12:45.742 ERROR (SyncWorker_26) [pymoebot] Unable to cancel due to current state: 'MOWING'
2024-06-29 15:12:45.745 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140178578954784] 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 "/usr/src/homeassistant/homeassistant/components/vacuum/init.py", line 296, in async_stop
await self.hass.async_add_executor_job(partial(self.stop, **kwargs))
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moebot/vacuum.py", line 103, in stop
self._moebot.cancel()
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 205, in cancel
raise MoeBotStateException()
pymoebot.MoeBotStateException
2024-06-29 15:13:50.336 ERROR (SyncWorker_9) [pymoebot] Error from device: None
2024-06-29 15:14:22.746 ERROR (SyncWorker_21) [pymoebot] Unable to cancel due to current state: 'MOWING'
2024-06-29 15:14:22.750 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 763, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 726, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
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 "/usr/src/homeassistant/homeassistant/components/vacuum/init.py", line 296, in async_stop
await self.hass.async_add_executor_job(partial(self.stop, **kwargs))
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moebot/vacuum.py", line 103, in stop
self._moebot.cancel()
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 205, in cancel
raise MoeBotStateException()
pymoebot.MoeBotStateException
2024-06-29 15:14:22.757 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140178578954784] Error handling message: Unknown error (unknown_error) Tito from 192.168.10.20 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 793, in handle_execute_script
script_result = await script_obj.async_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1769, in async_run
return await asyncio.shield(create_eager_task(run.async_run()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 464, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 528, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 558, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 763, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 726, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
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 "/usr/src/homeassistant/homeassistant/components/vacuum/init.py", line 296, in async_stop
await self.hass.async_add_executor_job(partial(self.stop, **kwargs))
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/moebot/vacuum.py", line 103, in stop
self._moebot.cancel()
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 205, in cancel
raise MoeBotStateException()
pymoebot.MoeBotStateException
2024-06-29 15:28:57.567 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 15:29:27.469 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 15:30:17.641 WARNING (MainThread) [custom_components.localtuya.switch] [bf8...zv0] Entity switch.lavadora_lt is requesting unknown DPS index 18
2024-06-29 15:30:17.641 WARNING (MainThread) [custom_components.localtuya.switch] [bf8...zv0] Entity switch.lavadora_lt is requesting unknown DPS index 19
2024-06-29 15:30:17.642 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback Entity._async_write_ha_state_from_call_soon_threadsafe() (None)
Traceback (most recent call last):
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 992, in _async_write_ha_state_from_call_soon_threadsafe
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1126, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1065, in __async_calculate_state
if extra_state_attributes := self.extra_state_attributes:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/localtuya/switch.py", line 65, in extra_state_attributes
self.dps(self._config[CONF_CURRENT_CONSUMPTION]) / 10
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
2024-06-29 15:38:54.195 ERROR (pymoebot) [pymoebot] Error from device: {'Error': 'Network Error: Unable to Connect', 'Err': '901', 'Payload': None}
2024-06-29 15:40:04.852 ERROR (pymoebot) [pymoebot] Error from device: {'Error': 'Network Error: Unable to Connect', 'Err': '901', 'Payload': None}
2024-06-29 15:41:15.507 ERROR (pymoebot) [pymoebot] Error from device: {'Error': 'Network Error: Unable to Connect', 'Err': '901', 'Payload': None}
2024-06-29 15:41:27.555 WARNING (MainThread) [homeassistant.components.automation.10_inversor_activar_cargas_por_alto_voltaje] 10/inversor activar cargas por alto voltaje : Already running
2024-06-29 15:42:26.163 ERROR (pymoebot) [pymoebot] Error from device: {'Error': 'Network Error: Unable to Connect', 'Err': '901', 'Payload': None}

From 'mowing' to 'dock' does not update lawn_mower state

Installed 0.30-beta1 and ran a test.
Started mowing and after 5 minutes selected Return to dock.
The robot paused then it started returning to dock, as expected (nice job!).
The only problem I found was that the lawn_mower entity remained in mowing state, but the old vacuum state shows the correct state.
Screenshot_20240707_165850_Home Assistant.jpg

Error calling vacuum commands

Hi. I've set up the integration, battery/state sensor seems to be working and mow time control works. However I can't issue any vacuum commands - start, stop, return etc all result in the below error.

Edit: oh I see, the other repo states that control isn't working yet. That's not clear from this repo, which implies control works with "Presents a Vacuum component for control of your MoeBot"

  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1808, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1845, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 686, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 961, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 726, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/vacuum/__init__.py", line 423, in async_start
    await self.hass.async_add_executor_job(self.start)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/moebot/vacuum.py", line 95, in start
    raise NotImplementedError()
NotImplementedError

Unable to add Moebot integration after reinstall

I had some broken icons after moving from the vacuum card to lawn mower card so i decided to remove both HACS and the HA integration and start again. I am now unable to add the moebot in the HA integration with the device id IP and local Key

`Logger: homeassistant.util.loop
Source: util/loop.py:136
First occurred: 3:40:48 PM (1 occurrences)
Last logged: 3:40:48 PM

Detected blocking call to sleep with args (5,) inside the event loop by custom integration 'moebot' at custom_components/moebot/config_flow.py, line 35: d = MoeBot(data["device_id"], data["ip_address"], data["local_key"]) (offender: /usr/local/lib/python3.12/site-packages/tinytuya/core.py, line 993: time.sleep(self.socketRetryDelay)), please create a bug report at https://github.com/Whytey/moebot-hass-integration/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#sleep Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, **request.match_info) File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin return await func(self, request, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper return await method(view, request, data, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure result = await self._async_configure(flow_id, user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 415, in _async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 518, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) File "/config/custom_components/moebot/config_flow.py", line 60, in async_step_user info = await validate_input(self.hass, user_input) File "/config/custom_components/moebot/config_flow.py", line 35, in validate_input d = MoeBot(data["device_id"], data["ip_address"], data["local_key"])`

Start stop Moebot from HA

not really an issue but more of a request. Would be great to have the ability to start and stop the mower from HA so automations can be used and not rely on the tuya app.

Moebot status unavailable

This integration has been working fine for the past 9 months, however today after upgrading my HA Core to 2024.5.0 the device has become unavailable. After restarting multiple time the integration and reinstalling it. No change. Following debug details found.

2024-05-03 14:30:25.738 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to sleep inside the event loop by custom integration 'moebot' at custom_components/moebot/config_flow.py, line 35: d = MoeBot(data["device_id"], data["ip_address"], data["local_key"]) (offender: /usr/local/lib/python3.12/site-packages/tinytuya/core.py, line 1190: time.sleep(self.sendWait) # give device time to respond), please create a bug report at https://github.com/Whytey/moebot-hass-integration/issues
2024-05-03 14:30:25.804 WARNING (ImportExecutor_0) [homeassistant.const] DEVICE_CLASS_BATTERY was used from moebot, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.BATTERY instead, please report it to the author of the 'moebot' custom integration
2024-05-03 14:30:25.912 WARNING (pymoebot) [homeassistant.helpers.frame] Detected that custom integration 'moebot' calls async_write_ha_state from a thread at custom_components/moebot/init.py, line 67: self.async_write_ha_state(), please report it to the author of the 'moebot' custom integration
2024-05-03 14:30:25.912 ERROR (pymoebot) [root] Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.12/threading.py", line 1010, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 92, in __loop
self.__parse_payload(data)
File "/usr/local/lib/python3.12/site-packages/pymoebot/init.py", line 70, in __parse_payload
listener(data)
File "/config/custom_components/moebot/init.py", line 67, in listener
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1008, in async_write_ha_state
self.hass.verify_event_loop_thread("async_write_ha_state")
File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread
frame.report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report
_report_integration(what, integration_frame, level, error_if_integration)
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration
raise RuntimeError(
RuntimeError: Detected that custom integration 'moebot' calls async_write_ha_state from a thread at custom_components/moebot/init.py, line 67: self.async_write_ha_state(). Please report it to the author of the 'moebot' custom integration.
home-assistant_moebot_2024-05-03T04-33-03.219Z.log

Allow setting tinytuya version

Thanks for this integration, I've just started using it!

My robot is however not coming online in the integration, even though it's alive and kicking.
I can control it by using the pymoebot library.

The robot is using version 3.4 and I see the library is hardcoding 3.3.
Would it be possible to make it configurable?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.