Giter Site home page Giter Site logo

openhab-ecovacs's Introduction

Library for Ecovacs Deebot 960/950/920

A simple library to connect Ecovac Deebots to a MQTT-Broker for usage with OpenHAB or other home automation tools. Currently known to work with the Ecovacs Deebot 960/950/920 from both North America and Europe.

Installation

Clone this repository and run like described below.

There are two methods of running this library:

  • Docker
  • Python (tested with Python 3.8.5)

Docker

The easiest was is to use docker-compose. For the library to work, you have to specify some configuration values in an .env-File (see docker docs).
The .env-File must contain the following variables.

email=your_ecovacs_email
password=ecovacs_password
device_id=randomd_device_id
country=your_country
continent=your_continent
verify_ssl=True
mqtt_client_id=client_name
mqtt_client_host=host_or_ip_of_mqtt_broker
mqtt_client_port=mqtt_port
mqtt_client_username=mqtt_broker_username
mqtt_client_password=mqtt_broker_password
mqtt_client_keepalive=keep_alive_in_seconds
mqtt_client_bind_address=
mqtt_client_root_topic=root_topic_name

Country and continent must be in two-letter code, e. g. for USA

    country code: us
    continent code: na

(If it doesn't appear to work for your continent, try "ww", their world-wide catchall.) See Wikipedia

You can check the correct values afterwards with docker-compose config. If everything is correct you can start the container with docker-compose up [-d]

Python

  1. Clone the repository
  2. Create an enviroment
  3. Activate the repository and install the requiremts with pip from requieremts.txt
  4. Set the above mentioned environment variales and run python main.py

Usage

For usage with e.g. openHAB you need the deebot device ID which is retrieved through the API. This device ID is used as subtopic in publishing and recieving messages. To retrieve this ID the easiest way is to start the library and watch the output.

openhabdeebot_1  | Device ID: 079a32a4-2650-4f07-9039-6f467024934e
openhabdeebot_1  | ecovacs/079a32a4-2650-4f07-9039-6f467024934e/status STATE_DOCKED
openhabdeebot_1  | ecovacs/079a32a4-2650-4f07-9039-6f467024934e/battery_level 100
...

Currently the livemap is updated every 15 seconds (unused at the moment), states every 30 seconds and components every 60 seconds.
If you wnat to change this, edit main.py line 128 and pass in your one values.

vacbot.setScheduleUpdates(livemap_cycle = 60, status_cycle = 120, components_cycle = 240)

Currently the following topics for recieving messages exist.

ecovacs/[device id]/status
ecovacs/[device id]/battery_level
ecovacs/[device id]/fanspeed
ecovacs/[device id]/water_level
ecovacs/[device id]/mop_attached
ecovacs/[device id]/stats_area
ecovacs/[device id]/stats_cid
ecovacs/[device id]/stats_time
ecovacs/[device id]/stats_type
ecovacs/[device id]/components/brush
ecovacs/[device id]/components/sideBrush
ecovacs/[device id]/components/heap
ecovacs/[device id]/last_clean_image

To send commands to your Deebot you have to publish to the following topic

ecovacs/[device id]/command

Accepted commands are

  • "Clean": Deebot starts cleaning
  • "CleanPause": Pause while cleaning
  • "CleanResume": resume cleaning
  • "Charge": return to dock and charge
  • "PlaySound": plays the "I am here" sound for locating your Deebot
  • "Relocate": sets the relocation status to manual
  • "GetCleanLogs": get the latest cleaning logs
  • "SetFanSpeed": sets the fanspeed (currently only to 'normal')

For easier use, you can use the provided examples in openhab

Thanks

If you want to support me
Buy Me A Coffee

My heartfelt thanks to:

  • And3rsL and his Deebot library, without his fork of sucks this wouln't be possible and this is also some kind of fork
  • guillebot and his mqtt addon for sucks who provided a lot of ideas used in this project
  • xmpppeek, a great library for examining XMPP traffic flows (yes, your vacuum speaks Jabbber!),
  • mitmproxy, a fantastic tool for analyzing HTTPS,
  • click, a wonderfully complete and thoughtful library for making Python command-line interfaces,
  • requests, a polished Python library for HTTP requests,
  • Decompilers online, which was very helpful in figuring out what the Android app was up to,
  • Albert Louw, who was kind enough to post code from his own experiments with his device, and
  • All the users who have given useful feedback and contributed code!

openhab-ecovacs's People

Contributors

astrnad avatar floschl8 avatar soenkekueper avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

openhab-ecovacs's Issues

Docker install error

Hi ,
This really nice work. Enabling deebot with openhab . Surely this should go as binding in OH3 .
For now, I am trying for Docker but getting the following error.
It will great to get help from u to resolve this.

docker-compose.yml

`version: '3.4'

services:
openhabdeebot:
image: openhabdeebot
build:
context: .
dockerfile: ./Dockerfile
restart: unless-stopped
container_name: openhabdeebot
environment:
- email=[email protected]
- password=XXXXXXXX
- device_id=deebot950home
- country=in
- continent=as
- verify_ssl=true
- mqtt_client_id=deebot950
- mqtt_client_host=XX.XX.XX.XX0
- mqtt_client_port=1883
- mqtt_client_username=XXXXX
- mqtt_client_password=XXXXX
- mqtt_client_keepalive=60
- mqtt_client_root_topic=deebot950`

`
pi@PI99:~/openhab-ecovacs $ sudo docker-compose up -d
Creating network "openhab-ecovacs_default" with the default driver
Building openhabdeebot
Step 1/10 : FROM python:3.8-slim-buster
3.8-slim-buster: Pulling from library/python
c06905228d4f: Pull complete
576e27635e2a: Pull complete
31b618766132: Pull complete
ab17eeea6058: Pull complete
aa21e0c66711: Pull complete
Digest: sha256:cede59c0e2fcbabed9b3094f1564917632ecdd11c25c2a275654946938225ef4
Status: Downloaded newer image for python:3.8-slim-buster
---> 46f7808bb4f3
Step 2/10 : ENV PYTHONDONTWRITEBYTECODE=1
---> Running in 4c66b9c9146f
Removing intermediate container 4c66b9c9146f
---> 506ddcdcb369
Step 3/10 : ENV PYTHONUNBUFFERED=1
---> Running in 6aecbbb04c16
Removing intermediate container 6aecbbb04c16
---> c7d27e6d4fc3
Step 4/10 : ADD requirements.txt .
---> 3b5633dc4af7
Step 5/10 : RUN python -m pip install -r requirements.txt
---> Running in b69a7c2a81f5
Collecting attrs==20.3.0
Downloading attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Collecting certifi==2020.12.5
Downloading certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting chardet==3.0.4
Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting click==7.1.2
Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting coverage==5.3
Downloading coverage-5.3.tar.gz (693 kB)
Collecting deebotozmo==1.7.2
Downloading deebotozmo-1.7.2.tar.gz (20 kB)
Collecting idna==2.10
Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting iniconfig==1.1.1
Downloading iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting numpy==1.19.4
Downloading numpy-1.19.4.zip (7.3 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: still running...
Preparing wheel metadata: still running...
Preparing wheel metadata: still running...
Preparing wheel metadata: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpnhmgrap2
cwd: /tmp/pip-install-lulvnfj3/numpy_d5ebb2816da8407899bd2db3b59dae92
Complete output (227 lines):
Running from numpy source directory.
setup.py:480: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
Cythonizing sources
Processing numpy/random/_bounded_integers.pxd.in
Processing numpy/random/_pcg64.pyx
Processing numpy/random/bit_generator.pyx
Processing numpy/random/_generator.pyx
Processing numpy/random/_sfc64.pyx
Processing numpy/random/_mt19937.pyx
Processing numpy/random/mtrand.pyx
Processing numpy/random/_philox.pyx
Processing numpy/random/_common.pyx
Processing numpy/random/_bounded_integers.pyx.in
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
NOT AVAILABLE

blis_info:
  libraries blis not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

openblas_info:
  libraries openblas not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries tatlas not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

atlas_3_10_blas_info:
  libraries satlas not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

atlas_blas_info:
  libraries f77blas,cblas,atlas not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

accelerate_info:
  NOT AVAILABLE

/tmp/pip-install-lulvnfj3/numpy_d5ebb2816da8407899bd2db3b59dae92/numpy/distutils/system_info.py:1914: UserWarning:
    Optimized (vendor) Blas libraries are not found.
    Falls back to netlib Blas library which has worse performance.
    A better performance should be easily gained by switching
    Blas library.
  if self._calc_info(blas):
blas_info:
  libraries blas not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

/tmp/pip-install-lulvnfj3/numpy_d5ebb2816da8407899bd2db3b59dae92/numpy/distutils/system_info.py:1914: UserWarning:
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  if self._calc_info(blas):
blas_src_info:
  NOT AVAILABLE

/tmp/pip-install-lulvnfj3/numpy_d5ebb2816da8407899bd2db3b59dae92/numpy/distutils/system_info.py:1914: UserWarning:
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  if self._calc_info(blas):
  NOT AVAILABLE

non-existing path in 'numpy/distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
  libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

openblas_lapack_info:
  libraries openblas not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

openblas_clapack_info:
  libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

flame_info:
  libraries flame not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
  libraries lapack_atlas not found in /usr/local/lib
  libraries tatlas,tatlas not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/lib
  libraries tatlas,tatlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
  NOT AVAILABLE

atlas_3_10_info:
  libraries lapack_atlas not found in /usr/local/lib
  libraries satlas,satlas not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/lib
  libraries satlas,satlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_info'>
  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
  libraries lapack_atlas not found in /usr/local/lib
  libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/lib
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_threads_info'>
  NOT AVAILABLE

atlas_info:
  libraries lapack_atlas not found in /usr/local/lib
  libraries f77blas,cblas,atlas not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/lib
  libraries f77blas,cblas,atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_info'>
  NOT AVAILABLE

lapack_info:
  libraries lapack not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

/tmp/pip-install-lulvnfj3/numpy_d5ebb2816da8407899bd2db3b59dae92/numpy/distutils/system_info.py:1748: UserWarning:
    Lapack (http://www.netlib.org/lapack/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [lapack]) or by setting
    the LAPACK environment variable.
  return getattr(self, '_calc_info_{}'.format(name))()
lapack_src_info:
  NOT AVAILABLE

/tmp/pip-install-lulvnfj3/numpy_d5ebb2816da8407899bd2db3b59dae92/numpy/distutils/system_info.py:1748: UserWarning:
    Lapack (http://www.netlib.org/lapack/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
    the LAPACK_SRC environment variable.
  return getattr(self, '_calc_info_{}'.format(name))()
  NOT AVAILABLE

numpy_linalg_lapack_lite:
  FOUND:
    language = c

/usr/local/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
  warnings.warn(msg)
running dist_info
running build_src
build_src
building py_modules sources
creating build
creating build/src.linux-armv7l-3.8
creating build/src.linux-armv7l-3.8/numpy
creating build/src.linux-armv7l-3.8/numpy/distutils
building library "npymath" sources
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable ifort
Could not locate executable ifc
Could not locate executable lf95
Could not locate executable pgfortran
Could not locate executable nvfortran
Could not locate executable f90
Could not locate executable f77
Could not locate executable fort
Could not locate executable efort
Could not locate executable efc
Could not locate executable g77
Could not locate executable g95
Could not locate executable pathf95
Could not locate executable nagfor
don't know how to compile Fortran code on platform 'posix'
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
    main()
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel
    return hook(metadata_directory, config_settings)
  File "/tmp/pip-build-env-2ipe2geo/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 157, in prepare_metadata_for_build_wheel
    self.run_setup()
  File "/tmp/pip-build-env-2ipe2geo/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 248, in run_setup
    super(_BuildMetaLegacyBackend,
  File "/tmp/pip-build-env-2ipe2geo/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 142, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 508, in <module>
    setup_package()
  File "setup.py", line 500, in setup_package
    setup(**metadata)
  File "/tmp/pip-install-lulvnfj3/numpy_d5ebb2816da8407899bd2db3b59dae92/numpy/distutils/core.py", line 169, in setup
    return old_setup(**new_attr)
  File "/tmp/pip-build-env-2ipe2geo/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/local/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/tmp/pip-build-env-2ipe2geo/overlay/lib/python3.8/site-packages/setuptools/command/dist_info.py", line 31, in run
    egg_info.run()
  File "/tmp/pip-install-lulvnfj3/numpy_d5ebb2816da8407899bd2db3b59dae92/numpy/distutils/command/egg_info.py", line 24, in run
    self.run_command("build_src")
  File "/usr/local/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/tmp/pip-install-lulvnfj3/numpy_d5ebb2816da8407899bd2db3b59dae92/numpy/distutils/command/build_src.py", line 144, in run
    self.build_sources()
  File "/tmp/pip-install-lulvnfj3/numpy_d5ebb2816da8407899bd2db3b59dae92/numpy/distutils/command/build_src.py", line 155, in build_sources
    self.build_library_sources(*libname_info)
  File "/tmp/pip-install-lulvnfj3/numpy_d5ebb2816da8407899bd2db3b59dae92/numpy/distutils/command/build_src.py", line 288, in build_library_sources
    sources = self.generate_sources(sources, (lib_name, build_info))
  File "/tmp/pip-install-lulvnfj3/numpy_d5ebb2816da8407899bd2db3b59dae92/numpy/distutils/command/build_src.py", line 378, in generate_sources
    source = func(extension, build_dir)
  File "numpy/core/setup.py", line 663, in get_mathlib_info
    raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
----------------------------------------

ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpnhmgrap2 Check the logs for full command output.
ERROR: Service 'openhabdeebot' failed to build: The command '/bin/sh -c python -m pip install -r requirements.txt' returned a non-zero code: 1

`

Docker image will not start

with the following error:

Preparing wheel metadata: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpgkaj6cqe
cwd: /tmp/pip-install-9isa2c_3/numpy_dc05759530fa455687defa0e4da7f823
Complete output (227 lines):
Running from numpy source directory.
setup.py:480: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
Cythonizing sources
Processing numpy/random/_bounded_integers.pxd.in
Processing numpy/random/_sfc64.pyx
Processing numpy/random/mtrand.pyx
Processing numpy/random/_generator.pyx
Processing numpy/random/_philox.pyx
Processing numpy/random/bit_generator.pyx
Processing numpy/random/_bounded_integers.pyx.in
Processing numpy/random/_common.pyx
Processing numpy/random/_mt19937.pyx
Processing numpy/random/_pcg64.pyx
blas_opt_info:
blas_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
NOT AVAILABLE

blis_info:
  libraries blis not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

openblas_info:
  libraries openblas not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries tatlas not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

atlas_3_10_blas_info:
  libraries satlas not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

atlas_blas_info:
  libraries f77blas,cblas,atlas not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

accelerate_info:
  NOT AVAILABLE

/tmp/pip-install-9isa2c_3/numpy_dc05759530fa455687defa0e4da7f823/numpy/distutils/system_info.py:1914: UserWarning:
    Optimized (vendor) Blas libraries are not found.
    Falls back to netlib Blas library which has worse performance.
    A better performance should be easily gained by switching
    Blas library.
  if self._calc_info(blas):
blas_info:
  libraries blas not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

/tmp/pip-install-9isa2c_3/numpy_dc05759530fa455687defa0e4da7f823/numpy/distutils/system_info.py:1914: UserWarning:
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  if self._calc_info(blas):
blas_src_info:
  NOT AVAILABLE

/tmp/pip-install-9isa2c_3/numpy_dc05759530fa455687defa0e4da7f823/numpy/distutils/system_info.py:1914: UserWarning:
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  if self._calc_info(blas):
  NOT AVAILABLE

non-existing path in 'numpy/distutils': 'site.cfg'
lapack_opt_info:
lapack_mkl_info:
  libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

openblas_lapack_info:
  libraries openblas not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

openblas_clapack_info:
  libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

flame_info:
  libraries flame not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
  libraries lapack_atlas not found in /usr/local/lib
  libraries tatlas,tatlas not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/lib
  libraries tatlas,tatlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
  NOT AVAILABLE

atlas_3_10_info:
  libraries lapack_atlas not found in /usr/local/lib
  libraries satlas,satlas not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/lib
  libraries satlas,satlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_info'>
  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
  libraries lapack_atlas not found in /usr/local/lib
  libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/lib
  libraries ptf77blas,ptcblas,atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_threads_info'>
  NOT AVAILABLE

atlas_info:
  libraries lapack_atlas not found in /usr/local/lib
  libraries f77blas,cblas,atlas not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/lib
  libraries f77blas,cblas,atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_info'>
  NOT AVAILABLE

lapack_info:
  libraries lapack not found in ['/usr/local/lib', '/usr/lib']
  NOT AVAILABLE

/tmp/pip-install-9isa2c_3/numpy_dc05759530fa455687defa0e4da7f823/numpy/distutils/system_info.py:1748: UserWarning:
    Lapack (http://www.netlib.org/lapack/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [lapack]) or by setting
    the LAPACK environment variable.
  return getattr(self, '_calc_info_{}'.format(name))()
lapack_src_info:
  NOT AVAILABLE

/tmp/pip-install-9isa2c_3/numpy_dc05759530fa455687defa0e4da7f823/numpy/distutils/system_info.py:1748: UserWarning:
    Lapack (http://www.netlib.org/lapack/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
    the LAPACK_SRC environment variable.
  return getattr(self, '_calc_info_{}'.format(name))()
  NOT AVAILABLE

numpy_linalg_lapack_lite:
  FOUND:
    language = c

/usr/local/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
  warnings.warn(msg)
running dist_info
running build_src
build_src
building py_modules sources
creating build
creating build/src.linux-armv7l-3.8
creating build/src.linux-armv7l-3.8/numpy
creating build/src.linux-armv7l-3.8/numpy/distutils
building library "npymath" sources
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable ifort
Could not locate executable ifc
Could not locate executable lf95
Could not locate executable pgfortran
Could not locate executable nvfortran
Could not locate executable f90
Could not locate executable f77
Could not locate executable fort
Could not locate executable efort
Could not locate executable efc
Could not locate executable g77
Could not locate executable g95
Could not locate executable pathf95
Could not locate executable nagfor
don't know how to compile Fortran code on platform 'posix'
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 280, in <module>
    main()
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 263, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 133, in prepare_metadata_for_build_wheel
    return hook(metadata_directory, config_settings)
  File "/tmp/pip-build-env-erjc0ugd/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 157, in prepare_metadata_for_build_wheel
    self.run_setup()
  File "/tmp/pip-build-env-erjc0ugd/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 248, in run_setup
    super(_BuildMetaLegacyBackend,
  File "/tmp/pip-build-env-erjc0ugd/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 142, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 508, in <module>
    setup_package()
  File "setup.py", line 500, in setup_package
    setup(**metadata)
  File "/tmp/pip-install-9isa2c_3/numpy_dc05759530fa455687defa0e4da7f823/numpy/distutils/core.py", line 169, in setup
    return old_setup(**new_attr)
  File "/tmp/pip-build-env-erjc0ugd/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/local/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/tmp/pip-build-env-erjc0ugd/overlay/lib/python3.8/site-packages/setuptools/command/dist_info.py", line 31, in run
    egg_info.run()
  File "/tmp/pip-install-9isa2c_3/numpy_dc05759530fa455687defa0e4da7f823/numpy/distutils/command/egg_info.py", line 24, in run
    self.run_command("build_src")
  File "/usr/local/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/local/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/tmp/pip-install-9isa2c_3/numpy_dc05759530fa455687defa0e4da7f823/numpy/distutils/command/build_src.py", line 144, in run
    self.build_sources()
  File "/tmp/pip-install-9isa2c_3/numpy_dc05759530fa455687defa0e4da7f823/numpy/distutils/command/build_src.py", line 155, in build_sources
    self.build_library_sources(*libname_info)
  File "/tmp/pip-install-9isa2c_3/numpy_dc05759530fa455687defa0e4da7f823/numpy/distutils/command/build_src.py", line 288, in build_library_sources
    sources = self.generate_sources(sources, (lib_name, build_info))
  File "/tmp/pip-install-9isa2c_3/numpy_dc05759530fa455687defa0e4da7f823/numpy/distutils/command/build_src.py", line 378, in generate_sources
    source = func(extension, build_dir)
  File "numpy/core/setup.py", line 663, in get_mathlib_info
    raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program
----------------------------------------

WARNING: Discarding https://files.pythonhosted.org/packages/c5/63/a48648ebc57711348420670bb074998f79828291f68aebfff1642be212ec/numpy-1.19.4.zip#sha256=141ec3a3300ab89c7f2b0775289954d193cc8edb621ea05f99db9cb181530512 (from https://pypi.org/simple/numpy/) (requires-python:>=3.6). Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpgkaj6cqe Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement numpy==1.19.4 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0, 1.13.1, 1.13.3, 1.14.0rc1, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0rc1, 1.15.0rc2, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0rc1, 1.16.0rc2, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0rc1, 1.17.0rc2, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0rc1, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0rc1, 1.19.0rc2, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0rc1, 1.20.0rc2, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0rc1, 1.21.0rc2, 1.21.0)
ERROR: No matching distribution found for numpy==1.19.4
The command '/bin/sh -c python -m pip install -r requirements.txt' returned a non-zero code: 1
ERROR: Service 'openhabdeebot' failed to build : Build failed

Script hung up after a while

Hey,

the script is working on my openhabian raspberry pi in an docker container without any trouble.

But from time to time, when it was running a longer time (which i unfortunately can't determine exactly) the connection to ecovacs api and MQTT hangs up and it doesn't do anything.

The only thing i can figure out from the logs is that there is some problem to connect to the ecovacs api with status code 502.
This error occours up to six times a day:

12021-05-18 19:02:41,375: deebotozmo.ecovacsiotmq WARNING: 1621364561.257185| Error calling API https://portal-ww.ecouser.net/api/iot/devmanager.do?mid=XXXXXc&td=q&u=XXXXX&cv=1.67.3&t=a&av=1.3.1 StatusCode 502

And once i've this error in the logs

2021-05-19 01:39:04,283: deebotozmo.ecovacsiotmq ERROR: EcoVacsMQTT - error connecting with MQTT Return 5
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3452, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1779, in loop_forever
    rc = self.loop(timeout, max_packets)
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1181, in loop
    rc = self.loop_read(max_packets)
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1572, in loop_read
    rc = self._packet_read()
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 2310, in _packet_read
    rc = self._packet_handle()
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 2942, in _packet_handle
    return self._handle_connack()
  File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3029, in _handle_connack
    self.on_connect(
  File "/usr/local/lib/python3.8/site-packages/deebotozmo/ecovacsiotmq.py", line 93, in on_connect
    raise RuntimeError("EcoVacsMQTT - error connecting with MQTT Return {}".format(rc))
RuntimeError: EcoVacsMQTT - error connecting with MQTT Return 5

After restarting the docker container everything is working well again.

Does anybody else have recognized this problem or any solution on it?

Greets

Sönke

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.