Mein Projekt CaSSAndRA zur Steuerung des Ardumowers

Hi,
dieses Ruckeln bei einer HTTP Verbindung hat man auch, wenn man die app per HTTP und nicht per BT verbindet. Scheint nix mit Cassandra zu tun zu haben.

Viele Grüße,
Jürgen
Das dürfte an Deiner WLAN-Verbindung liegen. Entweder ist Deine WLAN-Abdeckung im Garten empfangsschwach oder Deine ESP32-Konfiguration oder WLAN-Antennen-Verbauung ist problematisch.

Bei mir ging es sowohl per Sunray-App als auch per CASSANDRA ruckelfrei.

Da hatte ich aber noch kein MQTT mit auf dem ESP32 und fuhr noch mit einem nur leicht mpdifizierten Sunray 298. Ich kann nicht ausschließen, dass er ESP32 mit der MQTT-Implementierung vielleicht überlastet ist. Seit ich MQTT aktiviert habe, hatte ich es nicht mehr ausprobiert.
 
Hi,

bei mir ist es unter HTTP sowohl mit der App, als auch mit Cassandra ruckelnd. Die WLAN Abdeckung ist es nicht, die ist überall sehr gut. Ich wollte ohnehin die ESP32 mods von Silberstreifen ausprobieren, mal schaun, ob sich dann was ändert.

Viele Grüße,
Jürgen
 
Hi thanks for this nice project!

I try to mow the grass without the boundery line first. As I understood "Mow cut edge" should give me this behaviour?

I can not get this to work, have I misunderstood? Or do you have any tips and trics up your sleave? :)

Thanks again for this piece of software!

1686046597731.png1686046724905.png
 
No you understood it correctly. But as I remember I didn‘t connect it to the pathfinder due to some problems. If I finished some tasks I will rewrite pathfinder from scratch, because I have some ideas how it should work better, then I will check all settings from GUI and connect it correctly
 
Die WLAN Abdeckung ist es nicht, die ist überall sehr gut. Ich wollte ohnehin die ESP32 mods von Silberstreifen ausprobieren, mal schaun, ob sich dann was ändert.
Das Ruckeln kann auch bei guter WLAN-Abdeckung und mit meinen Mods auftreten. Der ESP32 kann meines Wissens kein Rooming/Mesh. Dadurch muss es erstmal zu einem Verbindungsabbruch zwischen Accesspoint und ESP kommen, bevor dieser sich an einem geeigneteren Accesspoint anmeldet. Bei mir auf dem Grundstück habe ich sehr gute WLAN-Abdeckung, benötige dafür aber 3 Accesspoints. Beim Übergang von einem zum nächsten Accesspoint ruckelt die Steuerung kurz, während sich der ESP mit dem neuen Accesspoint verbindet. Ansonsten kenne ich kein Ruckeln mehr.

Das Ruckeln kann aber auch durch die Umsetzung des Joysticks verursacht werden. So springt der Joystick der Sunray-APP beim Aufsetzen des Fingers immer mit dem Mittelpunkt des Steuerbuttons auf den Mittelpunkt des Berührpunktes. Das ist extrem doof, da hierdurch ungewollte Steuerbefehle ausgelöst werden. Ich habe mit der Sunray-APP nie eine halbwegs sensible, zielgenaue Steuerung hinbekommen. Das war auch einer der Gründe, warum ich auf eine eigene Oberfläche umgestiegen bin. Bei meiner Web-Oberfläche habe ich dieses Verhalten so geändert, dass ich den Steuerbutton an jeder beliebigen Stelle greifen kann, ohne dass dieser springt. Seitdem kann man den Mäher sehr exakt steuern.

Bei der Umsetzung des eigenen Joysticks hatte ich anfangs keine ausreichende Sendefrequenz des Steuerbefehls. Das führte dazu, dass der Mäher anhält/ruckelt, wenn er nicht rechtzeitig einen neuen Befehl erhält. Bei mir hat sich 3 Steuerbefehle pro Sekunde als ausreichend für einen ruckelfreien Betrieb gezeigt.
Grüße
Jürgen
 
Hallo zusammen,

es gibt eine neue Version auf GitHub. Zu den größten Änderungen gehört der wait spinner, wenn der path planner rechnet. Sag mir Bescheid, ob Ihr euch das so vorstellt, wenn CaSSAndRA am machen ist. Außerdem lässt sich die aktuelle Geschwindigket über Remote Control verstellen. Es gibt zwei Soll-Werte. 1 für mow speed und ein für transit speed. Die Geschwindigkeit lässt sich nur während der jeweiligen Aktion verstellen. Außerdem gibt es im Settingsbereich neuer Unterpunkt (Robot). Dort kann die initiale Geschwindigkeit für Mow und Transit eingestellt werden. Diese Paramtern werden nach dem Start des Servers verwendet.

Bei diesem Update geht bitte anders vor als auf Github beschrieben.
1. Sichert euren /src/data Ordner
2. Kopiert die neue Version aus dem Github in euren Wunschverzeichnis
3. Aus dem gesicherten Ordner /src/data/user kopiert die Dateien appcfg.json, commcfg.json, mapcfg.json in das gewünschte Verzeichnis /src/data/user und ersetzt die vorhandenen Dateien
4. Kopiert den Inhalt aus dem gesicherten Ordner /src/data/measure in das gewünschte Verzeichnis /src/data/measure
5. Kopiert den Inhalt aus dem gesicherten Ordner /src/data/map in das gewünschte Verzeicnis /src/data/map und überschreibt den Inhalt

Danach kann die App, wie gewohnt gestartet werden.

Stellt bitte sicher, dass Ihr auch die richtige Version (2.9.3) der dash Bibliothek habt, sonst funktioniert das nicht. Ich hatte komischerweise auf meinem Raspberry eine 2.8.X drauf.

P.S.: Ich kann immer noch keine Bilder anhängen, sonst würde ich die Änderungen präsentieren können. @W1976 kannst du bitte prüfen, was hier mit dem Forum los ist, alle beklagen, dass keine Anhänge mehr gemacht werden können.

Gruß
Alexander
 
Hallo Alexander,

bei mir funktioniert der wait spinner einwandfrei. EIne echte Bereicherung!

Viele Grüße,
Jürgen
 
The latest version works for me using HTTP. Having an MQTT server I decided to reflash the ESP32 with MQTT enabled and try it. The mower connects to the server fine but I seem to have an issue with cassandra as whilst it connects to MQTT and subscribes it fails to update the dashboard which permanantly shows offline. I have attached a file which shows it seems to 'fails to publish' . I'm running a standard Mosquitto server and the ESP32 code is as published with sunray 298. You will see towards the end I just tried to turn the mower motor on / off.

Tried to attach the debug file but couldn't so have edited out some of the success messages to save space.

Rgds Clive

Jun 08 07:48:10 cassandra systemd[1]: Started CaSSAndRA.
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG Found GEOS DLL: <CDLL '/home/ardumower/.local/lib/python3.9/site-packages/Shapely.libs/libgeos_c-17b902da.so.1.16.0', handle 29ad3790 at 0x7f796d9be0>, using it.
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 INFO Backend: Starting backend server
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG absolute_path: /home/ardumower/CaSSAndRA/CaSSAndRA/src/backend
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 INFO Backend: Read communication config file
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG Opening commcfg.json
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG Path to commcfg.json: /src/data/user/commcfg.json
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG commcfg.json content: {'USE': 'MQTT', 'MQTT': [{'CLIENT_ID': 'Ardumower'}, {'USERNAME': ''}, {'PASSWORD': ''}, {'MQTT_SERVER': '192.168.1.22'}, {'PORT': 1883}, {'MOWER_NAME': '/ardumower/Ardumower'}], 'HTTP': [{'IP': 'http://192.168.1.1'}, {'PASSWORD': '123456'}], 'UART': [{'SERPORT': '/dev/ttyACM0'}, {'BAUDRATE': 115200}]}
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 INFO Backend: Used connection: MQTT
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG Checking connection data
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG Connection data are valid
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 INFO Backend: Read map config file
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG Opening mapcfg.json
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG Path to mapcfg.json: /src/data/user/mapcfg.json
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG mapcfg.json content: {'MOWOFFSET': 0.18, 'MOWANGLE': 140, 'MOWEDGE': 'yes', 'DISTANCETOBORDER': 2, 'PATTERN': 'lines', 'POSITIONMODE': 'relative', 'LON': 0, 'LAT': 0}
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG Values for mapcfg. mowoffset: 0.18 mowangle: 140 distance to border: 2 pattern: lines mowedge: yes
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 INFO Backend: Read app config file
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG Opening appcfg.json
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG Path to appcfg.json: /src/data/user/appcfg.json
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG appcfg.json content: {'datamaxage': 30, 'voltage_to_soc': [{'V': 22.5, 'SoC': 0}, {'V': 28.7, 'SoC': 100}], 'time_to_offline': 60, 'current_thd_charge': -0.03}
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 DEBUG Values for appcfg. datamaxage: 30 time until offline: 60 soc look up table: [{'V': 22.5, 'SoC': 0}, {'V': 28.7, 'SoC': 100}]
Jun 08 07:48:14 cassandra python3[1706]: 2023-06-08 07:48:14 INFO Backend: Read saved data
Jun 08 07:48:15 cassandra python3[1706]: 2023-06-08 07:48:15 INFO Backend: State data are loaded successfully
Jun 08 07:48:15 cassandra python3[1706]: 2023-06-08 07:48:15 INFO Backend: Statistics data are loaded successfully
Jun 08 07:48:15 cassandra python3[1706]: 2023-06-08 07:48:15 INFO Backend: Calced data from state are loaded successfully
Jun 08 07:48:15 cassandra python3[1706]: 2023-06-08 07:48:15 INFO Backend: Calced data from stats are loaded successfully
Jun 08 07:48:15 cassandra python3[1706]: 2023-06-08 07:48:15 INFO Backend: Read map data file
Jun 08 07:48:15 cassandra python3[1706]: 2023-06-08 07:48:15 INFO Backend: Saved perimeters are loaded successfully
Jun 08 07:48:21 cassandra python3[1706]: 2023-06-08 07:48:21 INFO Backend: Perimeter name is successfully saved in tmp.json
Jun 08 07:48:21 cassandra python3[1706]: 2023-06-08 07:48:21 INFO Backend: Selected perimeter: Meadow_Ct
Jun 08 07:48:21 cassandra python3[1706]: 2023-06-08 07:48:21 INFO Backend: Establishing MQTT connection to the MQTT-Server
Jun 08 07:48:21 cassandra python3[1706]: 2023-06-08 07:48:21 INFO Backend: Connection to the MQTT-Server succsessfull
Jun 08 07:48:21 cassandra python3[1706]: 2023-06-08 07:48:21 INFO Backend: Starting server thread
Jun 08 07:48:21 cassandra python3[1706]: 2023-06-08 07:48:21 DEBUG Backend: Starting MQTT client loop
Jun 08 07:48:21 cassandra python3[1706]: 2023-06-08 07:48:21 INFO Backend: Backend is successfully started
Jun 08 07:48:21 cassandra python3[1706]: 2023-06-08 07:48:21 DEBUG MQTT: publish: /ardumower/Ardumower/command with message: AT+P,0,0,0
Jun 08 07:48:21 cassandra python3[1706]: 2023-06-08 07:48:21 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:48:22 cassandra python3[1706]: 2023-06-08 07:48:22 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:48:23 cassandra python3[1706]: Dash is running on http://0.0.0.0:8050/
Jun 08 07:48:23 cassandra python3[1706]: 2023-06-08 07:48:23 INFO Dash is running on http://0.0.0.0:8050/
Jun 08 07:48:23 cassandra python3[1706]: * Serving Flask app 'app'
Jun 08 07:48:23 cassandra python3[1706]: * Debug mode: off
Jun 08 07:48:23 cassandra python3[1706]: 2023-06-08 07:48:23 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:48:23 cassandra python3[1706]: 2023-06-08 07:48:23 ERROR Exception on /_dash-update-component [POST]
Jun 08 07:48:23 cassandra python3[1706]: Traceback (most recent call last):
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/dash/dash.py", line 1230, in dispatch
Jun 08 07:48:23 cassandra python3[1706]: cb = self.callback_map[output]
Jun 08 07:48:23 cassandra python3[1706]: KeyError: 'speedsetpoint-offcanvas.children'
Jun 08 07:48:23 cassandra python3[1706]: The above exception was the direct cause of the following exception:
Jun 08 07:48:23 cassandra python3[1706]: Traceback (most recent call last):
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/flask/app.py", line 2190, in wsgi_app
Jun 08 07:48:23 cassandra python3[1706]: response = self.full_dispatch_request()
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/flask/app.py", line 1486, in full_dispatch_request
Jun 08 07:48:23 cassandra python3[1706]: rv = self.handle_user_exception(e)
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/flask/app.py", line 1484, in full_dispatch_request
Jun 08 07:48:23 cassandra python3[1706]: rv = self.dispatch_request()
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/flask/app.py", line 1469, in dispatch_request
Jun 08 07:48:23 cassandra python3[1706]: return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/dash/dash.py", line 1279, in dispatch
Jun 08 07:48:23 cassandra python3[1706]: raise KeyError(msg) from missing_callback_function
Jun 08 07:48:23 cassandra python3[1706]: KeyError: "Callback function not found for output 'speedsetpoint-offcanvas.children', perhaps you forgot to prepend the '@'?"
Jun 08 07:48:23 cassandra python3[1706]: 2023-06-08 07:48:23 ERROR Exception on /_dash-update-component [POST]
Jun 08 07:48:23 cassandra python3[1706]: Traceback (most recent call last):
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/dash/dash.py", line 1230, in dispatch
Jun 08 07:48:23 cassandra python3[1706]: cb = self.callback_map[output]
Jun 08 07:48:23 cassandra python3[1706]: KeyError: 'modal-info-body.children'
Jun 08 07:48:23 cassandra python3[1706]: The above exception was the direct cause of the following exception:
Jun 08 07:48:23 cassandra python3[1706]: Traceback (most recent call last):
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/flask/app.py", line 2190, in wsgi_app
Jun 08 07:48:23 cassandra python3[1706]: response = self.full_dispatch_request()
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/flask/app.py", line 1486, in full_dispatch_request
Jun 08 07:48:23 cassandra python3[1706]: rv = self.handle_user_exception(e)
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/flask/app.py", line 1484, in full_dispatch_request
Jun 08 07:48:23 cassandra python3[1706]: rv = self.dispatch_request()
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/flask/app.py", line 1469, in dispatch_request
Jun 08 07:48:23 cassandra python3[1706]: return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/dash/dash.py", line 1279, in dispatch
Jun 08 07:48:23 cassandra python3[1706]: raise KeyError(msg) from missing_callback_function
Jun 08 07:48:23 cassandra python3[1706]: KeyError: "Callback function not found for output 'modal-info-body.children', perhaps you forgot to prepend the '@'?"
Jun 08 07:48:23 cassandra python3[1706]: 2023-06-08 07:48:23 ERROR Exception on /_dash-update-component [POST]
Jun 08 07:48:23 cassandra python3[1706]: Traceback (most recent call last):
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/dash/dash.py", line 1230, in dispatch
Jun 08 07:48:23 cassandra python3[1706]: cb = self.callback_map[output]
Jun 08 07:48:23 cassandra python3[1706]: KeyError: '..state-map.figure...interval.disabled@9c808abcc9bc812598b8db4ac4a08413..'
Jun 08 07:48:23 cassandra python3[1706]: The above exception was the direct cause of the following exception:
Jun 08 07:48:23 cassandra python3[1706]: Traceback (most recent call last):
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/flask/app.py", line 2190, in wsgi_app
Jun 08 07:48:23 cassandra python3[1706]: response = self.full_dispatch_request()
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/flask/app.py", line 1486, in full_dispatch_request
Jun 08 07:48:23 cassandra python3[1706]: rv = self.handle_user_exception(e)
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/flask/app.py", line 1484, in full_dispatch_request
Jun 08 07:48:23 cassandra python3[1706]: rv = self.dispatch_request()
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/flask/app.py", line 1469, in dispatch_request
Jun 08 07:48:23 cassandra python3[1706]: return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
Jun 08 07:48:23 cassandra python3[1706]: File "/home/ardumower/.local/lib/python3.9/site-packages/dash/dash.py", line 1279, in dispatch
Jun 08 07:48:23 cassandra python3[1706]: raise KeyError(msg) from missing_callback_function
Jun 08 07:48:23 cassandra python3[1706]: KeyError: "Callback function not found for output '..state-map.figure...interval.disabled@9c808abcc9bc812598b8db4ac4a08413..', perhaps you forgot to prepend the '@'?"
Jun 08 07:48:24 cassandra python3[1706]: 2023-06-08 07:48:24 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:48:25 cassandra python3[1706]: 2023-06-08 07:48:25 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
06-08 07:49:34 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:49:35 cassandra python3[1706]: 2023-06-08 07:49:35 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:49:36 cassandra python3[1706]: 2023-06-08 07:49:36 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:49:37 cassandra python3[1706]: 2023-06-08 07:49:37 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:49:38 cassandra python3[1706]: 2023-06-08 07:49:38 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
:27 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:50:29 cassandra python3[1706]: 2023-06-08 07:50:29 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:50:30 cassandra python3[1706]: 2023-06-08 07:50:30 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:50:31 cassandra python3[1706]: 2023-06-08 07:50:31 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:50:32 cassandra python3[1706]: 2023-06-08 07:50:32 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:50:33 cassandra python3[1706]: 2023-06-08 07:50:33 WARNING Backend: MQTT failed to publish: /ardumower/Ardumower/command with message: AT+C,1,-1,-1,-1,-1,-1,-1,-1
Jun 08 07:50:33 cassandra python3[1706]: 2023-06-08 07:50:33 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:50:34 cassandra python3[1706]: 2023-06-08 07:50:34 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:50:35 cassandra python3[1706]: 2023-06-08 07:50:35 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:50:37 cassandra python3[1706]: 2023-06-08 07:50:37 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:50:38 cassandra python3[1706]: 2023-06-08 07:50:38 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:50:38 cassandra python3[1706]: 2023-06-08 07:50:38 WARNING Backend: MQTT failed to publish: /ardumower/Ardumower/command with message: AT+C,0,-1,-1,-1,-1,-1,-1,-1
Jun 08 07:50:39 cassandra python3[1706]: 2023-06-08 07:50:39 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
Jun 08 07:50:40 cassandra python3[1706]: 2023-06-08 07:50:40 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
 
Zuletzt bearbeitet:
Can you share your ESP32 config.h

Check also your MQTT Rover connection with other tool (e.g. MQTT Explorer)

I think your mower Name in MQTT connection settings is wrong
 
Can you share your ESP32 config.h

Check also your MQTT Rover connection with other tool (e.g. MQTT Explorer)

I think your mower Name in MQTT connection settings is wrong
Hi,

Have been watching the Rover connection on an iPad app MQTT Loupe and it is definately connected. The online topic status cycles between true / false at roughly 1 second intervals and it shows state and stats. The leading '/' introduces an unnecessary topic level but its the same on both.

There are 15 other devices connected to the MQTT server all fine.

Salient part of ESP32 config here...

#define NAME "Ardumower"

// bluetooth low energy (BLE)
#define USE_BLE 1 // comment this line to remove BLE support
#define BLE_MTU 20 // max. transfer bytes per BLE frame
#define BLE_MIN_INTERVAL 2 // connection parameters (tuned for high speed/high power consumption - see: https://support.ambiq.com/hc/en-us/articles/115002907792-Managing-BLE-Connection-Parameters)
#define BLE_MAX_INTERVAL 10
#define BLE_LATENCY 0
#define BLE_TIMEOUT 30
//#define USE_NIM_BLE 1 // use NimBLE library (requires less memory) instead of ESP32 library?

//IP WiFi:
//#define WIFI_STATIC_IP true // activate this for static IP
#define WIFI_STATIC_IP false // activate this for dynamic IP
// if using static IP, configure IPs below
#define WIFI_STATIC_IP_LOCAL 10,0,100,11
#define WIFI_STATIC_IP_GW 10,0,100,1
#define WIFI_STATIC_IP_SUBNET 255,255,255,0
#define WIFI_STATIC_IP_DNS1 8,8,8,8
#define WIFI_STATIC_IP_DNS2 8,8,4,4

#define WIFI_STA_SSID "Cisco-Roaming" // WiFi SSID (leave empty ("") to not use WiFi)
#define WIFI_STA_PSK " Removed " // WiFi password (leave empty ("") to not use WiFi)
#define WIFI_TIMEOUT_FIRST_RESPONSE 800 // fast response times (500), for more reliable choose: 800
#define WIFI_TIMEOUT_RESPONSE 400 // fast response times (100), for more reliable choose: 400

// comment this line to use HTTP, uncomment to use HTTPS
// NOTE: if using HTTPS, you also need to uncomment USE_NIM_BLE above!
//#define USE_HTTPS 1


// Relay server
//
// Install this library with the Arduino Library Manager:
// ArduinoWebsockets - by Gil Maimon - https://github.com/gilmaimon/ArduinoWebsockets
//
//#define USE_RELAY
//#define RELAY_URL "wss://example.relay.mow.timotto.io/mower"
//#define RELAY_USERNAME ""
//#define RELAY_PASSWORD ""
//#define RELAY_TIMEOUT 1000
//#define RELAY_PINGWAIT 55

// MQTT server
// (subscribed topcis: '/command/start', '/command/stop', '/command/dock', '/command/reboot', '/command/shutdown', '/command/"every AT+... command supported by comm.cpp"')
// e.g. command for start over AT+... payload: /command/AT+C,-1,1,0.29,100,0,-1,-1,1
// (published topics: '/online', '/state', '/props', '/stats')

#define USE_MQTT 1 // uncomment to activate MQTT
#define MQTT_PREFIX "/ardumower/"
#define MQTT_HOSTNAME "192.168.1.22" // IP or hostname (example: "192.168.2.60")
#define MQTT_PORT 1883
#define MQTT_CLIENT_ID NAME
#define MQTT_USERNAME ""
#define MQTT_PASSWORD ""

#define ENCRYPTION_PASSWORD 123456
#define ENCRYPTION_ENABLED true

// pin assignment
#define pinGpioRx 16 // UART2 / GPIO16 / IO16
#define pinGpioTx 17 // UART2 / GPIO17 / IO17

//#define pinGpioRx 9 // UART1 / GPIO9 / SD2
//#define pinGpioTx 10 // UART1 / GPIO10 / SD3

//#define pinGpioRx 3 // UART0 / GPIO3 / RXD0
//#define pinGpioTx 1 // UART0 / GPIO1 / TXD0

#define pinLED 2

#define CONSOLE Serial // where to send/receive console messages for debugging etc.
#define UART Serial2 // where to send/receive UART data


Rgds

Clive
 
Zuletzt bearbeitet:
1. Toggling of online topic between true and false is definitely wrong. Something doesn’t work properly.
2. Try to remove first slash „/„ in Settings (mower name with prefix)
 
1. Toggling of online topic between true and false is definitely wrong. Something doesn’t work properly.
2. Try to remove first slash „/„ in Settings (mower name with prefix)
Ok, thank you that's something positive to work with, a leading '/' is not reccomended anyway... I will try that later this morning. I did wonder if the cycling was caused by having BLE enabled as well as MQTT.
 
1. Toggling of online topic between true and false is definitely wrong. Something doesn’t work properly.
2. Try to remove first slash „/„ in Settings (mower name with prefix)
Well I have now removed the leading / in both the ESP32 and cassandra no change
- Disabled BLE - no change
- Tried the previous version of the ESP32 firmware - no change
- The online status only toggles between true and false when cassandra is running
- Commands are not reliably published from cassandra 99% fail as per the screenshot almost looks like a timing issue
- I have other things running that use the paho mqtt lib fine
Run out of ideas this end for the moment :)


Screenshot 2023-06-08 133322.pngScreenshot2 2023-06-08 140926.png
 
Very strange, because command AT+P….was successfully send over MQTT from Cassandra. There is no difference between sending AT+P and AT+M. Can you scroll in log to the place where AT+P is send. It happens at the beginning.

Maybe you have not unique Client Id? How is Client Id from Cassandra in your MQTT Settings?
 
Ah.. I see Cassandra and your Mower have the same Client ID, that must be the problem
 
Zuletzt bearbeitet:
Ah.. I see Cassandra and your Mower have the same Client IDs, that must be a problem
THANK YOU!! That's fixed it!

All seems happy... will do a mow and check it out but all seems solid now like MQTT normall is. Maybe worth setting the default cassandra Client i.d. to somthing different.

Cheers
 
Ist es möglich CaSSAndRA paralell zu der Standard Sunray Software auf dem Banana Pi des Alfred zu betreiben?
 
Ist es möglich CaSSAndRA paralell zu der Standard Sunray Software auf dem Banana Pi des Alfred zu betreiben?
Das wäre die ideale Lösung für Alfred, allerdings weiß ich nicht wie man dann die API der Sunray FW ansprechen sollte, vielleicht kann mir hier jemand einen Hinweis geben wie das gehen kann, dann kann ich was einbauen, testen müsst Ihr dann selbst

Du kannst natürlich versuchen CaSSAndRA auf dem Banana Pi zu installieren über http weg sollte die Kommunikation klappen
 
Oben