freakent / dbus-mqtt-devices

A driver for Victron VenusOS GX devices to support use of dbus-mqtt/flashmq-mqtt
MIT License
122 stars 24 forks source link

Error while installing #120

Closed devilmastah closed 6 months ago

devilmastah commented 6 months ago

Version

0.8

What version of VenusOS are you running on your GX device

3.31 from what i understand

Does this issue occur during installation or at runtime ?

Installation

What is the issue you are actually experiencing?

When running the install script i run against following error, its the latest version as prescribed in the readme on this repo:

`ython3-pip. dbus-mqtt-devices: Pip install module dependencies Collecting PyYAML~=6.0 Downloading PyYAML-6.0.1.tar.gz (125 kB) |████████████████████████████████| 125 kB 1.6 MB/s Installing build dependencies ... done Getting requirements to build wheel ... done ERROR: Exception: Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", lin e 186, in _main status = self.run(options, args) File "/usr/lib/python3.8/site-packages/pip/_internal/commands/install.py", lin e 331, in run resolver.resolve(requirement_set) File "/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 177, in resolve discovered_reqs.extend(self._resolve_one(requirement_set, req)) File "/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "/usr/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for abstract_dist = self.preparer.prepare_linked_requirement(req) File "/usr/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", l ine 515, in prepare_linked_requirement abstract_dist = _get_prepared_distribution( File "/usr/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", l ine 95, in _get_prepared_distribution abstract_dist.prepare_distribution_metadata(finder, build_isolation) File "/usr/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 38, in prepare_distribution_metadata self._setup_isolation(finder) File "/usr/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 96, in _setup_isolation reqs = backend.get_requires_for_build_wheel() File "/usr/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py", line 1 51, in get_requires_for_build_wheel return self._call_hook('get_requires_for_build_wheel', { File "/usr/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py", line 2 55, in _call_hook raise BackendUnavailable(data.get('traceback', '')) pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last ): File "/usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", lin e 63, in _build_backend obj = import_module(mod_path) File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 961, in _find_and_load_unlocked File "", line 219, in _call_with_frames_removed File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 843, in exec_module File "", line 219, in _call_with_frames_removed File "/var/volatile/tmp/pip-build-env-61vbp_88/overlay/lib/python3.8/site-pack ages/setuptools/init.py", line 17, in from .dist import Distribution File "/var/volatile/tmp/pip-build-env-61vbp_88/overlay/lib/python3.8/site-pack ages/setuptools/dist.py", line 27, in from .extern.packaging.markers import InvalidMarker, Marker File "/var/volatile/tmp/pip-build-env-61vbp_88/overlay/lib/python3.8/site-pack ages/setuptools/_vendor/packaging/markers.py", line 11, in from ._parser import ( File "/var/volatile/tmp/pip-build-env-61vbp_88/overlay/lib/python3.8/site-pack ages/setuptools/_vendor/packaging/_parser.py", line 10, in from ._tokenizer import DEFAULT_RULES, Tokenizer File "/var/volatile/tmp/pip-build-env-61vbp_88/overlay/lib/python3.8/site-pack ages/setuptools/_vendor/packaging/_tokenizer.py", line 3, in from dataclasses import dataclass ModuleNotFoundError: No module named 'dataclasses'

dbus-mqtt-devices: Set up Victron module libraries dbus-mqtt-devices: Set up device service to autorun on restart dbus-mqtt-devices: Adding device service to /data/rc.local dbus-mqtt-devices: Setup complete `

I am trying to run this on a brand new Multiplus II GX version. do not know if this has to do with it. When i do the last step catting rclocal this seems fine.

If this is not installation related, what does the status payload look like that you are publishing to the driver to register your device?

No response

Relevant log output

No response

freakent commented 6 months ago

I'm unsure why you are getting this error as DataClasses has been added as a dependency in requirements.txt. I would like to see the full log from the setup.sh.

If you just want to get up and running quickly please check the troubleshooting section in the README.

Troubleshooting

during installation

If you receive an error during setup that includes the lines

ModuleNotFoundError: No module named 'dataclasses' Try running the following before running the setup.sh script again.

opkg install python3-modules

freakent commented 6 months ago

I'm also unsure what this log entry refers to:

substitutions: -sh: substitutions:: command not found root@nanopi:/data/drivers# device_name: "esp32_DSMR"

Can you say what was happening here?

devilmastah commented 6 months ago

Oh sorry, the last part should not have been included i accidently copy pasted some text in my putty window after the setup :) I updated the initial comment. I will try the opkg command.

freakent commented 6 months ago

One last thought from me is about using this on Multiplus II GX. I'm not sure how much RAM the venusos has available to it on the Multiplus GX. Keep an eye on system stability. If you get unexpected reboots you might not have enough RAM to support additional drivers etc. I had a similar issue with my original CCGX.

devilmastah commented 6 months ago

If this happens i will post it here so you know :) Thought it was worth a try. dataclasses problem is solved, i completely missed it in the documentation

devilmastah commented 6 months ago

@freakent just to let you know, its been running perfectly stable for the past 9 hours on a Multiplus-II 3000 GX. In combination with the esp project https://github.com/NuKeMtje/ESPHomeDSMRVictron this saved me 100 bucks on a energy meter + extra cabling effort :)