Remove unused LUNA library

This commit is contained in:
Daniel Öster 2024-08-30 12:21:59 +03:00
parent 3bf8fa4be9
commit 73d4d0777f
8 changed files with 0 additions and 85 deletions

View file

@ -53,7 +53,6 @@ jobs:
inverter:
- BYD_CAN
# - BYD_MODBUS
# - LUNA2000_MODBUS
# - PYLON_CAN
# - SMA_CAN
# - SMA_TRIPOWER_CAN

View file

@ -55,7 +55,6 @@ jobs:
- BYD_CAN
- BYD_SMA
- BYD_MODBUS
- LUNA2000_MODBUS
- PYLON_CAN
- SMA_CAN
- SMA_TRIPOWER_CAN

View file

@ -45,7 +45,6 @@ jobs:
- BYD_CAN
- BYD_SMA
- BYD_MODBUS
- LUNA2000_MODBUS
- PYLON_CAN
- SMA_CAN
- SMA_TRIPOWER_CAN

View file

@ -32,7 +32,6 @@
//#define BYD_CAN //Enable this line to emulate a "BYD Battery-Box Premium HVS" over CAN Bus
//#define BYD_SMA //Enable this line to emulate a SMA compatible "BYD Battery-Box HVS 10.2KW battery" over CAN bus
//#define BYD_MODBUS //Enable this line to emulate a "BYD 11kWh HVM battery" over Modbus RTU
//#define LUNA2000_MODBUS //Enable this line to emulate a "Luna2000 battery" over Modbus RTU
//#define PYLON_CAN //Enable this line to emulate a "Pylontech battery" over CAN bus
//#define SMA_CAN //Enable this line to emulate a "BYD Battery-Box H 8.9kWh, 7 mod" over CAN bus
//#define SMA_TRIPOWER_CAN //Enable this line to emulate a "SMA Home Storage battery" over CAN bus

View file

@ -457,9 +457,6 @@ String processor(const String& var) {
#ifdef BYD_MODBUS
content += "BYD 11kWh HVM battery over Modbus RTU";
#endif
#ifdef LUNA2000_MODBUS
content += "Luna2000 battery over Modbus RTU";
#endif
#ifdef PYLON_CAN
content += "Pylontech battery over CAN bus";
#endif

View file

@ -15,10 +15,6 @@
#include "BYD-SMA.h"
#endif
#ifdef LUNA2000_MODBUS
#include "LUNA2000-MODBUS.h"
#endif
#ifdef PYLON_CAN
#include "PYLON-CAN.h"
#endif

View file

@ -1,61 +0,0 @@
#include "../include.h"
#ifdef LUNA2000_MODBUS
#include "../datalayer/datalayer.h"
#include "LUNA2000-MODBUS.h"
void update_modbus_registers_inverter() {
handle_update_data_modbus32051();
handle_update_data_modbus39500();
}
void handle_update_data_modbus32051() {
// Store the data into the array
static uint16_t system_data[9];
system_data[0] = 1;
system_data[1] = 534; //Goes between 534-498 depending on SOC
system_data[2] = 110; //Goes between 110- -107 [NOTE, SIGNED VALUE]
system_data[3] = 0; //Goes between 0 and -1 [NOTE, SIGNED VALUE]
system_data[4] = 616; //Goes between 616- -520 [NOTE, SIGNED VALUE]
system_data[5] = datalayer.battery.status.temperature_max_dC; //Temperature max?
system_data[6] = datalayer.battery.status.temperature_min_dC; //Temperature min?
system_data[7] = (datalayer.battery.status.reported_soc / 100); //SOC 0-100%, no decimals
system_data[8] = 98; //Always 98 in logs
static uint16_t i = 2051;
memcpy(&mbPV[i], system_data, sizeof(system_data));
}
void handle_update_data_modbus39500() {
// Store the data into the array
static uint16_t system_data[26];
system_data[0] = 0;
system_data[1] = datalayer.battery.info.total_capacity_Wh; //Capacity? 5000 with 5kWh battery
system_data[2] = 0;
system_data[3] = datalayer.battery.info.total_capacity_Wh; //Capacity? 5000 with 5kWh battery
system_data[4] = 0;
system_data[5] = 2500; //???
system_data[6] = 0;
system_data[7] = 2500; //???
system_data[8] = (datalayer.battery.status.reported_soc / 100); //SOC 0-100%, no decimals
system_data[9] =
1; //Running status, equiv to register 37762, 0 = Offline, 1 = Standby,2 = Running, 3 = Fault, 4 = sleep mode
system_data[10] = datalayer.battery.status.voltage_dV; //Battery bus voltage (766.5V = 7665)
system_data[11] = 9; //TODO: GOES LOWER WITH LOW SOC
system_data[12] = 0;
system_data[13] = 699; //TODO: GOES LOWER WITH LOW SOC
system_data[14] = 1; //Always 1 in logs
system_data[15] = 18; //Always 18 in logs
system_data[16] = 8066; //TODO: GOES HIGHER WITH LOW SOC (max allowed charge W?)
system_data[17] = 17;
system_data[18] = 44027; //TODO: GOES LOWER WITH LOW SOC
system_data[19] = 0;
system_data[20] = 435; //Always 435 in logs
system_data[21] = 0;
system_data[22] = 0;
system_data[23] = 0;
system_data[24] = (datalayer.battery.status.reported_soc / 10); //SOC 0-100.0%, 1x decimal
system_data[25] = 0;
system_data[26] = 1; //Always 1 in logs
static uint16_t i = 9500;
memcpy(&mbPV[i], system_data, sizeof(system_data));
}
#endif

View file

@ -1,13 +0,0 @@
#ifndef LUNA2000_MODBUS_H
#define LUNA2000_MODBUS_H
#include "../include.h"
#define MODBUS_INVERTER_SELECTED
#define MB_RTU_NUM_VALUES 30000
extern uint16_t mbPV[MB_RTU_NUM_VALUES];
void handle_update_data_modbus32051();
void handle_update_data_modbus39500();
#endif