Code Monkey home page Code Monkey logo

hacc-ozmo's People

Contributors

clayauld avatar joshuaspence avatar ligio avatar majorbreakfast avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hacc-ozmo's Issues

Camera and live map support

Hello, first of all thank you for that great work - this is the only working decision for my deebot 900.
Are there any plans to add camera and live map support (or just showing current map picture) to integration?

No longer available after Core 2021.7.0 & 2021.7.1 update.

Logger: homeassistant.components.vacuum
Source: custom_components/deebot/vacuum.py:59
Integration: Vacuum (documentation, issues)
First occurred: 11:53:17 AM (1 occurrences)
Last logged: 11:53:17 AM

Error while setting up deebot platform for vacuum
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/deebot/vacuum.py", line 46, in setup_platform
vacuums.append(EcovacsDeebotVacuum(device, hass.data[ECOVACS_CONFIG][0]))
File "/config/custom_components/deebot/vacuum.py", line 59, in init
self.device.connect_and_wait_until_ready()
File "/usr/local/lib/python3.9/site-packages/ozmo/init.py", line 456, in connect_and_wait_until_ready
self.iotmq.schedule(30, self.send_ping)
File "/usr/local/lib/python3.9/site-packages/ozmo/init.py", line 750, in schedule
if not self.scheduler_thread.isAlive():
AttributeError: 'Thread' object has no attribute 'isAlive'

component dont load on 0.112

Work fine until core 0.112

Logger: homeassistant.core
Source: loader.py:322
First occurred: 12:29:24 PM (1 occurrences)
Last logged: 12:29:24 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 135, in component_platform_discovered
    await self.async_setup_platform(platform, {}, info)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 225, in async_setup_platform
    self.hass, self.config, self.domain, platform_type
  File "/usr/src/homeassistant/homeassistant/setup.py", line 278, in async_prepare_setup_platform
    platform = integration.get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 322, in get_platform
    f"{self.pkg_path}.{platform_name}"
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 860, in get_code
  File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/deebot/vacuum.py", line 6
    <!DOCTYPE html>
    ^
SyntaxError: invalid syntax

Error on custom_component init

After installing the integration and restarting HA, I get the following error

2021-11-17 11:34:24 ERROR (MainThread) [homeassistant.setup] Error during setup of component deebot
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 254, in _async_setup_component
result = await task
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/deebot_hacc/init.py", line 107, in setup
device["nick"],
KeyError: 'nick'

After some troubleshooting, I found out that the API is sending some different info:
2021-11-17 11:38:04 DEBUG (SyncWorker_0) [custom_components.deebot_hacc] Ecobot devices: [{'did': 'd59caf2e-9c7b-417e-b26f-2be320e6e117', 'name': 'E0001249918610430728', 'class': 'ls1ok3', 'resource': '3WFH', 'nick': None, 'company': 'eco-ng', 'bindTs': 1582317532533, 'service': {'jmq': 'jmq-ngiot-eu.dc.ww.ecouser.net', 'mqs': 'api-ngiot.dc-as.ww.ecouser.net'}, 'iotmq': True}, {'did': 'E0001161418600772095', 'name': 'E0001161418600772095', 'class': '155', 'resource': 'atom', 'company': 'eco-legacy', 'iotmq': False}]

As you can see, there is no "nick" property on the JSON returned by the API, for any of the vaccums on my account.

To resolve this:
In vacuum.py, line 60 and 61, change "nick" to "name"
In init.py, line 107, change "nick" to "name"

After changing this, restart HA, all vacuums should be visible.

Broken with HA update 2022.7

Hello,
There was a significant upgrade to Home Assistant recently which broke many integrations - this one included. Will there be an update to this to support 2022.7? This has been the only integration I can get working with my M80 Pro.

Thanks in advance

Broken with HA Core update 2022.8

I was trying to update to HA Core 2022.8 but the inte4gration doesn't load. The log says unable to load configuaration. I really want to update becaus 2022.8 provides some features I want to use. Is there any way you could fix that?

Thanks in Advance

How to install when already using another deebot integration?

I cannot seem to figure out how to install this for my deebot ozmo 900 vacuum.
Problem is that I already have a deebot integration installed wit haccs, that one supports my deebot 950 but doesn't support the deebot 900. The official ecovacs integration doesn't support both vacuums. But this custom integration is called deebot. Just like the haccs integration is.

Any workaround for this?

The log show concurrent error with ozmo integration

I have a deebot 500 series.
Work perfectly with this integration but in log show this error:

2022-04-21 07:41:15 ERROR (mqtt_schedule_thread) [ozmo] call to iotdevmanager failed with {'ret': 'fail', 'errno': 4200}

Logger: ozmo
Source: /usr/local/lib/python3.9/site-packages/ozmo/__init__.py:855
First occurred: 7:41:15 a. m. (12 occurrences)
Last logged: 10:41:22 a. m.

call to iotdevmanager failed with {'ret': 'fail', 'errno': 4200}

What could it be? or just ignore it?

Publish to PyPi.org

Is there any chance you can publish this to PyPi.org so that it can be used in Home Assistant etc?

Thanks.

Error after python update 3.9.1

I am using last version of home assistant 2021.2.1 and python 3.9.1.
After update I have this error with deebot 900 model DE5G:

2021-02-07 16:32:44 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up deebot platform for vacuum
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 198, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/deebot/vacuum.py", line 28, in setup_platform
vacuums.append(EcovacsDeebotVacuum(device, hass.data[ECOVACS_CONFIG][0]))
File "/home/homeassistant/.homeassistant/custom_components/deebot/vacuum.py", line 41, in init
self.device.connect_and_wait_until_ready()
File "/srv/homeassistant/lib/python3.9/site-packages/ozmo/init.py", line 456, in connect_and_wait_until_ready
self.iotmq.schedule(30, self.send_ping)
File "/srv/homeassistant/lib/python3.9/site-packages/ozmo/init.py", line 750, in schedule
if not self.scheduler_thread.isAlive():
AttributeError: 'Thread' object has no attribute 'isAlive'
2021-02-07 16:32:44 ERROR (MainThread) [homeassistant.components.ipp] Error fetching ipp data: Invalid response from API: Error occurred while communicating with IPP server.
2021-02-07 16:32:44 WARNING (MainThread) [homeassistant.config_entries] Config entry 'HP30E171DBD4F1' for ipp integration not ready yet. Retrying in 5 seconds
/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/cast/media_player.py:136: DeprecationWarning: The explicit passing of coroutine objects to asyncio.wait() is deprecated since Python 3.8, and scheduled for removal in Python 3.11.
done, _ = await asyncio.wait(

You have a solution?

Exception on startup with OZMO Slim10

Whenever starting up with a Deebot OZMO Slim10, I get this error:

2023-08-21 16:29:21.365 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up deebot platform for vacuum
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 362, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/deebot/vacuum.py", line 46, in setup_platform
    vacuums.append(EcovacsDeebotVacuum(device, hass.data[ECOVACS_CONFIG][0]))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/deebot/vacuum.py", line 59, in __init__
    self.device.connect_and_wait_until_ready()
  File "/usr/local/lib/python3.11/site-packages/ozmo/__init__.py", line 461, in connect_and_wait_until_ready
    self.send_ping()
  File "/usr/local/lib/python3.11/site-packages/ozmo/__init__.py", line 628, in send_ping
    self.request_all_statuses()
  File "/usr/local/lib/python3.11/site-packages/ozmo/__init__.py", line 662, in request_all_statuses
    self.refresh_statuses()
  File "/usr/local/lib/python3.11/site-packages/ozmo/__init__.py", line 647, in refresh_statuses
    self.run(GetCleanState())
  File "/usr/local/lib/python3.11/site-packages/ozmo/__init__.py", line 673, in run
    self.send_command(action)
  File "/usr/local/lib/python3.11/site-packages/ozmo/__init__.py", line 670, in send_command
    self.iotmq.send_command(action, self._vacuum_address())  #IOTMQ devices need the full action for additional parsing
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/ozmo/__init__.py", line 789, in send_command
    self._handle_ctl_api(
  File "/usr/local/lib/python3.11/site-packages/ozmo/__init__.py", line 871, in _handle_ctl_api
    s(resp)
  File "/usr/local/lib/python3.11/site-packages/ozmo/__init__.py", line 470, in _handle_ctl
    getattr(self, method)(ctl)
  File "/usr/local/lib/python3.11/site-packages/ozmo/__init__.py", line 500, in _handle_clean_report
    type = event['type']
           ~~~~~^^^^^^^^
KeyError: 'type'

Any idea on what is wrong? Country pt and continent eu set in the config.

Yeedi Vacums Unsupported, but possibly could with slight changes

After running some MIM it appears the only thing that changes is the format of the URL it calls, instead of being like:
https://eco-{country}-api.ecovacs.com/v1/private/{country}/{lang}/{deviceId}/{appCode}/{appVersion}/{channel}/{deviceType}
Should be something like https://gl-pt-api.yeedi.com/v1/private/PT/..........

The rest of the API structure looks ti be the same.

Im able to provide MIM traffic on a device for testing if needed

Deebot dont update his status

Hi!
Today in the morning my robot did not update his status. I reboot HA and all ok. One or two hours later HA dont uptade status of robot, again. Im can send comands like play, stop but status dónde update until I reboot my home assistant...
In log show this:
Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:329
First occurred: 11:08:36 a. m. (1 occurrences)
Last logged: 11:08:36 a. m.

Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
rc = self._loop(timeout)
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1164, in _loop
rc = self.loop_read()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1556, in loop_read
rc = self._packet_read()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
rc = self._packet_handle()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
return self._handle_publish()
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
self._handle_on_message(message)
File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message
on_message(self, self._userdata, message)
File "/usr/local/lib/python3.9/site-packages/ozmo/init.py", line 906, in _handle_ctl_mqtt
as_dict = self._ctl_to_dict_mqtt(message.topic, str(message.payload.decode("utf-8")))
File "/usr/local/lib/python3.9/site-packages/ozmo/init.py", line 913, in _ctl_to_dict_mqtt
xml = ET.fromstring(xmlstring) #Convert from string to xml (like IOT rest calls), other than this it is similar to XMPP
File "/usr/local/lib/python3.9/xml/etree/ElementTree.py", line 1347, in XML
parser.feed(text)
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0

After returning to base deebot changes state to cleaning

I have a Deebot Ozmo 930, this is the only integration that somehow works with my vacuum. The problem is that whenever I ask my vacuum to return to the dock, first it says that it's returning to the dock, then its state changes to docked and after a short while it changes to cleaning.

deebot.mp4

Start/Stop/Pause doesn't work on DEEBOT 930

Deebot 930, start/stop/pause isn't doing anything.

I've noticed "turn_on" activates its cleaning, and "turn_off" finishes it. "return_to_base" does work as well.

Could there be something difference in the 930 command set? Is there somewhere I can see or understand the API calls used? I'd like to create some REST calls so I can see how things work.

No status update ... May be we can do a workaround

Hi, for I unknown reason my robot did not update his status until I reboot my home assistant... could it be doable to replace a command ( let's say "STOP" ) with a "refresh" button something that could pull the info or even log out the Ecovacs server and then reload it with a renew info ? so at least I would be able to force a status update

No 'version' key in the manifest file

Hello,
from the version of Home Assistant 2021.3.4 in the register I see this:
"2021-04-03 12:08:04 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'deebot'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'deebot' ".

Thanks for your patience.
Good day

Status of only one Deebot changes at a time

Hello everyone, I have the problem that the status of only one Deebot changes at a time. We have four of them in the house. After each restart, the status display changes to a different device. All four can be controlled, but the status is only changed by one device at a time, the others remain frozen as "docking". Does anyone else have this problem, too?

Broken in Home Assistant 2022.2.0

Stopped working, and have the following error in the logs:

ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform deebot.vacuum: Platform not found (cannot import name 'VacuumDevice' from 'homeassistant.components.vacuum' (/usr/src/homeassistant/homeassistant/components/vacuum/__init__.py)).

Deebot 930 Not Working

ERROR (MainThread) [homeassistant.setup] Error during setup of component deebot
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 248, in _async_setup_component
result = await task
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/deebot/init.py", line 64, in setup
device["nick"],
KeyError: 'nick'

core-2021.6.4 Update - Deebot Not Working

Hi - I've just updated to core-2021.6.4, and it seems to have killed this integration for me. I'm updated to the most recent version, but I'm getting "Setup failed for deebot: Integration not found."

Has anyone else reported this?

Thanks

Packet Capture App Require Root

Should state in readme file that Packet capture requires root access. Would be nice if your project was able to determ rooms and convert to an attrabute.

Device State Attributes

Hello,
from the version of Home Assistant 2021.12.3 in the register I see this:
"Entity vacuum.robot (<class 'custom_components.deebot.vacuum.EcovacsDeebotVacuum'>) implements device_state_attributes. Please report it to the custom component author."

Thanks for your patience.
Good day

Not receiving status from Deebot 900 in Home Assistant

Hi, a few weeks ago my upstairs Deebot 900 stopped receiving a status on Home Assistant. I can still issue commands but the status doesn't update. If I restart my Home Assistant, it updates the status once.
The odd thing is that I have a second Deebot 900 downstairs which is reporting fine.
Any thoughts, or can you let me know how to provide you with logs?

930 stops dropping water

Hi Ligio

I know your component is for 900 but I have been using it with 930 without problems. In the last version I saw that you added set_water_level command, and I tried to use it. I think, but I'm not sure, that sending this command has caused my 930 to have a problem and I would like to know if you, since you have a lot of knowledge of how this works, you could know how to guide me.

I sent this command with level = 1, this generated an error in the home assistant log. I understand that sending the value 1 was incorrect, and this may have caused an exception on the server. It is also possible that simply my 930 has broken down and everything is a coincidence.

Do you know anything about it? I could give you more information about the error if necessary

Thank you

Deprecation warnings with `deebot` addon

Logger: sleekxmppfs.basexmpp
Source: custom_components/deebot/__init__.py:114
First occurred: 2:30:00 PM (1 occurrences)
Last logged: 2:30:00 PM
Source: custom_components/deebot/__init__.py:114

fulljid property deprecated. Use boundjid.resource

Not sure if this is still the best addon for DEEBOT OZMO 9XX. With recent updates, we're getting deprecation warnings within HA.


I'm also seeing this, but I don't know if it's specific to this addon. This is the only deebot vacuum integration I have:

Logger: homeassistant.components.vacuum
Source: components/vacuum/__init__.py:319
Integration: Vacuum (documentation, issues)
First occurred: 2:30:00 PM (1 occurrences)
Last logged: 2:30:00 PM

VacuumDevice is deprecated, modify EcovacsDeebotVacuum to extend VacuumEntity

Deebot 901 doesn't clean area

I tried to use the area cleaning with the send command and it only takes area: 0. I have 3 rooms in the app for area: 0 it starts the cleaning but for area: 1 or area: 2 it says can't send command. unknown error.
Other than this it is pretty good. I tried for weeks to get it to work with official integration or hacs integrations but i had no luck.
Any thoughts what could be the issue with area cleaning?
thanks

Ecovacs DEEBOT OZMO 900 HA Version 2024.02 not works

Hi since HA Version 2024. 2 (Yesterday) doesnt work your great Interagtion. This Log Error displayed:

`Logger: homeassistant.setup
Source: setup.py:404
First occurred: 19:02:00 (1 occurrences)
Last logged: 19:02:00

Unable to prepare setup for platform 'deebot.vacuum': Platform not found (cannot import name 'VacuumEntity' from 'homeassistant.components.vacuum' (/usr/src/homeassistant/homeassistant/components/vacuum/init.py)).`

Can i do anything?
Thanks a lot!

Error with configuration

Hello,

I am trying to setup custom areas and ran into problem. Please see configuration below it works fine without the vacuum-script-clean-area once I add it, I can’t restart HA.

deebot:
username: username
password: password
country: XX
continent: XX
supported_features:

  • start
  • pause
  • stop
  • return_home
  • fan_speed
  • battery
  • status
  • send_command
  • locate
  • clean_spot
  • turn_on
  • turn_off
    vacuum_script_clean_area:
    alias: living_room
    sequence:
    • service: vacuum.send_command
      data:
      command: spot_area
      entity_id: vacuum.deebot
      params:
      area: 0

Stops working after exactly 1 week (TokenExpiredError)

This is the only integration that is working with my Deebot Ozmo 900 and since i'm using this integration i'm having the problem that it stops working exactly after 1 week. If I restart my HA instance it will work again for exactly 1 week. There is somekind of token that has a duration of 7 days and then it has to be renewed but doesn't succeed in doing so. I can schedule my HA instance to reboot after 6 days but that is just a workaround.

Anyone know a solution? I tried EU and WW in my yaml configuration.

This is the error code it throws after 7 days.

2023-03-23 10:08:45.008 ERROR (mqtt_schedule_thread) [ozmo] call to iotdevmanager failed with {'ret': 'fail', 'errno': 3, 'error': {'error': 'check token error', 'es': {'action': 'checkToken', 'error': {'errno': 3001, 'error': 'JWTVerifyError', 'es': {'action': 'jwt.verify', 'error': {'name': 'TokenExpiredError', 'message': 'jwt expired', 'expiredAt': '2023-03-23T09:06:43.000Z'}}}, 'debug': {'token': 'MYTOKENCODEREMOVED'}}}}

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.