Giter VIP home page Giter VIP logo

opendtu's Introduction

OpenDTU

OpenDTU Build cpplint Yarn Linting

!! IMPORTANT UPGRADE NOTES !!

If you are upgrading from a version before 15.03.2023 you have to upgrade the partition table of the ESP32. Please follow the this documentation!

Background

This project was started from this discussion (Mikrocontroller.net). It was the goal to replace the original Hoymiles DTU (Telemetry Gateway) with their cloud access. With a lot of reverse engineering the Hoymiles protocol was decrypted and analyzed.

Documentation

The documentation can be found here. Please feel free to support and create a PR in this repository to make the documentation even better.

Breaking changes

Generated using: git log --date=short --pretty=format:"* %h%x09%ad%x09%s" | grep BREAKING

* 1b637f08      2024-01-30      BREAKING CHANGE: Web API Endpoint /api/livedata/status and /api/prometheus/metrics
* e1564780      2024-01-30      BREAKING CHANGE: Web API Endpoint /api/livedata/status and /api/prometheus/metrics
* f0b5542c      2024-01-30      BREAKING CHANGE: Web API Endpoint /api/livedata/status and /api/prometheus/metrics
* c27ecc36      2024-01-29      BREAKING CHANGE: Web API Endpoint /api/livedata/status
* 71d1b3b       2023-11-07      BREAKING CHANGE: Home Assistant Auto Discovery to new naming scheme
* 04f62e0       2023-04-20      BREAKING CHANGE: Web API Endpoint /api/eventlog/status no nested serial object
* 59f43a8       2023-04-17      BREAKING CHANGE: Web API Endpoint /api/devinfo/status requires GET parameter inv=
* 318136d       2023-03-15      BREAKING CHANGE: Updated partition table: Make sure you have a configuration backup and completly reflash the device!
* 3b7aef6       2023-02-13      BREAKING CHANGE: Web API!
* d4c838a       2023-02-06      BREAKING CHANGE: Prometheus API!
* daf847e       2022-11-14      BREAKING CHANGE: Removed deprecated config parsing method
* 69b675b       2022-11-01      BREAKING CHANGE: Structure WebAPI /api/livedata/status changed
* 27ed4e3       2022-10-31      BREAKING: Change power factor from percent value to value between 0 and 1

Currently supported Inverters

Model Required RF Module DC Inputs MPP-Tracker AC Phases
Hoymiles HM-300-1T NRF24L01+ 1 1 1
Hoymiles HM-350-1T NRF24L01+ 1 1 1
Hoymiles HM-400-1T NRF24L01+ 1 1 1
Hoymiles HM-600-2T NRF24L01+ 2 2 1
Hoymiles HM-700-2T NRF24L01+ 2 2 1
Hoymiles HM-800-2T NRF24L01+ 2 2 1
Hoymiles HM-1000-4T NRF24L01+ 4 2 1
Hoymiles HM-1200-4T NRF24L01+ 4 2 1
Hoymiles HM-1500-4T NRF24L01+ 4 2 1
Hoymiles HMS-300-1T CMT2300A 1 1 1
Hoymiles HMS-350-1T CMT2300A 1 1 1
Hoymiles HMS-400-1T CMT2300A 1 1 1
Hoymiles HMS-450-1T CMT2300A 1 1 1
Hoymiles HMS-500-1T CMT2300A 1 1 1
Hoymiles HMS-600-2T CMT2300A 2 2 1
Hoymiles HMS-700-2T CMT2300A 2 2 1
Hoymiles HMS-800-2T CMT2300A 2 2 1
Hoymiles HMS-900-2T CMT2300A 2 2 1
Hoymiles HMS-1000-2T CMT2300A 2 2 1
Hoymiles HMS-1600-4T CMT2300A 4 4 1
Hoymiles HMS-1800-4T CMT2300A 4 4 1
Hoymiles HMS-2000-4T CMT2300A 4 4 1
Hoymiles HMT-1600-4T CMT2300A 4 2 3
Hoymiles HMT-1800-4T CMT2300A 4 2 3
Hoymiles HMT-2000-4T CMT2300A 4 2 3
Hoymiles HMT-1800-6T CMT2300A 6 3 3
Hoymiles HMT-2250-6T CMT2300A 6 3 3
Solenso SOL-H350 NRF24L01+ 1 1 1
Solenso SOL-H400 NRF24L01+ 1 1 1
Solenso SOL-H800 NRF24L01+ 2 2 1
TSUN TSOL-M350 NRF24L01+ 1 1 1
TSUN TSOL-M800 NRF24L01+ 2 2 1
TSUN TSOL-M1600 NRF24L01+ 4 2 1
E-Star HERF-800 NRF24L01+ 2 2 1
E-Star HERF-1600 NRF24L01+ 4 2 1
E-Star HERF-1800 NRF24L01+ 4 2 1

opendtu's People

Contributors

ahinrichs avatar boldfor avatar broth-itk avatar commanderredyt avatar cschoch avatar dependabot[bot] avatar dersch81 avatar diecknet avatar fischaxe avatar gregorwolf avatar hannes0009 avatar helgeerbe avatar isarrider avatar itn3rd77 avatar jstammi avatar khancyr avatar madmartin avatar markusdd avatar marove2000 avatar mobbl avatar mpw96 avatar nikwest avatar nkappler avatar o0shojo0o avatar sabouflage avatar schlimmchen avatar schulti avatar stefanoberhumer avatar tbnobody avatar x2on avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opendtu's Issues

Inverter Config UI corrupts Inverter List on Serial Update

starting with a list of configured inverters on https://github.com/tbnobody/OpenDTU/commits/378fa29 (current master + my platformio config)
image
curl http://192.168.178.97/api/inverter/list {"inverter":[{"id":0,"name":"SoxSolar","serial":"114181302838","type":"HM-600, HM-700, HM-800","max_power":[0,0,0,0]},{"id":1,"name":"SoxSolar39","serial":"114181302839","type":"HM-600, HM-700, HM-800","max_power":[0,0,0,0]},{"id":2,"name":"SoxSolar40","serial":"114181302840","type":"HM-600, HM-700, HM-800","max_power":[0,0,0,0]},{"id":3,"name":"SoxSolar41","serial":"114181302841","type":"HM-600, HM-700, HM-800","max_power":[0,0,0,0]}]}

use the UI to change SoxSolar39 ( new serial: 114181302842, new name: SoxSolar39To42 ) -> all OK
use the UI to change SoxSolar39To42 ( new serial: 114181302839, new name: SoxSolar39 ) -> pretty regularly another inverter in the list breaks

image
curl http://192.168.178.97/api/inverter/list {"inverter":[{"id":0,"name":"SoxSolar","serial":"114181302838","type":"HM-600, HM-700, HM-800","max_power":[0,0,0,0]},{"id":1,"name":"SoxSolar39","serial":"114181302839","type":"HM-600, HM-700, HM-800","max_power":[0,0,0,0]},{"id":2,"name":"SoxSolar40","serial":"114181302840","type":"Unknown","max_power":[0,0,0,0]},{"id":3,"name":"SoxSolar41","serial":"114181302841","type":"HM-600, HM-700, HM-800","max_power":[0,0,0,0]}]}

TSUN TSOL-M800 - keine Daten

Hallo zusammen,

ich habe einen TSUN TSOL-M800 WR, welchen ich gerne überwachen würde.

Leider bekomme ich keine Daten aus dem WR.

done
Setting Hostname... Configuring WiFi STA using new credentials... done
Initialize NTP... done
Initialize MqTT... done
Initialize WebApi... done
Initialize Hoymiles interface... Connection successfull
Setting radio PA level...
Setting DTU serial...
Setting poll interval...
Adding inverter: 114182207126 - TSUN TSOL-M800 done
done
Switch to WiFi mode
Setting Hostname... done
Configuring WiFi STA using existing credentials... E (917) wifi:Association refused temporarily, comeback time 1024 mSec
E (922) wifi:sta is connecting, return error
[ 276][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
done
WiFi disconnected
Try reconnecting
Network lost connection
WiFi connected
WiFi got ip: 192.168.178.68
Network connected
Fetch inverter: 114182207126
TX Channel: 23 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD C1 0 0 0 0 0 0 0 0 47 34 E5
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 40 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD C1 0 0 0 0 0 0 0 0 47 34 E5
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 61 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD C1 0 0 0 0 0 0 0 0 47 34 E5
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 75 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD C1 0 0 0 0 0 0 0 0 47 34 E5
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 3 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD C1 0 0 0 0 0 0 0 0 47 34 E5
RX Period End
All missing
Nothing received, resend count exeeded
Fetch inverter: 114182207126
TX Channel: 23 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD C6 0 0 0 0 0 0 0 0 77 12 F4
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 40 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD C6 0 0 0 0 0 0 0 0 77 12 F4
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 61 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD C6 0 0 0 0 0 0 0 0 77 12 F4
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 75 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD C6 0 0 0 0 0 0 0 0 77 12 F4
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 3 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD C6 0 0 0 0 0 0 0 0 77 12 F4
RX Period End
All missing
Nothing received, resend count exeeded
Fetch inverter: 114182207126
TX Channel: 23 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD CB 0 0 0 0 0 0 0 0 E7 4A 31
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 40 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD CB 0 0 0 0 0 0 0 0 E7 4A 31
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 61 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD CB 0 0 0 0 0 0 0 0 E7 4A 31
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 75 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD CB 0 0 0 0 0 0 0 0 E7 4A 31
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 3 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD CB 0 0 0 0 0 0 0 0 E7 4A 31
RX Period End
All missing
Nothing received, resend count exeeded
Fetch inverter: 114182207126
TX Channel: 23 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD D0 0 0 0 0 0 0 0 0 17 F4 64
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 40 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD D0 0 0 0 0 0 0 0 0 17 F4 64
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 61 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD D0 0 0 0 0 0 0 0 0 17 F4 64
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 75 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD D0 0 0 0 0 0 0 0 0 17 F4 64
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 3 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD D0 0 0 0 0 0 0 0 0 17 F4 64
RX Period End
All missing
Nothing received, resend count exeeded
Websocket: [/livedata][1] connect
Fetch inverter: 114182207126
TX Channel: 23 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD D5 0 0 0 0 0 0 0 0 47 CB E
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 40 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD D5 0 0 0 0 0 0 0 0 47 CB E
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 61 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD D5 0 0 0 0 0 0 0 0 47 CB E
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 75 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD D5 0 0 0 0 0 0 0 0 47 CB E
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 3 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD D5 0 0 0 0 0 0 0 0 47 CB E
RX Period End
All missing
Nothing received, resend count exeeded
Fetch inverter: 114182207126
TX Channel: 23 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD DA 0 0 0 0 0 0 0 0 B7 8A B0
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 40 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD DA 0 0 0 0 0 0 0 0 B7 8A B0
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 61 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD DA 0 0 0 0 0 0 0 0 B7 8A B0
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 75 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD DA 0 0 0 0 0 0 0 0 B7 8A B0
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 3 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD DA 0 0 0 0 0 0 0 0 B7 8A B0
RX Period End
All missing
Nothing received, resend count exeeded
Websocket: [/livedata][1] disconnect
Fetch inverter: 114182207126
TX Channel: 23 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD DF 0 0 0 0 0 0 0 0 E7 B5 DA
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 40 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD DF 0 0 0 0 0 0 0 0 E7 B5 DA
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 61 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD DF 0 0 0 0 0 0 0 0 E7 B5 DA
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 75 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD DF 0 0 0 0 0 0 0 0 E7 B5 DA
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 3 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD DF 0 0 0 0 0 0 0 0 E7 B5 DA
RX Period End
All missing
Nothing received, resend count exeeded
Fetch inverter: 114182207126
TX Channel: 23 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD E4 0 0 0 0 0 0 0 0 D6 92 F7
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 40 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD E4 0 0 0 0 0 0 0 0 D6 92 F7
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 61 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD E4 0 0 0 0 0 0 0 0 D6 92 F7
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 75 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD E4 0 0 0 0 0 0 0 0 D6 92 F7
RX Period End
All missing
Nothing received, resend whole request
TX Channel: 3 --> 15 82 20 71 26 78 56 34 12 80 B 0 62 FB AD E4 0 0 0 0 0 0 0 0 D6 92 F7
RX Period End
All missing
Nothing received, resend count exeeded

compiled bin

Hi,

nice Project...
Can you upload a compiled bin version that it is easier to install?

Thanks in advance.

Dieter

Victron ve.direct interface und Leistungsbegrenzung

Hallo Thomas,

das ist kein Issue. Vielleicht magst du in GitHub die Discussions aktivieren?

Ich habe aktuell meinen Batterielader von Victron über das ve.direct Protokoll (HardwareSerial) in OpenDTU integriert.

Von der Idee:

  • Der virtuelle Lastausgang des Baterieladers schaltet den Inverter an/aus (aktuell mache ich das über einen Shelly auf der AC Seite). So wird die Tiefenentladung der Batterie verhindert. Bzw. muss ein gewisser Ladestand erreicht werden, bevor der Lausausgang wieder freigeschaltet wird.
  • In Abhängigkeit des exportierten Stroms (gemessen über Shelly EM3) würde ich dann gerne die Leistung des Hoymiles regeln, so dass möglichst kein Strom zum Stromversorger abfliesst.

Dazu hätte ich 2 Fragen.

  1. Die Batterie liefert 24 V. Laut Datenblatt ist da MPPT nicht aktiv. Läuft ein Hoymiles HM-300 sauber mit dem entsprechenden Batteriestrom an?
  2. Man kann neben der Leistungsbegrenzung den Inverter auch abschalten (laut ahoy code). Funktioniert das? Und könnte ich damit auf den Shelly verzichten?

Testen kann ich das ganze noch nicht, da ich für die Batterie einen China-Inverter habe, der über ein Poti fix auf 160 Watt gestellt ist.

Aber einen Hoymiles-300 für die Grundlast könnte ich einfach an mein HM-600 Balkonkraftwerk anschliessen. Der esp32 könnte das Gesamtsystem prima regeln.

Live-Daten in Version 0.1.19 werden nach einiger Zeit nicht mehr angezeigt

Hallo und Herzlichen Dank für dieses wunderschöne Tool!

Gestern habe ich ein Update auf die Version 0.1.19 gemacht.
Seit dem gibt es allerdings Probleme mit den Live-Daten.
Diese werden nach einer gewissen Zeit nicht mehr angezeigt.
Ein Reload der Seite hilft nicht. Einzig ein Restart des ESP scheint zu helfen.

Bei der Version 0.1.18 tritt dieser Fehler nicht auf.

Hierzu habe ich ein Video gemacht, auf dem beide Versionen parallel zu sehen sind (2 ESPs).
Links: Version 0.1.19 / Rechts Version 0.1.18

Der Fehler ist ab Minute 2:30 zu sehen

Im Serial-Log wird kein Fehler dazu ausgegeben.

Das Update von 0.1.18 auf 0.1.19 habe ich zunächst per OTA durchgeführt (Settings / Firmware Upgrade).
Nachdem ich den Fehler bemerkt hatte, habe ich die Firmware noch einmal direkt geflasht.
Auch ein löschen des .pio Verzeichnis, kompletter re-build und erneuter upload haben nicht geholfen.

Gruß
Sivar2311

No Values in Irradiation

Moin,
erstmal vielen Dank für die tolle Arbeit.
Ich habe heute mal die aktuelle Version 01.17 geflasht. Soweit hat alles geklappt. Aufgefallen ist mir, dass das Feld für die Irradiation den Wert 0.00% anzeigt. Ich habe vorher den Adapter von ahoy getestet. Da wurde der Wert angezeigt.
Mein WR ist ein HM-300.
Screenshot 2022-07-14 095554
Screenshot 2022-07-14 095727

Live-Data Ansicht - kleiner Schönheitsfehler

Nachdem die Daten in der mobilen Ansicht jetzt perfekt passen, gibt es einen kleinen Schönheitsfehler bei der Einteilung.
In meinem Fall wird das letzte Feld auf die volle Breite gezogen, und nicht nur so breit wie die bestehenden.
Zwar nur ein winziger Fehler aber.... ;)

07-07-2022_07-36-16

Irradiation is always zero

Hi,
I have OpenDTU running with 1x HM-1200 connected. Everythink works fine so far, except the irradiation value is always zero (see attachted picture). In my setup, there is only one PV module connected to the inverter. Irradiation is zero independent from current DC power.

grafik

Thanks for this amazing project!

Leistungsreduzierung HM300

Hallo tbnobody,

hier das Protokoll zur Leistungsreduzierung HM300:
Erste Version quick and dirty mit dem openDTU implementiert und getestet:

limit = zwei Byte, eine Dezimalstelle. Z.B: 30.0W = 300dez = 0x01 0x2c

<0x51> <WR>     <DTU>    <0x81>   <0x0b 0x00> <0x01 0x2c> <0x01 0x00>            <CRC16/modbus> <crc8>
<Cmd>  <target> <source> <subcmd> <ctrlmode>  <limit>     <?desc?-fix 0x01 0x00> <crc16/modbus> <crc8>

22:28:13.964 > Fetch inverter: 112172615582
22:28:13.964 > sendPackSetPowerLimitCommand
22:28:13.966 > sendEsbPacket
22:28:13.969 > TX 51 72 61 55 82 78 56 34 12 81 0B 00 01 2C 01 00 C5 C0 3E 
...
22:28:14.897 > Interrupt received
22:28:14.897 > 
22:28:14.897 > >> RX  OK: D1 72 61 55 82 72 61 55 82 81 00 00 0B 00 14 07 48 
22:28:14.903 > 
22:28:15.271 > RX Period End
22:28:15.271 > getLastRequest() == RequestType::Cmd
22:28:15.275 > Success
bool HM_Abstract::sendPackSetPowerLimitCommand(HoymilesRadio* radio) // hus:
{

    inverter_transaction_t payload;

    memset(payload.payload, 0, MAX_RF_PAYLOAD_SIZE);

    payload.target.u64 = serial();
    payload.mainCmd = 0x51;
    payload.subCmd = 0x81;
    payload.timeout = 400;
    payload.len = 8;

    payload.payload[0] = 0x0b;
    payload.payload[1] = 0x00; 
    payload.payload[2] = 0x01;
    payload.payload[3] = 0x2c;   
    payload.payload[4] = 0x01;   
    payload.payload[5] = 0x00;

    uint16_t crc = crc16(&payload.payload[0], 6);

    payload.payload[6] = (crc >> 8) & 0xff;
    payload.payload[7] = (crc)&0xff;

    payload.requestType = RequestType::Cmd;

    radio->enqueTransaction(&payload);
    return true;
}

Siehe auch :

usart_nrf3.cpp
UsartNrf_Send_DevControlUpdate()
...
                    MIMajor[PortNO].Property.Pass.PowerPFDev.SetValut[0] = (u8)(relative_value >> 8);
                    MIMajor[PortNO].Property.Pass.PowerPFDev.SetValut[1] = (u8)(relative_value);
                    MIMajor[PortNO].Property.Pass.PowerPFDev.Desc[0] = 0;
                    MIMajor[PortNO].Property.Pass.PowerPFDev.Desc[1] = 1;

Viele Grüße
Klaus

Initialize Hoymiles interface... Connection error!!

Ich habe hier einen neuen ESP32 von AZ-delivery und einen nRF24L01+
Habe die Verkabelung so gemacht wie hier angegeben.
Also:
ESP nRF
3.3V ---- 3.3V
GND ---- GND
23 ------ MOSI
19 ------ MISO
18 ------ SCK
5 ------ CSN
16 ----- IRQ
4 ------ CE

Habe schon einige nRF Module ausprobiert. An diesem kann es nicht liegen.
ESP32 habe ich leider nur diesen einen.

Verkabelung sollte richtig sein. Leider sehe ich im Serial Log, dass keine Verbindung zum Funkmodul zustande kommt.
Ist da der ESP32 defekt (obwohl nagelneu) oder beim debuggen etwas schief gelaufen (obwohl keine Fehler angezeigt wurden).

Wo könnte ich die Pinbelegung im Programm tauschen?

YieldDay/YieldTotal fehlen für Phase 1

Hi,

in dem Screenshot 01_LiveView.png sind YieldDay & YieldTotal für 'Phase 1' verfügbar und entspricht der Summe der einzelnen String's (Solarmodule).

Ich habe einen HM-400 mit einem String (Solarmodul) und da ist die Info nur bei dem 'String 1' verfügbar. Ist das Absicht bei einem Modul oder ein Bug?

grafik

Beste Grüße
Ingo

Hostname not applied correctly

Hi,
when setting under Settings -> Network Settings the hostname for the device to e.g. "OpenDTU" and saving it. The hostname reports after reboot and also reconnection esp32-F4DF20 instead of the saved and shown hostname in the webui.

image

As shown in Ubiquiti Unifi Network GUI.

Does anybody else experience this issue?

The device is a pycom wipy 3.0

cheers,
Horst

connection problems

Hallo,

thank you very much for this awsome project and all the work you've out into it! I really enjoy this tool.

Unfortunately I have 2 connection problems:

  1. Sometimes the connection to the inverter is lost.
    Error pattern:
  • Data age increases
  • no new data comes in
  • Settings -> Inverter Settings -> Inverter Type is set to unkown
    Workaround:
  • open edit (pen) the inverter settings and just save settings
    -> everthing works
  1. Web access not working every morning. No new values ​​arrive at the MQTT either. Only when I press the reset button on the esp32 everything works again.

HMS-2000 Unterstützung

Wie kann ich vorgehen um meinen HMS-2000 zu den unterstützen Geräten hinzuzufügen?

Ich bin Softwareentwickler. Apple Plattformen. Mein C++ ist nicht so besonders. Aber irgendwo muss ich ja anfangen. ;)

Inverter Settings - Add confirmation dialog before deleting inverter

Danke für die neue Version, ist wie immer Top.
Bei mir funktioniert schon Wochen alles problemlos.

Was mir jetzt aber aufgefallen ist.
Ich wollte nur einmal in die Invertersettings rein schauen, und habe aus versehen den Mistkübel angeklickt statt dem Stift.
Diese beiden Dinge sind auch sehr knapp beieinander.
Es wurde der Inverter sofort ohne Nachfrage gelöscht.
Könnte man da nicht sicherheitshalber eine Abfrage einbauen, damit man den Inverter nicht aus versehen löscht (wie es mir passiert ist)

Feature Request - option to reboot device

Hi,
would be great to have an option in the configuration menu to reboot the device.
Reason: after changing options, would be useful to reboot the device to make sure new options are in place.

Thanks,
Willi

Leistungslimitierung HM-1500 ohne Effekt

Hallo, ich habe einen HM-1500, wenn ich versuche bei MaxPower einen Wert einzusetzen und dann zu speichern , kommt zwar die Rückmeldung "Inverter changed" aber eine Limitierung findet nicht statt.

Lan Support | ESP32-POE & MOD-NRF24LR

Hallo tbnobody,
vielen Dank für das Erstellen des openDTU Projektes.

Gerne würde ich folgende Erweiterungen in dein Projekt einfließen lassen:
ESP32 Hardware:

NRF Hardware:

Entgegen der technischen Beschreibung und des Schaltplan von Olimex,
ist auf meinem MOD-NRF-24LR Rev.B von 2021 ein "24L01+" verbaut.
Das Initialisieren mit 250 kbps funktioniert.

Olimex-MOD-NRF24LR

Durch die Nutzung des UEXT Moduls, fallen auch Lötarbeiten etc weg.
Zusätzlich bieten die Boards auch noch einen
"LiPo battery charger with LiPo battery connector".

Den NRF Teil (HSPI + Pins) hab ich schon mal so weit an den UEXT
Connector angepasst und mit realen HM-300 getestet.

  • Inverter over UEXT (HSPI)

Lan-Support anstelle von WLan sollte auch machbar sein.

  • MQTT over Lan
  • WebApi over Lan

Nur beim WebApi über Lan hab ich aktuell noch Probleme mit einigen Browsern.
Auf meinem IPad funktioniert alles, auf dem Linux-Notebook leider nicht.
Ich bekomme dort beim Aufruf einen wdt-timeout:

12:35:53.961 > E (754746) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
12:35:53.969 > E (754746) task_wdt:  - async_tcp (CPU 0/1)
12:35:53.972 > E (754746) task_wdt: Tasks currently running:
12:35:53.977 > E (754746) task_wdt: CPU 0: IDLE
12:35:53.980 > E (754746) task_wdt: CPU 1: IDLE
12:35:53.983 > E (754746) task_wdt: Aborting.
12:35:53.986 > 
12:35:53.986 > abort() was called at PC 0x40118380 on core 0
12:35:53.989 > 
12:35:53.989 > 
12:35:53.991 > Backtrace:0x400837a1:0x3ffbe9ec |<-CORRUPTED

Kennt jemand diesen Fehler bzw. das Verhalten?

Viele Grüße
Klaus

Crash after setting Inverter

My opendtu testcase reboots after setting an (invalid) inverter number/name.

I can integrate it into WLAN and then try to set Inverter serial to "1" and name to "Michael". My real inverter will only arrive next week, but I have tried with valid serial numbers as well.

The ESP32 immediately goes into a boot loop:
11:31:21.438 > Starting OpenDTU
11:31:21.438 > Initialize FS... done
11:31:21.438 > Reading configuration... done
11:31:21.438 > Initialize Network... done
11:31:21.438 > Setting Hostname... Configuring WiFi STA using new credentials... done
11:31:21.438 > Initialize NTP... done
11:31:21.438 > Initialize MqTT... done
11:31:21.438 > Initialize WebApi... done
11:31:21.438 > Initialize Hoymiles interface... Connection successfull
11:31:21.438 > Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
11:31:21.438 >
11:31:21.438 > Core 1 register dump:
11:31:21.438 > PC : 0x40188f5b PS : 0x00060930 A0 : 0x800e19aa A1 : 0x3ffb27b0
11:31:21.438 > A2 : 0x00000000 A3 : 0x3ffc413c A4 : 0x00000000 A5 : 0x00000999
11:31:21.438 > A6 : 0x00000001 A7 : 0x00000000 A8 : 0x800ee13e A9 : 0x3ffb2750
11:31:21.438 > A10 : 0x00000000 A11 : 0xffffeedf A12 : 0x00000001 A13 : 0x3ffc470c
11:31:21.438 > A14 : 0x0000004b A15 : 0x00000000 SAR : 0x0000001b EXCCAUSE: 0x0000001c
11:31:21.438 > EXCVADDR: 0x000001d0 LBEG : 0x4008464d LEND : 0x40084655 LCOUNT : 0x00000027

Reflashing the code via platformIO does not fix the boot loop. I have to clear the flash with some other code and only then can reapply openDTU.

Build Probleme

Hallo zusammen,
ich würde gerne dieses Projekt auf einem ESP32 umsetzen.
Ich habe Probleme beim Build.
Leider habe ich keine Ahnung, wo es klemmt. Vielleicht habe ich etwas vergessen ?

Executing task: C:\Users\Volker.platformio\penv\Scripts\platformio.exe run <

Processing esp32 (platform: espressif32; board: esp32dev; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Library Manager: Installing git+https://github.com/me-no-dev/ESPAsyncWebServer.git
git version 2.36.1.windows.1
Cloning into 'C:\Users\Vr.platformio.cache\tmp\pkg-installing-jqbp2_0k'...
remote: Enumerating objects: 61, done.
remote: Counting objects: 100% (61/61), done.
remote: Compressing objects: 100% (53/53), done.
remote: Total 61 (delta 3), reused 39 (delta 1), pack-reused 0
Receiving objects: 100% (61/61), 270.18 KiB | 30.02 MiB/s, done.
Resolving deltas: 100% (3/3), done.
Library Manager: ESP Async [email protected]+sha.f71e3d4 has been installed!
Library Manager: Resolving dependencies...
Library Manager: Installing me-no-dev/ESPAsyncTCP @ ^1.2.2
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
Library Manager: Installing me-no-dev/AsyncTCP @ ^1.1.1
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
Library Manager: Installing Hash
Library Manager: Installing bblanchon/ArduinoJson @ ^6.19.4
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
Library Manager: Installing git+https://github.com/marvinroger/async-mqtt-client.git
git version 2.36.1.windows.1
Cloning into 'C:\Users\Volker.platformio.cache\tmp\pkg-installing-ic3d8dwc'...
remote: Enumerating objects: 89, done.
remote: Counting objects: 100% (89/89), done.
remote: Compressing objects: 100% (79/79), done.
Receiving objects: 50% (45/89)
Receiving objects: 100% (89/89), 31.22 KiB | 6.24 MiB/s, done.
Resolving deltas: 100% (29/29), done.
Library Manager: [email protected]+sha.89bf464 has been installed!
Library Manager: Resolving dependencies...
Library Manager: Installing nrf24/RF24 @ ^1.4.2
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
Verbose mode can be enabled via -v, --verbose option
NotGitRepository: No git repository was found at .:
File "C:\Users\Volker.platformio\penv\lib\site-packages\platformio\builder\main.py", line 182:
env.SConscript(item, exports="env")
File "C:\Users\Volker.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 597:
return _SConscript(self.fs, *files, **subst_kw)
File "C:\Users\Volker.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 285:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "D:\test\OpenDTU-master\auto_firmware_version.py", line 21:
BUILD_FLAGS=[get_firmware_specifier_build_flag()]
File "D:\test\OpenDTU-master\auto_firmware_version.py", line 15:
build_version = porcelain.describe('.') # '.' refers to the repository root dir
File "C:\Users\Volker.platformio\penv\lib\site-packages\dulwich\porcelain.py", line 1843:
with open_repo_closing(repo) as r:
File "C:\Users\Volker.platformio\penv\lib\site-packages\dulwich\porcelain.py", line 212:
return closing(Repo(path_or_repo))
File "C:\Users\Volker.platformio\penv\lib\site-packages\dulwich\repo.py", line 1075:
raise NotGitRepository(
=========================================================================== [FAILED] Took 9.66 seconds ===========================================================================
Der Terminalprozess "C:\Users\Vr.platformio\penv\Scripts\platformio.exe 'run'" wurde mit folgendem Exitcode beendet: 1.

Home Assistant MQTT Auto Discovery - Sensor "flattern"

Hallo Thomas,

mit ist heute erst aufgefallen, dass die erkannten Sensoren per Home Assistant MQTT Auto Discovery ständig "flatten". D.h. anstatt einfach nur zu Updaten sind die immer kurz "Nicht verfügbar". Da passt wohl irgentwas mit dem Update der Topics nicht. Bei anderen Sensoren die ich per Home Assistant MQTT Auto Discovery in meinem System haben zeigt sich das Verhalten nicht. Hier mal ein Video das ist wohl sprechender:

19-08-_2022_13-22-24.mp4

Hast Du eine Idee? Ich gehe auch mal auf die Suche im Code.

Beste Grüße
Ingo

Feature: POC Home Assistant MQTT Discovery

Hi @tbnobody,

wie schon mal angekündigt habe ich ein POC für Home Assistant MQTT Discovery erstellt.
Damit wird dann ein Inverter in Home Assistant automatisch als Gerät erkannt und mit allen verfügbaren Sensoren eingerichtet ohne das der Benutzer einer manuelle Konfiguration erstellen muss.

Es gibt auch noch weitere Heimautomatisierungen, welche MQTT Discovery unterstützen und die Informationen in einer definierten Struktur erwarten. Es wäre also sinnvoll einer modulare Lösung zu schaffen, so dass bei Bedarf einfach weitere Implemenationen hinzugefügt werden können.

So sieht das dann in Home Assistant aus:

grafik

Ich habe für den POC einfach mal die MqttPublishing.cpp misbraucht. Deshalb kommt auch kein PR und ich brauche natürlich Deine Unterstützung und Zustimmung openDTU diesbezüglich zu erweitern.

Folgende Punkte wären zu klären/erweitern:

  • Die MQTT Konfiguration über die UI muss eine Option haben zu wählen welche Strategie angewand werden soll. D.h. Default, Home Assistant, etc.. Evtl. müssen auch neue andere Optionen eingeblendet werden, je nach Auswahl.
  • Im Backend muss je nach gewählter MQTT Strategie eine passende "MqttPublishing" angesteuert werden.

Ich kopiere mal meine angepasste MqttPublishing.cpp hier rein, damit Du mal einen Eindruck bekommst was ich verbrochen habe. Sind auch ein paar Kommentare was noch gelöst werden muss.

#include "ArduinoJson.h"
#include "MqttPublishing.h"
#include "MqttSettings.h"

MqttPublishingClass MqttPublishing;

void MqttPublishingClass::init()
{
}

void MqttPublishingClass::loop()
{
    if (!MqttSettings.getConnected() && Hoymiles.getRadio()->isIdle()) {
        return;
    }

    CONFIG_T& config = Configuration.get();

    if (millis() - _lastPublish > (config.Mqtt_PublishInterval * 1000)) {
        //MqttSettings.publish("dtu/uptime", String(millis() / 1000));
        //MqttSettings.publish("dtu/ip", WiFi.localIP().toString());

        // Loop all inverters
        for (uint8_t i = 0; i < Hoymiles.getNumInverters(); i++) {
            auto inv = Hoymiles.getInverterByPos(i);

            char buffer[sizeof(uint64_t) * 8 + 1];
            sprintf(buffer, "%0lx%08lx",
                ((uint32_t)((inv->serial() >> 32) & 0xFFFFFFFF)),
                ((uint32_t)(inv->serial() & 0xFFFFFFFF)));
            String serial = String(buffer);

            // MqttSettings.publish(subtopic + "/name", inv->name());

            String subtopic = "sensor/dtu_" + serial;

            uint32_t lastUpdate = inv->getLastStatsUpdate();
            if (lastUpdate > 0 && lastUpdate != _lastPublishStats[i]) {
                _lastPublishStats[i] = lastUpdate;

                // Loop all channels
                for (uint8_t c = 0; c <= inv->Statistics()->getChannelCount(); c++) {
                    publishField(subtopic, inv, c, FLD_UDC);
                    publishField(subtopic, inv, c, FLD_IDC);
                    if (c == 0) {
                        publishField(subtopic, inv, c, FLD_PDC, "PowerDC");
                    } else {
                        publishField(subtopic, inv, c, FLD_PDC);
                    }
                    publishField(subtopic, inv, c, FLD_YD);
                    publishField(subtopic, inv, c, FLD_YT);
                    publishField(subtopic, inv, c, FLD_UAC);
                    publishField(subtopic, inv, c, FLD_IAC);
                    publishField(subtopic, inv, c, FLD_PAC);
                    publishField(subtopic, inv, c, FLD_F);
                    publishField(subtopic, inv, c, FLD_T);
                    publishField(subtopic, inv, c, FLD_PCT);
                    publishField(subtopic, inv, c, FLD_EFF);
                    publishField(subtopic, inv, c, FLD_IRR);
                }
            }

            yield();
        }

        _lastPublish = millis();
    }
}

void MqttPublishingClass::publishField(String subtopic, std::shared_ptr<InverterAbstract> inv, uint8_t channel, uint8_t fieldId, String topic)
{
    if (inv->Statistics()->hasChannelFieldValue(channel, fieldId)) {
        CONFIG_T& config = Configuration.get();

        String chanName;
        String chanNameLower;

        if (topic == "") {
            chanName = inv->Statistics()->getChannelFieldName(channel, fieldId);
        } else {
            chanName = topic;
        }

        chanNameLower = chanName;
        chanNameLower.toLowerCase();
        
        char buffer[sizeof(uint64_t) * 8 + 1];
        sprintf(buffer, "%0lx%08lx",
            ((uint32_t)((inv->serial() >> 32) & 0xFFFFFFFF)),
            ((uint32_t)(inv->serial() & 0xFFFFFFFF)));
        String serial = String(buffer);

        // Home Assistant configuation topic payload (JSON)
        StaticJsonDocument<1024> jsonConfigurationPayload;
        jsonConfigurationPayload["uniq_id"] = "dtu_" + serial + "_" + chanNameLower + "_" + String(channel);
        jsonConfigurationPayload["obj_id"] = "dtu_" + serial + "_" + chanNameLower + "_" + String(channel);
        jsonConfigurationPayload["name"] = (channel == 0) ? chanName : chanName + "_" + String(channel);
        jsonConfigurationPayload["unit_of_meas"] = inv->Statistics()->getChannelFieldUnit(channel, fieldId);
        jsonConfigurationPayload["val_tpl"] = "{{ value_json.value }}";
        jsonConfigurationPayload["stat_t"] = String(config.Mqtt_Topic) + "/" + subtopic + "/" + chanNameLower + "_" + String(channel) + "/state";
        
        // Create device object
        JsonObject jsonDeviceObject = jsonConfigurationPayload.createNestedObject("device");
        jsonDeviceObject["name"] = String(inv->name());
        jsonDeviceObject["mdl"] = String(inv->typeName());
        jsonDeviceObject["mf"] = "Hoymiles";
        jsonDeviceObject["cu"] = "http://" + WiFi.localIP().toString();
        JsonArray idsJsonArray = jsonDeviceObject.createNestedArray("ids");
        idsJsonArray.add(serial);       

        if (channel > 0) {
            jsonConfigurationPayload["ent_cat"] = "diagnostic";
            jsonConfigurationPayload["enabled_by_default"] = "false";
        }

        // TODO: How to solve this?
        String unitOfMeasurement = inv->Statistics()->getChannelFieldUnit(channel, fieldId);

        if (unitOfMeasurement == "A") {
            jsonConfigurationPayload["dev_cla"] = "current";
            jsonConfigurationPayload["stat_cla"] = "measurement";
        } else if (unitOfMeasurement == "V") {
            jsonConfigurationPayload["dev_cla"] = "voltage";
            jsonConfigurationPayload["stat_cla"] = "measurement";           
        } else if (unitOfMeasurement == "W") {
            jsonConfigurationPayload["dev_cla"] = "power";
            jsonConfigurationPayload["stat_cla"] = "measurement";   
        } else if (unitOfMeasurement== "Wh") {
            jsonConfigurationPayload["dev_cla"] = "energy";
            jsonConfigurationPayload["stat_cla"] = "total_increasing"; 
        } else if (unitOfMeasurement == "kWh") {
            jsonConfigurationPayload["dev_cla"] = "energy";
            jsonConfigurationPayload["stat_cla"] = "total_increasing"; 
        } else if (unitOfMeasurement == "Hz") {
            jsonConfigurationPayload["dev_cla"] = "frequency";
            jsonConfigurationPayload["stat_cla"] = "measurement"; 
        } else if (unitOfMeasurement == "°C") {
            jsonConfigurationPayload["dev_cla"] = "temperature";
            jsonConfigurationPayload["stat_cla"] = "measurement"; 
        }

        String configurationPayload = "";
        serializeJson(jsonConfigurationPayload, configurationPayload);

        // Publish configuration topic.
        // TODO: Only send once e.g. on device start
        MqttSettings.publish(subtopic + "/" + chanNameLower + "_" + String(channel) + "/config", configurationPayload);

        // Update Home Assistant sensor with new measurement
        MqttSettings.publish(subtopic + "/" + chanNameLower + "_" + String(channel) + "/state", "{ \"value\": \"" + String(inv->Statistics()->getChannelFieldValue(channel, fieldId)) + "\"}");
    }
}

Also wenn Du Zeit und Lust hast würde ich mich freuen, wenn wir das angehen könnten. Bin natürlich auch bereit den Home Assistant Teil dann später zu pflegen bei Problemen und zu supporten.

Freue mich auf Deine Rückemeldung!

Danke und Gruß
Ingo

Feature Request: Power Limiting

Eigentlich ganz einfach :-D

Der Frame dazu sieht so aus:

payload[0] = 0x51				// TX_REQ_DEVCONTROL
	
payload[1..4] 					// Inverter-ID
payload[5..8]					// DTU-ID
	
payload[9] = 0x81				// PID (0x81 = SINGLE_FRAME)

payload[10] = 0x0b				// ActivePowerContr 	= 0x0b
						// ReactivePowerContr 	= 0x0c
payload[11] = 0x00
payload[12] = (power >> 8) & 0xff 		// power limit (in 1/10 Watt (z.B. input: 3000 -> 300 Watt))
payload[13] = (power     ) & 0xff 		// power limit
payload[14] = (persist >> 8) & 0xff 		// persistency
payload[15] = (persist     ) & 0xff 		// 0x0000 -> temporary in Hoymiles memory
						// 0x0100 -> persistent in Hoymiles EEPROM

Schön wäre, wenn man das mit der REST-API oder MQTT aufrufen könnte.

Verwendung der Hoymiles.h als Library

Hallo Thomas!

Eigentlich ist das kein Issue, sondern mehr eine Frage :)

Ich habe versucht die Hoymiles.h als Library in einem kleinen Testsketch zu benutzen.
Allerdings bekomme ich keine Daten geliefert.
Kannst du mir einen Tipp geben, was ich falsch mache?

(Ich verwende die gleichen Seriennummern wie im openDTU).

Gruß
Boris

Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled

Hello,
I have an esp32 after I upload the OpenDTU to the ESP I get the following error: Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled
Then the esp goes into a reboot.
Entire log:

17:49:17.718 > Starting OpenDTU
17:49:17.718 > Initialize FS... done
17:49:17.718 > Reading configuration... done
17:49:17.718 > Initialize Network... done
17:49:17.718 > Setting Hostname... Configuring WiFi STA using new credentials... done
17:49:17.718 > Initialize NTP... done
17:49:17.718 > Initialize MqTT... done
17:49:17.718 > Initialize WebApi... done
17:49:17.718 > Initialize Hoymiles interface... Connection error!!
17:49:17.718 > Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
17:49:17.718 > 
17:49:17.718 > Core  1 register dump:
17:49:17.718 > PC      : 0x401720f7  PS      : 0x00060430  A0      : 0x800e1296  A1      : 0x3ffb27b0  
17:49:17.718 > A2      : 0x00000000  A3      : 0x3ffc3aa0  A4      : 0x00000000  A5      : 0x00000000  
17:49:17.718 > A6      : 0x17481253  A7      : 0x00000116  A8      : 0x800ee54a  A9      : 0x3ffb2750  
17:49:17.718 > A10     : 0x00000000  A11     : 0xffffeff5  A12     : 0x00000000  A13     : 0x00000008  
17:49:17.718 > A14     : 0x3ffd0dfc  A15     : 0x3ffd0dfc  SAR     : 0x0000001b  EXCCAUSE: 0x0000001c  
17:49:17.718 > EXCVADDR: 0x000001d0  LBEG    : 0x4008b3cd  LEND    : 0x4008b3de  LCOUNT  : 0xffffffff  
17:49:17.718 > 
17:49:17.718 > 
17:49:17.718 > Backtrace:0x401720f4:0x3ffb27b00x400e1293:0x3ffb27d0 0x400f3eca:0x3ffb2820 
17:49:17.718 >

I can't find where the LoadProhibited variable appears in the code.

At the moment I have not connected the RF24L01+, it doesn't matter whether it is connected or not the same error remains.

Can someone help me with this problem?

Feature Request - Langer Servername

Hi,
euer Projekt läuft sehr gut mit meinem neuen HM-600, vielen Dank.

Könnt Ihr die länge des Servernamen ( MqTT Broker Parameter ) auf 64 Zeichen erweitern ?
Leider weiss ich nicht wie man den webapp Teil neu erzeugt.

TLS für MQTT

Hallo @tbnobody,
erst mal vielen Dank für dieses tolle Projekt. Aktuell warte ich noch auf meinen Sender. Da mein MQTT Broker TLS verwendet, wollte ich den Code so anpassen, dass man über die Config "Enable TLS" verwenden kann.

Leider musste ich feststellen, dass https://github.com/marvinroger/async-mqtt-client.git kein TLS für den esp32 unterstützt. Die nötigen Portierungen vom esp8266 sind wohl nie gemacht worden.

Gibt es irgendwelche Gründe warum du "async-mqtt-client" genutzt hast? Ansonsten würde ich die Lib z. B. mit "pubsubclient" austauschen.

Idee:

  • ssl optional
  • Root CA Certificate in die Config. Default "ISRG Root X1" für Letsencrypt Zertifikate

Was ich aktuell herausgefunden habe.

  • Jason Docsize muss vergrössert werden
  • Die Partition für Spiffs muss vergrößert werden

Ich habe keine Erfahrung mit vue. Aber ich habe herausgefunden, wie ich die WebConfig erweitern kann. Für das Zertifikat nutze ich eine textarea. Das Lesen und Schreiben der Config funktioniert. Aber das Zertifikat ist so um die 2048 Zeichen lang. Es wird wird nicht in die texareaübernommen. Wenn ich weniger Zeichen nehme funktioniert alles. Gibt es da irgendwelche Einstellungen?

WLAN password limited to 32 characters?

Hi,

I just manged to install my EPS32 with this fantastic software. Great work - thanks a lot!

But I am unable to get this connected with my WLAN and suppose this is due to a limitation in the WLAN password length.
All my WLAN passwords are 63 chars long with really all kind of characters. I tried with short PSK and that work.

Would you be able to allow the max allowed length of 63 chars for WPA2 PSK ?

Thanks and best regards
Ingo

Eventlog - Anzeige neuer Events

Mir fällt auf, dass gelegentlich die Anzahl neuer Events wie folgt angezeigt werden:

eventlog1

Öffne ich dann die Eventlog-Ansicht sehe ich z.B. folgendes:

eventlog2

Allerdings bleibt die Anzahl am Eventlog-Icon selbst nach Schließen der Log-Ansicht weiterhin bestehen:

eventlog1

Ich hätte zwei Vorschläge:

  • entweder nach Öffnen der Eventlog-Ansicht die numerische Anzeige zurücksetzen/ausblenden oder
  • jedes einzelne Eventlog anklicken um "als gelesen" zu kennzeichnen und danach die numerische Anzeige dementsprechend zu korrigieren.

Wobei ich die zweite Möglichkeit für überzogen halte, würde ich mir die erste wünschen. Ansonsten bleibt ewig die numerische Anzeige stehen und irgendwann beachtet man diese nicht mehr.

Oder steckt hinter dieser Anzeige eine andere Logik, die ich noch nicht erkannt habe. Dann wäre es schön, wenn man mir diese nennen könnte.

Crash on wipy 3.0

Hi,
first of all i wanted to thank you for such great product.

When i first connected to the freshly flashed pycom wipy 3.0 and clicked around in the web gui i have seen that when i clicked Info -> Ntp without setting yet a wifi station information that the page did not load any content and the device rebooted.

Screenshot 2022-08-06 154505

The issue only happend once for me.

cheers,
Horst

Keine verbindung zum OpenDTU AP möglich

Moin, kriege einfach keine Verbindung mit dem openDTU AP hin, sagt immer nur keine Verbindung möglich. Sind meine ersten Erfahrungen mit einem ESP32.
Das Terminal sagt denke ich alles i.O ?

  • 18:13:09.077 > Starting OpenDTU
  • 18:13:09.081 > Initialize FS... done
  • 18:13:09.081 > Reading configuration... done
  • 18:13:09.097 > Initialize Network... done
  • 18:13:09.219 > Setting Hostname... Initialize NTP... done
  • 18:13:09.223 > Initialize MqTT... done
  • 18:13:09.227 > Initialize WebApi... done
  • 18:13:09.227 > Initialize Hoymiles interface... Connection successfull
  • 18:13:09.244 > done
  • 18:13:09.244 > Switch to WiFi mode
  • 18:13:09.244 > Setting Hostname... done
  • 18:13:25.048 > Disable search for AP... done

Könnte es an der Pin-Belegung liegen?
Habe ein ESP32 mit 30 Pins die Belegung habe ich mir aus Diversen Schemata zusammengereimt.
Das habe ich in die Platformio.ini eingetragen und die NRF24L01+ auch so angeschlossen.

-DHOYMILES_PIN_MISO=19
-DHOYMILES_PIN_MOSI=23
-DHOYMILES_PIN_SCLK=18
-DHOYMILES_PIN_IRQ=16
-DHOYMILES_PIN_CE=4
-DHOYMILES_PIN_CS=5

Habe ich irgendwo einen Fehler drin?
Am Handy kommt immer nur prüfe das Passwort am Laptop keine Verbindung möglich.
Passwort = "openDTU42" ?

Edit:
Ok... gerade selbst gemerkt das der ESP32 auch ohne das NRF Modul diesen AP bereit stellt aber keine Chance damit zu verbinden ich verstehe es nicht. Ist der Espressif ESP32 WLAN Dev Kit Board Development Bluetooth Wifi v1 WROOM32 NodeMCU nicht geeignet?

TSUN M800 Suppport

Muss leider nochmal was fragen: Nachdem der Build, das Flashen und die Konfiguration des ESP32 super funktioniert haben:

Ich habe einen TSUN TSOL M800 Inverter Ser Nr: 1141647055xx Leider wird von diesem nichts empfangen. Das Log der seriellen Console habe ich angehängt. Ein ESP8266 mit der Ahoy Software empfängt die Daten des Inverters. Verkabelung habe ich geprüft. NRF+ Module habe ich untereinander getauscht. Beide funktionieren am ESP8266. Ein Elko an den 3.3V bringt keine Verbesserung. Ein anderes ESP32 Modul habe ich gerade leider nicht verfügbar.
Verkabelung ist wie folgt lt. Doku:
CE GPIO4
CS GPIO5
SCK GPIO18
MOSI GPIO23
MISO GPIO19
IRQ GPIO16

serielles Log:
Using 'COM6' as serial port.
Showing logs:
[08:11:46]ets Jul 29 2019 12:21:46
[08:11:46]
[08:11:46]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[08:11:46]configsip: 0, SPIWP:0xee
[08:11:46]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[08:11:46]mode:DIO, clock div:2
[08:11:46]load:0x3fff0018,len:4
[08:11:46]load:0x3fff001c,len:1044
[08:11:46]load:0x40078000,len:8896
[08:11:46]load:0x40080400,len:5828
[08:11:46]entry 0x400806ac
[08:11:46]
[08:11:46]Starting OpenDTU
[08:11:46]Initialize FS... done
[08:11:46]Reading configuration... done
[08:11:46]Initialize WiFi... done
[08:11:46]Setting Hostname... done
[08:11:46]Configuring WiFi STA using new credentials... done
[08:11:46]Initialize NTP... done
[08:11:46]Initialize MqTT... done
[08:11:46]Initialize WebApi... done
[08:11:46]Initialize Hoymiles interface... Connection successfull
[08:11:46]done
[08:11:46]WiFi connected
[08:12:01]Fetch inverter: 18972555629891
[08:12:01]TX 15 64 70 55 43 78 56 34 12 80 B 0 62 BE 90 33 0 0 0 5 0 0 0 0 2B 30 F5
[08:12:01]RX Period End
[08:12:01]All missing
[08:12:01]Nothing received, resend whole request
[08:12:01]TX 15 64 70 55 43 78 56 34 12 80 B 0 62 BE 90 33 0 0 0 5 0 0 0 0 2B 30 F5
[08:12:02]RX Period End
[08:12:02]All missing
[08:12:02]Nothing received, resend whole request
[08:12:02]TX 15 64 70 55 43 78 56 34 12 80 B 0 62 BE 90 33 0 0 0 5 0 0 0 0 2B 30 F5
[08:12:02]RX Period End
[08:12:02]All missing
[08:12:02]Nothing received, resend whole request
[08:12:02]TX 15 64 70 55 43 78 56 34 12 80 B 0 62 BE 90 33 0 0 0 5 0 0 0 0 2B 30 F5
[08:12:02]RX Period End
[08:12:02]All missing
[08:12:02]Nothing received, resend count exeeded
[08:12:16]Fetch inverter: 18972555629891
[08:12:16]TX 15 64 70 55 43 78 56 34 12 80 B 0 62 BE 90 42 0 0 0 5 0 0 0 0 79 58 BE
[08:12:16]RX Period End
[08:12:16]All missing
[08:12:16]Nothing received, resend whole request
[08:12:16]TX 15 64 70 55 43 78 56 34 12 80 B 0 62 BE 90 42 0 0 0 5 0 0 0 0 79 58 BE
[08:12:17]RX Period End
[08:12:17]All missing
[08:12:17]Nothing received, resend whole request
[08:12:17]TX 15 64 70 55 43 78 56 34 12 80 B 0 62 BE 90 42 0 0 0 5 0 0 0 0 79 58 BE
[08:12:17]RX Period End
[08:12:17]All missing
[08:12:17]Nothing received, resend whole request
[08:12:17]TX 15 64 70 55 43 78 56 34 12 80 B 0 62 BE 90 42 0 0 0 5 0 0 0 0 79 58 BE
[08:12:17]RX Period End
[08:12:17]All missing
[08:12:17]Nothing received, resend count exeeded

Eventlog Fehler

Hallo Thomas,

habe heute neben zwei Hoymiles HM-400 noch einen HM-1200 in Betrieb genommen. Hier ist mir erstmals ein komischer Eintrag im Eventlog aufgefallen. Anbei ein Screenshot:

grafik

Beste Grüße
Ingo

MQTT doppelte Werte bei /0/power

Erst mal DANKE für die großartige Arbeit.
Nachdem ich mich mit PaltformIO länger beschäftig habe, habe ich es jetzt auch hin bekommen ;)

Beim übertragen der Werte für /topic/inverter-sn/0/power werden mit 2 Werten übertragen. (siehe Grafik)
Erst kommt ein etwas höherer Wert und ein paar Millisekunden später ein etwas niedrigerer Wert hinterher.
Das ist nur bei diesen Item so, alle andere werden nur mit einem Wert übertragen

01-07-2022_17-44-46

Es ist egal ob ein oder mehrere Inverter eingebunden sind, mit oder ohne Retain-Flag etc,

Ist das ein Fehler von mir, oder kommt das von der Software?

MQTT NULL Werte

Ich habe oft NULL Werte zwischendurch.
Diese werden auch per MQTT versendet.
Ist es möglich diese NULL Werte nicht zu senden, oder muss ich das in iobroker irgendwie unterdrücken?

Open DTU zeigt keine Daten

Hallo Zusammen,

Ich habe alles soweit hinbekommen dass ich mir zu OpenDTU melden kann, serial Nr von Hoymiles 600 ist eingegeben und WLan Settings auch...allerdings schein was nicht zu funktionieren....

Bei mir zeigt gar keine Werte bleibt alles auf 0.

Wo kann das Problem liegen?

Screenshot_2022-08-07-11-55-07-658_com brave browser

Kontakt?

Hallo tbnobody,
ich bin der Gründer vom wled.shop.
könntest du mich bitte unter [email protected] kontaktieren?
Es geht um OpenDTU.

LG Robert

SunSpec(kompatibel) Protokoll

Das SunSpec-Protokoll ist Modbus-Basiert, am einfachsten ModbusTCP, was per WLAN ja sowieso schon in Hardware verfügbar ist.
Damit wird es möglich, den/die Wechselrichter in anderen Systemen zu integrieren, z.B. Victron mit angeschlossenen Speichersystemen, die Daten in das System zu bekommen und (später) auch die Leistungslimitierung umsetzen zu können.

Hier werden insgesamt 2 relevante Komponenten benötigt:

  • Leistungslimitierung der WR
  • ModbusTCP mit SunSpec

Die Leistungslimitierung ist ja bereits in der Entwicklung, bis diese funktioniert könntest du eine Modbus-Verbindung vorbereiten?
Im Setup wird zusätzlich zur IP-Adresse ein Schalter/Haken für Enable Modbus sowie ein Port (default: 502) benötigt.

Als Basis wird functioncode 0x04 Read Input Registers der Adressen 30001 bis 40000 sowie 0x03 Read Holding Registers und später wahrscheinlich 0x06 Write Single Register (Limits) benötigt.
Ich schaue mir das SunSpec gerade an um die genaue Registerbelegung herauszukriegen.
Eine Python-Implementierung gibt es bereits: https://github.com/sunspec/pysunspec2

Kannst du dazu eine define vorbereiten, in der man die entsprechenden Werte den registern zuweisen kann?
Es kann sein, dass noch weiteres benötigt wird, für den Anfang und Test wäre es das einfachste, nur die AC-Werte in die Register 30000 und folgede zu schreiben, die man mit functioncode 0x04 lesen kann.

Feature Request: REST Interface

Es wäre toll wenn Ihr ein REST Interface implementieren könntet um die Daten im JSON Format zu bekommen. Und - später mal - die maximale Ausgangsleistung von extern setzen zu können.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.