mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-10 15:36:38 +02:00
* added HM800 defines
* updated README.md
This commit is contained in:
parent
cf12ceefac
commit
6a31bcddb1
4 changed files with 49 additions and 11 deletions
|
@ -13,6 +13,13 @@ This code can be compiled using Arduino. The settings were:
|
||||||
- Board: Generic ESP8266 Module
|
- Board: Generic ESP8266 Module
|
||||||
- Flash-Size: 1MB (FS: none, OTA: 502kB)
|
- Flash-Size: 1MB (FS: none, OTA: 502kB)
|
||||||
|
|
||||||
|
### Optional Configuration before compilation
|
||||||
|
|
||||||
|
- number of supported inverters (set to 3 by default) `defines.h`
|
||||||
|
- enable channel hopping `hmRadio.h`
|
||||||
|
- DTU radio id `hmRadio.h`
|
||||||
|
- unformated list in webbrowser `/livedata` `defines.h`, `LIVEDATA_VISUALIZED`
|
||||||
|
|
||||||
|
|
||||||
## Flash ESP with firmware
|
## Flash ESP with firmware
|
||||||
|
|
||||||
|
@ -21,12 +28,12 @@ This code can be compiled using Arduino. The settings were:
|
||||||
3. the ESP will start as access point (AP) if there is no network config stored in its eeprom
|
3. the ESP will start as access point (AP) if there is no network config stored in its eeprom
|
||||||
4. connect to the AP, you will be forwarded to the setup page
|
4. connect to the AP, you will be forwarded to the setup page
|
||||||
5. configure your WiFi settings, save, repower
|
5. configure your WiFi settings, save, repower
|
||||||
6. check your router for the IP address of the module
|
6. check your router or serial console for the IP address of the module. You can try ping the configured device name as well.
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Connect the ESP to power and to your serial console. The webinterface has the following abilities:
|
Connect the ESP to power and to your serial console (optional). The webinterface has the following abilities:
|
||||||
|
|
||||||
- OTA Update (over the air update)
|
- OTA Update (over the air update)
|
||||||
- Configuration (Wifi, inverter(s), Pinout, MQTT)
|
- Configuration (Wifi, inverter(s), Pinout, MQTT)
|
||||||
|
@ -40,11 +47,14 @@ The serial console will print the converted values which were read out of the in
|
||||||
|
|
||||||
For now the following inverters should work out of the box:
|
For now the following inverters should work out of the box:
|
||||||
|
|
||||||
|
- HM400
|
||||||
- HM600
|
- HM600
|
||||||
|
- HM800
|
||||||
- HM1200
|
- HM1200
|
||||||
|
|
||||||
## USED LIBRARIES
|
## USED LIBRARIES
|
||||||
|
|
||||||
- `Time`
|
- `Time`
|
||||||
- `RF24`
|
- `RF24`
|
||||||
|
- `PubSubClient`
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 2
|
#define VERSION_MINOR 2
|
||||||
#define VERSION_PATCH 11
|
#define VERSION_PATCH 12
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
|
|
|
@ -20,9 +20,9 @@ const char* const fields[] = {"U_DC", "I_DC", "P_DC", "YieldDay", "YieldWeek", "
|
||||||
enum {CH0 = 0, CH1, CH2, CH3, CH4};
|
enum {CH0 = 0, CH1, CH2, CH3, CH4};
|
||||||
enum {CMD01 = 0x01, CMD02, CMD03, CMD82 = 0x82, CMD83, CMD84};
|
enum {CMD01 = 0x01, CMD02, CMD03, CMD82 = 0x82, CMD83, CMD84};
|
||||||
|
|
||||||
enum {INV_TYPE_HM600 = 0, INV_TYPE_HM1200, INV_TYPE_HM400};
|
enum {INV_TYPE_HM600 = 0, INV_TYPE_HM1200, INV_TYPE_HM400, INV_TYPE_HM800};
|
||||||
const char* const invTypes[] = {"HM600", "HM1200 / HM1500", "HM400"};
|
const char* const invTypes[] = {"HM600", "HM1200 / HM1500", "HM400", "HM800"};
|
||||||
#define NUM_INVERTER_TYPES 3
|
#define NUM_INVERTER_TYPES 4
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t fieldId; // field id
|
uint8_t fieldId; // field id
|
||||||
|
@ -96,6 +96,30 @@ const byteAssign_t hm600assignment[] = {
|
||||||
#define HM600_LIST_LEN (sizeof(hm600assignment) / sizeof(byteAssign_t))
|
#define HM600_LIST_LEN (sizeof(hm600assignment) / sizeof(byteAssign_t))
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------
|
||||||
|
// HM800
|
||||||
|
//-------------------------------------
|
||||||
|
const byteAssign_t hm800assignment[] = {
|
||||||
|
|
||||||
|
{ FLD_UDC, UNIT_V, CH1, CMD01, 3, 2, 10 },
|
||||||
|
{ FLD_IDC, UNIT_A, CH1, CMD01, 5, 2, 100 },
|
||||||
|
{ FLD_PDC, UNIT_W, CH1, CMD01, 7, 2, 10 },
|
||||||
|
{ FLD_UDC, UNIT_V, CH2, CMD01, 9, 2, 10 },
|
||||||
|
{ FLD_IDC, UNIT_A, CH2, CMD01, 11, 2, 100 },
|
||||||
|
{ FLD_PDC, UNIT_W, CH2, CMD01, 13, 2, 10 },
|
||||||
|
{ FLD_YW, UNIT_WH, CH0, CMD02, 1, 2, 1 },
|
||||||
|
{ FLD_YT, UNIT_KWH, CH0, CMD02, 3, 4, 1000 },
|
||||||
|
{ FLD_YD, UNIT_WH, CH1, CMD02, 7, 2, 1 },
|
||||||
|
{ FLD_YD, UNIT_WH, CH2, CMD02, 9, 2, 1 },
|
||||||
|
{ FLD_UAC, UNIT_V, CH0, CMD02, 11, 2, 10 },
|
||||||
|
{ FLD_F, UNIT_HZ, CH0, CMD02, 13, 2, 100 },
|
||||||
|
{ FLD_PAC, UNIT_W, CH0, CMD02, 15, 2, 10 },
|
||||||
|
{ FLD_IAC, UNIT_A, CH0, CMD83, 3, 2, 100 },
|
||||||
|
{ FLD_T, UNIT_C, CH0, CMD83, 7, 2, 10 }
|
||||||
|
};
|
||||||
|
#define HM800_LIST_LEN (sizeof(hm800assignment) / sizeof(byteAssign_t))
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
// HM1200, HM1500
|
// HM1200, HM1500
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
|
|
|
@ -137,18 +137,22 @@ class HmSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
void getAssignment(inverter_t *p) {
|
void getAssignment(inverter_t *p) {
|
||||||
if(INV_TYPE_HM600 == p->type) {
|
if(INV_TYPE_HM400 == p->type) {
|
||||||
|
p->listLen = (uint8_t)(HM400_LIST_LEN);
|
||||||
|
p->assign = (byteAssign_t*)hm400assignment;
|
||||||
|
}
|
||||||
|
else if(INV_TYPE_HM600 == p->type) {
|
||||||
p->listLen = (uint8_t)(HM600_LIST_LEN);
|
p->listLen = (uint8_t)(HM600_LIST_LEN);
|
||||||
p->assign = (byteAssign_t*)hm600assignment;
|
p->assign = (byteAssign_t*)hm600assignment;
|
||||||
}
|
}
|
||||||
|
else if(INV_TYPE_HM800 == p->type) {
|
||||||
|
p->listLen = (uint8_t)(HM800_LIST_LEN);
|
||||||
|
p->assign = (byteAssign_t*)hm800assignment;
|
||||||
|
}
|
||||||
else if(INV_TYPE_HM1200 == p->type) {
|
else if(INV_TYPE_HM1200 == p->type) {
|
||||||
p->listLen = (uint8_t)(HM1200_LIST_LEN);
|
p->listLen = (uint8_t)(HM1200_LIST_LEN);
|
||||||
p->assign = (byteAssign_t*)hm1200assignment;
|
p->assign = (byteAssign_t*)hm1200assignment;
|
||||||
}
|
}
|
||||||
else if(INV_TYPE_HM400 == p->type) {
|
|
||||||
p->listLen = (uint8_t)(HM400_LIST_LEN);
|
|
||||||
p->assign = (byteAssign_t*)hm400assignment;
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
p->listLen = 0;
|
p->listLen = 0;
|
||||||
p->assign = NULL;
|
p->assign = NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue