Merge remote-tracking branch 'tbnobody/OpenDTU/master'

This commit is contained in:
helgeerbe 2023-02-02 20:58:06 +01:00
commit 9e70d2dfc6
9 changed files with 22 additions and 13 deletions

View File

@ -59,6 +59,7 @@ Sends text raw data as difined in VE.Direct spec.
* Hoymiles HM-1000
* Hoymiles HM-1200
* Hoymiles HM-1500
* Solenso SOL-H400
* TSUN TSOL-M350 (Maybe depending on firmware/serial number on the inverter)
* TSUN TSOL-M800 (Maybe depending on firmware/serial number on the inverter)
* TSUN TSOL-M1600 (Maybe depending on firmware/serial number on the inverter)
@ -165,6 +166,7 @@ You can also change the pins by creating a custom [device profile](docs/DeviceP
* upload_port
* monitor_port
* Select the arrow button in the blue bottom status bar (PlatformIO: Upload) to compile and upload the firmware. During the compilation, all required libraries are downloaded automatically.
* Under Linux, if the upload fails with error messages "Could not open /dev/ttyUSB0, the port doesn't exist", you can check via ```ls -la /dev/tty*``` to which group your port belongs to, and then add your user this group via ```sudo adduser <yourusername> dialout```
* There are two videos showing these steps:
* [Git Clone and compilation](https://youtu.be/9cA_esv3zeA)
* [Full installation and compilation](https://youtu.be/xs6TqHn7QWM)

View File

@ -1,6 +1,6 @@
[
{
"name": "Generic NodeMCU 38 pin",
"name": "Generic NodeMCU 32",
"nrf24": {
"miso": 19,
"mosi": 23,

View File

@ -9,7 +9,7 @@ You can either create your own device profile as described [here](DeviceProfiles
Use the "Config Management" site to upload (Restore) the json file. Make sure to choose "Pin Mapping (pin_mapping.json)" in the combo box. After you click on restore the ESP will restart. At this point, the profile is not yet active. Please read the next chapter.
![](screenshots/14_ConfigManagement.png)
## Selecting the a Device Profile
## Selecting a Device Profile
After you uploaded the device profile you can select the profile in the "Device Manager" view. After a click on "Save" the ESP will be restarted and the pin assignment is active. At this point the display should already show something. Please see the next chapter for display settings.
![](screenshots/20_DeviceManager_Pin.png)

View File

@ -20,6 +20,10 @@ here are some screenshots of OpenDTU's web interface.
***
![](12_Eventlog.png)
***
![](02_NetworkAdmin.png)
***
@ -85,7 +89,3 @@ here are some screenshots of OpenDTU's web interface.
***
![](18_Console.png)
***
![](12_Eventlog.png)

View File

@ -11,6 +11,9 @@
[env]
; Specify port here. Comment out (add ; in front of line) to use auto detection.
; Under Linux, the ports are in the format /dev/tty***, typically /dev/ttyUSB0
; To look up the port, execute ls /dev/tty*, then connect the device
; then execute ls /dev/tty* again and check which device was added
monitor_port = COM4
upload_port = COM4

View File

@ -113,9 +113,13 @@ void MqttHandleHassClass::publishField(std::shared_ptr<InverterAbstract> inv, ui
DynamicJsonDocument root(1024);
root[F("name")] = name;
root[F("stat_t")] = stateTopic;
root[F("unit_of_meas")] = inv->Statistics()->getChannelFieldUnit(channel, fieldType.fieldId);
root[F("uniq_id")] = serial + "_ch" + String(channel) + "_" + fieldName;
String unit_of_meausure = inv->Statistics()->getChannelFieldUnit(channel, fieldType.fieldId);
if (unit_of_meausure != "") {
root[F("unit_of_meas")] = unit_of_meausure;
}
JsonObject deviceObj = root.createNestedObject("dev");
createDeviceInfo(deviceObj, inv);

View File

@ -83,7 +83,7 @@ bool PinMappingClass::init(const String& deviceMapping)
MessageOutput.println(F("Failed to read file, using default configuration"));
}
for (uint8_t i = 1; i <= doc.size(); i++) {
for (uint8_t i = 0; i < doc.size(); i++) {
String devName = doc[i]["name"] | "";
if (devName == deviceMapping) {
strlcpy(_pinMapping.name, devName.c_str(), sizeof(_pinMapping.name));

View File

@ -28,7 +28,7 @@
"@vitejs/plugin-vue": "^4.0.0",
"@vue/eslint-config-typescript": "^11.0.2",
"@vue/tsconfig": "^0.1.3",
"eslint": "^8.32.0",
"eslint": "^8.33.0",
"eslint-plugin-vue": "^9.9.0",
"npm-run-all": "^4.1.5",
"sass": "^1.57.1",

View File

@ -896,10 +896,10 @@ eslint-visitor-keys@^3.3.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
eslint@^8.32.0:
version "8.32.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.32.0.tgz#d9690056bb6f1a302bd991e7090f5b68fbaea861"
integrity sha512-nETVXpnthqKPFyuY2FNjz/bEd6nbosRgKbkgS/y1C7LJop96gYHWpiguLecMHQ2XCPxn77DS0P+68WzG6vkZSQ==
eslint@^8.33.0:
version "8.33.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.33.0.tgz#02f110f32998cb598c6461f24f4d306e41ca33d7"
integrity sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA==
dependencies:
"@eslint/eslintrc" "^1.4.1"
"@humanwhocodes/config-array" "^0.11.8"