Closed sugar012 closed 3 months ago
hello, on my side I've used this combinaison of items:
hello, on my side I've used this combinaison of items:
Ok, i got the same usb-rs232 cable as you. it's the first time i work with terminal so i'm a little lost here. Is this correct?
Hello, check the GND connection to serial port.. have you already try to reverse TX and RX pins?
Let me know ;)
Hello, check the GND connection to serial port.. have you already try to reverse TX and RX pins?
Let me know ;)
by swapping i got this. Also settings are 8,1, none and none
It seems bad serial pin connection.. double check GND and try to revert TX and RX.
It seems bad serial pin connection.. double check GND and try to revert TX and RX.
What should the output be like? do you have telegram? Sono italiano cmq
It seems bad serial pin connection.. double check GND and try to revert TX and RX.
i swapped GND and TX .. sorry. but it wont connect to the server. port should be open
i had to tick this box
Hello Lorenzo. I'm maybe at 90%. i can run che python scrypt only without the logger and sql database. i guess that cell voltages nee the db to be showed up in HA?
alpine-docker:~/silence-private-server# python silence-server.py
Python version: 3.12.3
Silence-Server version: 2024.5.21
Silence-Server - Main Start
Silence-Server Main
Configuration loaded: {'IMEI': 'zzz', 'TCPServer': {'serverPORT': 38955, 'bridgeMode': True, 'silenceHOST': 'api.connectivity.silence.eco', 'silencePORT': 38955, 'SaveToDB': True, 'keepAliveInterval': 15, 'BMScellVoltage_pooling_interval': 600}, 'Logging': {'LogToFile': False, 'LogLevel': 50}, 'MQTT': {'Enabled': True, 'MQTTbroker': '192.168.2.30', 'MQTTport': 1883, 'MQTTuser': 'mqtt', 'MQTTpass': 'AGw&!e*CF7DJ9u', 'TopicPrefix': 'home/silence-server'}}
2024-07-27 15:46:42,625 - [silence-server] - DEBUG - Logged configured
2024-07-27 15:46:42,626 - [silence-server] - INFO - Starting Silence Server
2024-07-27 15:46:42,626 - [SilenceServerService] - INFO - Starting SilenceServerService
2024-07-27 15:46:42,626 - [SilenceServerService] - INFO - Starting DBService
2024-07-27 15:46:42,626 - [DBService] - DEBUG - DBService init
2024-07-27 15:46:42,626 - [DBService] - INFO - DBService Start
2024-07-27 15:46:42,626 - [DBService] - ERROR - Exception in MQTTService start
Traceback (most recent call last):
File "/root/silence-private-server/services/DBService.py", line 21, in start
self.DBcon = sqlite3.connect('logs/silenceLOG.db', check_same_thread=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: unable to open database file
Silence-Server - Exception in main, restart...
'DBService' object has no attribute 'DBcon'
and with the logger active:
alpine-docker:~/silence-private-server# python silence-server.py
Python version: 3.12.3
Silence-Server version: 2024.5.21
Silence-Server - Main Start
Silence-Server Main
Configuration loaded: {'IMEI': 'zzz', 'TCPServer': {'serverPORT': 38955, 'bridgeMode': True, 'silenceHOST': 'api.connectivity.silence.eco', 'silencePORT': 38955, 'SaveToDB': False, 'keepAliveInterval': 15, 'BMScellVoltage_pooling_interval': 600}, 'Logging': {'LogToFile': True, 'LogLevel': 50}, 'MQTT': {'Enabled': True, 'MQTTbroker': '192.168.2.30', 'MQTTport': 1883, 'MQTTuser': 'mqtt', 'MQTTpass': 'AGw&!e*CF7DJ9u', 'TopicPrefix': 'home/silence-server'}}
Silence-Server - Exception in main, restart...
[Errno 2] No such file or directory: '/root/silence-private-server/logs/silence-server.log'
alpine-docker:~/silence-private-server#
sorry, my fault in the default configuration.json, put
"LogToFile": false
Ok, and what about the database? the cell voltage seems to be not working also?
2024-07-27 16:09:03,096 - [MQTTService] - DEBUG - Publishing scooter status: {'status': {'value': 0.0, 'MQTT_topic': 'status'}, 'movementAlarm': {'value': 0, 'MQTT_topic': 'movementAlarm'}, 'batteryIn': {'value': 1, 'MQTT_topic': 'batteryIn'}, 'astraBatterySOC': {'value': 98.0, 'MQTT_topic': 'astraBatterySOC'}, 'latitude': {'value': xxx, 'MQTT_topic': 'latitude'}, 'longitude': {'value': xxx, 'MQTT_topic': 'longitude'}, 'batterySOC': {'value': 99.0, 'MQTT_topic': 'SOCbatteria'}, 'batteryTempMax': {'value': 32.0, 'MQTT_topic': 'BatteryTempMax'}, 'batteryTempMin': {'value': 31.0, 'MQTT_topic': 'BatteryTempMin'}, 'batteryVoltage': {'value': 57.6, 'MQTT_topic': 'VOLTbatteria'}, 'batteryCurrent': {'value': 0.0, 'MQTT_topic': 'batteryCurrent'}, 'motorTemp': {'value': 'None', 'MQTT_topic': 'motorTemp'}, 'inverterTemp': {'value': 'None', 'MQTT_topic': 'inverterTemp'}, 'speed': {'value': 'None', 'MQTT_topic': 'speed'}, 'range': {'value': 102.0, 'MQTT_topic': 'range'}, 'chargedEnergy': {'value': 327.1, 'MQTT_topic': 'chargedEnergy'}, 'RegeneratedEnergy': {'value': 24.128611111111113, 'MQTT_topic': 'RegeneratedEnergy'}, 'DischargedEnergy': {'value': 317.15527777777777, 'MQTT_topic': 'DischargedEnergy'}, 'ambientTemp': {'value': 'None', 'MQTT_topic': 'ambientTemp'}, 'odo': {'value': 4469.0, 'MQTT_topic': 'odo'}, 'VIN': {'value': None, 'MQTT_topic': 'VIN'}, 'Cell1Voltage': {'value': None, 'MQTT_topic': 'Cell1Voltage'}, 'Cell2Voltage': {'value': None, 'MQTT_topic': 'Cell2Voltage'}, 'Cell3Voltage': {'value': None, 'MQTT_topic': 'Cell3Voltage'}, 'Cell4Voltage': {'value': None, 'MQTT_topic': 'Cell4Voltage'}, 'Cell5Voltage': {'value': None, 'MQTT_topic': 'Cell5Voltage'}, 'Cell6Voltage': {'value': None, 'MQTT_topic': 'Cell6Voltage'}, 'Cell7Voltage': {'value': None, 'MQTT_topic': 'Cell7Voltage'}, 'Cell8Voltage': {'value': None, 'MQTT_topic': 'Cell8Voltage'}, 'Cell9Voltage': {'value': None, 'MQTT_topic': 'Cell9Voltage'}, 'Cell10Voltage': {'value': None, 'MQTT_topic': 'Cell10Voltage'}, 'Cell11Voltage': {'value': None, 'MQTT_topic': 'Cell11Voltage'}, 'Cell12Voltage': {'value': None, 'MQTT_topic': 'Cell12Voltage'}, 'Cell13Voltage': {'value': None, 'MQTT_topic': 'Cell13Voltage'}, 'Cell14Voltage': {'value': None, 'MQTT_topic': 'Cell14Voltage'}}
good, very well done! :) cell voltages is valued only when scooter inverter is ON. have you try to travel?
good, very well done! :) cell voltages is valued only when scooter inverter is ON. have you try to travel?
yep, as soon as i switched it on (remotely of course :)) all mqqt are published. One last thing, i hope. Where do you think this "none" got in the way instead of "silence" ?
simply, with this new integration we have decided to put all the values that cannot be obtained at that time into None.
simply, with this new integration we have decided to put all the values that cannot be obtained at that time into None.
i tried re-configure the mqtt broker but same result. that's strange because some values where correct before. i think you should do the HACS integration aswell for this private server. of course for the future noobs like me. Thanks for your time Lorenzo
Ho to all. Is this 232 to ttl suitable for the job ? Of course connected via USB