Habs jetzt beim Image integriert, hat problemlos funktioniert... du brauchst sicher nur Geduld! Auf nem Raspi 1 dauert der ganze Prozess mehrere Stunden!
Einfach 2. SSH Verbindung aufmachen und mit top checken, ob python3 noch läuft. Davor am besten smarthome und so stoppen.
Ankündigung
Einklappen
Keine Ankündigung bisher.
Raspberry Image Version 2.2 mit SmarthomeNG 1.5.1
Einklappen
Dieses Thema ist geschlossen.
X
X
-
Hm, das läuft jettz wiede rin die Richtung mit der ich ja schon eine laufenden ModbusPy irgendwie hinbekommen habe...
Aber beim Install kommen viele Warnungen und dann bleibt derr Prozess hängen...
Vielleicht schaust du dir das mal in Ruhe an - muss doch irgendwie ins Image integrierbar sein (-:
Aber mein Plugin läuft mit dem was er damit installiert hat... (-.Code:Installed /tmp/easy_install-s0rzrwcy/Twisted-17.5.0/.eggs/incremental-17.5.0-py3.5.egg warning: no previously-included files matching '*.misc' found under directory 'src/twisted' warning: no previously-included files matching '*.bugfix' found under directory 'src/twisted' warning: no previously-included files matching '*.doc' found under directory 'src/twisted' warning: no previously-included files matching '*.feature' found under directory 'src/twisted' warning: no previously-included files matching '*.removal' found under directory 'src/twisted' warning: no previously-included files matching 'NEWS' found under directory 'src/twisted' warning: no previously-included files matching 'README' found under directory 'src/twisted' warning: no previously-included files matching 'newsfragments' found under directory 'src/twisted' warning: no previously-included files found matching 'src/twisted/topfiles/CREDITS' warning: no previously-included files found matching 'src/twisted/topfiles/ChangeLog.Old' warning: no previously-included files found matching 'pyproject.toml' warning: no previously-included files found matching 'codecov.yml' warning: no previously-included files found matching 'appveyor.yml' no previously-included directories found matching 'bin' no previously-included directories found matching 'admin' no previously-included directories found matching '.travis' warning: no files found matching '*.Quotes' under directory 'docs' warning: no previously-included files found matching 'docs/historic/2003' warning: no previously-included files matching '*' found under directory 'docs/historic/2003' -> dann hängt der Prozess
Zuletzt geändert von boardman; 16.06.2017, 23:13.
Einen Kommentar schreiben:
-
Du musst nach dem Klonen noch im pymodbus Verzeichnis
ausführen.Code:python3 setup.py install
Warnungen kannst wohl ignorieren. Würde auch vorschlagen, das modbus Modul völlig unabhängig mal in einer eigenen python3 Instanz zu testen. Den Code dazu gibt es auf der git Seite: https://github.com/riptideio/pymodbusZuletzt geändert von Onkelandy; 16.06.2017, 23:01.
Einen Kommentar schreiben:
-
das ging nun fix...
(#)~:$ git clone https://github.com/riptideio/pymodbus -b python3 --single-branch 22:59:40
Klone nach 'pymodbus'...
remote: Counting objects: 2878, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 2878 (delta 0), reused 1 (delta 0), pack-reused 2876
Empfange Objekte: 100% (2878/2878), 1.95 MiB | 640.00 KiB/s, Fertig.
Löse Unterschiede auf: 100% (1975/1975), Fertig.
Prüfe Konnektivität... Fertig.
(#)~:$
ich teste ob es installiert ist
Hm, ich hoffe ich habe nichts vergessen, aber ich bekommen nun eine ganz neuen Fehler den ich nicht einordnen kann:
Code:2017-06-16 23:44:29 DEBUG plugin Main Plugin: Solaredge -- plugin.py:__init__:58 --- Logging error --- --- Logging error --- 2017-06-16 23:44:29 ERROR smarthome Main Unhandled exception: 'utf-8' codec can't decode byte 0xe4 in position 110: invalid continuation byte <class 'UnicodeDecodeError'> File "/usr/local/smarthome/bin/smarthome.py", line 653, in <module> sh.start() File "/usr/local/smarthome/bin/smarthome.py", line 315, in start self._plugins = lib.plugin.Plugins(self, configfile=self._plugin_conf_basename) File "/usr/local/smarthome/lib/plugin.py", line 94, in __init__ logger.exception("Plugin {0} exception: {1}".format(plugin, e)) File "/usr/local/lib/python3.5/logging/__init__.py", line 1314, in exception self.error(msg, *args, exc_info=exc_info, **kwargs) File "/usr/local/lib/python3.5/logging/__init__.py", line 1308, in error self._log(ERROR, msg, args, **kwargs) File "/usr/local/lib/python3.5/logging/__init__.py", line 1415, in _log self.handle(record) File "/usr/local/lib/python3.5/logging/__init__.py", line 1425, in handle self.callHandlers(record) File "/usr/local/lib/python3.5/logging/__init__.py", line 1487, in callHandlers hdlr.handle(record) File "/usr/local/lib/python3.5/logging/__init__.py", line 855, in handle self.emit(record) File "/usr/local/lib/python3.5/logging/handlers.py", line 75, in emit self.handleError(record) File "/usr/local/lib/python3.5/logging/__init__.py", line 908, in handleError traceback.print_exception(t, v, tb, None, sys.stderr) File "/usr/local/lib/python3.5/traceback.py", line 100, in print_exception type(value), value, tb, limit=limit).format(chain=chain): File "/usr/local/lib/python3.5/traceback.py", line 487, in __init__ self._load_lines() File "/usr/local/lib/python3.5/traceback.py", line 500, in _load_lines self.__context__._load_lines() File "/usr/local/lib/python3.5/traceback.py", line 500, in _load_lines self.__context__._load_lines() File "/usr/local/lib/python3.5/traceback.py", line 498, in _load_lines frame.line File "/usr/local/lib/python3.5/traceback.py", line 282, in line self._line = linecache.getline(self.filename, self.lineno).strip() File "/usr/local/lib/python3.5/linecache.py", line 16, in getline lines = getlines(filename, module_globals) File "/usr/local/lib/python3.5/linecache.py", line 47, in getlines return updatecache(filename, module_globals) File "/usr/local/lib/python3.5/linecache.py", line 137, in updatecache lines = fp.readlines() File "/usr/local/lib/python3.5/codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) -- smarthome.py:_excepthook:542 ^C2017-06-16 23:44:36 INFO smarthome Main Number of Threads: 7 -- smarthome.py:stop:379 2017-06-16 23:44:36 INFO smarthome Main SmartHomeNG stopped -- smarthome.py:stop:403 Exception ignored in: <module 'threading' from '/usr/local/lib/python3.5/threading.py'> Traceback (most recent call last): File "/usr/local/lib/python3.5/threading.py", line 1288, in _shutdown t.join() File "/usr/local/lib/python3.5/threading.py", line 1054, in join self._wait_for_tstate_lock() File "/usr/local/lib/python3.5/threading.py", line 1070, in _wait_for_tstate_lock elif lock.acquire(block, timeout): File "/usr/local/smarthome/bin/smarthome.py", line 407, in stop exit() File "/usr/local/lib/python3.5/_sitebuiltins.py", line 26, in __call__ raise SystemExit(code) SystemExit: NoneZuletzt geändert von boardman; 16.06.2017, 22:46.
Einen Kommentar schreiben:
-
Ja, soweit ich weiss, wurde googlecode eingestellt.
Unter https://github.com/riptideio/pymodbus steht:
Also würde ich vielleicht mal den branch python3 verwenden: https://github.com/riptideio/pymodbus/tree/python3Furthermore, it should work fine under any python version > 2.3 with a python 3.0 branch currently being maintained as well.
SVN brauchst du dann auch nicht unbedingt, für GitHub nimmst du besser git:
Code:git clone https://github.com/riptideio/pymodbus -b python3 --single-branch
Einen Kommentar schreiben:
-
okay, svn ist nun da aber:
(#)~:$ svn checkout http://pymodbus.googlecode.com/svn/trunk/ pymodbus-read-only svn: E160013: Unable to connect to a repository at URL 'http://pymodbus.googlecode.com/svn/trunk'
svn: E160013: »/svn/trunk« Pfad nicht gefunden
Ich glaube die aktuelle Entwicklung liegt hier : https://github.com/riptideio/pymodbus
Aber da hatte ich ja Problem beim Installieren... wie geht es mit dem Image am besten?
uweZuletzt geändert von boardman; 16.06.2017, 22:11.
Einen Kommentar schreiben:
-
Ich habe mal zurückgesetzt und versucht:
apt-get update und dann
(#)~:$ apt-get install svn 20:03:49
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
E: Paket svn kann nicht gefunden werden.
(#)~:$ svn checkout http://pymodbus.googlecode.com/svn/trunk/ pymodbus-read-only-bash: svn: Kommando nicht gefunden.
[Exit 127 ]
Einen Kommentar schreiben:
-
Was ist wenn du es beim Image mit dem installierst?
musst vermutlich noch davorCode:svn checkout [URL]http://pymodbus.googlecode.com/svn/trunk/[/URL] pymodbus-read-only cd pymodbus-read-only python3 setup.py
Code:apt-get install subversion
Zuletzt geändert von Onkelandy; 16.06.2017, 21:32.
Einen Kommentar schreiben:
-
Habe gerade Jessi hochgefahren, wie sehe ich das ?
In Skript steht #!/usr/bin/env python ---------> geändert auf python3 läuft aber auch
Beim SH steht dort #!/usr/bin/env python3
Aufrufen mit
Sorry kein Plan von den ganzen Versionen...Code:python /home/pi/modbustest.py
PS: gerade gesehen, es ist Python 2 wohl... mal sehen ob ich auch Python3 testen kann...
Ich installiere Python 3.4 mal nach , Jessi light hat nur 2.4 dabei...Code:pi@raspberrypi-test:~ $ python Python 2.7.9 (default, Sep 17 2016, 20:26:04) [GCC 4.9.2] on linux2
Vermutlich habe ich dann den selben Fehler wie unter SH...
De Eigentliche Frage: Wie installiere ich das mittels PIP korrekt das es dann auch läuft... bzw. kann ich die selbe Version von Pymodbus nutzen... ichhabe Syntaktische Fehler unter Python 3, die ich bei Jessi (2.4.) nicht hatte... ggf hat sich hier aber auch Pymodbus verändert, ich werde das mal im Jessi testen...
und bin gescheitert: nach:
Code:sudo apt-get install python3 sudo apt-get install python3-setuptools sudo apt-get install python3-pip sudo easy_install3 -U pymodbus > File "/tmp/easy_install-xio33owb/pymodbus-1.2.0/pymodbus/__init__.py", line 37 True, False = (1 == 1), (0 == 1) ^ SyntaxError: can't assign to keyword
Zuletzt geändert von bmx; 16.06.2017, 11:47.
Einen Kommentar schreiben:
-
Hattest du denn im Jessi Python 2 oder 3 installiert und verwendet?
Einen Kommentar schreiben:
-
Hast Du mit pip3 installiert? Sonst hat pip Dir pymodbus in die Python 2.7 Installation installiert.
Einen Kommentar schreiben:
-
Hallo, ich brauche noch mal eien Tip, habe Probleme bei der Installation der richtigen pymodbus Version...
Im Pluggit Plugin wird die Google Version verwendet:
# pymodbus library from https://code.google.com/p/pymodbus/
Das hatte ich so auch unter SH gemacht aber massive Probleme mit dem Bus bekommen , manche Konvertierungen scheinenn einfach nicht zu gehen...Code:[B]Installing[/B] You can install using pip or easy install by issuing the following commands in a terminal window (make sure you have correct permissions or a virtualenv currently running): easy_install -U pymodbus pip install -U pymodbus Otherwise you can pull the trunk source and install from there: svn checkout http://pymodbus.googlecode.com/svn/trunk/ pymodbus-read-only cd pymodbus-read-only python setup.py install
Um das Modbus Problem einzugrenzen habe ich ein Jessi light installiert, dann
und danachCode:sudo apt-get update && sudo apt-get upgrade
Darauf hin hatte ich eine funktionierende Python Umgebung incl. Pymodbus und konnte alles vom Bus lesen wie geplant...Code:sudo apt-get install python-pymodbus
Mit der Obigen SH Installation funktionieren identische Logiken nicht... also ein Problem der Pymodbus Version...
auf dem SH Image scheitert an der Stick Größe -> Platte VollCode:sudo apt-get update && sudo apt-get upgrade
führt nun wieder zu einer defekten??? pymodbus InstllationCode:sudo apt-get update sudo apt-get install python-pymodbus
Ich vermute nun, dass das ggf an verschienen Python versione liegt - blicke da aber nicht wirklich durch - wie komme ich weiter?Code:2017-06-15 17:50:07 ERROR plugin Main Plugin Solaredge exception: No module named 'pymodbus' -- plugin.py:__init__:94 Traceback (most recent call last): File "/usr/local/smarthome/lib/plugin.py", line 90, in __init__ plugin_thread = PluginWrapper(smarthome, plugin, classname, classpath, args, instance) File "/usr/local/smarthome/lib/plugin.py", line 127, in __init__ exec("import {0}".format(classpath)) File "<string>", line 1, in <module> File "/usr/local/smarthome/plugins/solaredge/__init__.py", line 31, in <module> from pymodbus.constants import Endian
Ratlos.. Uwe
Zuletzt geändert von bmx; 16.06.2017, 11:48.
Einen Kommentar schreiben:
-
Vielen Dank erstmal für das tolle Image!
ich habe das System jetzt das zweite mal aufgesetzt, da ich Probleme mit den Rechten und mir diese zerschossen habe.
Nun aber stehe ich vor einem, hoffentlich kleinem, Problem.
Es betrifft die Kommunikation zwischen SmartVisu und SmarthomeNG,
ich habe mehrere plugin.yaml Einstellungen probiert, in der SmartVisu bekomme ich aber
immer Websocket Error undefined. Das Backend ist auch nicht aufrufbar (http://192.168.1.77:8383/) (http://192.168.1.77 - jedoch zeigt die defaultSite an)
SmartVisu Einstellungen:
System: SmartHome.py
Host: 192.168.1.77 (IP des Raspberry)
Port: 2424
Reconnect: ON
Meine plugin.yaml:
tail /usr/local/smarthome/var/log/smarthome.logCode:%YAML 1.1 --- BackendServer: class_name: BackendServer class_path: plugins.backend user: admin password: admin knx: class_name: KNX class_path: plugins.knx host: 127.0.0.1 port: 6720 # send_time: 600 # update date/time every 600 seconds, default none # time_ga: 13/0/0 # default none # date_ga: 6/0/1 # default none # busmonitor: True # log all knx messages, default false # readonly: True ## don't write to knx bus, default false" # instance: default websocket: class_name: WebSocket clas_path: plugins.visu_websocket # wsproto: 4 # acl: rw smartvisu: class_name: SmartVisu class_path: plugins.visu_smartvisu smartvisu_dir: /var/www/html/smartvisu cli: class_name: CLI class_path: plugins.cli ip: 192.168.1.77 update: 'True' # password: admin sql: class_name: SQL class_path: plugins.sqlite # ow: # class_name: OneWire # class_path: plugins.onewire # host: 127.0.0.1 # port: 4304 # visu: # class_name: WebSocket # class_path: plugins.visu # smartvisu_dir: /var/www/html/smartVISU
Code:2017-06-14 23:18:47 INFO Main Loading '/usr/local/smarthome/etc/plugin.yaml' to 'OrderedDict' 2017-06-14 23:18:47 ERROR Main Unhandled exception: string indices must be integers <class 'TypeError'> File "/usr/local/smarthome/bin/smarthome.py", line 653, in <module> sh.start() File "/usr/local/smarthome/bin/smarthome.py", line 315, in start self._plugins = lib.plugin.Plugins(self, configfile=self._plugin_conf_basename) File "/usr/local/smarthome/lib/plugin.py", line 61, in __init__ value = _conf[plugin][arg]Zuletzt geändert von schorge; 14.06.2017, 22:22.
Einen Kommentar schreiben:


Einen Kommentar schreiben: