Mein Projekt CaSSAndRA zur Steuerung des Ardumowers

Ich konnte jetzt den Mähmotor starten und auch wieder stoppen, vorwärts fahren und Kurven, nur zurück fährt er nicht. Draußen wird i. M. nichts, es regnet!
Die journalctl-Ausgabe ist folgende:

Code:
ardumower@raspberrypi:~/CaSSAndRA/CaSSAndRA $ journalctl -u cassandra -e
Mai 05 18:25:42 raspberrypi python3[3674]: 2023-05-05 18:25:42 DEBUG Content: S,25.84,12.40,0.06,-0.26,0,0,0,0.90,2,0.00,0.00,93420.05,0,0.02,0,-1592743,0.00>
Mai 05 18:25:42 raspberrypi python3[3674]: 2023-05-05 18:25:42 DEBUG Recieved checksum:0x0 Calced checksum: 0x0
Mai 05 18:25:42 raspberrypi python3[3674]: 2023-05-05 18:25:42 DEBUG Backend: Calc data from state data frame
Mai 05 18:25:44 raspberrypi python3[3674]: 2023-05-05 18:25:44 INFO Backend: Performing get state http-request
Mai 05 18:25:44 raspberrypi python3[3674]: 2023-05-05 18:25:44 DEBUG Calced checksumme: 0x13
Mai 05 18:25:44 raspberrypi python3[3674]: 2023-05-05 18:25:44 DEBUG encryption true
Mai 05 18:25:44 raspberrypi python3[3674]: 2023-05-05 18:25:44 DEBUG Starting new HTTP connection (1): 192.168.1.29:80
Mai 05 18:25:45 raspberrypi python3[3674]: 2023-05-05 18:25:45 DEBUG http://192.168.1.29:80 "POST / HTTP/1.1" 200 86
Mai 05 18:25:45 raspberrypi python3[3674]: 2023-05-05 18:25:45 DEBUG Status code: 200
Mai 05 18:25:45 raspberrypi python3[3674]: 2023-05-05 18:25:45 DEBUG Content: S,25.84,12.40,0.06,-0.26,0,0,0,0.55,2,0.00,0.00,93517.70,0,0.02,0,-1592743,0.00>
Mai 05 18:25:45 raspberrypi python3[3674]: 2023-05-05 18:25:45 DEBUG Recieved checksum:0xa Calced checksum: 0xa
Mai 05 18:25:45 raspberrypi python3[3674]: 2023-05-05 18:25:45 DEBUG Backend: Calc data from state data frame
Mai 05 18:25:47 raspberrypi python3[3674]: 2023-05-05 18:25:47 INFO Backend: Performing get state http-request
Mai 05 18:25:47 raspberrypi python3[3674]: 2023-05-05 18:25:47 DEBUG Calced checksumme: 0x13
Mai 05 18:25:47 raspberrypi python3[3674]: 2023-05-05 18:25:47 DEBUG encryption true
Mai 05 18:25:47 raspberrypi python3[3674]: 2023-05-05 18:25:47 DEBUG Starting new HTTP connection (1): 192.168.1.29:80
Mai 05 18:25:48 raspberrypi python3[3674]: 2023-05-05 18:25:48 DEBUG http://192.168.1.29:80 "POST / HTTP/1.1" 200 86
Mai 05 18:25:48 raspberrypi python3[3674]: 2023-05-05 18:25:48 DEBUG Status code: 200
Mai 05 18:25:48 raspberrypi python3[3674]: 2023-05-05 18:25:48 DEBUG Content: S,25.84,12.40,0.06,-0.26,0,0,0,0.31,2,0.00,0.00,93615.33,0,0.02,0,-1592743,0.00>
Mai 05 18:25:48 raspberrypi python3[3674]: 2023-05-05 18:25:48 DEBUG Recieved checksum:0x2 Calced checksum: 0x2
Mai 05 18:25:48 raspberrypi python3[3674]: 2023-05-05 18:25:48 DEBUG Backend: Calc data from state data frame
Mai 05 18:25:50 raspberrypi python3[3674]: 2023-05-05 18:25:50 INFO Backend: Performing get state http-request
Mai 05 18:25:50 raspberrypi python3[3674]: 2023-05-05 18:25:50 DEBUG Calced checksumme: 0x13
Mai 05 18:25:50 raspberrypi python3[3674]: 2023-05-05 18:25:50 DEBUG encryption true
Mai 05 18:25:50 raspberrypi python3[3674]: 2023-05-05 18:25:50 DEBUG Starting new HTTP connection (1): 192.168.1.29:80
Mai 05 18:25:50 raspberrypi python3[3674]: 2023-05-05 18:25:50 DEBUG http://192.168.1.29:80 "POST / HTTP/1.1" 200 86
Mai 05 18:25:50 raspberrypi python3[3674]: 2023-05-05 18:25:50 DEBUG Status code: 200
Mai 05 18:25:50 raspberrypi python3[3674]: 2023-05-05 18:25:50 DEBUG Content: S,25.84,12.40,0.06,-0.26,0,0,0,0.98,2,0.00,0.00,93705.99,0,0.02,0,-1592743,0.00>
Mai 05 18:25:50 raspberrypi python3[3674]: 2023-05-05 18:25:50 DEBUG Recieved checksum:0x1b Calced checksum: 0x1b
Mai 05 18:25:50 raspberrypi python3[3674]: 2023-05-05 18:25:50 DEBUG Backend: Calc data from state data frame
Mai 05 18:25:52 raspberrypi python3[3674]: 2023-05-05 18:25:52 INFO Backend: Performing get state http-request
Mai 05 18:25:52 raspberrypi python3[3674]: 2023-05-05 18:25:52 DEBUG Calced checksumme: 0x13
Mai 05 18:25:52 raspberrypi python3[3674]: 2023-05-05 18:25:52 DEBUG encryption true
Mai 05 18:25:52 raspberrypi python3[3674]: 2023-05-05 18:25:52 DEBUG Starting new HTTP connection (1): 192.168.1.29:80
Mai 05 18:25:53 raspberrypi python3[3674]: 2023-05-05 18:25:53 DEBUG http://192.168.1.29:80 "POST / HTTP/1.1" 200 86
Mai 05 18:25:53 raspberrypi python3[3674]: 2023-05-05 18:25:53 DEBUG Status code: 200
Mai 05 18:25:53 raspberrypi python3[3674]: 2023-05-05 18:25:53 DEBUG Content: S,25.84,12.40,0.06,-0.26,0,0,0,0.64,2,0.00,0.00,93796.64,0,0.02,0,-1592743,0.00>
Mai 05 18:25:53 raspberrypi python3[3674]: 2023-05-05 18:25:53 DEBUG Recieved checksum:0x16 Calced checksum: 0x16
Mai 05 18:25:53 raspberrypi python3[3674]: 2023-05-05 18:25:53 DEBUG Backend: Calc data from state data frame
 
Du kannst mit Pfeilen im Journal Blättern, ich brauche die Stellen, wo irgendwas cmd send to Rover steht.
Welche FW ist auf dem ESP32?
 
Hallo @EinEinach, zuerst einmal vielen Dank für Deine Geduld!
Wenn ich im Journal blättere erscheint da nirgends etwas wie 'cmd send to Rower'. Ich habe Cassandra neu gestartet, habe mit remote control den Mähmotor gestartet und auch wieder gestoppt, aber keine solche Meldung im Log.
Die Firmware auf dem ESP ist aus der 298er Version.
Mit dem Raspberry über USB wollte ich schon testen, aber da fing es an zu regnen, kann ich vielleicht morgen einmal probieren.
 
@Beecee Das sind 2 unterschiedliche Methoden:
- Entweder Du richtest Git ein. Dann holst Du Dir das ganze Repository und bekommst ein Arbeitsverzeichnis, in dem der ganze Verzeichnisbaum entpackt enthalten ist. Dafür musst Du zuvor Git installieren, falls es in Deinem Unixsystem nicht schon enthalten ist. Dann führst Du den o.g. Befehl im Ordner /home/ardumower aus, damit die Ordnerstruktur an der richtigen Stelle ist.
- Oder Du holst Dir den aktuellen Code von Github per "Download Zip". Dann kannst Du das Archiv an einem Laptop entpacken und den Verzeichnisbaum bspw. per SFTP auf das Linuxsystem nach /home/ardumower kopieren.

Ich nutze es etwas gemischt. Ich Klone das Repository auf meinen Laptop und verwalte von dem Laptop den Pi per SFTP und ssh-Terminal.
 
@Beecee Das sind 2 unterschiedliche Methoden:
- Entweder Du richtest Git ein. Dann holst Du Dir das ganze Repository und bekommst ein Arbeitsverzeichnis, in dem der ganze Verzeichnisbaum entpackt enthalten ist. Dafür musst Du zuvor Git installieren, falls es in Deinem Unixsystem nicht schon enthalten ist. Dann führst Du den o.g. Befehl im Ordner /home/ardumower aus, damit die Ordnerstruktur an der richtigen Stelle ist.
- Oder Du holst Dir den aktuellen Code von Github per "Download Zip". Dann kannst Du das Archiv an einem Laptop entpacken und den Verzeichnisbaum bspw. per SFTP auf das Linuxsystem nach /home/ardumower kopieren.

Ich nutze es etwas gemischt. Ich Klone das Repository auf meinen Laptop und verwalte von dem Laptop den Pi per SFTP und ssh-Terminal.
okay Danke, jetzt läuft erstmal die Installation
 
@jottka Dein Perimeter und die Exclusions werden jetzt nach dem Neustart gleich angezeigt, ohne dass Du die Map neu importieren musst?
Es sah ja im Log so aus, als wenn es jetzt speichert.
Da waren noch Fehler bzgl. des Ladens der Statistikdaten in Deinem Log. Sind nur noch keine angelegt worden oder musst Du ggf. auch den Ordner src/measure noch anlegen?

Ggf. hast Du ja gar kein Problem mehr und musst nur auf besseres Wetter warten?
 
Da waren noch Fehler bzgl. des Ladens der Statistikdaten in Deinem Log. Sind nur noch keine angelegt worden oder musst Du ggf. auch den Ordner src/measure noch anlegen?
Ich pushe mal leere Ordner ins Github, kann sein, dass es irgendwie damit Probleme geben kann, wenn Das Verzeichnis nicht exsestiert
 
Ich habe es erst einmal aufgegeben , wenn es mal eine richtige Schritt für Schritt Anleitung gibt versuche ich es wieder.
Trotzdem danke für die Hilfe.
 
Hello.
I have installed cassandra on my raspberry. Installation ok.
I have a problem to connect with http.
Message : Warning backend http connection tonthe rover lost or not possible. Try to reconnect.
Is there an issue to resolve ?
Charles
 
Which FW do you use on ESP32?
Can you share terminal output here. Before do that, open app.py with text editor and change INFO to DEBUG in the 5th row and start the app again
 
No, that's another debugging.

Change line 5
Code:
level=logging.INFO,
-->
Code:
level=logging.DEBUG,
 
Ich pushe mal leere Ordner ins Github
Ich bin mir nicht sicher, ob Git das annimmt. Ggf. kleine Dummydateienfür diese Ordner vorsehen. Bspw. als perimeter.json ein kleines Dreieck mit 1cm Abstand um den Nullpunkt.
Dann kannst Du Dir den Aufwand im Code sparen, immer zu prüfen, ob die Ordner vorhanden sind und ggf. welche automatisch anzulegen.
 
@EinEinach
Zunächst mal Danke für deinen Einsatz und das interessante Projekt.
Leider komme ich nicht sehr weit, FW230.
Derzeit steuere ich den mower per node-red. Würde aber gerne auf dein Projekt umschwenken.
Debug:
* Serving Flask app 'app'
* Debug mode: off
2023-05-06 08:03:18 INFO Backend: Performing get state http-request
2023-05-06 08:03:18 DEBUG Calced checksumme: 0x13
2023-05-06 08:03:18 DEBUG Starting new HTTP connection (1): 10.0.0.74:80
2023-05-06 08:03:19 DEBUG http://10.0.0.74:80 "POST / HTTP/1.1" 200 83
2023-05-06 08:03:19 DEBUG Status code: 200
2023-05-06 08:03:19 DEBUG Content: S,28.68,20.02,-11.85,0.89,2,2,0,0.72,0,19.06,-13.04,0.02,43,-0.01,36,-249178,0x98

2023-05-06 08:03:19 DEBUG Recieved checksum:0x98 Calced checksum: 0x98
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/home/ardumower/CaSSAndRA/CaSSAndRA/src/backend/backendserver.py", line 31, in connect_http
connection_status = httpcomm.get_state(connect_data, connection)
File "/home/ardumower/CaSSAndRA/CaSSAndRA/src/backend/comm/httpcomm.py", line 107, in get_state
datatodf.add_state_to_df(res.text)
File "/home/ardumower/CaSSAndRA/CaSSAndRA/src/backend/data/datatodf.py", line 108, in add_state_to_df
state_to_df.columns = ['battery_voltage',
File "/home/ardumower/.local/lib/python3.9/site-packages/pandas/core/generic.py", line 6002, in __setattr__
return object.__setattr__(self, name, value)
File "pandas/_libs/properties.pyx", line 69, in pandas._libs.properties.AxisProperty.__set__
File "/home/ardumower/.local/lib/python3.9/site-packages/pandas/core/generic.py", line 730, in _set_axis
self._mgr.set_axis(axis, labels)
File "/home/ardumower/.local/lib/python3.9/site-packages/pandas/core/internals/managers.py", line 225, in set_axis
self._validate_set_axis(axis, new_labels)
File "/home/ardumower/.local/lib/python3.9/site-packages/pandas/core/internals/base.py", line 70, in _validate_set_axis
raise ValueError(
ValueError: Length mismatch: Expected axis has 16 elements, new values have 17 elements


Wenn du mir das auf die Sprünge helfen könntest.... Wäre supernett.

Danke, Gerd
 
Oben