Recently I upgraded my home security surveilance to Dahua cameras. What I needed is to detect movement and do some home automation, so I wrote AppDaemon APP which polls Dahua camera events and translates it to MQTT messages. If you’re interested, feel free to use and modify it. You can find it in my repository:
Do I need some required packages (system or python) for that app? I am totally new to appdaemon… configured it well in apps.yaml but log gives me error about pycurl module…
added “pycurl” to appdaemon but it seems extra packages are required…
Could you please list all required packages?
In the same directory as apps.yaml, create file requirements.txt put pycurl, and every other missing module (if any) separated by new line. If you have any issues with runing this app - let me know!
you dont add it to appdaemon.yaml (because then AD wont startup anymore)
you need to create a file in the directory apps (or in the config dir, i am not sure which would work) that is called requirements.txt
and that need to contain:
I could not find codeblock - tried to - sorry!
Please check external link in one of my previous message to somebody forum topic - I am getting exact same errors when I add “pycurl” to appdaemon settings. Think it is common HassOS (Hassio) problem…
Collecting pycurl
Downloading https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz (214kB)
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "/tmp/pip-install-9n9b9ru_/pycurl/setup.py", line 223, in configure_unix
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'curl-config': 'curl-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-9n9b9ru_/pycurl/setup.py", line 913, in <module>
ext = get_extension(sys.argv, split_extension_source=split_extension_source)
File "/tmp/pip-install-9n9b9ru_/pycurl/setup.py", line 582, in get_extension
ext_config = ExtensionConfiguration(argv)
File "/tmp/pip-install-9n9b9ru_/pycurl/setup.py", line 99, in __init__
self.configure()
File "/tmp/pip-install-9n9b9ru_/pycurl/setup.py", line 227, in configure_unix
raise ConfigurationError(msg)
__main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory: 'curl-config': 'curl-config'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-9n9b9ru_/pycurl/
You are using pip version 10.0.1, however version 19.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
FATAL: Failed installing package pycurl
[cont-init.d] 81-python-packages.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 50-compiled-symlink.sh: executing...
[cont-finish.d] 50-compiled-symlink.sh: exited 0.
[cont-finish.d] 99-message.sh: executing...
-----------------------------------------------------------
Oops! Something went wrong.
We are so sorry, but something went terribly wrong when
starting or running this add-on.
it needs to be done like i suggested in the last 2 postings.
however i think thats only step 1.
its very well possible that pycurl depends on more libs, but that can be found out by reading the logs after restart.
but its probably also case sensitive and i just did a lookup with google and the package is called pycURL
Requirement already satisfied: pip in /usr/lib/python3.6/site-packages (10.0.1)
You are using pip version 10.0.1, however version 19.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
ERROR: You must give at least one requirement to install (see "pip help install")
You are using pip version 10.0.1, however version 19.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
FATAL: Failed installing package --upgrade