lumapu / ahoy

Various tools, examples, and documentation for communicating with Hoymiles microinverters
https://ahoydtu.de
Other
953 stars 224 forks source link

[ESP8266] Rest API "record/live" returns only values of first inverter #507

Closed snowstoked closed 1 year ago

snowstoked commented 1 year ago

Platform

ESP8266

Model name

No response

nRF24L01+ Module

nRF24L01+ plus

Antenna

circuit board

Power Stabilization

nothing

Connection diagram

Connection diagram I used:

nRF24L01+ Pin ESP8266 GPIO
Pin 1 GND [*] GND
Pin 2 +3.3V +3.3V
Pin 3 CE GPIO2 CE D4
Pin 4 CSN GPIO15 CS D8
Pin 5 SCK GPIO14 SCLK D5
Pin 6 MOSI GPIO13 MOSI D7
Pin 7 MISO GPIO12 MISO D6
Pin 8 IRQ GPIO0 IRQ D3

Note: [*] GND Pin 1 has a square mark on the nRF24L01+ module

Connection picture

Version

0.5.41

Github Hash

dec333f

Build & Flash Method

ESP Tools (flash)

Desktop

Windows

Setup

Device Host Name

- Device Name: AHOY-DTU

WiFi

- SSID: YOUR_WIFI_SSID *don't paste here*
- Password: YOUR_WIFI_PWD *don't paste here*

Inverter

Inverter 0

- Address: 116163207202
- Name: HM-1500-Pergola
- Active Power Limit: 65535
- Active Power Limit Control Type: no powerlimit
- Max Module Power (Wp): 375, 375
- Module Name: ??

Inverter 1

- Address: 116183059731
- Name: HM-1500-Garage
- Active Power Limit: 65535
- Active Power Limit Control Type: no powerlimit
- Max Module Power (Wp): 375, 375
- Module Name: ??

General

- Interval [s]: 10
- Max retries per Payload: 5

NTP Server

- NTP Server / IP: pool.ntp.org
- NTP Port: 123

MQTT

- Broker / Server IP: homeassistant.local
- Port: 1883
- Username (optional): 
- Password (optional): 
- Topic: inverter

System Config

Pinout (Wemos)

- CS: D8 (GPIO15)
- CE: D4 (GPIO2)
- IRQ: D3 (GPIO0)

Radio (NRF24L01+)

- Amplifier Power Level: LOW

Serial Console

- print inverter data: [x]
- Serial Debug: [x]
- Interval [s]: 5

version: 0.5.41 wifi_rssi: -52 mac: C8:C9:A3:61:C1:9C sdk: 2.2.2-dev(38a443e) cpu_freq: 80 heap_free: 10968 sketch_used: 468 core_version: 3.0.2 flash_size: 4096 heap_frag: 3 max_free_blk: 10672 reboot_reason: Hardware Watchdog esp_type: ESP8266

Debug Serial Log output

No response

Error description

1) Go to http://ahoy-dtu.local/api/record/live 2) Now receiving two entries for inverters but the second one is identical to the first one. Especially the overall yieldTotal of the inverters are different (switching the invertes results in the same issue) {"inverter": [ [{"fld":"U_DC","unit":"V","val":"16.10"},{"fld":"I_DC","unit":"A","val":"0.01"},{"fld":"P_DC","unit":"W","val":"0.20"},{"fld":"YieldDay","unit":"Wh","val":"40.00"},{"fld":"YieldTotal","unit":"kWh","val":"512.46"},{"fld":"Irradiation","unit":"%","val":"0.00"},{"fld":"U_DC","unit":"V","val":"16.10"},{"fld":"I_DC","unit":"A","val":"0.01"},{"fld":"P_DC","unit":"W","val":"0.20"},{"fld":"YieldDay","unit":"Wh","val":"323.00"},{"fld":"YieldTotal","unit":"kWh","val":"568.40"},{"fld":"Irradiation","unit":"%","val":"0.00"},{"fld":"U_DC","unit":"V","val":"16.10"},{"fld":"I_DC","unit":"A","val":"0.01"},{"fld":"P_DC","unit":"W","val":"0.20"},{"fld":"YieldDay","unit":"Wh","val":"56.00"},{"fld":"YieldTotal","unit":"kWh","val":"491.18"},{"fld":"Irradiation","unit":"%","val":"0.00"},{"fld":"U_DC","unit":"V","val":"16.10"},{"fld":"I_DC","unit":"A","val":"0.02"},{"fld":"P_DC","unit":"W","val":"0.30"},{"fld":"YieldDay","unit":"Wh","val":"374.00"},{"fld":"YieldTotal","unit":"kWh","val":"560.98"},{"fld":"Irradiation","unit":"%","val":"0.00"},{"fld":"U_AC","unit":"V","val":"223.80"},{"fld":"I_AC","unit":"A","val":"0.00"},{"fld":"P_AC","unit":"W","val":"0.00"},{"fld":"Q_AC","unit":"var","val":"19.50"},{"fld":"F_AC","unit":"Hz","val":"50.00"},{"fld":"PF_AC","unit":"","val":"0.00"},{"fld":"Temp","unit":"°C","val":"3.80"},{"fld":"ALARM_MES_ID","unit":"","val":"9.00"},{"fld":"YieldDay","unit":"Wh","val":"793.00"},{"fld":"YieldTotal","unit":"kWh","val":"2133.02"},{"fld":"P_DC","unit":"W","val":"0.90"},{"fld":"Efficiency","unit":"%","val":"0.00"}], [{"fld":"U_DC","unit":"V","val":"16.10"},{"fld":"I_DC","unit":"A","val":"0.01"},{"fld":"P_DC","unit":"W","val":"0.20"},{"fld":"YieldDay","unit":"Wh","val":"40.00"},{"fld":"YieldTotal","unit":"kWh","val":"512.46"},{"fld":"Irradiation","unit":"%","val":"0.00"},{"fld":"U_DC","unit":"V","val":"16.10"},{"fld":"I_DC","unit":"A","val":"0.01"},{"fld":"P_DC","unit":"W","val":"0.20"},{"fld":"YieldDay","unit":"Wh","val":"323.00"},{"fld":"YieldTotal","unit":"kWh","val":"568.40"},{"fld":"Irradiation","unit":"%","val":"0.00"},{"fld":"U_DC","unit":"V","val":"16.10"},{"fld":"I_DC","unit":"A","val":"0.01"},{"fld":"P_DC","unit":"W","val":"0.20"},{"fld":"YieldDay","unit":"Wh","val":"56.00"},{"fld":"YieldTotal","unit":"kWh","val":"491.18"},{"fld":"Irradiation","unit":"%","val":"0.00"},{"fld":"U_DC","unit":"V","val":"16.10"},{"fld":"I_DC","unit":"A","val":"0.02"},{"fld":"P_DC","unit":"W","val":"0.30"},{"fld":"YieldDay","unit":"Wh","val":"374.00"},{"fld":"YieldTotal","unit":"kWh","val":"560.98"},{"fld":"Irradiation","unit":"%","val":"0.00"},{"fld":"U_AC","unit":"V","val":"223.80"},{"fld":"I_AC","unit":"A","val":"0.00"},{"fld":"P_AC","unit":"W","val":"0.00"},{"fld":"Q_AC","unit":"var","val":"19.50"},{"fld":"F_AC","unit":"Hz","val":"50.00"},{"fld":"PF_AC","unit":"","val":"0.00"},{"fld":"Temp","unit":"°C","val":"3.80"},{"fld":"ALARM_MES_ID","unit":"","val":"9.00"},{"fld":"YieldDay","unit":"Wh","val":"793.00"},{"fld":"YieldTotal","unit":"kWh","val":"2133.02"},{"fld":"P_DC","unit":"W","val":"0.90"},{"fld":"Efficiency","unit":"%","val":"0.00"}]]}

GitHubUserDev commented 1 year ago

With version 0.5.63(Dev) it works: Download: https://nightly.link/lumapu/ahoy/workflows/compile_development/development03/ahoydtu_dev.zip