user0x01 / venus-mqtt-pvinverter

connect pvinverter to victron gx via mqtt
7 stars 2 forks source link

Epever #1

Open DerRudi79 opened 1 year ago

DerRudi79 commented 1 year ago

Hello, I would like to include my two epever with your script on the Venus os. The charge controllers are connected to another RaspberryPi and it already provides the data via MQTT. What do I have to adjust in the script and where do I have to copy the two files to?

Thank you very much Rudi

user0x01 commented 1 year ago

Hallo Rudi

Das eine ist je ein Service (phyton) für die verschiedene Geräteklassen, den man auf dem Venus os installieren muss. Das andere dient als Beispiel (yaml file für esphome) wie man die Daten passend für das Skript zum MQTT Server publiziert.

Um mehrere Geräte der gleichen Klasse auseinanderzuhalten gibt man ihnen unter "key" einen eindeutigen Namen "deviceinstance" ist eine freie Nummer die in victron vrm noch nicht vergeben ist, Key und deviceinstance könen natürlioch aiuch gleich sein.

Die Readme für die Schritte, die man zur Installation machen muss, ist angepasst.

One is a service (phyton) for different device classes that you have to install on the Venus os. The other file is an example (yaml file for esphome) how to publish the data suitable for the script to the MQTT server.

In order to distinguish several devices of the same class, they are given a unique name under "key". "deviceinstance" is a free number that has not yet been assigned in victron vrm, key and deviceinstance can also be the same.

The readme for the steps you have to take to install has been adjusted.

DerRudi79 commented 1 year ago

Moin, vielen Dank für die Antwort. der Befehl gibt einen Fehler aus

pip install paho-mqtt
-sh: pip: command not found

Also brauche ich lediglich die "solarcharger.py"? Wo muss ich diese hin kopieren? Sorry für die Fragen ich bin absoluter Anfänger und werde wohl noch einiges an Unterstützung brauchen.

user0x01 commented 1 year ago

Dann ist pip nicht installiert, das macht die Zeile davor,

Versuche mal ohne --upgrade https://docs.python.org/3/library/ensurepip.html

Wo muss ich diese hin kopieren? Die Installation läuft genauso wie hier beschrieben, https://github.com/RalfZim/venus.dbus-fronius-smartmeter#installation Statt "dbus-fronius-smartmeter" kannst du einen Namen deiner Wahl benutzen.

DerRudi79 commented 1 year ago

Moin, es funktioniert nicht

root@raspberrypi2:~# python -m ensurepip Traceback (most recent call last): File "<string>", line 6, in <module> File "/usr/lib/python3.8/runpy.py", line 207, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code _run_code(code, mod_globals, init_globals, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/tmp/tmpd6kbj0ii/pip-22.0.4-py3-none-any.whl/pip/__main__.py", line 29, in <module> File "<frozen zipimport>", line 259, in load_module File "/tmp/tmpd6kbj0ii/pip-22.0.4-py3-none-any.whl/pip/_internal/cli/main.py", line 9, in <module> File "<frozen zipimport>", line 259, in load_module File "/tmp/tmpd6kbj0ii/pip-22.0.4-py3-none-any.whl/pip/_internal/cli/autocompletion.py", line 10, in <module> File "<frozen zipimport>", line 259, in load_module File "/tmp/tmpd6kbj0ii/pip-22.0.4-py3-none-any.whl/pip/_internal/cli/main_parser.py", line 8, in <module> File "<frozen zipimport>", line 259, in load_module File "/tmp/tmpd6kbj0ii/pip-22.0.4-py3-none-any.whl/pip/_internal/cli/cmdoptions.py", line 23, in <module> File "<frozen zipimport>", line 259, in load_module File "/tmp/tmpd6kbj0ii/pip-22.0.4-py3-none-any.whl/pip/_internal/cli/parser.py", line 12, in <module> File "<frozen zipimport>", line 259, in load_module File "/tmp/tmpd6kbj0ii/pip-22.0.4-py3-none-any.whl/pip/_internal/configuration.py", line 20, in <module> File "<frozen zipimport>", line 259, in load_module File "/tmp/tmpd6kbj0ii/pip-22.0.4-py3-none-any.whl/pip/_internal/exceptions.py", line 14, in <module> File "<frozen zipimport>", line 259, in load_module File "/tmp/tmpd6kbj0ii/pip-22.0.4-py3-none-any.whl/pip/_vendor/rich/console.py", line 44, in <module> File "<frozen zipimport>", line 259, in load_module File "/tmp/tmpd6kbj0ii/pip-22.0.4-py3-none-any.whl/pip/_vendor/rich/themes.py", line 1, in <module> File "<frozen zipimport>", line 259, in load_module File "/tmp/tmpd6kbj0ii/pip-22.0.4-py3-none-any.whl/pip/_vendor/rich/default_styles.py", line 3, in <module> File "<frozen zipimport>", line 259, in load_module File "/tmp/tmpd6kbj0ii/pip-22.0.4-py3-none-any.whl/pip/_vendor/rich/style.py", line 8, in <module> File "<frozen zipimport>", line 259, in load_module File "/tmp/tmpd6kbj0ii/pip-22.0.4-py3-none-any.whl/pip/_vendor/rich/color.py", line 3, in <module> ModuleNotFoundError: No module named 'colorsys' Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/usr/lib/python3.8/ensurepip/__main__.py", line 5, in <module> sys.exit(ensurepip._main()) File "/usr/lib/python3.8/ensurepip/__init__.py", line 204, in _main return _bootstrap( File "/usr/lib/python3.8/ensurepip/__init__.py", line 123, in _bootstrap return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) File "/usr/lib/python3.8/ensurepip/__init__.py", line 32, in _run_pip return subprocess.run([sys.executable, "-c", code], check=True).returncode File "/usr/lib/python3.8/subprocess.py", line 516, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/usr/bin/python', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/tmp/tmpd6kbj0ii/setuptools-56.0.0-py3-none-any.whl\', \'/tmp/tmpd6kbj0ii/pip-22.0.4-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/tmp/tmpd6kbj0ii\', \'setuptools\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.

root@raspberrypi2:~# pip install paho-mqtt -sh: pip: command not found root@raspberrypi2:~#

user0x01 commented 1 year ago

Ich glaube, es ist besser, du stellst die Frage in einem Forum, bei dem es viele Venus User gibt. z.B.: https://community.victronenergy.com/questions/93714/no-pip-in-python.html Ich hab Pip irgendwie installiert, aber ich weiß auch nicht mehr wie.

user0x01 commented 1 year ago

oder so

opkg install python3-pip python3-modules

gefunden bei: https://github.com/Louisvdw/dbus-serialbattery/pull/372

DerRudi79 commented 1 year ago

Moin, vielen dank für deine Mühe. Werde es die Tage mal in angriff nehmen.

mr-manuel commented 1 year ago

paho-mqtt ist normalweise in Venus OS schon installiert, da Mosquitto drauf läuft.