Package: epevermodbus
epevermodbusThis package is intended to help you communicate with an EPever charge controller. It has been tested with an EPever Tracer AN but should work with other EPever devices.FeaturesRead real time dataRead battery parametersWrite battery parametersthis feature is a work in progressAutomatic retriesConnecting to the charge controllerI have only tested this package on Linux / Raspberry Pi but I see no reason why it should not work on other devices.For the cable you have two optionsOfficial EPever cableWhen using the offical cable on Linux your device will show up something like/dev/ttyXRUSB0. You will need to use a custom driver to use this cable on Linux rather than the bundled cdc-acm driver. It can be difficult to get this driver working properly on Linux and Raspberry Pi.On Windows you can use the driver provided by EPever and the cable should work fine so long as you check the rs485 checkbox in device manager.Your own custom cableYou can quite easily make your own cable if you purchase a few parts, and with this approach you won't need a custom driver on Linux so it should be easier to get working. The device should show up as something like/dev/ttyUSB0.For more information read:https://ross-warren.co.uk/2021/08/14/building-a-cable-to-connect-my-epever-charge-controller/Installing the packageTo install the package runpipinstallepevermodbusThis package requires Python 3, depending on your setup you might have to instead run:pip3installepevermodbusCommand line utilityTo run the command line utility and see the debug output run the following on the command line:epevermodbus--portname/dev/ttyUSB0--slaveaddress1usage:epevermodbus[-h][--portnamePORTNAME][--slaveaddressSLAVEADDRESS]optionalarguments:-h,--helpshowthishelpmessageandexit--portnamePORTNAMEPortnameforexample/dev/ttyUSB0--slaveaddressSLAVEADDRESSSlaveaddress1-247--baudrateBAUDRATEBaudratetocommunicatewithcontroller(defaultis115200)Example outputRealTimeData
Solarvoltage:0.02V
Solarcurrent:0.0A
Solarpower:0.0W
SolarpowerL:0.0W
SolarpowerH:0.0W
Loadvoltage:0.0V
Loadcurrent:0.0A
Loadpower:0.0W
LoadpowerL:0.0W
LoadpowerH:0.0W
BatterycurrentL:0.0A
BatterycurrentH:0.0A
Batteryvoltage:13.25V
Batterystateofcharge:86%
Batterytemperature:16.91°C
Remotebatterytemperature:0.0°C
Controllertemperature:16.55°C
Batterystatus:{'wrong_identifaction_for_rated_voltage':False,'battery_inner_resistence_abnormal':False,'temperature_warning_status':'NORMAL','battery_status':'NORMAL'}Chargingequipmentstatus:{'input_voltage_status':'NORMAL','charging_mosfet_is_short_circuit':False,'charging_or_anti_reverse_mosfet_is_open_circuit':False,'anti_reverse_mosfet_is_short_circuit':False,'input_over_current':False,'load_over_current':False,'load_short_circuit':False,'load_mosfet_short_circuit':False,'disequilibrium_in_three_circuits':False,'pv_input_short_circuit':False,'charging_status':'NO_CHARGING','fault':False,'running':True}Dischargingequipmentstatus:{'input_voltage_status':'NORMAL','output_power_load':'LIGHT','short_circuit':False,'unable_to_discharge':False,'unable_to_stop_discharging':False,'output_voltage_abnormal':False,'input_over_voltage':False,'short_circuit_in_high_voltage_side':False,'boost_over_voltage':False,'output_over_voltage':False,'fault':False,'running':False}Daytime:False
Nighttime:True
Maximumbatteryvoltagetoday:14.5V
Minimumbatteryvoltagetoday:13.25V
Deviceovertemperature:False


BatteryParameters:
Ratedchargingcurrent:20.0A
Ratedloadcurrent:20.0A
Batteryrealratedvoltage:12.0V
Batterytype:USER_DEFINED
Batterycapacity:40AH
Temperaturecompensationcoefficient:0Overvoltagedisconnectvoltage:14.7V
Charginglimitvoltage:14.4V
Overvoltagereconnectvoltage:14.6V
Equalizechargingvoltage:14.4V
Boostchargingvoltage:14.4V
Floatchargingvoltage:13.6V
Boostreconnectchargingvoltage:13.3V
Lowvoltagereconnectvoltage:12.0V
Undervoltagerecovervoltage:12.0V
Undervoltagewarningvoltage:11.5V
Lowvoltagedisconnectvoltage:11.0V
Discharginglimitvoltage:11.0V
Batteryratedvoltage:12V
Defaultloadon/offinmanualmode:OFF
Equalizeduration:0min
Boostduration:180min
Batterydischarge:30%
Batterycharge:100%
Chargingmode:VOLTAGE_COMPENSATIONPython usageTo use the library within your Python codefromepevermodbus.driverimportEpeverChargeControllercontroller=EpeverChargeController("/dev/ttyUSB0",1)controller.get_solar_voltage()Seehttps://github.com/rosswarren/epevermodbus/blob/main/epevermodbus/driver.pyfor all available methods