Giter VIP home page Giter VIP logo

Comments (15)

Tasshack avatar Tasshack commented on June 8, 2024 2

This a new feature added on HA 2024.5 to detect and block async calls from a thread and I will release a new Beta version to fix this issue very soon.

from dreame-vacuum.

Tasshack avatar Tasshack commented on June 8, 2024

@Max101 I cannot reproduce the issue on my setup. Can you confirm that you are using v2.0.0b14 and send me the full automation yaml.
Also it would be very helpfull if you enable the info logs and share the output.

logger:
  default: warn
  logs:
    custom_components.dreame_vacuum: info

from dreame-vacuum.

RimanCz avatar RimanCz commented on June 8, 2024

Same here, error from Lovelace.
Thanks you for your awesome work, I really love it!

from dreame-vacuum.

pmharris77 avatar pmharris77 commented on June 8, 2024

Same error, looking forward to beta. Great integration!

from dreame-vacuum.

Tasshack avatar Tasshack commented on June 8, 2024

@RimanCz @pmharris77 saying that you have the exact issue is not helping me a bit for solving the issue. So I suggest you don't write anything if you are not willing to give extra information regarding the issue to prevent being useless.

from dreame-vacuum.

pmharris77 avatar pmharris77 commented on June 8, 2024

@Tasshack In my experience, knowing that an issue is not a one-off occurrence for a specific user, especially when you said you couldn't reproduce initially yourself, is valuable info.

If you need more information from us, why don't you just ask us exactly what you want nicely instead of being unnecessarily rude, especially when we were both being complimentary about your work...

from dreame-vacuum.

Tasshack avatar Tasshack commented on June 8, 2024

@pmharris77 I have already asked what I need from @Max101 but he did not responded yet. You should read previous posts before posting a new one.

from dreame-vacuum.

pmharris77 avatar pmharris77 commented on June 8, 2024

@pmharris77 I have already asked what I need from @Max101 but he did not responded yet. You should read previous posts before posting a new one.

I did read the posts. As I said, I posted it to let you know that there is at least one other person with the same issue, since you could not reproduce. How am I to know he didn't DM you the details?

If you needed extra information, ask, and I would be happy to provide - don't have an unnecessary passive-aggressive dig at your users...

from dreame-vacuum.

pmharris77 avatar pmharris77 commented on June 8, 2024

Model Name : L20 Ultra
Integration version: v2.0.0b14
Firmware Version [e.g. 1156]: 4.3.6_1510
Home Assistant Version: 2024.5
Errors or warnings shown in the HA logs (if applicable): see below service call yaml and info level debug

Service Call Yaml

alias: Vacuum Hall
sequence:
  - service: dreame_vacuum.vacuum_clean_segment
    data:
      segments: 5
    target:
      entity_id: vacuum.dreamebot_l20_ultra_complete
mode: single

Info Log (doesn't seem to give any other info over error)

2024-05-05 09:12:06.616 ERROR (MainThread) [homeassistant.components.script.vacuum_hall] Vacuum Hall: Error executing script. Unexpected error for call_service at pos 1: Detected that custom integration 'dreame_vacuum' calls async_write_ha_state from a thread at custom_components/dreame_vacuum/vacuum.py, line 638: self.async_write_ha_state(). Please report it to the author of the 'dreame_vacuum' custom integration.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 501, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 736, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 699, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1047, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/dreame_vacuum/vacuum.py", line 761, in async_clean_segment
await self._try_command(
File "/config/custom_components/dreame_vacuum/entity.py", line 159, in _try_command
await self.hass.async_add_executor_job(partial(func, *args, **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/dreame_vacuum/dreame/device.py", line 3244, in clean_segment
self._update_status(
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 605, in _update_status
self._update_property(DreameVacuumProperty.STATE, new_state.value)
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 630, in _update_property
callback(current_value)
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 639, in _map_property_changed
self._map_manager.editor.refresh_map()
File "/config/custom_components/dreame_vacuum/dreame/map.py", line 1567, in refresh_map
self.map_manager._map_data_updated()
File "/config/custom_components/dreame_vacuum/dreame/map.py", line 453, in _map_data_updated
self._update_callback()
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 1420, in _map_updated
self._property_changed()
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 1415, in _property_changed
self._update_callback()
File "/config/custom_components/dreame_vacuum/coordinator.py", line 483, in async_set_updated_data
super().async_set_updated_data(self._device)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 450, in async_set_updated_data
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners
update_callback()
File "/config/custom_components/dreame_vacuum/vacuum.py", line 638, in _handle_coordinator_update
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 'dreame_vacuum' calls async_write_ha_state from a thread at custom_components/dreame_vacuum/vacuum.py, line 638: self.async_write_ha_state(). Please report it to the author of the 'dreame_vacuum' custom integration.
2024-05-05 09:12:06.626 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140734551182144] Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 654, in _service_handler
response = await self._async_start_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 612, in _async_start_run
script_result = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 643, in _async_run
return await self.script.async_run(script_vars, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1731, in async_run
return await asyncio.shield(create_eager_task(run.async_run()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 503, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 533, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 501, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 736, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 699, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1047, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/dreame_vacuum/vacuum.py", line 761, in async_clean_segment
await self._try_command(
File "/config/custom_components/dreame_vacuum/entity.py", line 159, in _try_command
await self.hass.async_add_executor_job(partial(func, *args, **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/dreame_vacuum/dreame/device.py", line 3244, in clean_segment
self._update_status(
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 605, in _update_status
self._update_property(DreameVacuumProperty.STATE, new_state.value)
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 630, in _update_property
callback(current_value)
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 639, in _map_property_changed
self._map_manager.editor.refresh_map()
File "/config/custom_components/dreame_vacuum/dreame/map.py", line 1567, in refresh_map
self.map_manager._map_data_updated()
File "/config/custom_components/dreame_vacuum/dreame/map.py", line 453, in _map_data_updated
self._update_callback()
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 1420, in _map_updated
self._property_changed()
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 1415, in _property_changed
self._update_callback()
File "/config/custom_components/dreame_vacuum/coordinator.py", line 483, in async_set_updated_data
super().async_set_updated_data(self._device)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 450, in async_set_updated_data
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners
update_callback()
File "/config/custom_components/dreame_vacuum/vacuum.py", line 638, in _handle_coordinator_update
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 'dreame_vacuum' calls async_write_ha_state from a thread at custom_components/dreame_vacuum/vacuum.py, line 638: self.async_write_ha_state(). Please report it to the author of the 'dreame_vacuum' custom integration.
2024-05-05 09:12:17.550 INFO (Thread-23) [custom_components.dreame_vacuum.dreame.device] Property STATE Changed: 1 -> 13
2024-05-05 09:12:18.022 INFO (Thread-2 (_thread_main)) [custom_components.dreame_vacuum.dreame.device] Property STREAM_STATUS Added: {"operType":"end","operation":"monitor","result":0,"status":0}

from dreame-vacuum.

Tasshack avatar Tasshack commented on June 8, 2024

It is already really hard to develop this project without any help from anyone else but all I am trying to say is telling that "it is not working" is useless for me because this is not a customer support. Don't write anything if you won't provide any data regarding the issue because I don't have time to ask every detail from each and everyone of you.
If you really want to write something then use the forum but not the issue that should only contain the information regarding the problem and how to help me solve it.

from dreame-vacuum.

Lari0 avatar Lari0 commented on June 8, 2024

Hi I have same issue, happy to assist with testing and logs, my vacum is L10s ultra. Thanks for your work !

This is what I have in the log:

File "/config/custom_components/dreame_vacuum/vacuum.py", line 762, in async_clean_segment await self._try_command( File "/config/custom_components/dreame_vacuum/entity.py", line 159, in _try_command await self.hass.async_add_executor_job(partial(func, *args, **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/dreame_vacuum/dreame/device.py", line 3296, in clean_segment return self.start_custom( ^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dreame_vacuum/dreame/device.py", line 3017, in start_custom return self.call_action(DreameVacuumAction.START_CUSTOM, payload) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dreame_vacuum/dreame/device.py", line 2658, in call_action self._property_changed() File "/config/custom_components/dreame_vacuum/dreame/device.py", line 1443, in _property_changed self._update_callback() File "/config/custom_components/dreame_vacuum/coordinator.py", line 486, in async_set_updated_data super().async_set_updated_data(self._device) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 450, in async_set_updated_data self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners update_callback() File "/config/custom_components/dreame_vacuum/vacuum.py", line 638, in _handle_coordinator_update 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 'dreame_vacuum' calls async_write_ha_state from a thread at custom_components/dreame_vacuum/vacuum.py, line 638: self.async_write_ha_state(). Please report it to the author of the 'dreame_vacuum' custom integration. 2024-05-05 09:22:42.315 WARNING (Thread-2 (_thread_main)) [homeassistant.helpers.frame] Detected that custom integration 'dreame_vacuum' calls async_write_ha_state from a thread at custom_components/dreame_vacuum/vacuum.py, line 638: self.async_write_ha_state(), please report it to the author of the 'dreame_vacuum' custom integration 2024-05-05 09:22:45.321 WARNING (Thread-2 (_thread_main)) [homeassistant.helpers.frame] Detected that custom integration 'dreame_vacuum' calls async_write_ha_state from a thread at custom_components/dreame_vacuum/vacuum.py, line 638: self.async_write_ha_state(), please report it to the author of the 'dreame_vacuum' custom integration 2024-05-05 09:22:48.317 WARNING (Thread-2 (_thread_main)) [homeassistant.helpers.frame] Detected that custom integration 'dreame_vacuum' calls async_write_ha_state from a thread at custom_components/dreame_vacuum/vacuum.py, line 638: self.async_write_ha_state(), please report it to the author of the 'dreame_vacuum' custom integration 2024-05-05 09:22:51.059 WARNING (Thread-23) [homeassistant.helpers.frame] Detected that custom integration 'dreame_vacuum' calls async_write_ha_state from a thread at custom_components/dreame_vacuum/vacuum.py, line 638: self.async_write_ha_state(), please report it to the author of the 'dreame_vacuum' custom integration

from dreame-vacuum.

Tasshack avatar Tasshack commented on June 8, 2024

@pmharris77 @Lari0 logs are looking like you are still using v2.0.0b13.

Can you run this command and restart your HA to make sure v2.0.0b14 is installed.
wget -O - https://raw.githubusercontent.com/Tasshack/dreame-vacuum/dev/install | bash -

from dreame-vacuum.

Lari0 avatar Lari0 commented on June 8, 2024

@pmharris77 @Lari0 logs are looking like you are still using v2.0.0b13.

Can you run this command and restart your HA to make sure v2.0.0b14 is installed. wget -O - https://raw.githubusercontent.com/Tasshack/dreame-vacuum/dev/install | bash -

Installed v2.0.0b14 and looks like the issue is fixed with this update, at least for me. Also no warnings or errors in the log.
Thank you !

from dreame-vacuum.

pmharris77 avatar pmharris77 commented on June 8, 2024

@Tasshack HACS was telling me b14 was installed, but turns out it hadn't installed properly. Redownloaded and confirmed component manifest says b14 and issue is now resolved.

Thank you for helping! Please consider being nicer to your users next time. If you have time to write something rude in response, you could equally have just asked for more info, rather than shutting them down. All I am saying is, don't take your frustrations out on your users when most are usually trying to help, even if they are not helping you at first. HA is a community after all!

from dreame-vacuum.

Max101 avatar Max101 commented on June 8, 2024

@Tasshack apologies for the delay I wasnt feeling too well.

As a developer I completely understand the importance of reporting issues with context so thanks for your patience :)

As @pmharris77 mentioned I too had issues updating the Dreame Vacuum extension from HACS (the loader was just stuck on loading), so I downloaded the zip and manually unpacked it into the custom_components directory. For some reason (might be that I didnt restart) It was not working but its working now. So thank you very much for looking into it!

Have a great day, we appreciate your work, cheers 🙌

from dreame-vacuum.

Related Issues (20)

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.