Open Source Silence Server Project! :)

S01, S02, S03, Mó
Gerold
Beiträge: 465
Registriert: Fr 7. Feb 2020, 10:23
Roller: Silence S01
PLZ: 55*
Kontaktdaten:

Re: Open Source Silence Server Project! :)

Beitrag von Gerold »

I have found the reason for the misbehavior of the parser. I have changed the protocol-mask of the $PROT command to a higher value in order to receive more data from the module to my private Astra Opengts server. When changing back the protocol-mask to his original value ( 55968794727) the parser works fine.

Code: Alles auswählen

2024-05-30 14:10:29,420 - [MQTTService] - DEBUG - Publishing on topic [mySilence/35xxxx/status/status] value: 2.0
2024-05-30 14:10:29,420 - [MQTTService] - DEBUG - Publishing on topic [mySilence/35xxxx/status/movementAlarm] value: 0
2024-05-30 14:10:29,420 - [MQTTService] - DEBUG - Publishing on topic [mySilence/35xxxx/status/batteryIn] value: 1
2024-05-30 14:10:29,420 - [MQTTService] - DEBUG - Publishing on topic [mySilence/35xxxx/status/astraBatterySOC] value: 90.0

lorenzo.deluca
Beiträge: 14
Registriert: Sa 22. Mai 2021, 23:36
Roller: Silence S01
PLZ: ITA
Land: anderes Land
Kontaktdaten:

Re: Open Source Silence Server Project! :)

Beitrag von lorenzo.deluca »

Gerold hat geschrieben:
Do 30. Mai 2024, 22:49
I have found the reason for the misbehavior of the parser. I have changed the protocol-mask of the $PROT command to a higher value in order to receive more data from the module to my private Astra Opengts server. When changing back the protocol-mask to his original value ( 55968794727) the parser works fine.

Code: Alles auswählen

2024-05-30 14:10:29,420 - [MQTTService] - DEBUG - Publishing on topic [mySilence/35xxxx/status/status] value: 2.0
2024-05-30 14:10:29,420 - [MQTTService] - DEBUG - Publishing on topic [mySilence/35xxxx/status/movementAlarm] value: 0
2024-05-30 14:10:29,420 - [MQTTService] - DEBUG - Publishing on topic [mySilence/35xxxx/status/batteryIn] value: 1
2024-05-30 14:10:29,420 - [MQTTService] - DEBUG - Publishing on topic [mySilence/35xxxx/status/astraBatterySOC] value: 90.0
Ok, perfect!
Yes, the messages from module to server are in binary format and it's quite "tricky" to decode this.
If you want you can improve the project and add more decoding for other informations.
What extra information were you able to get with this protocol?
Zuletzt geändert von lorenzo.deluca am Fr 31. Mai 2024, 19:32, insgesamt 1-mal geändert.

Benutzeravatar
Pfriemler
Moderator
Beiträge: 2011
Registriert: Di 7. Mai 2019, 17:41
Roller: SEAT Mó 125 (Mj. 2021, Votol)
PLZ: 14513
Wohnort: Südrandberlin
Tätigkeit: Tonkünstler
Kontaktdaten:

Re: Open Source Silence Server Project! :)

Beitrag von Pfriemler »

The known protocol modules refer to the usual $PROT mask. If detailed information to the other protocol modules are secret, at least an information on how many bytes they use would enable the parser to skip them.
SuperSoco CUx '19-'21 (36Wh/km in 2000 km), Piaggio Medley 125 '20-'22 (26,6 ml/km in 5000 km). Seat Mó: Bild

SpeedCore
Beiträge: 133
Registriert: Di 6. Dez 2022, 22:08
Roller: Silence S01
PLZ: 6020
Land: A
Kontaktdaten:

Re: Open Source Silence Server Project! :)

Beitrag von SpeedCore »

I moved from script-based to docker today but I keep getting an error with the mqtt service:

Code: Alles auswählen

2024-06-13 22:41:14,868 - [silence-server] - INFO - Starting Silence Server
2024-06-13 22:41:14,868 - [SilenceServerService] - INFO - Starting SilenceServerService
2024-06-13 22:41:14,869 - [SilenceServerService] - INFO - Starting DBService
2024-06-13 22:41:14,869 - [DBService] - DEBUG - DBService init
2024-06-13 22:41:14,869 - [DBService] - INFO - DBService Start
2024-06-13 22:41:14,869 - [DBService] - DEBUG - Subscribing to socket
2024-06-13 22:41:14,870 - [CommandService] - DEBUG - CommandService init
2024-06-13 22:41:14,870 - [CommandService] - DEBUG - Subscribing to command_received
2024-06-13 22:41:14,871 - [CommandService] - INFO - CommandService Started
2024-06-13 22:41:14,871 - [silence-server] - INFO - Starting MQTT
2024-06-13 22:41:14,871 - [MQTTService] - DEBUG - MQTT Service initialized
2024-06-13 22:41:14,871 - [MQTTService] - INFO - Start MQTT Service
2024-06-13 22:41:14,871 - [SilenceServerService] - INFO - socket created on port 31337
2024-06-13 22:41:14,871 - [SilenceServerService] - INFO - waiting for clients
2024-06-13 22:41:14,873 - [MQTTService] - ERROR - Exception in MQTTService start
Traceback (most recent call last):
  File "/app/services/MQTTService.py", line 58, in start
    self.client.connect(self.broker, self.port, 60)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 914, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1044, in reconnect
    sock = self._create_socket_connection()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
    return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
  File "/usr/local/lib/python3.9/socket.py", line 844, in create_connection
    raise err
  File "/usr/local/lib/python3.9/socket.py", line 832, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Python version: 3.9.19
Silence-Server version: 2024.5.21
Silence-Server - Main Start
Silence-Server Main
Configuration loaded: {...}
Silence-Server - Exception in main, restart...
Exception in MQTTService start

lorenzo.deluca
Beiträge: 14
Registriert: Sa 22. Mai 2021, 23:36
Roller: Silence S01
PLZ: ITA
Land: anderes Land
Kontaktdaten:

Re: Open Source Silence Server Project! :)

Beitrag von lorenzo.deluca »

SpeedCore hat geschrieben:
Fr 14. Jun 2024, 00:45
I moved from script-based to docker today but I keep getting an error with the mqtt service:

Code: Alles auswählen

2024-06-13 22:41:14,868 - [silence-server] - INFO - Starting Silence Server
2024-06-13 22:41:14,868 - [SilenceServerService] - INFO - Starting SilenceServerService
2024-06-13 22:41:14,869 - [SilenceServerService] - INFO - Starting DBService
2024-06-13 22:41:14,869 - [DBService] - DEBUG - DBService init
2024-06-13 22:41:14,869 - [DBService] - INFO - DBService Start
2024-06-13 22:41:14,869 - [DBService] - DEBUG - Subscribing to socket
2024-06-13 22:41:14,870 - [CommandService] - DEBUG - CommandService init
2024-06-13 22:41:14,870 - [CommandService] - DEBUG - Subscribing to command_received
2024-06-13 22:41:14,871 - [CommandService] - INFO - CommandService Started
2024-06-13 22:41:14,871 - [silence-server] - INFO - Starting MQTT
2024-06-13 22:41:14,871 - [MQTTService] - DEBUG - MQTT Service initialized
2024-06-13 22:41:14,871 - [MQTTService] - INFO - Start MQTT Service
2024-06-13 22:41:14,871 - [SilenceServerService] - INFO - socket created on port 31337
2024-06-13 22:41:14,871 - [SilenceServerService] - INFO - waiting for clients
2024-06-13 22:41:14,873 - [MQTTService] - ERROR - Exception in MQTTService start
Traceback (most recent call last):
  File "/app/services/MQTTService.py", line 58, in start
    self.client.connect(self.broker, self.port, 60)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 914, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1044, in reconnect
    sock = self._create_socket_connection()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
    return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
  File "/usr/local/lib/python3.9/socket.py", line 844, in create_connection
    raise err
  File "/usr/local/lib/python3.9/socket.py", line 832, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Python version: 3.9.19
Silence-Server version: 2024.5.21
Silence-Server - Main Start
Silence-Server Main
Configuration loaded: {...}
Silence-Server - Exception in main, restart...
Exception in MQTTService start
Mmmmh, which MQTT broker IP Address have you set?
Of course if you're on Docker you cannot put 127.0.0.1 but you've have put MQTT server address (192.168.xxx.xxx) right?

SpeedCore
Beiträge: 133
Registriert: Di 6. Dez 2022, 22:08
Roller: Silence S01
PLZ: 6020
Land: A
Kontaktdaten:

Re: Open Source Silence Server Project! :)

Beitrag von SpeedCore »

Thanks for the hint - still had "localhost" in my config from pre-docker times :)
Changed that to the host ip address for the docker0 interface and it works:

Code: Alles auswählen

2024-06-17 16:54:30,990 - [MQTTService] - INFO - Connected to broker with result code 0
2024-06-17 16:54:30,990 - [MQTTService] - DEBUG - MQTT Sub to home/silence-server/8608730xxxxxxxx/command/+

SpeedCore
Beiträge: 133
Registriert: Di 6. Dez 2022, 22:08
Roller: Silence S01
PLZ: 6020
Land: A
Kontaktdaten:

Re: Open Source Silence Server Project! :)

Beitrag von SpeedCore »

Is anyone working on a web frontend with the features the Silence App had like "my trips" and some buttons for opening seat etc?

lorenzo.deluca
Beiträge: 14
Registriert: Sa 22. Mai 2021, 23:36
Roller: Silence S01
PLZ: ITA
Land: anderes Land
Kontaktdaten:

Re: Open Source Silence Server Project! :)

Beitrag von lorenzo.deluca »

SpeedCore hat geschrieben:
Mo 17. Jun 2024, 19:21
Is anyone working on a web frontend with the features the Silence App had like "my trips" and some buttons for opening seat etc?
I use Home Assistant for status/commands and Traccar for gps tracking 😉

SpeedCore
Beiträge: 133
Registriert: Di 6. Dez 2022, 22:08
Roller: Silence S01
PLZ: 6020
Land: A
Kontaktdaten:

Re: Open Source Silence Server Project! :)

Beitrag von SpeedCore »

I just noticed that there's a protocol x parser by astra telematics available at npmjs: https://www.npmjs.com/package/astra-protocol-x-parser
Maybe this comes in handy when it comes to handling protocol x messages from the scooter.

Antworten

Zurück zu „Silence / SEAT“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 53 Gäste