EinEinfach / CaSSAndRA

Cascaded sunray server and rover application
MIT License
29 stars 17 forks source link

CaSSAndRA keine Verbindung zu Alfred #12

Closed themanfrommoon closed 1 year ago

themanfrommoon commented 1 year ago

ch kriege mit CaSSAndRA keine Verbindung zu Alfred. An welcher Stelle mache ich was falsch? In Sunray sieht das so aus: grafik In CaSSAndRA stelle ich folgendes ein: grafik Danach Klick auf "Save and reboot" Are you sure? This will overwrite your setting and restart backend server -> OK Ich drücke auf OK und dann dauert es 6-7 Sekunden, das Fenster geht wieder zu....aber ob es geklappt hat oder nicht weiss man irgendwie nicht so richtig. Dann klicke ich auf CaSSAndRA ..... keine Statusupdate Dann klicke ich wieder auf Settings -> Connection: Alle Einstellungen weg?!

Fragen:

  1. Muss Alfred eingeschaltet sein, damit die Einstellungen akzeptiert werden? (Ich habe Alfred aus und eingeschaltet getestet, funktioniert beides nicht)
  2. Auf dem Button steht "Save and reboot". Was wird rebootet? Der ganze RaspberryPi? Das wird wohl kaum innherhalt von 6-7 Sekunden gehen. Was ist also gemeint mit reboot?

Wenn ich mit sudo reboot now den RaspberryPi reboote, dann steht wenigstens die IP Adresse in den Einstellungen. Das Passwort aber nicht?! grafik Hat er das Passwort jetzt genommen oder nicht? (Er kriegt so keine Verbindung, und nach Eingabe des Passworts auch nicht) Alfred ist natürlich eingeschaltet. Sunray kann eine Verbindung aufbauen.

Beste Grüße, Chris

themanfrommoon commented 1 year ago

Jul 12 18:05:44 raspberrypi python3[635]: 2023-07-12 18:05:44 DEBUG Recieved checksum:0x12 Calced checksum: 0x12 Jul 12 18:05:44 raspberrypi python3[635]: 2023-07-12 18:05:44 ERROR Backend: Failed to write state data to data frame Jul 12 18:05:44 raspberrypi python3[635]: 2023-07-12 18:05:44 DEBUG Length mismatch: Expected axis has 20 elements, new values have 18 elements Jul 12 18:05:46 raspberrypi python3[635]: 2023-07-12 18:05:46 INFO Backend: Performing get state http-request Jul 12 18:05:46 raspberrypi python3[635]: 2023-07-12 18:05:46 DEBUG Calced checksumme: 0x13 Jul 12 18:05:46 raspberrypi python3[635]: 2023-07-12 18:05:46 DEBUG Encryption: true Jul 12 18:05:46 raspberrypi python3[635]: 2023-07-12 18:05:46 DEBUG Data to be send: }1g0hlUmo Jul 12 18:05:46 raspberrypi python3[635]: 2023-07-12 18:05:46 DEBUG Starting new HTTP connection (1): 192.168.178.127:80 Jul 12 18:05:46 raspberrypi python3[635]: 2023-07-12 18:05:46 DEBUG http://192.168.178.127:80 "POST / HTTP/1.1" 200 96 Jul 12 18:05:46 raspberrypi python3[635]: 2023-07-12 18:05:46 DEBUG Status code: 200 Jul 12 18:05:46 raspberrypi python3[635]: 2023-07-12 18:05:46 DEBUG Content: S,29.14,-28.58,-53.11,-1.39,2,0,0,0.30,0,-28.03,-52.03,0.02,38,0.45,32,-7778768,0.00,-1,0,0x06 Jul 12 18:05:46 raspberrypi python3[635]: 2023-07-12 18:05:46 DEBUG Recieved checksum:0x6 Calced checksum: 0x6 Jul 12 18:05:46 raspberrypi python3[635]: 2023-07-12 18:05:46 ERROR Backend: Failed to write state data to data frame Jul 12 18:05:46 raspberrypi python3[635]: 2023-07-12 18:05:46 DEBUG Length mismatch: Expected axis has 20 elements, new values have 18 elements Jul 12 18:05:48 raspberrypi python3[635]: 2023-07-12 18:05:48 INFO Backend: Writing new connection data to the file Jul 12 18:05:48 raspberrypi python3[635]: 2023-07-12 18:05:48 DEBUG Path to commcfg.json: /src/data/user/commcfg.json Jul 12 18:05:48 raspberrypi python3[635]: 2023-07-12 18:05:48 DEBUG New connect data: {'USE': 'HTTP', 'MQTT': [{'CLIENT_ID': 'Ardumower'}, {'USERNAME': None}, {'PASSWORD': None}, { 'MQTT_SERVER': '192.168.1.1'}, {'PORT': 1883}, {'MOWER_NAME': 'ardumower/Ardumower'}], 'HTTP': [{'IP': 'http://192.168.178.127'}, {'PASSWORD': '123456'}], 'UART': [{'SERPORT': '/de v/ttyACM0'}, {'BAUDRATE': 115200}]} Jul 12 18:05:48 raspberrypi python3[635]: 2023-07-12 18:05:48 INFO Backend: Connection data are successfully stored in commcfg.json Jul 12 18:05:48 raspberrypi python3[635]: 2023-07-12 18:05:48 INFO Backend: Save and reboot Jul 12 18:05:48 raspberrypi python3[635]: 2023-07-12 18:05:48 INFO Backend: Server thread is stopped Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 INFO Backend: Starting backend server Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 DEBUG absolute_path: /home/pi/CaSSAndRA/CaSSAndRA/src/backend Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 INFO Backend: Read communication config file Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 DEBUG Opening commcfg.json Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 DEBUG Path to commcfg.json: /src/data/user/commcfg.json Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 DEBUG commcfg.json content: {'USE': 'HTTP', 'MQTT': [{'CLIENT_ID': 'Ardumower'}, {'USERNAME': None}, {'PASSWORD': None }, {'MQTT_SERVER': '192.168.1.1'}, {'PORT': 1883}, {'MOWER_NAME': 'ardumower/Ardumower'}], 'HTTP': [{'IP': 'http://192.168.178.127'}, {'PASSWORD': '123456'}], 'UART': [{'SERPORT': '/dev/ttyACM0'}, {'BAUDRATE': 115200}]} Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 INFO Backend: Used connection: HTTP Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 DEBUG Checking connection data Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 DEBUG Connection data are valid Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 INFO Backend: Read saved data Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 INFO Backend: State data are loaded successfully Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 INFO Backend: Statistics data are loaded successfully Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 INFO Backend: Calced data from state are loaded successfully Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 INFO Backend: Calced data from stats are loaded successfully Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 INFO Backend: Read map data file Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 WARNING Backend: Failed to load saved perimeters from file Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 DEBUG File /home/pi/CaSSAndRA/CaSSAndRA/src/data/map/perimeter.json does not exist Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 INFO Backend: Establishing HTTP connection to the rover Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 INFO Backend: Try initial HTTP request Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 DEBUG Calced checksumme: 0x16 Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 DEBUG Data to be send: AT+V,0x16 Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 DEBUG Starting new HTTP connection (1): 192.168.178.127:80 Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 DEBUG http://192.168.178.127:80 "POST / HTTP/1.1" 200 67 Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 DEBUG Status code: 200 Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 DEBUG Content: V,Sunray,1.0.309,1,91,Linux,SR,RM18,1.1.15,d6:d2:fb:2b:81:ab,0x13 Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 INFO Backend: Starting server thread Jul 12 18:05:53 raspberrypi python3[635]: 2023-07-12 18:05:53 INFO Backend: Backend is successfully started Jul 12 18:05:55 raspberrypi python3[635]: 2023-07-12 18:05:55 INFO Backend: Performing get state http-request Jul 12 18:05:55 raspberrypi python3[635]: 2023-07-12 18:05:55 DEBUG Calced checksumme: 0x13 Jul 12 18:05:55 raspberrypi python3[635]: 2023-07-12 18:05:55 DEBUG Encryption: true Jul 12 18:05:55 raspberrypi python3[635]: 2023-07-12 18:05:55 DEBUG Data to be send: }1g0hlUmo Jul 12 18:05:55 raspberrypi python3[635]: 2023-07-12 18:05:55 DEBUG Starting new HTTP connection (1): 192.168.178.127:80 Jul 12 18:05:55 raspberrypi python3[635]: 2023-07-12 18:05:55 DEBUG http://192.168.178.127:80 "POST / HTTP/1.1" 200 96 Jul 12 18:05:55 raspberrypi python3[635]: 2023-07-12 18:05:55 DEBUG Status code: 200 Jul 12 18:05:55 raspberrypi python3[635]: 2023-07-12 18:05:55 DEBUG Content: S,29.13,-28.58,-53.10,-1.39,2,0,0,1.34,0,-28.03,-52.03,0.02,35,0.46,32,-7778768,0.00,-1,0,0x07 Jul 12 18:05:55 raspberrypi python3[635]: 2023-07-12 18:05:55 DEBUG Recieved checksum:0x7 Calced checksum: 0x7 Jul 12 18:05:55 raspberrypi python3[635]: 2023-07-12 18:05:55 ERROR Backend: Failed to write state data to data frame Jul 12 18:05:55 raspberrypi python3[635]: 2023-07-12 18:05:55 DEBUG Length mismatch: Expected axis has 20 elements, new values have 18 elements Jul 12 18:05:57 raspberrypi python3[635]: 2023-07-12 18:05:57 INFO Backend: Performing get state http-request Jul 12 18:05:57 raspberrypi python3[635]: 2023-07-12 18:05:57 DEBUG Calced checksumme: 0x13 Jul 12 18:05:57 raspberrypi python3[635]: 2023-07-12 18:05:57 DEBUG Encryption: true Jul 12 18:05:57 raspberrypi python3[635]: 2023-07-12 18:05:57 DEBUG Data to be send: }1g0hlUmo Jul 12 18:05:57 raspberrypi python3[635]: 2023-07-12 18:05:57 DEBUG Starting new HTTP connection (1): 192.168.178.127:80 Jul 12 18:05:57 raspberrypi python3[635]: 2023-07-12 18:05:57 DEBUG http://192.168.178.127:80 "POST / HTTP/1.1" 200 96 Jul 12 18:05:57 raspberrypi python3[635]: 2023-07-12 18:05:57 DEBUG Status code: 200 Jul 12 18:05:57 raspberrypi python3[635]: 2023-07-12 18:05:57 DEBUG Content: S,29.12,-28.58,-53.09,-1.39,2,0,0,0.42,0,-28.03,-52.03,0.02,35,0.45,32,-7778768,0.00,-1,0,0x0b Jul 12 18:05:57 raspberrypi python3[635]: 2023-07-12 18:05:57 DEBUG Recieved checksum:0xb Calced checksum: 0xb Jul 12 18:05:57 raspberrypi python3[635]: 2023-07-12 18:05:57 ERROR Backend: Failed to write state data to data frame Jul 12 18:05:57 raspberrypi python3[635]: 2023-07-12 18:05:57 DEBUG Length mismatch: Expected axis has 20 elements, new values have 18 elements Jul 12 18:05:59 raspberrypi python3[635]: 2023-07-12 18:05:59 INFO Backend: Performing get state http-request Jul 12 18:05:59 raspberrypi python3[635]: 2023-07-12 18:05:59 DEBUG Calced checksumme: 0x13 Jul 12 18:05:59 raspberrypi python3[635]: 2023-07-12 18:05:59 DEBUG Encryption: true Jul 12 18:05:59 raspberrypi python3[635]: 2023-07-12 18:05:59 DEBUG Data to be send: }1g0hlUmo Jul 12 18:05:59 raspberrypi python3[635]: 2023-07-12 18:05:59 DEBUG Starting new HTTP connection (1): 192.168.178.127:80 Jul 12 18:05:59 raspberrypi python3[635]: 2023-07-12 18:05:59 DEBUG http://192.168.178.127:80 "POST / HTTP/1.1" 200 96 Jul 12 18:05:59 raspberrypi python3[635]: 2023-07-12 18:05:59 DEBUG Status code: 200 Jul 12 18:05:59 raspberrypi python3[635]: 2023-07-12 18:05:59 DEBUG Content: S,29.12,-28.58,-53.10,-1.39,2,0,0,0.31,0,-28.03,-52.03,0.02,38,0.44,33,-7778768,0.00,-1,0,0x04 Jul 12 18:05:59 raspberrypi python3[635]: 2023-07-12 18:05:59 DEBUG Recieved checksum:0x4 Calced checksum: 0x4 Jul 12 18:05:59 raspberrypi python3[635]: 2023-07-12 18:05:59 ERROR Backend: Failed to write state data to data frame Jul 12 18:05:59 raspberrypi python3[635]: 2023-07-12 18:05:59 DEBUG Length mismatch: Expected axis has 20 elements, new values have 18 elements Jul 12 18:06:01 raspberrypi python3[635]: 2023-07-12 18:06:01 INFO Backend: Performing get state http-request Jul 12 18:06:01 raspberrypi python3[635]: 2023-07-12 18:06:01 DEBUG Calced checksumme: 0x13 Jul 12 18:06:01 raspberrypi python3[635]: 2023-07-12 18:06:01 DEBUG Encryption: true Jul 12 18:06:01 raspberrypi python3[635]: 2023-07-12 18:06:01 DEBUG Data to be send: }1g0hlUmo Jul 12 18:06:01 raspberrypi python3[635]: 2023-07-12 18:06:01 DEBUG Starting new HTTP connection (1): 192.168.178.127:80 Jul 12 18:06:01 raspberrypi python3[635]: 2023-07-12 18:06:01 DEBUG http://192.168.178.127:80 "POST / HTTP/1.1" 200 96 Jul 12 18:06:01 raspberrypi python3[635]: 2023-07-12 18:06:01 DEBUG Status code: 200 Jul 12 18:06:01 raspberrypi python3[635]: 2023-07-12 18:06:01 DEBUG Content: S,29.12,-28.58,-53.10,-1.39,2,0,0,0.61,0,-28.03,-52.03,0.02,38,0.43,33,-7778768,0.00,-1,0,0x06 Jul 12 18:06:01 raspberrypi python3[635]: 2023-07-12 18:06:01 DEBUG Recieved checksum:0x6 Calced checksum: 0x6 Jul 12 18:06:01 raspberrypi python3[635]: 2023-07-12 18:06:01 ERROR Backend: Failed to write state data to data frame

EinEinfach commented 1 year ago

Ok you are using Sunray 1.0.309, it seems to be there are some changes in communication protocol. Cassandra expects 18 Values but get 20 values. I'll check how it has to be fixed.

EinEinfach commented 1 year ago

https://github.com/EinEinfach/CaSSAndRA/commit/298ab254842d86586b0ff40830605b2ee918ba98

themanfrommoon commented 1 year ago

Problem solved, thank you Alexander!