mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-12 00:16:42 +02:00
Merge branch 'upstream/HEAD' into control
This commit is contained in:
commit
6032a5ad41
6 changed files with 222 additions and 145 deletions
|
@ -127,15 +127,17 @@ void app::setup(uint32_t timeout) {
|
|||
|
||||
|
||||
// mqtt
|
||||
char mqttAddr[MQTT_ADDR_LEN];
|
||||
uint16_t mqttPort;
|
||||
char mqttAddr[MQTT_ADDR_LEN];
|
||||
char mqttUser[MQTT_USER_LEN];
|
||||
char mqttPwd[MQTT_PWD_LEN];
|
||||
char mqttTopic[MQTT_TOPIC_LEN];
|
||||
char mqttDevName[DEVNAME_LEN];
|
||||
mEep->read(ADDR_MQTT_ADDR, mqttAddr, MQTT_ADDR_LEN);
|
||||
mEep->read(ADDR_MQTT_USER, mqttUser, MQTT_USER_LEN);
|
||||
mEep->read(ADDR_MQTT_PWD, mqttPwd, MQTT_PWD_LEN);
|
||||
mEep->read(ADDR_MQTT_TOPIC, mqttTopic, MQTT_TOPIC_LEN);
|
||||
mEep->read(ADDR_DEVNAME, mqttDevName, DEVNAME_LEN);
|
||||
//mEep->read(ADDR_MQTT_INTERVAL, &mMqttInterval);
|
||||
mEep->read(ADDR_MQTT_PORT, &mqttPort);
|
||||
|
||||
|
@ -150,7 +152,7 @@ void app::setup(uint32_t timeout) {
|
|||
if(0 == mqttPort)
|
||||
mqttPort = 1883;
|
||||
|
||||
mMqtt.setup(mqttAddr, mqttTopic, mqttUser, mqttPwd, mqttPort);
|
||||
mMqtt.setup(mqttAddr, mqttTopic, mqttUser, mqttPwd, mqttDevName, mqttPort);
|
||||
mMqtt.mClient->setCallback(std::bind(&app::cbMqtt, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||
mMqttTicker = 0;
|
||||
|
||||
|
@ -158,6 +160,7 @@ void app::setup(uint32_t timeout) {
|
|||
|
||||
if(mqttAddr[0] > 0) {
|
||||
char topic[30];
|
||||
mMqtt.sendMsg("device", mqttDevName);
|
||||
mMqtt.sendMsg("version", mVersion);
|
||||
for(uint8_t i = 0; i < MAX_NUM_INVERTERS; i ++) {
|
||||
iv = mSys->getInverterByPos(i);
|
||||
|
@ -213,9 +216,9 @@ void app::loop(void) {
|
|||
yield();
|
||||
|
||||
if(checkTicker(&mRxTicker, 5)) {
|
||||
DPRINTLN(DBG_DEBUG, F("app_loops =") + String(app_loops));
|
||||
//DPRINTLN(DBG_VERBOSE, F("app_loops =") + String(app_loops));
|
||||
app_loops=0;
|
||||
DPRINT(DBG_DEBUG, F("a"));
|
||||
DPRINT(DBG_VERBOSE, F("a"));
|
||||
|
||||
bool rxRdy = mSys->Radio.switchRxCh();
|
||||
|
||||
|
@ -226,7 +229,8 @@ void app::loop(void) {
|
|||
if(mSys->Radio.checkPaketCrc(p->packet, &len, p->rxCh)) {
|
||||
// process buffer only on first occurrence
|
||||
if(mSerialDebug) {
|
||||
DPRINT(DBG_DEBUG, "Received " + String(len) + " bytes channel " + String(p->rxCh) + ": ");
|
||||
DPRINT(DBG_INFO, "RX " + String(len) + "B Ch" + String(p->rxCh) + " | ");
|
||||
|
||||
mSys->Radio.dumpBuf(NULL, p->packet, len);
|
||||
}
|
||||
mFrameCnt++;
|
||||
|
@ -316,6 +320,7 @@ void app::loop(void) {
|
|||
Inverter<> *iv = mSys->getInverterByPos(id);
|
||||
if(NULL != iv) {
|
||||
if(iv->isAvailable(mTimestamp)) {
|
||||
DPRINTLN(DBG_INFO, "Inverter: " + String(id));
|
||||
for(uint8_t i = 0; i < iv->listLen; i++) {
|
||||
if(0.0f != iv->getValue(i)) {
|
||||
snprintf(topic, 30, "%s/ch%d/%s", iv->name, iv->assign[i].ch, iv->getFieldName(i));
|
||||
|
@ -324,6 +329,7 @@ void app::loop(void) {
|
|||
}
|
||||
yield();
|
||||
}
|
||||
DPRINTLN(DBG_INFO, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
//-------------------------------------
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 4
|
||||
#define VERSION_PATCH 25
|
||||
#define VERSION_PATCH 26
|
||||
|
||||
|
||||
//-------------------------------------
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#define DTU_RADIO_ID ((uint64_t)0x1234567801ULL)
|
||||
#define DUMMY_RADIO_ID ((uint64_t)0xDEADBEEF01ULL)
|
||||
|
||||
#define RX_CHANNELS 5
|
||||
#define RX_LOOP_CNT 300
|
||||
#define RF_CHANNELS 5
|
||||
#define RF_LOOP_CNT 300
|
||||
|
||||
|
||||
const char* const rf24AmpPower[] = {"MIN", "LOW", "HIGH", "MAX"};
|
||||
|
@ -56,18 +56,18 @@ class HmRadio {
|
|||
public:
|
||||
HmRadio() : mNrf24(CE_PIN, CS_PIN, SPI_SPEED) {
|
||||
DPRINTLN(DBG_VERBOSE, F("hmRadio.h : HmRadio():mNrf24(CE_PIN: ") + String(CE_PIN) + F(", CS_PIN: ") + String(CS_PIN) + F(", SPI_SPEED: ") + String(SPI_SPEED) + ")");
|
||||
mTxChLst[0] = 40;
|
||||
//mTxChIdx = 1;
|
||||
|
||||
// Depending on the program, the module can work on 2403, 2423, 2440, 2461 or 2475MHz.
|
||||
// Channel List 2403, 2423, 2440, 2461, 2475MHz
|
||||
mRxChLst[0] = 03;
|
||||
mRxChLst[1] = 23;
|
||||
mRxChLst[2] = 40;
|
||||
mRxChLst[3] = 61;
|
||||
mRxChLst[4] = 75;
|
||||
mRxChIdx = 0;
|
||||
mRxLoopCnt = RX_LOOP_CNT;
|
||||
mRfChLst[0] = 03;
|
||||
mRfChLst[1] = 23;
|
||||
mRfChLst[2] = 40;
|
||||
mRfChLst[3] = 61;
|
||||
mRfChLst[4] = 75;
|
||||
|
||||
mTxChIdx = 2; // Start TX with 40
|
||||
mRxChIdx = 0; // Start RX with 03
|
||||
mRxLoopCnt = RF_LOOP_CNT;
|
||||
|
||||
pinCs = CS_PIN;
|
||||
pinCe = CE_PIN;
|
||||
|
@ -109,7 +109,7 @@ class HmRadio {
|
|||
DPRINTLN(DBG_INFO, F("Radio Config:"));
|
||||
mNrf24.printPrettyDetails();
|
||||
|
||||
mTxCh = getDefaultChannel();
|
||||
mTxCh = setDefaultChannels();
|
||||
|
||||
if(!mNrf24.isChipConnected()) {
|
||||
DPRINTLN(DBG_WARN, F("WARNING! your NRF24 module can't be reached, check the wiring"));
|
||||
|
@ -128,7 +128,7 @@ class HmRadio {
|
|||
while(mNrf24.available(&pipe)) {
|
||||
if(!mBufCtrl->full()) {
|
||||
p = mBufCtrl->getFront();
|
||||
p->rxCh = mRxChLst[mRxChIdx];
|
||||
p->rxCh = mRfChLst[mRxChIdx];
|
||||
len = mNrf24.getPayloadSize();
|
||||
if(len > MAX_RF_PAYLOAD_SIZE)
|
||||
len = MAX_RF_PAYLOAD_SIZE;
|
||||
|
@ -152,19 +152,12 @@ class HmRadio {
|
|||
mIrqRcvd = true;
|
||||
}
|
||||
|
||||
uint8_t getDefaultChannel(void) {
|
||||
//DPRINTLN(DBG_VERBOSE, F("hmRadio.h:getDefaultChannel"));
|
||||
return mTxChLst[0];
|
||||
uint8_t setDefaultChannels(void) {
|
||||
//DPRINTLN(DBG_VERBOSE, F("hmRadio.h:setDefaultChannels"));
|
||||
mTxChIdx = 2; // Start TX with 40
|
||||
mRxChIdx = 0; // Start RX with 03
|
||||
return mRfChLst[mTxChIdx];
|
||||
}
|
||||
/*uint8_t getLastChannel(void) {
|
||||
return mTxChLst[mTxChIdx];
|
||||
}
|
||||
|
||||
uint8_t getNxtChannel(void) {
|
||||
if(++mTxChIdx >= 4)
|
||||
mTxChIdx = 0;
|
||||
return mTxChLst[mTxChIdx];
|
||||
}*/
|
||||
|
||||
void sendControlPacket(uint64_t invId, uint8_t cmd, uint16_t data) {
|
||||
DPRINTLN(DBG_VERBOSE, F("hmRadio.h:sendControlPacket"));
|
||||
|
@ -290,7 +283,7 @@ class HmRadio {
|
|||
//DPRINTLN(DBG_VERBOSE, "sent packet: #" + String(mSendCnt));
|
||||
//dumpBuf("SEN ", buf, len);
|
||||
if(mSerialDebug) {
|
||||
DPRINT(DBG_INFO, "Transmit " + String(len) + " | ");
|
||||
DPRINT(DBG_INFO, "TX " + String(len) + "B Ch" + String(mRfChLst[mTxChIdx]) + " | ");
|
||||
dumpBuf(NULL, buf, len);
|
||||
}
|
||||
|
||||
|
@ -298,10 +291,10 @@ class HmRadio {
|
|||
mNrf24.stopListening();
|
||||
|
||||
if(clear)
|
||||
mRxLoopCnt = RX_LOOP_CNT;
|
||||
mRxLoopCnt = RF_LOOP_CNT;
|
||||
|
||||
mTxCh = getDefaultChannel();
|
||||
mNrf24.setChannel(mTxCh);
|
||||
mNrf24.setChannel(mRfChLst[mTxChIdx]);
|
||||
mTxCh = getTxNxtChannel(); // switch channel for next packet
|
||||
mNrf24.openWritingPipe(invId); // TODO: deprecated
|
||||
mNrf24.setCRCLength(RF24_CRC_16);
|
||||
mNrf24.enableDynamicPayloads();
|
||||
|
@ -312,7 +305,7 @@ class HmRadio {
|
|||
// Try to avoid zero payload acks (has no effect)
|
||||
mNrf24.openWritingPipe(DUMMY_RADIO_ID); // TODO: why dummy radio id?, deprecated
|
||||
mRxChIdx = 0;
|
||||
mNrf24.setChannel(mRxChLst[mRxChIdx]);
|
||||
mNrf24.setChannel(mRfChLst[mRxChIdx]);
|
||||
mNrf24.setAutoAck(false);
|
||||
mNrf24.setRetries(0, 0);
|
||||
mNrf24.disableDynamicPayloads();
|
||||
|
@ -323,18 +316,24 @@ class HmRadio {
|
|||
mSendCnt++;
|
||||
}
|
||||
|
||||
uint8_t getTxNxtChannel(void) {
|
||||
|
||||
if(++mTxChIdx >= RF_CHANNELS)
|
||||
mTxChIdx = 0;
|
||||
return mRfChLst[mTxChIdx];
|
||||
}
|
||||
|
||||
uint8_t getRxNxtChannel(void) {
|
||||
|
||||
if(++mRxChIdx >= RX_CHANNELS)
|
||||
if(++mRxChIdx >= RF_CHANNELS)
|
||||
mRxChIdx = 0;
|
||||
return mRxChLst[mRxChIdx];
|
||||
return mRfChLst[mRxChIdx];
|
||||
}
|
||||
|
||||
uint8_t mTxCh;
|
||||
uint8_t mTxChLst[1];
|
||||
//uint8_t mTxChIdx;
|
||||
uint8_t mTxChIdx;
|
||||
|
||||
uint8_t mRxChLst[RX_CHANNELS];
|
||||
uint8_t mRfChLst[RF_CHANNELS];
|
||||
|
||||
uint8_t mRxChIdx;
|
||||
uint16_t mRxLoopCnt;
|
||||
|
|
|
@ -18,23 +18,28 @@ class mqtt {
|
|||
mClient = new PubSubClient(mEspClient);
|
||||
mAddressSet = false;
|
||||
|
||||
memset(mBroker, 0, MQTT_ADDR_LEN);
|
||||
memset(mUser, 0, MQTT_USER_LEN);
|
||||
memset(mPwd, 0, MQTT_PWD_LEN);
|
||||
memset(mTopic, 0, MQTT_TOPIC_LEN);
|
||||
memset(mDevName, 0, DEVNAME_LEN);
|
||||
}
|
||||
|
||||
~mqtt() { }
|
||||
|
||||
void setup(const char *broker, const char *topic, const char *user, const char *pwd, uint16_t port) {
|
||||
void setup(const char *broker, const char *topic, const char *user, const char *pwd, const char *devname, uint16_t port) {
|
||||
DPRINTLN(DBG_VERBOSE, F("mqtt.h:setup"));
|
||||
mAddressSet = true;
|
||||
mClient->setServer(broker, port);
|
||||
mClient->setBufferSize(MQTT_MAX_PACKET_SIZE);
|
||||
|
||||
mPort = port;
|
||||
snprintf(mBroker, MQTT_ADDR_LEN, "%s", broker);
|
||||
snprintf(mUser, MQTT_USER_LEN, "%s", user);
|
||||
snprintf(mPwd, MQTT_PWD_LEN, "%s", pwd);
|
||||
snprintf(mTopic, MQTT_TOPIC_LEN, "%s", topic);
|
||||
snprintf(mDevName, DEVNAME_LEN, "%s", devname);
|
||||
|
||||
mClient->setServer(mBroker, mPort);
|
||||
mClient->setBufferSize(MQTT_MAX_PACKET_SIZE);
|
||||
}
|
||||
|
||||
void setCallback(void (*func)(const char* topic, byte* payload, unsigned int length)){
|
||||
|
@ -64,6 +69,11 @@ class mqtt {
|
|||
return mClient->connected();
|
||||
}
|
||||
|
||||
char *getBroker(void) {
|
||||
//DPRINTLN(DBG_VERBOSE, F("mqtt.h:getBroker"));
|
||||
return mBroker;
|
||||
}
|
||||
|
||||
char *getUser(void) {
|
||||
//DPRINTLN(DBG_VERBOSE, F("mqtt.h:getUser"));
|
||||
return mUser;
|
||||
|
@ -79,6 +89,11 @@ class mqtt {
|
|||
return mTopic;
|
||||
}
|
||||
|
||||
char *getDevName(void) {
|
||||
//DPRINTLN(DBG_VERBOSE, F("mqtt.h:getDevName"));
|
||||
return mDevName;
|
||||
}
|
||||
|
||||
uint16_t getPort(void) {
|
||||
return mPort;
|
||||
}
|
||||
|
@ -92,12 +107,20 @@ class mqtt {
|
|||
|
||||
private:
|
||||
void reconnect(void) {
|
||||
DPRINTLN(DBG_INFO, F("mqtt.h:reconnect"));
|
||||
DPRINTLN(DBG_DEBUG, F("mqtt.h:reconnect"));
|
||||
DPRINTLN(DBG_DEBUG, F("MQTT mClient->_state ") + String(mClient->state()) );
|
||||
DPRINTLN(DBG_DEBUG, F("WIFI mEspClient.status ") + String(mEspClient.status()) );
|
||||
if(!mClient->connected()) {
|
||||
if(strlen(mDevName) > 0) {
|
||||
// der Server und der Port müssen neu gesetzt werden,
|
||||
// da ein MQTT_CONNECTION_LOST -3 die Werte zerstört hat.
|
||||
mClient->setServer(mBroker, mPort);
|
||||
mClient->setBufferSize(MQTT_MAX_PACKET_SIZE);
|
||||
if((strlen(mUser) > 0) && (strlen(mPwd) > 0))
|
||||
mClient->connect(DEF_DEVICE_NAME, mUser, mPwd);
|
||||
mClient->connect(mDevName, mUser, mPwd);
|
||||
else
|
||||
mClient->connect(DEF_DEVICE_NAME);
|
||||
mClient->connect(mDevName);
|
||||
}
|
||||
}
|
||||
char topic[MQTT_TOPIC_LEN + 13 ]; // "/devcontrol/#" --> + 6 byte
|
||||
// ToDo: "/devcontrol/#" is hardcoded
|
||||
|
@ -110,9 +133,11 @@ class mqtt {
|
|||
|
||||
bool mAddressSet;
|
||||
uint16_t mPort;
|
||||
char mBroker[MQTT_ADDR_LEN];
|
||||
char mUser[MQTT_USER_LEN];
|
||||
char mPwd[MQTT_PWD_LEN];
|
||||
char mTopic[MQTT_TOPIC_LEN];
|
||||
char mDevName[DEVNAME_LEN];
|
||||
};
|
||||
|
||||
#endif /*__MQTT_H_*/
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
; PlatformIO Project Configuration File
|
||||
;
|
||||
; Build options: build flags, source filter
|
||||
; Upload options: custom upload port, speed and extra flags
|
||||
; Library options: dependencies, extra library storages
|
||||
; Advanced options: extra scripting
|
||||
;
|
||||
; Please visit documentation for the other options and examples
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[platformio]
|
||||
src_dir = .
|
||||
|
||||
|
@ -5,9 +15,22 @@ src_dir = .
|
|||
platform = espressif8266
|
||||
framework = arduino
|
||||
board = d1_mini
|
||||
monitor_speed = 115200
|
||||
board_build.f_cpu = 80000000L
|
||||
|
||||
; ;;;;; Possible Debug options ;;;;;;
|
||||
; https://docs.platformio.org/en/latest/platforms/espressif8266.html#debug-level
|
||||
;build_flags = -DDEBUG_ESP_PORT=Serial
|
||||
;-DDEBUG_ESP_CORE
|
||||
;-DDEBUG_ESP_WIFI
|
||||
;-DDEBUG_ESP_HTTP_CLIENT
|
||||
;-DDEBUG_ESP_HTTP_SERVER
|
||||
;-DDEBUG_ESP_OOM
|
||||
|
||||
monitor_speed = 115200
|
||||
monitor_filters =
|
||||
;default ; Remove typical terminal control codes from input
|
||||
time ; Add timestamp with milliseconds for each new line
|
||||
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||
|
||||
lib_deps =
|
||||
nrf24/RF24@1.4.2
|
||||
|
@ -26,11 +49,33 @@ lib_deps =
|
|||
platform = espressif8266
|
||||
framework = arduino
|
||||
board = nodemcuv2
|
||||
monitor_speed = 115200
|
||||
board_build.f_cpu = 80000000L
|
||||
|
||||
; ;;;;; Possible Debug options ;;;;;;
|
||||
; https://docs.platformio.org/en/latest/platforms/espressif8266.html#debug-level
|
||||
;build_flags = -DDEBUG_ESP_PORT=Serial
|
||||
;-DDEBUG_ESP_CORE
|
||||
;-DDEBUG_ESP_WIFI
|
||||
;-DDEBUG_ESP_HTTP_CLIENT
|
||||
;-DDEBUG_ESP_HTTP_SERVER
|
||||
;-DDEBUG_ESP_OOM
|
||||
|
||||
monitor_speed = 115200
|
||||
monitor_filters =
|
||||
;default ; Remove typical terminal control codes from input
|
||||
time ; Add timestamp with milliseconds for each new line
|
||||
;log2file ; Log data to a file “platformio-device-monitor-*.log” located in the current working directory
|
||||
upload_port = /dev/ttyUSB0
|
||||
|
||||
lib_deps =
|
||||
nrf24/RF24@1.4.2
|
||||
paulstoffregen/Time@^1.6.1
|
||||
knolleary/PubSubClient@^2.8
|
||||
bblanchon/ArduinoJson@^6.19.4
|
||||
;esp8266/DNSServer@1.1.0
|
||||
;esp8266/EEPROM@^1.0
|
||||
;esp8266/ESP8266HTTPUpdateServer@^1.0
|
||||
;esp8266/ESP8266WebServer@^1.0
|
||||
;esp8266/ESP8266WiFi@^1.0
|
||||
;esp8266/SPI@1.0
|
||||
;esp8266/Ticker@^1.0
|
||||
|
|
|
@ -217,74 +217,76 @@ class EventsResponse(UnknownResponse):
|
|||
""" Hoymiles micro-inverter event log decode helper """
|
||||
|
||||
alarm_codes = {
|
||||
1: 'Inverter start',
|
||||
2: 'DTU command failed',
|
||||
121: 'Over temperature protection',
|
||||
125: 'Grid configuration parameter error',
|
||||
126: 'Software error code 126',
|
||||
127: 'Firmware error',
|
||||
128: 'Software error code 128',
|
||||
129: 'Software error code 129',
|
||||
130: 'Offline',
|
||||
141: 'Grid overvoltage',
|
||||
142: 'Average grid overvoltage',
|
||||
143: 'Grid undervoltage',
|
||||
144: 'Grid overfrequency',
|
||||
145: 'Grid underfrequency',
|
||||
146: 'Rapid grid frequency change',
|
||||
147: 'Power grid outage',
|
||||
148: 'Grid disconnection',
|
||||
149: 'Island detected',
|
||||
205: 'Input port 1 & 2 overvoltage',
|
||||
206: 'Input port 3 & 4 overvoltage',
|
||||
207: 'Input port 1 & 2 undervoltage',
|
||||
208: 'Input port 3 & 4 undervoltage',
|
||||
209: 'Port 1 no input',
|
||||
210: 'Port 2 no input',
|
||||
211: 'Port 3 no input',
|
||||
212: 'Port 4 no input',
|
||||
213: 'PV-1 & PV-2 abnormal wiring',
|
||||
214: 'PV-3 & PV-4 abnormal wiring',
|
||||
215: 'PV-1 Input overvoltage',
|
||||
216: 'PV-1 Input undervoltage',
|
||||
217: 'PV-2 Input overvoltage',
|
||||
218: 'PV-2 Input undervoltage',
|
||||
219: 'PV-3 Input overvoltage',
|
||||
220: 'PV-3 Input undervoltage',
|
||||
221: 'PV-4 Input overvoltage',
|
||||
222: 'PV-4 Input undervoltage',
|
||||
301: 'Hardware error code 301',
|
||||
302: 'Hardware error code 302',
|
||||
303: 'Hardware error code 303',
|
||||
304: 'Hardware error code 304',
|
||||
305: 'Hardware error code 305',
|
||||
306: 'Hardware error code 306',
|
||||
307: 'Hardware error code 307',
|
||||
308: 'Hardware error code 308',
|
||||
309: 'Hardware error code 309',
|
||||
310: 'Hardware error code 310',
|
||||
311: 'Hardware error code 311',
|
||||
312: 'Hardware error code 312',
|
||||
313: 'Hardware error code 313',
|
||||
314: 'Hardware error code 314',
|
||||
5041: 'Error code-04 Port 1',
|
||||
5042: 'Error code-04 Port 2',
|
||||
5043: 'Error code-04 Port 3',
|
||||
5044: 'Error code-04 Port 4',
|
||||
5051: 'PV Input 1 Overvoltage/Undervoltage',
|
||||
5052: 'PV Input 2 Overvoltage/Undervoltage',
|
||||
5053: 'PV Input 3 Overvoltage/Undervoltage',
|
||||
5054: 'PV Input 4 Overvoltage/Undervoltage',
|
||||
5060: 'Abnormal bias',
|
||||
5070: 'Over temperature protection',
|
||||
5080: 'Grid Overvoltage/Undervoltage',
|
||||
5090: 'Grid Overfrequency/Underfrequency',
|
||||
5100: 'Island detected',
|
||||
5120: 'EEPROM reading and writing error',
|
||||
5150: '10 min value grid overvoltage',
|
||||
5200: 'Firmware error',
|
||||
8310: 'Shut down',
|
||||
9000: 'Microinverter is suspected of being stolen'
|
||||
// HM Error Codes
|
||||
1: 'Inverter start', // 0x01
|
||||
2: 'DTU command failed', // 0x02
|
||||
121: 'Over temperature protection', // 0x79
|
||||
125: 'Grid configuration parameter error', // 0x7D
|
||||
126: 'Software error code 126', // 0x7E
|
||||
127: 'Firmware error', // 0x7F
|
||||
128: 'Software error code 128', // 0x80
|
||||
129: 'Software error code 129', // 0x81
|
||||
130: 'Offline', // 0x82
|
||||
141: 'Grid overvoltage', // 0x8D
|
||||
142: 'Average grid overvoltage', // 0x8E
|
||||
143: 'Grid undervoltage', // 0x8F
|
||||
144: 'Grid overfrequency', // 0x90
|
||||
145: 'Grid underfrequency', // 0x91
|
||||
146: 'Rapid grid frequency change', // 0x92
|
||||
147: 'Power grid outage', // 0x93
|
||||
148: 'Grid disconnection', // 0x94
|
||||
149: 'Island detected', // 0x95
|
||||
205: 'Input port 1 & 2 overvoltage', // 0xCD
|
||||
206: 'Input port 3 & 4 overvoltage', // 0xCE
|
||||
207: 'Input port 1 & 2 undervoltage', // 0xCF
|
||||
208: 'Input port 3 & 4 undervoltage', // 0xD0
|
||||
209: 'Port 1 no input', // 0xD1
|
||||
210: 'Port 2 no input', // 0xD2
|
||||
211: 'Port 3 no input', // 0xD3
|
||||
212: 'Port 4 no input', // 0xD4
|
||||
213: 'PV-1 & PV-2 abnormal wiring', // 0xD5
|
||||
214: 'PV-3 & PV-4 abnormal wiring', // 0xD6
|
||||
215: 'PV-1 Input overvoltage', // 0xD7
|
||||
216: 'PV-1 Input undervoltage', // 0xD8
|
||||
217: 'PV-2 Input overvoltage', // 0xD9
|
||||
218: 'PV-2 Input undervoltage', // 0xDA
|
||||
219: 'PV-3 Input overvoltage', // 0xDB
|
||||
220: 'PV-3 Input undervoltage', // 0xDC
|
||||
221: 'PV-4 Input overvoltage', // 0xDD
|
||||
222: 'PV-4 Input undervoltage', // 0xDE
|
||||
301: 'Hardware error code 301', // 0x012D
|
||||
302: 'Hardware error code 302', // 0x012E
|
||||
303: 'Hardware error code 303', // 0x012F
|
||||
304: 'Hardware error code 304', // 0x0130
|
||||
305: 'Hardware error code 305', // 0x0131
|
||||
306: 'Hardware error code 306', // 0x0132
|
||||
307: 'Hardware error code 307', // 0x0133
|
||||
308: 'Hardware error code 308', // 0x0134
|
||||
309: 'Hardware error code 309', // 0x0135
|
||||
310: 'Hardware error code 310', // 0x0136
|
||||
311: 'Hardware error code 311', // 0x0137
|
||||
312: 'Hardware error code 312', // 0x0138
|
||||
313: 'Hardware error code 313', // 0x0139
|
||||
314: 'Hardware error code 314', // 0x013A
|
||||
// MI Error Codes
|
||||
5041: 'Error code-04 Port 1', // 0x13B1
|
||||
5042: 'Error code-04 Port 2', // 0x13B2
|
||||
5043: 'Error code-04 Port 3', // 0x13B3
|
||||
5044: 'Error code-04 Port 4', // 0x13B4
|
||||
5051: 'PV Input 1 Overvoltage/Undervoltage', // 0x13BB
|
||||
5052: 'PV Input 2 Overvoltage/Undervoltage', // 0x13BC
|
||||
5053: 'PV Input 3 Overvoltage/Undervoltage', // 0x13BD
|
||||
5054: 'PV Input 4 Overvoltage/Undervoltage', // 0x13BE
|
||||
5060: 'Abnormal bias', // 0x13C4
|
||||
5070: 'Over temperature protection', // 0x13CE
|
||||
5080: 'Grid Overvoltage/Undervoltage', // 0x13D8
|
||||
5090: 'Grid Overfrequency/Underfrequency', // 0x13E2
|
||||
5100: 'Island detected', // 0x13EC
|
||||
5120: 'EEPROM reading and writing error', // 0x1400
|
||||
5150: '10 min value grid overvoltage', // 0x141E
|
||||
5200: 'Firmware error', // 0x1450
|
||||
8310: 'Shut down', // 0x2076
|
||||
9000: 'Microinverter is suspected of being stolen' // 0x2328
|
||||
}
|
||||
|
||||
def __init__(self, *args, **params):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue