chinezbrun / pytes_serial

Read RS232 serial port of PYTES and PYLONTECH LiFePo4 batteries, send data to MQTT, JSON and MariaDB ,There is a build in integration with Home Assistant.
GNU Affero General Public License v3.0
17 stars 3 forks source link

Automatic detection for some config parameters #37

Open chinezbrun opened 1 day ago

chinezbrun commented 1 day ago

Current are few parameters like : type of the battery [Pylon, Pytes], number of cells [16,15], number of batteries in the bank, that are manually configured. The 'info' command provides all this information, therefore an automatic detection at beginning of the script will be a nice feature to be implemented.

Other information that can be retrieve and used in home assistant sensors: Manufacturer, Device name, Firmware .

'info' command output :

Device address      : 1
Manufacturer        : PYTES
Device name         : E-BOX-48100R-C
Board version       : SQBMSV15
Main Soft version   : SPBMS16SRP2203V1.5.38.C8
Iterate version     : SPBMS16SRP2203V1.5.38.C8.T4
Soft  version       : V38.8
Boot  version       : V1.14
Comm version        : V2.0
Release Date        : 24-07-15
Barcode             : xxxxx
Board ID            : xxxxx
Board SRAM Size     : 96KB
Board FLASH Size    : 256KB
Specification       : 51.2V/100AH
Cell Number         : 16
Max Dischg Curr     : -102000mA
Max Charge Curr     : 102000mA
Console Port rate   : 115200