Privatecoder / seplos-mqtt-remote-rs485

fetch data from one or multiple Seplos battery packs via (a) (remote) RS485 connection(s)
10 stars 3 forks source link

Application stops regularly #6

Closed jwillmer closed 3 months ago

jwillmer commented 6 months ago

The docker container stops transmitting data every couple of days. A simple restart of the docker container resolves it. The last log output from the container today (before I restarted it) was the following:

    ...
    "no_calibration_of_voltage": "normal",
    "no_calibration_of_current": "normal",
    "no_calibration_of_null_point": "normal"
}
INFO:SeplosBMS:Pack1:Sending updated stats to mqtt.
INFO:SeplosBMS:Sending online status to mqtt
INFO:SeplosBMS:Pack0:Requesting data...
DEBUG:SeplosBMS:Pack0:telemetry_command: b'~20004642E00201FD36\r'
INFO:SeplosBMS:home assistant online, sending sensor configs
smagicld commented 5 months ago

I had the same problem. add timeout to the serial connection: SERIAL_SLAVES_INSTANCE = serial.Serial(port='/dev/ttyUSB0', baudrate=19200, timeout=0.501750)

jwillmer commented 3 months ago

I had the same problem. add timeout to the serial connection: SERIAL_SLAVES_INSTANCE = serial.Serial(port='/dev/ttyUSB0', baudrate=19200, timeout=0.501750)

Only for the slave or in general?

Privatecoder commented 3 months ago

also: is there any specific reason for this timeout value?

jwillmer commented 3 months ago

@Privatecoder I guess it does not heart. If we run into a timeout the app stops and will be restarted. If we do not set it we might end up in a deadlock. I updated my pull request with it.

Privatecoder commented 3 months ago

I was just wondering about the 0.501750– if that value was chosen for any specific reason..?

jwillmer commented 3 months ago

same question but i guess not. I did not use any specific time.

Privatecoder commented 3 months ago

can we close this now or is this still a problem for anyone?

jwillmer commented 3 months ago

Already pulled last release. Awesome teamwork this night :)