Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for HERF-300 inverter #2236

Closed
xenio opened this issue Aug 28, 2024 · 32 comments
Closed

Support for HERF-300 inverter #2236

xenio opened this issue Aug 28, 2024 · 32 comments
Labels
enhancement New feature or request

Comments

@xenio
Copy link

xenio commented Aug 28, 2024

Is your feature request related to a problem? Please describe.

I just received a micro invert from ESTAR ENERGY, it is a HERF-300.

I added the serial and the form accepted and converted it, but I get UNKNOWN TYPE.

Is it possible to add support for this model?
Thanks.

Screen Shot 2024-08-28 at 10 12 01

Screen Shot 2024-08-28 at 10 12 19

Screen Shot 2024-08-28 at 10 12 47

Screen Shot 2024-08-28 at 10 11 11

Screen Shot 2024-08-28 at 10 11 32

Describe the solution you'd like

I don't have a solution :(

Describe alternatives you've considered

No response

Additional context

The HERF-300 micro inverter it is working with HERF-DCU but I'll love to get off their cloud, and there is no integration with Home Assistant or MQTT.

@xenio xenio added the enhancement New feature or request label Aug 28, 2024
@tbnobody
Copy link
Owner

Are you able to compile the firmware by yourself? Otherwise I will provide you a binary which includes a first detection. The interpretation of the data will still be wrong as I need the console output from your side if it's able to send and receive data.

@xenio
Copy link
Author

xenio commented Aug 28, 2024

@tbnobody yep I can compile the source code (VSCode on MacOS).

Do I need to change something in the code?

Log:

08:21:42.608 > Starting OpenDTU
08:21:42.608 > Initialize FS... done
08:21:42.608 > Reading configuration... done
08:21:42.715 > Reading PinMapping... found valid mapping done
08:21:42.763 > Initialize Network... done
08:21:42.871 > Setting Hostname... Configuring WiFi STA using new credentials... done
08:21:42.886 > Initialize NTP... done
08:21:42.886 > Initialize SunPosition... done
08:21:42.886 > Initialize MqTT... done
08:21:42.889 > Initialize WebApi... done
08:21:42.901 > Initialize Display... done
08:21:42.901 > Initialize LEDs... done
08:21:42.901 > Check for default DTU serial... done
08:21:42.907 > Initialize Hoymiles interface... NRF: Connection successful
08:21:42.915 >   Setting radio PA level... 
08:21:42.915 >   Setting DTU serial... 
08:21:42.920 >   Setting poll interval... 
08:21:42.920 >   Adding inverter: 28410000C9DD - HERF-300 done
08:21:42.926 > done
08:21:42.926 > Switch to WiFi mode
08:21:42.926 > Setting Hostname... done
08:21:42.947 > Configuring WiFi STA using new credentials... done
08:21:42.956 > Configuring WiFi STA DHCP IP... done
08:21:45.879 > WiFi connected
08:21:45.932 > WiFi got ip: 192.168.1.126
08:21:45.932 > Network connected
08:21:45.932 > Connecting to MQTT...
08:21:45.964 > Connected to MQTT.
08:21:55.582 > Admin AP remaining seconds: 10 / 180
08:22:05.592 > Admin AP remaining seconds: 20 / 180
08:22:15.602 > Admin AP remaining seconds: 30 / 180
08:22:25.612 > Admin AP remaining seconds: 40 / 180
08:22:35.622 > Admin AP remaining seconds: 50 / 180
08:22:45.633 > Admin AP remaining seconds: 60 / 180
08:22:55.645 > Admin AP remaining seconds: 70 / 180
08:23:05.657 > Admin AP remaining seconds: 80 / 180
08:23:15.671 > Admin AP remaining seconds: 90 / 180
08:23:25.682 > Admin AP remaining seconds: 100 / 180
08:23:35.695 > Admin AP remaining seconds: 110 / 180
08:23:45.706 > Admin AP remaining seconds: 120 / 180
08:23:55.718 > Admin AP remaining seconds: 130 / 180
08:24:05.732 > Admin AP remaining seconds: 140 / 180
08:24:15.743 > Admin AP remaining seconds: 150 / 180
08:24:25.756 > Admin AP remaining seconds: 160 / 180
08:24:35.767 > Admin AP remaining seconds: 170 / 180
08:24:45.780 > Admin AP remaining seconds: 180 / 180
08:24:46.780 > Admin mode disabled

@tbnobody
Copy link
Owner

Do I need to change something in the code?

Yes. Please add at this line:

the following:

    uint16_t preSerial = (serial >> 32) & 0xffff;
    if (preSerial == 0x2841) {
        return true;
    }

After this the inverter should be recognized as HM-300/350/400-1T.
In the console you should see TX and RX lines.

Also the inverter should be visible at the Live View.
But I would expect that the properties just show strange values.
Please provide a screenshot of the Live View and also from the console.
We need the output of those lines:

TX RealTimeRunData Channel: 23 --> 15 71 60 35 46 80 12 23 04 80 0B 00 66 D0 96 B2 00 00 00 00 00 00 00 00 44 4B D4
Interrupt received
RX Channel: 75 --> 95 71 60 35 46 71 60 35 46 01 00 01 01 42 00 D5 01 4E 02 AD 04 35 00 11 16 55 80 | -80 dBm
Interrupt received
RX Channel: 75 --> 95 71 60 35 46 71 60 35 46 02 00 11 0A F3 08 89 08 92 01 3D 01 58 00 02 04 40 47 | -80 dBm
Interrupt received
RX Channel: 61 --> 95 71 60 35 46 71 60 35 46 03 00 07 00 11 3C CE 00 00 19 5E 08 81 00 07 09 0D BF | -80 dBm
Interrupt received
RX Channel: 61 --> 95 71 60 35 46 71 60 35 46 84 13 86 0A 9A 00 D3 00 75 03 E5 01 ED 00 02 D2 5E 36 | -80 dBm
Interrupt received
RX Period End
Success

@xenio
Copy link
Author

xenio commented Aug 29, 2024

Ok, I added the code and now it is recognised but it is not connecting :(

The inverter is connected to its DCU should I turn off the HERF DCU?

Screen Shot 2024-08-29 at 18 40 03

Screen Shot 2024-08-29 at 18 35 55
Screen Shot 2024-08-29 at 18 36 29

18:38:58.823 > Starting OpenDTU
18:38:58.823 > Initialize FS... done
18:38:58.832 > Reading configuration... done
18:38:58.959 > Reading PinMapping... found valid mapping done
18:38:59.048 > Initialize Network... done
18:38:59.175 > Setting Hostname... Configuring WiFi STA using new credentials... done
18:38:59.175 > Initialize NTP... done
18:38:59.175 > Initialize SunPosition... done
18:38:59.175 > Initialize MqTT... done
18:38:59.175 > Initialize WebApi... done
18:38:59.186 > Initialize Display... done
18:38:59.186 > Initialize LEDs... done
18:38:59.186 > Check for default DTU serial... done
18:38:59.192 > Initialize Hoymiles interface... NRF: Connection successful
18:38:59.201 >   Setting radio PA level... 
18:38:59.201 >   Setting DTU serial... 
18:38:59.206 >   Setting poll interval... 
18:38:59.206 >   Adding inverter: 28410000C9DD - HERF-300 done
18:38:59.212 > done
18:38:59.212 > Switch to WiFi mode
18:38:59.215 > Setting Hostname... done
18:38:59.234 > Configuring WiFi STA using new credentials... done
18:38:59.244 > Configuring WiFi STA DHCP IP... done
18:39:02.161 > WiFi connected
18:39:02.220 > WiFi got ip: 192.168.1.126
18:39:02.220 > Network connected
18:39:02.220 > Connecting to MQTT...
18:39:02.271 > Connected to MQTT.
18:39:03.784 > Fetch inverter: 28410000C9DD
18:39:03.792 > TX RealTimeRunData Channel: 23 --> 15 00 00 C9 DD 80 15 43 20 80 0B 00 66 D0 A4 27 00 00 00 00 00 00 00 00 27 79 17 
18:39:04.333 > RX Period End
18:39:04.333 > All missing
18:39:04.333 > Nothing received, resend whole request
18:39:04.338 > TX RealTimeRunData Channel: 40 --> 15 00 00 C9 DD 80 15 43 20 80 0B 00 66 D0 A4 27 00 00 00 00 00 00 00 00 27 79 17 
18:39:04.885 > RX Period End
18:39:04.885 > All missing
18:39:04.885 > Nothing received, resend whole request
18:39:04.890 > TX RealTimeRunData Channel: 61 --> 15 00 00 C9 DD 80 15 43 20 80 0B 00 66 D0 A4 27 00 00 00 00 00 00 00 00 27 79 17 
18:39:05.437 > RX Period End
18:39:05.437 > All missing
18:39:05.437 > Nothing received, resend whole request
18:39:05.442 > TX RealTimeRunData Channel: 75 --> 15 00 00 C9 DD 80 15 43 20 80 0B 00 66 D0 A4 27 00 00 00 00 00 00 00 00 27 79 17 
18:39:05.989 > RX Period End
18:39:05.989 > All missing
18:39:05.989 > Nothing received, resend whole request
18:39:05.994 > TX RealTimeRunData Channel: 3 --> 15 00 00 C9 DD 80 15 43 20 80 0B 00 66 D0 A4 27 00 00 00 00 00 00 00 00 27 79 17 
18:39:06.541 > RX Period End
18:39:06.541 > All missing
18:39:06.541 > Nothing received, resend count exeeded
18:39:06.546 > TX AlarmData Channel: 23 --> 15 00 00 C9 DD 80 15 43 20 80 11 00 66 D0 A4 27 00 00 00 00 00 00 00 00 FD 62 CC 
18:39:07.336 > RX Period End
18:39:07.336 > All missing
18:39:07.336 > Nothing received, resend whole request
18:39:07.342 > TX AlarmData Channel: 40 --> 15 00 00 C9 DD 80 15 43 20 80 11 00 66 D0 A4 27 00 00 00 00 00 00 00 00 FD 62 CC 
18:39:08.138 > RX Period End
18:39:08.138 > All missing
18:39:08.138 > Nothing received, resend whole request
18:39:08.143 > TX AlarmData Channel: 61 --> 15 00 00 C9 DD 80 15 43 20 80 11 00 66 D0 A4 27 00 00 00 00 00 00 00 00 FD 62 CC 
18:39:08.940 > RX Period End
18:39:08.940 > All missing
18:39:08.940 > Nothing received, resend whole request
18:39:08.946 > TX AlarmData Channel: 75 --> 15 00 00 C9 DD 80 15 43 20 80 11 00 66 D0 A4 27 00 00 00 00 00 00 00 00 FD 62 CC 
18:39:09.741 > RX Period End
18:39:09.741 > All missing
18:39:09.741 > Nothing received, resend whole request
18:39:09.747 > TX AlarmData Channel: 3 --> 15 00 00 C9 DD 80 15 43 20 80 11 00 66 D0 A4 27 00 00 00 00 00 00 00 00 FD 62 CC 
18:39:10.542 > RX Period End
18:39:10.542 > All missing
18:39:10.542 > Nothing received, resend count exeeded
18:39:10.545 > Fetch inverter: 28410000C9DD
18:39:10.584 > TX RealTimeRunData Channel: 23 --> 15 00 00 C9 DD 80 15 43 20 80 0B 00 66 D0 A4 2E 00 00 00 00 00 00 00 00 77 13 24 
18:39:11.124 > RX Period End
18:39:11.124 > All missing
18:39:11.124 > Nothing received, resend whole request
18:39:11.130 > TX RealTimeRunData Channel: 40 --> 15 00 00 C9 DD 80 15 43 20 80 0B 00 66 D0 A4 2E 00 00 00 00 00 00 00 00 77 13 24 
18:39:11.676 > RX Period End
18:39:11.676 > All missing
18:39:11.676 > Nothing received, resend whole request
18:39:11.682 > TX RealTimeRunData Channel: 61 --> 15 00 00 C9 DD 80 15 43 20 80 0B 00 66 D0 A4 2E 00 00 00 00 00 00 00 00 77 13 24 
18:39:11.837 > Admin AP remaining seconds: 10 / 180
18:39:12.228 > RX Period End
18:39:12.228 > All missing
18:39:12.228 > Nothing received, resend whole request
18:39:12.233 > TX RealTimeRunData Channel: 75 --> 15 00 00 C9 DD 80 15 43 20 80 0B 00 66 D0 A4 2E 00 00 00 00 00 00 00 00 77 13 24 
18:39:12.780 > RX Period End
18:39:12.780 > All missing
18:39:12.780 > Nothing received, resend whole request
18:39:12.785 > TX RealTimeRunData Channel: 3 --> 15 00 00 C9 DD 80 15 43 20 80 0B 00 66 D0 A4 2E 00 00 00 00 00 00 00 00 77 13 24 
18:39:13.331 > RX Period End
18:39:13.331 > All missing
18:39:13.331 > Nothing received, resend count exeeded
18:39:13.337 > TX AlarmData Channel: 23 --> 15 00 00 C9 DD 80 15 43 20 80 11 00 66 D0 A4 2E 00 00 00 00 00 00 00 00 AD 08 FF 
18:39:14.126 > RX Period End
18:39:14.126 > All missing
18:39:14.126 > Nothing received, resend whole request
18:39:14.132 > TX AlarmData Channel: 40 --> 15 00 00 C9 DD 80 15 43 20 80 11 00 66 D0 A4 2E 00 00 00 00 00 00 00 00 AD 08 FF 
18:39:14.927 > RX Period End
18:39:14.927 > All missing
18:39:14.927 > Nothing received, resend whole request
18:39:14.933 > TX AlarmData Channel: 61 --> 15 00 00 C9 DD 80 15 43 20 80 11 00 66 D0 A4 2E 00 00 00 00 00 00 00 00 AD 08 FF 
18:39:15.729 > RX Period End
18:39:15.729 > All missing
18:39:15.729 > Nothing received, resend whole request
18:39:15.735 > TX AlarmData Channel: 75 --> 15 00 00 C9 DD 80 15 43 20 80 11 00 66 D0 A4 2E 00 00 00 00 00 00 00 00 AD 08 FF 
18:39:16.531 > RX Period End
18:39:16.531 > All missing
18:39:16.531 > Nothing received, resend whole request
18:39:16.537 > TX AlarmData Channel: 3 --> 15 00 00 C9 DD 80 15 43 20 80 11 00 66 D0 A4 2E 00 00 00 00 00 00 00 00 AD 08 FF 
18:39:17.333 > RX Period End
18:39:17.333 > All missing
18:39:17.333 > Nothing received, resend count exeeded
18:39:17.335 > Fetch inverter: 28410000C9DD

@tbnobody
Copy link
Owner

What is the original serial number of the inverter before any conversion? (So whats shown on the label on the inverter?) I assume the 2841xxxxxx was generated by the WebGUI. Maybe there is another logic how the serial number is created for this kind of model.

@xenio
Copy link
Author

xenio commented Aug 29, 2024

Here it is...

SN: A21001JXX-XXX
Type: Micro
Model: HERF-300
Hardware Ver: H00.04.00
Software Ver: V01.00.02

@xenio
Copy link
Author

xenio commented Aug 30, 2024

@tbnobody I got some data from the inverter, for a couples of seconds datas was available in the live view but after that now it is in "nothing received", "all missing", "last missing", "middle missing"

Maybe it is related to #2137 ?

I have two chinese NRF24L01+ with antenna, I am trying with capacitor / cables etc with no luck.

@tbnobody
Copy link
Owner

tbnobody commented Aug 30, 2024

Maybe it is related to #2137 ?

Nope. NRF24 and CMT module uses completely different frequency handling.

But if you receive anything (and if its only for a short period of time) the serial number is formatted correctly. Can now be anything. From the power supply, RF module, wiring, antenna etc.

@xenio
Copy link
Author

xenio commented Aug 30, 2024

It is almost working now... with transmitting power to maximum 0dbm, but the data received does not match the dashboard information :(

Maybe it is necessary to adapt the Herf-800 datas to the Herf-300 1ch.

Screen Shot 2024-08-30 at 13 06 26
Screen Shot 2024-08-30 at 13 20 22
Screen Shot 2024-08-30 at 13 06 46
Screen Shot 2024-08-30 at 13 25 28

13:20:27.091 > Last missing
13:20:27.091 > Request retransmit: 2
13:20:27.091 > TX RequestFrame Channel: 23 --> 15 00 00 C9 DD 80 19 19 52 82 51 
13:20:27.138 > RX Period End
13:20:27.138 > Last missing
13:20:27.138 > Request retransmit: 2
13:20:27.138 > TX RequestFrame Channel: 40 --> 15 00 00 C9 DD 80 19 19 52 82 51 
13:20:27.215 > RX Period End
13:20:27.215 > Last missing
13:20:27.215 > Request retransmit: 2
13:20:27.215 > TX RequestFrame Channel: 61 --> 15 00 00 C9 DD 80 19 19 52 82 51 
13:20:27.245 > Interrupt received
13:20:27.330 > RX Channel: 3 --> 95 00 00 C9 DD 00 00 C9 DD 02 19 DE 00 00 00 00 01 71 00 00 09 21 13 88 06 07 92 | -80 dBm
13:20:27.439 > RX Period End
13:20:27.439 > Last missing
13:20:27.439 > Request retransmit: 3
13:20:27.439 > TX RequestFrame Channel: 75 --> 15 00 00 C9 DD 80 19 19 52 83 50 
13:20:27.695 > Interrupt received
13:20:27.721 > RX Channel: 23 --> 95 00 00 C9 DD 00 00 C9 DD 83 00 00 00 42 03 E7 01 80 01 A8 16 29 A7 | -80 dBm
13:20:27.758 > RX Period End
13:20:27.758 > Success
13:20:27.781 > TX AlarmData Channel: 3 --> 15 00 00 C9 DD 80 19 19 52 80 11 00 66 D1 AA F9 00 00 00 00 00 00 00 00 51 D6 21 
13:20:27.798 > Websocket: [/livedata][5] disconnect
13:20:28.283 > RX Period End
13:20:28.283 > All missing
13:20:28.283 > Nothing received, resend whole request
13:20:28.283 > TX AlarmData Channel: 23 --> 15 00 00 C9 DD 80 19 19 52 80 11 00 66 D1 AA F9 00 00 00 00 00 00 00 00 51 D6 21 
13:20:29.143 > RX Period End
13:20:29.143 > All missing
13:20:29.143 > Nothing received, resend whole request
13:20:29.143 > TX AlarmData Channel: 40 --> 15 00 00 C9 DD 80 19 19 52 80 11 00 66 D1 AA F9 00 00 00 00 00 00 00 00 51 D6 21 
13:20:29.214 > Interrupt received
13:20:29.234 > RX Channel: 3 --> 95 00 00 C9 DD 00 00 C9 DD 01 00 01 80 01 00 01 46 23 46 23 00 00 00 00 80 02 97 | -80 dBm
13:20:29.261 > Interrupt received
13:20:29.318 > RX Channel: 40 --> 95 00 00 C9 DD 00 00 C9 DD 04 00 07 80 02 01 9D 98 35 98 35 FF FF FF FA 80 02 0F | -80 dBm
13:20:29.406 > Interrupt received
13:20:29.433 > RX Channel: 3 --> 95 00 00 C9 DD 00 00 C9 DD 07 1C 2E 80 02 01 A1 9B DE 9B DE FF FF E3 DA 90 02 29 | -80 dBm
13:20:29.524 > Interrupt received
13:20:29.545 > RX Channel: 75 --> 95 00 00 C9 DD 00 00 C9 DD 09 9B E9 FF FF E3 D5 90 02 01 A4 9B E9 9B E9 00 00 EF | -80 dBm
13:20:29.578 > Interrupt received
13:20:29.601 > RX Channel: 40 --> 95 00 00 C9 DD 00 00 C9 DD 0B 01 A6 9C 02 9C 02 00 00 1C 26 80 02 01 A7 9C 06 BD | -80 dBm
13:20:29.871 > RX Period End
13:20:29.871 > Last missing
13:20:29.871 > Request retransmit: 12
13:20:29.871 > TX RequestFrame Channel: 61 --> 15 00 00 C9 DD 80 19 19 52 8C 5F 
13:20:29.908 > Interrupt received
13:20:29.943 > RX Channel: 3 --> 95 00 00 C9 DD 00 00 C9 DD 8C 9C 06 FF FF E3 D5 B7 F3 F1 | -80 dBm
13:20:29.972 > RX Period End
13:20:29.972 > Middle missing
13:20:29.972 > Request retransmit: 2
13:20:29.972 > TX RequestFrame Channel: 75 --> 15 00 00 C9 DD 80 19 19 52 82 51 
13:20:30.106 > RX Period End
13:20:30.106 > Middle missing
13:20:30.106 > Request retransmit: 2
13:20:30.106 > TX RequestFrame Channel: 3 --> 15 00 00 C9 DD 80 19 19 52 82 51 
13:20:30.223 > RX Period End
13:20:30.223 > Middle missing
13:20:30.223 > Request retransmit: 2
13:20:30.223 > TX RequestFrame Channel: 23 --> 15 00 00 C9 DD 80 19 19 52 82 51 
13:20:30.397 > RX Period End
13:20:30.397 > Middle missing
13:20:30.397 > Request retransmit: 2
13:20:30.397 > TX RequestFrame Channel: 40 --> 15 00 00 C9 DD 80 19 19 52 82 51 
13:20:30.430 > Interrupt received
13:20:30.449 > RX Channel: 75 --> 95 00 00 C9 DD 00 00 C9 DD 02 01 9A 98 1B 98 1B FF FF E3 DB 80 02 01 9B 98 29 9D | -80 dBm
13:20:30.490 > RX Period End
13:20:30.490 > Middle missing
13:20:30.490 > Retransmit timeout
13:20:31.415 > Fetch inverter: 28410000C9DD
13:20:31.500 > TX RealTimeRunData Channel: 61 --> 15 00 00 C9 DD 80 19 19 52 80 0B 00 66 D1 AA FF 00 00 00 00 00 00 00 00 2B E6 77 
13:20:31.531 > Interrupt received
13:20:31.553 > RX Channel: 3 --> 95 00 00 C9 DD 00 00 C9 DD 01 00 01 01 29 00 00 02 21 00 00 06 59 00 00 00 00 C1 | -80 dBm
13:20:31.594 > Interrupt received
13:20:31.626 > RX Channel: 3 --> 95 00 00 C9 DD 00 00 C9 DD 02 19 DE 00 00 00 00 01 71 00 00 09 1E 13 88 06 06 AC | -80 dBm
13:20:31.681 > Interrupt received
13:20:31.722 > RX Channel: 75 --> 95 00 00 C9 DD 00 00 C9 DD 83 00 00 00 42 03 E7 01 80 01 A8 FB E2 81 | -80 dBm
13:20:31.752 > RX Period End
13:20:31.752 > Success
13:20:31.774 > TX AlarmData Channel: 75 --> 15 00 00 C9 DD 80 19 19 52 80 11 00 66 D1 AA FF 00 00 00 00 00 00 00 00 F1 FD AC 
13:20:31.906 > Interrupt received
13:20:31.958 > RX Channel: 23 --> 95 00 00 C9 DD 00 00 C9 DD 03 98 29 FF FF FF F9 80 02 01 9C 98 2F 98 2F 00 00 3E | -80 dBm
13:20:32.090 > Interrupt received
13:20:32.128 > RX Channel: 75 --> 95 00 00 C9 DD 00 00 C9 DD 07 1C 2E 80 02 01 A1 9B DE 9B DE FF FF E3 DA 90 02 29 | -80 dBm
13:20:32.379 > Interrupt received
13:20:32.409 > RX Channel: 40 --> 95 00 00 C9 DD 00 00 C9 DD 8C 9C 06 FF FF E3 D5 B7 F3 F1 | -80 dBm
13:20:32.594 > RX Period End
13:20:32.594 > Middle missing
13:20:32.594 > Request retransmit: 1
13:20:32.594 > TX RequestFrame Channel: 3 --> 15 00 00 C9 DD 80 19 19 52 81 52 
13:20:32.722 > RX Period End
13:20:32.722 > Middle missing
13:20:32.722 > Request retransmit: 1
13:20:32.722 > TX RequestFrame Channel: 23 --> 15 00 00 C9 DD 80 19 19 52 81 52 
13:20:32.813 > RX Period End

@tbnobody
Copy link
Owner

Maybe it is necessary to adapt the Herf-800 datas to the Herf-300 1ch.

Yes, I will to that using the information you provided. A new inverter class for the HERF-300 is required (like for the other HERF types) and the byte assignment has to be adjusted.

Will provide you a new patch soon. Does the event log show correct values? I see it shows 15 events in your screenshot

@xenio
Copy link
Author

xenio commented Aug 30, 2024

I only took a part of the log where I saw a couple of ‘successes’, the log continues sending more or less always that kind of data. Do you need a longer log?

@tbnobody
Copy link
Owner

Do you need a longer log?

No, thats great

@stefan123t
Copy link

The inverter is connected to its DCU should I turn off the HERF DCU?

I guess you did turn off the HERF DCU already, as this would most likely interfere with OpenDTU connecting to the HERF-300 inverter.

@xenio
Copy link
Author

xenio commented Aug 30, 2024

I guess you did turn off the HERF DCU already, as this would most likely interfere with OpenDTU connecting to the HERF-300 inverter.

Yes I turned it off, with the HERF DCU on I never got any data from the NRF24L01+
I also bought an EByte NRF24L01+ module, maybe it works better than the cheap ones I am using now.

@tbnobody
Copy link
Owner

I analyzed the following snippet

13:20:31.500 > TX RealTimeRunData Channel: 61 --> 15 00 00 C9 DD 80 19 19 52 80 0B 00 66 D1 AA FF 00 00 00 00 00 00 00 00 2B E6 77 
13:20:31.531 > Interrupt received
13:20:31.553 > RX Channel: 3 --> 95 00 00 C9 DD 00 00 C9 DD 01 00 01 01 29 00 00 02 21 00 00 06 59 00 00 00 00 C1 | -80 dBm
13:20:31.594 > Interrupt received
13:20:31.626 > RX Channel: 3 --> 95 00 00 C9 DD 00 00 C9 DD 02 19 DE 00 00 00 00 01 71 00 00 09 1E 13 88 06 06 AC | -80 dBm
13:20:31.681 > Interrupt received
13:20:31.722 > RX Channel: 75 --> 95 00 00 C9 DD 00 00 C9 DD 83 00 00 00 42 03 E7 01 80 01 A8 FB E2 81 | -80 dBm
13:20:31.752 > RX Period End
13:20:31.752 > Success

How realistic are the following values (based on the dump you pasted above) (I dont know how long you are already operating the inverter)

DC-Input Voltage: 29,7V
DC-Input Current: 5,45A
DC-Input Power: 162,5W

Yield Daily: 369Wh
Yield Total: 6,622kWh

AC Voltage: 233,4V
AC Current: 0,66A
AC Power: 154,2W
AC Reactive Power: ????°C
AC Power Factor: 0,999
AC Frequency: 50Hz

Temperature: ???? °C

image

The temperature was either 38,4°C or 42,4°C. Reactive Power also either 38,4var or 42,4var.

Therefor a additional data snippet e.g. at the morning when it's a little bit colder or at afternoon when it's really hot would be helpfull to distinct between the two values

@xenio
Copy link
Author

xenio commented Aug 30, 2024

I have only been using the inverter for a few days, it is not yet installed on the roof.
Today I was switching between the HERF DCU and OpenDTU so I don't have precise data.

This is today screenshot from the Herf Monitor cloud.
Tomorrow I can get the json from the cloud to try to match some number.

Screen Shot 2024-08-30 at 20 49 26

@tbnobody
Copy link
Owner

ah ok. but based on this screenshot my guess for yield total and yield daily is correct. the other values also make sense as e.g. Power = Voltage * Current.

Looking forward to see whether other values match up

@xenio
Copy link
Author

xenio commented Aug 31, 2024

I've got the data from the HERF DCU and from OpenDTU to compare.

I can't find any information about Power DC/temperature/current/frequency/hz from the platform Estar Energy :(

Screen Shot 2024-08-31 at 14 46 42

Response from api:
/platform/api/gateway/pvm-data/data_count_station_real_data

{
  "status": "0",
  "message": "success",
  "data":
    {
      "today_eq": "61.0",
      "month_eq": "6801",
      "year_eq": "6801",
      "total_eq": "6801",
      "real_power": "228.2",
      "co2_emission_reduction": "6780.597",
      "plant_tree": "0",
      "data_time": "2024-08-31 14:38:47",
      "last_data_time": "2024-08-31 14:38:47",
      "capacitor": "0.35",
      "is_balance": 0,
      "is_reflux": 0,
      "reflux_station_data": null,
    },
  "systemNotice": null,
}

OpenDTU

LOG:

log_herf-300.txt

GRID PROFILE
grid-profile.json

Screen Shot 2024-08-31 at 14 53 33

@tbnobody
Copy link
Owner

unfortunatly the cloud does not show values like e.g. temperature. did you use the generic_esp32 binary to flash the esp? Then I could provide you a version with partly corrected byte assignments. Then we just have to look at the temperature whether the value makes sense.

@xenio
Copy link
Author

xenio commented Aug 31, 2024

I just installed the defaults from PlatformIO with vscode.
I have a AZ Delivery ESP32 NodeMCU Development Board.

@xenio
Copy link
Author

xenio commented Aug 31, 2024

I can't see the inverter now, before flashing I had the lines added to fake the HERF 300 as HM 300

    uint16_t preSerial = (serial >> 32) & 0xffff;
    if (preSerial == 0x2841) {
        return true;
    }

@tbnobody
Copy link
Owner

Yeah... just found the issue.... give me 3minutes..

@tbnobody
Copy link
Owner

tbnobody commented Aug 31, 2024

generic_esp32.zip

Should work better now :)

Just figured out, that the name is still wrong (it shows HERF-300-2T instead of 1T...) but thats only a cosmetic issue.

@xenio
Copy link
Author

xenio commented Aug 31, 2024

WOOOOWWWW! I am so happy :))))

Screen Shot 2024-08-31 at 16 05 09

Screen Shot 2024-08-31 at 16 06 21

@tbnobody
Copy link
Owner

looks good for the moment. but as expected the reactive power is wrong and I don't know how realistic the temperature is.

@xenio
Copy link
Author

xenio commented Aug 31, 2024

I'll try to monitor the temperature, it is cloudy now.
Will you add the Herf-300 code to the repository in the future?
Thanks for your amazing work.

@tbnobody
Copy link
Owner

tbnobody commented Aug 31, 2024

Will you add the Herf-300 code to the repository in the future?

Yes. The source will be available in the next release.

Thats what I did:

diff --git a/lib/Hoymiles/src/Hoymiles.cpp b/lib/Hoymiles/src/Hoymiles.cpp
index 1416a73a..0e60301e 100644
--- a/lib/Hoymiles/src/Hoymiles.cpp
+++ b/lib/Hoymiles/src/Hoymiles.cpp
@@ -4,6 +4,7 @@
  */
 #include "Hoymiles.h"
 #include "Utils.h"
+#include "inverters/HERF_1CH.h"
 #include "inverters/HERF_2CH.h"
 #include "inverters/HERF_4CH.h"
 #include "inverters/HMS_1CH.h"
@@ -173,6 +174,8 @@ std::shared_ptr<InverterAbstract> HoymilesClass::addInverter(const char* name, c
         i = std::make_shared<HM_2CH>(_radioNrf.get(), serial);
     } else if (HM_1CH::isValidSerial(serial)) {
         i = std::make_shared<HM_1CH>(_radioNrf.get(), serial);
+    } else if (HERF_1CH::isValidSerial(serial)) {
+        i = std::make_shared<HERF_1CH>(_radioNrf.get(), serial);
     } else if (HERF_2CH::isValidSerial(serial)) {
         i = std::make_shared<HERF_2CH>(_radioNrf.get(), serial);
     } else if (HERF_4CH::isValidSerial(serial)) {
diff --git a/lib/Hoymiles/src/inverters/HERF_1CH.cpp b/lib/Hoymiles/src/inverters/HERF_1CH.cpp
new file mode 100644
index 00000000..f137a67f
--- /dev/null
+++ b/lib/Hoymiles/src/inverters/HERF_1CH.cpp
@@ -0,0 +1,55 @@
+
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (C) 2022-2024 Thomas Basler and others
+ */
+#include "HERF_1CH.h"
+
+static const byteAssign_t byteAssignment[] = {
+    { TYPE_DC, CH0, FLD_UDC, UNIT_V, 2, 2, 10, false, 1 },
+    { TYPE_DC, CH0, FLD_IDC, UNIT_A, 6, 2, 100, false, 2 },
+    { TYPE_DC, CH0, FLD_PDC, UNIT_W, 10, 2, 10, false, 1 },
+    { TYPE_DC, CH0, FLD_YD, UNIT_WH, 22, 2, 1, false, 0 },
+    { TYPE_DC, CH0, FLD_YT, UNIT_KWH, 14, 4, 1000, false, 3 },
+    { TYPE_DC, CH0, FLD_IRR, UNIT_PCT, CALC_CH_IRR, CH0, CMD_CALC, false, 3 },
+
+    { TYPE_AC, CH0, FLD_UAC, UNIT_V, 26, 2, 10, false, 1 },
+    { TYPE_AC, CH0, FLD_IAC, UNIT_A, 34, 2, 100, false, 2 },
+    { TYPE_AC, CH0, FLD_PAC, UNIT_W, 30, 2, 10, false, 1 },
+    { TYPE_AC, CH0, FLD_Q, UNIT_VAR, 32, 2, 10, false, 1 }, //TODO
+    { TYPE_AC, CH0, FLD_F, UNIT_HZ, 28, 2, 100, false, 2 },
+    { TYPE_AC, CH0, FLD_PF, UNIT_NONE, 36, 2, 1000, false, 3 },
+
+    { TYPE_INV, CH0, FLD_T, UNIT_C, 38, 2, 10, true, 1 }, //TODO
+    { TYPE_INV, CH0, FLD_EVT_LOG, UNIT_NONE, 40, 2, 1, false, 0 }, //TODO
+
+    { TYPE_INV, CH0, FLD_YD, UNIT_WH, CALC_TOTAL_YD, 0, CMD_CALC, false, 0 },
+    { TYPE_INV, CH0, FLD_YT, UNIT_KWH, CALC_TOTAL_YT, 0, CMD_CALC, false, 3 },
+    { TYPE_INV, CH0, FLD_PDC, UNIT_W, CALC_TOTAL_PDC, 0, CMD_CALC, false, 1 },
+    { TYPE_INV, CH0, FLD_EFF, UNIT_PCT, CALC_TOTAL_EFF, 0, CMD_CALC, false, 3 }
+};
+
+HERF_1CH::HERF_1CH(HoymilesRadio* radio, const uint64_t serial)
+    : HM_Abstract(radio, serial) {};
+
+bool HERF_1CH::isValidSerial(const uint64_t serial)
+{
+    // serial >= 0x284100000000 && serial <= 0x2841ffffffff
+    uint16_t preSerial = (serial >> 32) & 0xffff;
+    return preSerial == 0x2841;
+}
+
+String HERF_1CH::typeName() const
+{
+    return "HERF-300-1T";
+}
+
+const byteAssign_t* HERF_1CH::getByteAssignment() const
+{
+    return byteAssignment;
+}
+
+uint8_t HERF_1CH::getByteAssignmentSize() const
+{
+    return sizeof(byteAssignment) / sizeof(byteAssignment[0]);
+}
diff --git a/lib/Hoymiles/src/inverters/HERF_1CH.h b/lib/Hoymiles/src/inverters/HERF_1CH.h
new file mode 100644
index 00000000..8220272e
--- /dev/null
+++ b/lib/Hoymiles/src/inverters/HERF_1CH.h
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#include "HM_Abstract.h"
+
+class HERF_1CH : public HM_Abstract {
+public:
+    explicit HERF_1CH(HoymilesRadio* radio, const uint64_t serial);
+    static bool isValidSerial(const uint64_t serial);
+    String typeName() const;
+    const byteAssign_t* getByteAssignment() const;
+    uint8_t getByteAssignmentSize() const;
+};

@xenio
Copy link
Author

xenio commented Aug 31, 2024

Love it. Thanks!

@tbnobody
Copy link
Owner

generic_esp32.zip

I've just updated the bit for PowerFactor to show my other guess... so either the shown temperature or power factor should be the right temperature :)

@xenio
Copy link
Author

xenio commented Aug 31, 2024

With latest firmware.

Screen Shot 2024-08-31 at 17 41 17

@tbnobody
Copy link
Owner

Implemented in a949776

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants