├── .editorconfig
├── .github
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── bug_report.yml
│ ├── config.yml
│ └── feature_request.yml
├── dependabot.yml
└── workflows
│ ├── build.yml
│ ├── config
│ └── release-notes-config.json
│ ├── cpplint.yml
│ ├── repo-maintenance.yml
│ ├── yarnlint.yml
│ └── yarnprettier.yml
├── .gitignore
├── .vscode
├── extensions.json
└── settings.json
├── COPYING
├── LICENSE
├── README.md
├── docs
├── DeviceProfiles.md
├── DeviceProfiles
│ ├── AhoyDTU-ESP32.json
│ ├── CASmo-DTU.json
│ ├── blinkyparts_esp32.json
│ ├── esp32_stick_poe_a.json
│ ├── liligo_t-eth-lite_poe.json
│ ├── lilygo_ttgo_t-internet_poe.json
│ ├── nodemcu_esp32.json
│ ├── olimex_esp32_evb.json
│ ├── olimex_esp32_gateway.json
│ ├── olimex_esp32_poe.json
│ ├── opendtu_fusion.json
│ ├── wemos-lolin32-oled.json
│ └── wt32-eth01.json
├── Display.md
├── MQTT_Topics.md
├── README.md
├── UpgradePartition.md
├── Web-API.md
├── Wiring_ESP32.fzz
├── Wiring_ESP32_Schematic.png
├── Wiring_ESP32_Symbol.png
├── builds
│ ├── 202654506-8a4ac4ef-c883-490e-8ee1-1e1f7fa34972.jpg
│ ├── README.md
│ ├── large_display_PXL_20220715_145622277.jpg
│ ├── opendtu_breakoutboard.jpg
│ ├── sol.webp
│ └── thumbnail.jpg
├── esp32_flash_download_tool.png
├── nodemcu-esp32.png
├── nrf24l01plus.png
└── screenshots
│ ├── 01_LiveView.png
│ ├── 02_NetworkAdmin.png
│ ├── 03_NtpAdmin.png
│ ├── 04_MqttAdmin.png
│ ├── 05_InverterAdmin.png
│ ├── 06_DtuAdmin.png
│ ├── 07_FirmwareUpgrade.png
│ ├── 08_NetworkInfo.png
│ ├── 09_NtpInfo.png
│ ├── 10_MqttInfo.png
│ ├── 11_SystemInfo.png
│ ├── 12_Eventlog.png
│ ├── 13_InverterSettings.png
│ ├── 14_ConfigManagement.png
│ ├── 15_LimitSettings.png
│ ├── 16_PowerSettings.png
│ ├── 17_InverterInfo.png
│ ├── 18_Console.png
│ ├── 19_Reboot.png
│ ├── 20_DeviceManager_Pin.png
│ ├── 21_DeviceManager_Display.png
│ ├── 22_Security.png
│ ├── 23_Database.png
│ ├── README.md
│ └── Screenshot_2024-05-23_131208.png
├── include
├── Configuration.h
├── Datastore.h
├── Display_Graphic.h
├── Display_Graphic_Diagram.h
├── I18n.h
├── InverterSettings.h
├── Led_Single.h
├── MessageOutput.h
├── MqttHandleDtu.h
├── MqttHandleHass.h
├── MqttHandleInverter.h
├── MqttHandleInverterTotal.h
├── MqttSettings.h
├── NetworkSettings.h
├── NtpSettings.h
├── PinMapping.h
├── README
├── RestartHelper.h
├── Scheduler.h
├── SunPosition.h
├── Utils.h
├── W5500.h
├── WebApi.h
├── WebApi_database.h
├── WebApi_device.h
├── WebApi_devinfo.h
├── WebApi_dtu.h
├── WebApi_errors.h
├── WebApi_eventlog.h
├── WebApi_file.h
├── WebApi_firmware.h
├── WebApi_gridprofile.h
├── WebApi_i18n.h
├── WebApi_inverter.h
├── WebApi_limit.h
├── WebApi_maintenance.h
├── WebApi_mqtt.h
├── WebApi_network.h
├── WebApi_ntp.h
├── WebApi_power.h
├── WebApi_prometheus.h
├── WebApi_security.h
├── WebApi_sysstatus.h
├── WebApi_webapp.h
├── WebApi_ws_console.h
├── WebApi_ws_live.h
├── __compiled_constants.h
├── defaults.h
└── helper.h
├── lang
├── README.md
├── es.lang.json
└── it.lang.json
├── lib
├── CMT2300a
│ ├── cmt2300a.c
│ ├── cmt2300a.h
│ ├── cmt2300a_defs.h
│ ├── cmt2300a_hal.c
│ ├── cmt2300a_hal.h
│ ├── cmt2300a_params_860.h
│ ├── cmt2300a_params_900.h
│ ├── cmt2300wrapper.cpp
│ ├── cmt2300wrapper.h
│ ├── cmt_spi3.cpp
│ └── cmt_spi3.h
├── CpuTemperature
│ └── src
│ │ ├── CpuTemperature.cpp
│ │ └── CpuTemperature.h
├── Every
│ └── Every.h
├── Frozen
│ ├── AUTHORS
│ ├── LICENSE
│ ├── README.rst
│ └── frozen
│ │ ├── CMakeLists.txt
│ │ ├── algorithm.h
│ │ ├── bits
│ │ ├── algorithms.h
│ │ ├── basic_types.h
│ │ ├── constexpr_assert.h
│ │ ├── defines.h
│ │ ├── elsa.h
│ │ ├── elsa_std.h
│ │ ├── exceptions.h
│ │ ├── hash_string.h
│ │ ├── mpl.h
│ │ ├── pmh.h
│ │ └── version.h
│ │ ├── map.h
│ │ ├── random.h
│ │ ├── set.h
│ │ ├── string.h
│ │ ├── unordered_map.h
│ │ └── unordered_set.h
├── Hoymiles
│ ├── README.md
│ ├── library.json
│ └── src
│ │ ├── Hoymiles.cpp
│ │ ├── Hoymiles.h
│ │ ├── HoymilesRadio.cpp
│ │ ├── HoymilesRadio.h
│ │ ├── HoymilesRadio_CMT.cpp
│ │ ├── HoymilesRadio_CMT.h
│ │ ├── HoymilesRadio_NRF.cpp
│ │ ├── HoymilesRadio_NRF.h
│ │ ├── Utils.cpp
│ │ ├── Utils.h
│ │ ├── commands
│ │ ├── ActivePowerControlCommand.cpp
│ │ ├── ActivePowerControlCommand.h
│ │ ├── AlarmDataCommand.cpp
│ │ ├── AlarmDataCommand.h
│ │ ├── ChannelChangeCommand.cpp
│ │ ├── ChannelChangeCommand.h
│ │ ├── CommandAbstract.cpp
│ │ ├── CommandAbstract.h
│ │ ├── DevControlCommand.cpp
│ │ ├── DevControlCommand.h
│ │ ├── DevInfoAllCommand.cpp
│ │ ├── DevInfoAllCommand.h
│ │ ├── DevInfoSimpleCommand.cpp
│ │ ├── DevInfoSimpleCommand.h
│ │ ├── GridOnProFilePara.cpp
│ │ ├── GridOnProFilePara.h
│ │ ├── MultiDataCommand.cpp
│ │ ├── MultiDataCommand.h
│ │ ├── ParaSetCommand.cpp
│ │ ├── ParaSetCommand.h
│ │ ├── PowerControlCommand.cpp
│ │ ├── PowerControlCommand.h
│ │ ├── README.md
│ │ ├── RealTimeRunDataCommand.cpp
│ │ ├── RealTimeRunDataCommand.h
│ │ ├── RequestFrameCommand.cpp
│ │ ├── RequestFrameCommand.h
│ │ ├── SingleDataCommand.cpp
│ │ ├── SingleDataCommand.h
│ │ ├── SystemConfigParaCommand.cpp
│ │ └── SystemConfigParaCommand.h
│ │ ├── crc.cpp
│ │ ├── crc.h
│ │ ├── inverters
│ │ ├── HERF_1CH.cpp
│ │ ├── HERF_1CH.h
│ │ ├── HERF_2CH.cpp
│ │ ├── HERF_2CH.h
│ │ ├── HERF_4CH.cpp
│ │ ├── HERF_4CH.h
│ │ ├── HMS_1CH.cpp
│ │ ├── HMS_1CH.h
│ │ ├── HMS_1CHv2.cpp
│ │ ├── HMS_1CHv2.h
│ │ ├── HMS_2CH.cpp
│ │ ├── HMS_2CH.h
│ │ ├── HMS_4CH.cpp
│ │ ├── HMS_4CH.h
│ │ ├── HMS_Abstract.cpp
│ │ ├── HMS_Abstract.h
│ │ ├── HMT_4CH.cpp
│ │ ├── HMT_4CH.h
│ │ ├── HMT_6CH.cpp
│ │ ├── HMT_6CH.h
│ │ ├── HMT_Abstract.cpp
│ │ ├── HMT_Abstract.h
│ │ ├── HM_1CH.cpp
│ │ ├── HM_1CH.h
│ │ ├── HM_2CH.cpp
│ │ ├── HM_2CH.h
│ │ ├── HM_4CH.cpp
│ │ ├── HM_4CH.h
│ │ ├── HM_Abstract.cpp
│ │ ├── HM_Abstract.h
│ │ ├── InverterAbstract.cpp
│ │ ├── InverterAbstract.h
│ │ └── README.md
│ │ ├── parser
│ │ ├── AlarmLogParser.cpp
│ │ ├── AlarmLogParser.h
│ │ ├── DevInfoParser.cpp
│ │ ├── DevInfoParser.h
│ │ ├── GridProfileParser.cpp
│ │ ├── GridProfileParser.h
│ │ ├── Parser.cpp
│ │ ├── Parser.h
│ │ ├── PowerCommandParser.cpp
│ │ ├── PowerCommandParser.h
│ │ ├── StatisticsParser.cpp
│ │ ├── StatisticsParser.h
│ │ ├── SystemConfigParaParser.cpp
│ │ └── SystemConfigParaParser.h
│ │ └── types.h
├── MqttSubscribeParser
│ ├── MqttSubscribeParser.cpp
│ └── MqttSubscribeParser.h
├── README
├── ResetReason
│ └── src
│ │ ├── ResetReason.cpp
│ │ └── ResetReason.h
├── SpiManager
│ ├── library.json
│ └── src
│ │ ├── SpiBus.cpp
│ │ ├── SpiBus.h
│ │ ├── SpiBusConfig.cpp
│ │ ├── SpiBusConfig.h
│ │ ├── SpiCallback.cpp
│ │ ├── SpiCallback.h
│ │ ├── SpiManager.cpp
│ │ └── SpiManager.h
├── ThreadSafeQueue
│ ├── README.md
│ ├── library.json
│ └── src
│ │ └── ThreadSafeQueue.h
└── TimeoutHelper
│ ├── README.md
│ ├── library.json
│ └── src
│ ├── TimeoutHelper.cpp
│ └── TimeoutHelper.h
├── partitions_custom_16mb.csv
├── partitions_custom_4mb.csv
├── pio-scripts
├── auto_firmware_version.py
├── create_factory_bin.py
└── patch_apply.py
├── platformio.ini
├── platformio_override.ini
├── src
├── Configuration.cpp
├── Datastore.cpp
├── Display_Graphic.cpp
├── Display_Graphic_Diagram.cpp
├── I18n.cpp
├── InverterSettings.cpp
├── Led_Single.cpp
├── MessageOutput.cpp
├── MqttHandleDtu.cpp
├── MqttHandleHass.cpp
├── MqttHandleInverter.cpp
├── MqttHandleInverterTotal.cpp
├── MqttSettings.cpp
├── NetworkSettings.cpp
├── NtpSettings.cpp
├── PinMapping.cpp
├── RestartHelper.cpp
├── Scheduler.cpp
├── SunPosition.cpp
├── Utils.cpp
├── W5500.cpp
├── WebApi.cpp
├── WebApi_database.cpp
├── WebApi_device.cpp
├── WebApi_devinfo.cpp
├── WebApi_dtu.cpp
├── WebApi_eventlog.cpp
├── WebApi_file.cpp
├── WebApi_firmware.cpp
├── WebApi_gridprofile.cpp
├── WebApi_i18n.cpp
├── WebApi_inverter.cpp
├── WebApi_limit.cpp
├── WebApi_maintenance.cpp
├── WebApi_mqtt.cpp
├── WebApi_network.cpp
├── WebApi_ntp.cpp
├── WebApi_power.cpp
├── WebApi_prometheus.cpp
├── WebApi_security.cpp
├── WebApi_sysstatus.cpp
├── WebApi_webapp.cpp
├── WebApi_ws_console.cpp
├── WebApi_ws_live.cpp
└── main.cpp
├── test
└── README
├── webapp
├── .gitignore
├── .prettierrc.json
├── .vscode
│ └── extensions.json
├── .yarn
│ └── install-state.gz
├── .yarnrc.yml
├── README.md
├── env.d.ts
├── eslint.config.js
├── index.html
├── package-lock.json
├── package.json
├── public
│ ├── favicon.ico
│ ├── favicon.png
│ ├── site.webmanifest
│ └── zones.json
├── src
│ ├── App.vue
│ ├── assets
│ │ └── logo.png
│ ├── components
│ │ ├── BarChart.vue
│ │ ├── BasePage.vue
│ │ ├── BootstrapAlert.vue
│ │ ├── CalendarChart.vue
│ │ ├── CardElement.vue
│ │ ├── DevInfo.vue
│ │ ├── EventLog.vue
│ │ ├── FirmwareInfo.vue
│ │ ├── FormFooter.vue
│ │ ├── FsInfo.vue
│ │ ├── GridProfile.vue
│ │ ├── HardwareInfo.vue
│ │ ├── HeapDetails.vue
│ │ ├── HintView.vue
│ │ ├── InputElement.vue
│ │ ├── InputSerial.vue
│ │ ├── InterfaceApInfo.vue
│ │ ├── InterfaceNetworkInfo.vue
│ │ ├── InverterChannelInfo.vue
│ │ ├── InverterTotalInfo.vue
│ │ ├── LocaleSwitcher.vue
│ │ ├── MemoryInfo.vue
│ │ ├── ModalDialog.vue
│ │ ├── NavBar.vue
│ │ ├── PinInfo.vue
│ │ ├── RadioInfo.vue
│ │ ├── StatusBadge.vue
│ │ ├── TaskDetails.vue
│ │ ├── ThemeSwitcher.vue
│ │ ├── WifiApInfo.vue
│ │ └── WifiStationInfo.vue
│ ├── emitter.d.ts
│ ├── i18n.ts
│ ├── locales
│ │ ├── de.json
│ │ ├── en.json
│ │ └── fr.json
│ ├── main.ts
│ ├── plugins
│ │ └── bootstrap.ts
│ ├── router
│ │ └── index.ts
│ ├── scss
│ │ └── styles.scss
│ ├── types
│ │ ├── AlertResponse.ts
│ │ ├── DevInfoStatus.ts
│ │ ├── DeviceConfig.ts
│ │ ├── DtuConfig.ts
│ │ ├── EventlogStatus.ts
│ │ ├── File.ts
│ │ ├── GridProfileRawdata.ts
│ │ ├── GridProfileStatus.ts
│ │ ├── InverterConfig.ts
│ │ ├── LimitConfig.ts
│ │ ├── LimitStatus.ts
│ │ ├── LiveDataStatus.ts
│ │ ├── MqttConfig.ts
│ │ ├── MqttStatus.ts
│ │ ├── NetworkConfig.ts
│ │ ├── NetworkStatus.ts
│ │ ├── NtpConfig.ts
│ │ ├── NtpStatus.ts
│ │ ├── PinMapping.ts
│ │ ├── SecurityConfig.ts
│ │ └── SystemStatus.ts
│ ├── utils
│ │ ├── authentication.ts
│ │ ├── index.ts
│ │ ├── structure.ts
│ │ ├── time.ts
│ │ └── waitRestart.ts
│ └── views
│ │ ├── AboutView.vue
│ │ ├── ConfigAdminView.vue
│ │ ├── ConsoleInfoView.vue
│ │ ├── DeviceAdminView.vue
│ │ ├── DtuAdminView.vue
│ │ ├── ErrorView.vue
│ │ ├── FirmwareUpgradeView.vue
│ │ ├── HomeView.vue
│ │ ├── InverterAdminView.vue
│ │ ├── LoginView.vue
│ │ ├── MaintenanceRebootView.vue
│ │ ├── MqttAdminView.vue
│ │ ├── MqttInfoView.vue
│ │ ├── NetworkAdminView.vue
│ │ ├── NetworkInfoView.vue
│ │ ├── NtpAdminView.vue
│ │ ├── NtpInfoView.vue
│ │ ├── SecurityAdminView.vue
│ │ ├── SystemInfoView.vue
│ │ └── WaitRestartView.vue
├── tsconfig.config.json
├── tsconfig.json
├── vite.config.ts
├── yarn
└── yarn.lock
└── webapp_dist
├── favicon.ico
├── favicon.png
├── index.html.gz
├── js
└── app.js.gz
├── site.webmanifest
└── zones.json.gz
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | end_of_line = lf
6 | insert_final_newline = true
7 | indent_style = space
8 | indent_size = 4
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | ko_fi: tbnobody
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: 🤔 Have questions or need support?
4 | url: https://discord.gg/WzhxEY62mB
5 | about: Discuss with us on Discord
6 | - name: 🤔 Have questions or need support?
7 | url: https://github.com/tbnobody/OpenDTU/discussions
8 | about: Use the GitHub Discussions feature
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.yml:
--------------------------------------------------------------------------------
1 | name: ✨ Request a feature
2 | description: Suggest an improvement idea for OpenDTU!
3 | title: "[Request]"
4 | labels: ["enhancement"]
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: >
9 | **Thank you for wanting to request a feature in OpenDTU!**
10 |
11 | Before you go ahead with your request, please first consider if it wouldn't be
12 | better suited in a external home automation software like OpenHAB, ioBroker, Home Assistant etc.
13 |
14 | - type: textarea
15 | attributes:
16 | label: Is your feature request related to a problem? Please describe.
17 | description: A clear and concise description of what the problem is. Eg, "I'm always frustrated when [...]".
18 | - type: textarea
19 | attributes:
20 | label: Describe the solution you'd like
21 | description: A clear and concise description of what you want to happen.
22 | validations:
23 | required: true
24 | - type: textarea
25 | attributes:
26 | label: Describe alternatives you've considered
27 | description: A clear and concise description of any alternative solutions or features you've considered.
28 | - type: textarea
29 | attributes:
30 | label: Additional context
31 | description: Add any other context or screenshots about the feature request here.
32 |
33 |
34 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | # Maintain dependencies for npm
4 | - package-ecosystem: "npm"
5 | directory: "/webapp"
6 | schedule:
7 | interval: "weekly"
8 |
9 | # Maintain dependencies for GitHub Actions
10 | - package-ecosystem: "github-actions"
11 | directory: "/"
12 | schedule:
13 | interval: "daily"
--------------------------------------------------------------------------------
/.github/workflows/config/release-notes-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "categories": [
3 | {
4 | "title": "## ⚡ Breaking Changes",
5 | "labels": [
6 | "breaking change"
7 | ]
8 | },
9 | {
10 | "title": "## 🚀 Features",
11 | "labels": [
12 | "feature"
13 | ]
14 | },
15 | {
16 | "title": "## 🐛 Fixes",
17 | "labels": [
18 | "fix"
19 | ]
20 | },
21 | {
22 | "title": "## 🌎 Web Application",
23 | "labels": [
24 | "webapp"
25 | ]
26 | },
27 | {
28 | "title": "## 📚 Documentation",
29 | "labels": [
30 | "doc"
31 | ]
32 | },
33 | {
34 | "title": "## 🛠 Under the hood",
35 | "labels": []
36 | }
37 | ],
38 | "template": "${{CHANGELOG}}",
39 | "pr_template": "- [${{TITLE}}](https://github.com/tbnobody/OpenDTU/commit/${{MERGE_SHA}})",
40 | "empty_template": "- no changes",
41 | "label_extractor": [
42 | {
43 | "pattern": "(.): (.+)",
44 | "target": "$1",
45 | "on_property": "title"
46 | },
47 | {
48 | "pattern": "(.) (.+)",
49 | "target": "$1",
50 | "on_property": "title"
51 | }
52 | ],
53 | "tag_resolver": {
54 | "method": "semver"
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/.github/workflows/cpplint.yml:
--------------------------------------------------------------------------------
1 | name: cpplint
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | build:
7 | runs-on: ubuntu-latest
8 |
9 | steps:
10 | - uses: actions/checkout@v4
11 | - name: Set up Python
12 | uses: actions/setup-python@v5
13 | with:
14 | python-version: "3.x"
15 | - name: Install dependencies
16 | run: |
17 | python -m pip install --upgrade pip
18 | pip install cpplint
19 | - name: Linting
20 | run: |
21 | cpplint --repository=. --recursive --filter=-build/c++11,-runtime/references,-readability/braces,-whitespace,-legal,-build/include ./src ./include ./lib/Hoymiles ./lib/MqttSubscribeParser ./lib/TimeoutHelper ./lib/ResetReason
22 |
--------------------------------------------------------------------------------
/.github/workflows/repo-maintenance.yml:
--------------------------------------------------------------------------------
1 | name: 'Repository Maintenance'
2 |
3 | on:
4 | schedule:
5 | - cron: '0 4 * * *'
6 | workflow_dispatch:
7 |
8 | permissions:
9 | issues: write
10 | pull-requests: write
11 | discussions: write
12 |
13 | concurrency:
14 | group: lock
15 |
16 | jobs:
17 | stale:
18 | name: 'Stale'
19 | runs-on: ubuntu-latest
20 | steps:
21 | - uses: actions/stale@v9
22 | with:
23 | days-before-stale: 14
24 | days-before-close: 60
25 | any-of-labels: 'cant-reproduce,not a bug'
26 | stale-issue-label: stale
27 | stale-pr-label: stale
28 | stale-issue-message: >
29 | This issue has been automatically marked as stale because it has not had
30 | recent activity. It will be closed if no further activity occurs. Thank you
31 | for your contributions.
32 |
33 | lock-threads:
34 | name: 'Lock Old Threads'
35 | runs-on: ubuntu-latest
36 | steps:
37 | - uses: dessant/lock-threads@v5
38 | with:
39 | issue-inactive-days: '30'
40 | pr-inactive-days: '30'
41 | discussion-inactive-days: '30'
42 | log-output: true
43 | issue-comment: >
44 | This issue has been automatically locked since there
45 | has not been any recent activity after it was closed.
46 | Please open a new discussion or issue for related concerns.
47 | pr-comment: >
48 | This pull request has been automatically locked since there
49 | has not been any recent activity after it was closed.
50 | Please open a new discussion or issue for related concerns.
51 | discussion-comment: >
52 | This discussion has been automatically locked since there
53 | has not been any recent activity after it was closed.
54 | Please open a new discussion for related concerns.
55 |
--------------------------------------------------------------------------------
/.github/workflows/yarnlint.yml:
--------------------------------------------------------------------------------
1 | name: Yarn Linting
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | build:
7 | runs-on: ubuntu-latest
8 |
9 | defaults:
10 | run:
11 | working-directory: webapp
12 |
13 | steps:
14 | - uses: actions/checkout@v4
15 | - name: Enable Corepack
16 | run: corepack enable
17 | - name: Setup Node.js and yarn
18 | uses: actions/setup-node@v4
19 | with:
20 | node-version: "22"
21 | cache: "yarn"
22 | cache-dependency-path: "webapp/yarn.lock"
23 |
24 | - name: Install WebApp dependencies
25 | run: yarn install --frozen-lockfile
26 |
27 | - name: Linting
28 | run: yarn lint
29 |
--------------------------------------------------------------------------------
/.github/workflows/yarnprettier.yml:
--------------------------------------------------------------------------------
1 | name: Yarn Prettier
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | build:
7 | runs-on: ubuntu-latest
8 |
9 | defaults:
10 | run:
11 | working-directory: webapp
12 |
13 | steps:
14 | - uses: actions/checkout@v4
15 | - name: Enable Corepack
16 | run: corepack enable
17 | - name: Setup Node.js and yarn
18 | uses: actions/setup-node@v4
19 | with:
20 | node-version: "22"
21 | cache: "yarn"
22 | cache-dependency-path: "webapp/yarn.lock"
23 |
24 | - name: Install WebApp dependencies
25 | run: yarn install --frozen-lockfile
26 |
27 | - name: Check Formatting
28 | run: yarn prettier --check src/
29 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .pio
2 | .vscode/.browse.c_cpp.db*
3 | .vscode/c_cpp_properties.json
4 | .vscode/launch.json
5 | .vscode/ipch
6 | .vscode/settings.json
7 | platformio-device-monitor*.log
8 | logs/device-monitor*.log
9 | platformio_override.ini
10 | .DS_Store
11 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // See http://go.microsoft.com/fwlink/?LinkId=827846
3 | // for the documentation about the extensions.json format
4 | "recommendations": [
5 | "DavidAnson.vscode-markdownlint",
6 | "EditorConfig.EditorConfig",
7 | "Vue.volar",
8 | "platformio.platformio-ide"
9 | ],
10 | "unwantedRecommendations": [
11 | "ms-vscode.cpptools-extension-pack"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "C_Cpp.clang_format_style": "WebKit",
3 | "cmake.sourceDirectory": "C:/git/OpenDTU-Database/.pio/libdeps/generic_esp32/ArduinoJson/src"
4 | }
5 |
--------------------------------------------------------------------------------
/COPYING:
--------------------------------------------------------------------------------
1 | OpenDTU - ESP32 firmware to control HoyMiles Inverter
2 |
3 | Copyright (C) 2022 Thomas Basler and others
4 |
5 | OpenDTU is provided under:
6 |
7 | SPDX-License-Identifier: GPL-2.0-or-later
8 |
9 | Being under the terms of the GNU General Public License version 2
10 | or any later version, according with:
11 |
12 | LICENSE
--------------------------------------------------------------------------------
/docs/DeviceProfiles.md:
--------------------------------------------------------------------------------
1 | # Device Profiles
2 |
3 | This documentation will has been moved and can be found here:
4 |
--------------------------------------------------------------------------------
/docs/DeviceProfiles/AhoyDTU-ESP32.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "AhoyDTU ESP32 Display LED",
4 | "links": [
5 | {"name": "Information", "url": "https://ahoydtu.de/getting_started/"}
6 | ],
7 | "nrf24": {
8 | "miso": 19,
9 | "mosi": 23,
10 | "clk": 18,
11 | "irq": 16,
12 | "en": 4,
13 | "cs": 5
14 | },
15 | "led": {
16 | "led0": 25,
17 | "led1": 26
18 | },
19 | "display": {
20 | "type": 2,
21 | "data": 21,
22 | "clk": 22
23 | }
24 | },
25 | {
26 | "name": "AhoyDTU ESP32 Display",
27 | "links": [
28 | {"name": "Information", "url": "https://ahoydtu.de/getting_started/"}
29 | ],
30 | "nrf24": {
31 | "miso": 19,
32 | "mosi": 23,
33 | "clk": 18,
34 | "irq": 16,
35 | "en": 4,
36 | "cs": 5
37 | },
38 | "display": {
39 | "type": 2,
40 | "data": 21,
41 | "clk": 22
42 | }
43 | },
44 | {
45 | "name": "AhoyDTU ESP32 LED",
46 | "links": [
47 | {"name": "Information", "url": "https://ahoydtu.de/getting_started/"}
48 | ],
49 | "nrf24": {
50 | "miso": 19,
51 | "mosi": 23,
52 | "clk": 18,
53 | "irq": 16,
54 | "en": 4,
55 | "cs": 5
56 | },
57 | "led": {
58 | "led0": 25,
59 | "led1": 26
60 | }
61 | },
62 | {
63 | "name": "AhoyDTU ESP32",
64 | "links": [
65 | {"name": "Information", "url": "https://ahoydtu.de/getting_started/"}
66 | ],
67 | "nrf24": {
68 | "miso": 19,
69 | "mosi": 23,
70 | "clk": 18,
71 | "irq": 16,
72 | "en": 4,
73 | "cs": 5
74 | }
75 | }
76 | ]
--------------------------------------------------------------------------------
/docs/DeviceProfiles/CASmo-DTU.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "CASmo-DTU",
4 | "links": [
5 | {"name": "Information", "url": "https://casmo.info/product-details/?product=2"}
6 | ],
7 | "nrf24": {
8 | "miso": 19,
9 | "mosi": 23,
10 | "clk": 18,
11 | "irq": 16,
12 | "en": 4,
13 | "cs": 5
14 | },
15 | "led": {
16 | "led0": 25,
17 | "led1": 26
18 | }
19 | }
20 | ]
--------------------------------------------------------------------------------
/docs/DeviceProfiles/esp32_stick_poe_a.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "Esp32-Stick-PoE-A",
4 | "links": [
5 | {"name": "Information", "url": "https://github.com/allexoK/Esp32-Stick-Boards-Docs"}
6 | ],
7 | "nrf24": {
8 | "miso": 2,
9 | "mosi": 15,
10 | "clk": 14,
11 | "irq": 34,
12 | "en": 12,
13 | "cs": 4
14 | },
15 | "eth": {
16 | "enabled": true,
17 | "phy_addr": 1,
18 | "power": -1,
19 | "mdc": 23,
20 | "mdio": 18,
21 | "type": 0,
22 | "clk_mode": 3
23 | }
24 | }
25 | ]
26 |
--------------------------------------------------------------------------------
/docs/DeviceProfiles/liligo_t-eth-lite_poe.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "LILYGO T-ETH-Lite-POE CMT",
4 | "links": [
5 | {"name": "Datasheet", "url": "https://www.lilygo.cc/products/t-eth-lite"}
6 | ],
7 | "eth": {
8 | "enabled": true,
9 | "phy_addr": 0,
10 | "power": 12,
11 | "mdc": 23,
12 | "mdio": 18,
13 | "type": 2,
14 | "clk_mode": 0
15 | },
16 | "cmt": {
17 | "clk": 15,
18 | "cs": 32,
19 | "fcs": 33,
20 | "sdio": 4
21 | }
22 | },
23 | {
24 | "name": "LILYGO T-ETH-Lite-POE NRF24",
25 | "links": [
26 | {"name": "Datasheet", "url": "https://www.lilygo.cc/products/t-eth-lite"}
27 | ],
28 | "eth": {
29 | "enabled": true,
30 | "phy_addr": 0,
31 | "power": 12,
32 | "mdc": 23,
33 | "mdio": 18,
34 | "type": 2,
35 | "clk_mode": 0
36 | },
37 | "nrf24": {
38 | "miso": 34,
39 | "mosi": 13,
40 | "clk": 14,
41 | "irq": 35,
42 | "en": 4,
43 | "cs": 2
44 | }
45 | },
46 | {
47 | "name": "LILYGO T-ETH-Lite-POE NRF24 + Display",
48 | "links": [
49 | {"name": "Datasheet", "url": "https://www.lilygo.cc/products/t-eth-lite"}
50 | ],
51 | "eth": {
52 | "enabled": true,
53 | "phy_addr": 0,
54 | "power": 12,
55 | "mdc": 23,
56 | "mdio": 18,
57 | "type": 2,
58 | "clk_mode": 0
59 | },
60 | "nrf24": {
61 | "miso": 34,
62 | "mosi": 13,
63 | "clk": 14,
64 | "irq": 35,
65 | "en": 4,
66 | "cs": 2
67 | },
68 | "display": {
69 | "type": 3,
70 | "data": 32,
71 | "clk": 33
72 | }
73 | }
74 | ]
75 |
--------------------------------------------------------------------------------
/docs/DeviceProfiles/lilygo_ttgo_t-internet_poe.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "LILYGO TTGO T-Internet-POE",
4 | "links": [
5 | {"name": "Datasheet", "url": "https://www.lilygo.cc/products/t-internet-poe"}
6 | ],
7 | "nrf24": {
8 | "miso": 2,
9 | "mosi": 15,
10 | "clk": 14,
11 | "irq": 34,
12 | "en": 12,
13 | "cs": 4
14 | },
15 | "eth": {
16 | "enabled": true,
17 | "phy_addr": 0,
18 | "power": -1,
19 | "mdc": 23,
20 | "mdio": 18,
21 | "type": 0,
22 | "clk_mode": 3
23 | }
24 | },
25 | {
26 | "name": "LILYGO TTGO T-Internet-POE, nrf24 direct solder",
27 | "links": [
28 | {"name": "Datasheet", "url": "https://www.lilygo.cc/products/t-internet-poe"}
29 | ],
30 | "nrf24": {
31 | "miso": 12,
32 | "mosi": 4,
33 | "clk": 15,
34 | "irq": 33,
35 | "en": 14,
36 | "cs": 2
37 | },
38 | "eth": {
39 | "enabled": true,
40 | "phy_addr": 0,
41 | "power": -1,
42 | "mdc": 23,
43 | "mdio": 18,
44 | "type": 0,
45 | "clk_mode": 3
46 | }
47 | },
48 | {
49 | "name": "LILYGO TTGO T-Internet-POE, nrf24 direct solder, SSD1306",
50 | "links": [
51 | {"name": "Datasheet", "url": "https://www.lilygo.cc/products/t-internet-poe"}
52 | ],
53 | "nrf24": {
54 | "miso": 12,
55 | "mosi": 4,
56 | "clk": 15,
57 | "irq": 33,
58 | "en": 14,
59 | "cs": 2
60 | },
61 | "eth": {
62 | "enabled": true,
63 | "phy_addr": 0,
64 | "power": -1,
65 | "mdc": 23,
66 | "mdio": 18,
67 | "type": 0,
68 | "clk_mode": 3
69 | },
70 | "display": {
71 | "type": 2,
72 | "data": 16,
73 | "clk": 32
74 | }
75 | }
76 | ]
--------------------------------------------------------------------------------
/docs/DeviceProfiles/olimex_esp32_evb.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "Olimex ESP32-EVB",
4 | "links": [
5 | { "name": "Datasheet", "url": "https://www.olimex.com/Products/IoT/ESP32/ESP32-EVB/open-source-hardware" }
6 | ],
7 | "nrf24": {
8 | "miso": 15,
9 | "mosi": 2,
10 | "clk": 14,
11 | "irq": 13,
12 | "en": 16,
13 | "cs": 17
14 | },
15 | "eth": {
16 | "enabled": true,
17 | "phy_addr": 0,
18 | "power": 12,
19 | "mdc": 23,
20 | "mdio": 18,
21 | "type": 0,
22 | "clk_mode": 0
23 | }
24 | }
25 | ]
--------------------------------------------------------------------------------
/docs/DeviceProfiles/olimex_esp32_gateway.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "Olimex ESP32-Gateway",
4 | "nrf24": {
5 | "miso": 14,
6 | "mosi": 13,
7 | "clk": 12,
8 | "irq": 15,
9 | "en": 2,
10 | "cs": 4
11 | },
12 | "eth": {
13 | "enabled": true,
14 | "phy_addr": 0,
15 | "power": 12,
16 | "mdc": 23,
17 | "mdio": 18,
18 | "type": 0,
19 | "clk_mode": 3
20 | }
21 | },
22 | {
23 | "name": "Olimex ESP32-Gateway with SSH1106",
24 | "nrf24": {
25 | "miso": 14,
26 | "mosi": 13,
27 | "clk": 12,
28 | "irq": 15,
29 | "en": 2,
30 | "cs": 4
31 | },
32 | "eth": {
33 | "enabled": true,
34 | "phy_addr": 0,
35 | "power": 12,
36 | "mdc": 23,
37 | "mdio": 18,
38 | "type": 0,
39 | "clk_mode": 3
40 | },
41 | "display": {
42 | "type": 3,
43 | "data": 32,
44 | "clk": 16
45 | }
46 | }
47 | ]
48 |
--------------------------------------------------------------------------------
/docs/DeviceProfiles/wemos-lolin32-oled.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "Wemos Lolin32 OLED",
4 | "nrf24": {
5 | "miso": 2,
6 | "mosi": 14,
7 | "clk": 12,
8 | "irq": 0,
9 | "en": 15,
10 | "cs": 13
11 | },
12 | "eth": {
13 | "enabled": false
14 | },
15 | "display": {
16 | "type": 2,
17 | "data": 5,
18 | "clk": 4
19 | }
20 | }
21 | ]
22 |
--------------------------------------------------------------------------------
/docs/Display.md:
--------------------------------------------------------------------------------
1 | # Display integration
2 |
3 | This documentation will has been moved and can be found here:
4 |
--------------------------------------------------------------------------------
/docs/MQTT_Topics.md:
--------------------------------------------------------------------------------
1 | # MQTT Topics
2 |
3 | This documentation will has been moved and can be found here:
4 |
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | # Documents - Table of content
2 |
3 | More detailed descriptions for some topics can be found here.
4 |
5 | ## [Display Documentation](Display.md)
6 |
7 | ## [MQTT Topic Documentation](MQTT_Topics.md)
8 |
9 | ## [Web API Documentation](Web-API.md)
10 |
11 | ## [Device Profile Documentation](DeviceProfiles.md)
12 |
13 | ## [Builds](builds/README.md)
--------------------------------------------------------------------------------
/docs/UpgradePartition.md:
--------------------------------------------------------------------------------
1 | # Upgrade Partition
2 |
3 | This documentation has been moved and can be found here:
4 |
--------------------------------------------------------------------------------
/docs/Web-API.md:
--------------------------------------------------------------------------------
1 | # Web API
2 |
3 | This documentation will has been moved and can be found here:
4 |
--------------------------------------------------------------------------------
/docs/Wiring_ESP32.fzz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/Wiring_ESP32.fzz
--------------------------------------------------------------------------------
/docs/Wiring_ESP32_Schematic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/Wiring_ESP32_Schematic.png
--------------------------------------------------------------------------------
/docs/Wiring_ESP32_Symbol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/Wiring_ESP32_Symbol.png
--------------------------------------------------------------------------------
/docs/builds/202654506-8a4ac4ef-c883-490e-8ee1-1e1f7fa34972.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/builds/202654506-8a4ac4ef-c883-490e-8ee1-1e1f7fa34972.jpg
--------------------------------------------------------------------------------
/docs/builds/README.md:
--------------------------------------------------------------------------------
1 | # Builds using different boards
2 |
3 | ## ESP32 Dev Board
4 |
5 | ### Build by @tbnobody, jan and @marove2000
6 | * Used build environment: generic
7 | * Case: https://www.printables.com/de/model/441037-opendtu-breakoutboard-case
8 | * Soldering Kit: https://shop.blinkyparts.com/en/OpenDTU-Breakoutboard-Your-evaluation-for-your-balcony-solar-system/blink237542
9 | * Breakout board: https://github.com/marove2000/openDTU_BreakoutBoard
10 | 
11 | 
12 |
13 | ### Build by @Marc--
14 | * Used build environment: generic
15 | * Case: https://www.thingiverse.com/thing:5435911
16 | 
17 |
18 | ### Build by @cepresso
19 | * Used build environment: generic
20 | * Case: https://www.printables.com/de/model/293003-sol-opendtu-esp32-nrf24l01-case
21 | 
22 |
23 | ## LILYGO® TTGO T-Internet-POE
24 | ### Build by @fromCologne
25 | * Used build environment: LilyGO_T_ETH_POE
26 | * Board info: http://www.lilygo.cn/claprod_view.aspx?TypeId=21&Id=1344&FId=t28:21:28
27 | * Case: https://www.thingiverse.com/thing:5244895
28 | 
--------------------------------------------------------------------------------
/docs/builds/large_display_PXL_20220715_145622277.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/builds/large_display_PXL_20220715_145622277.jpg
--------------------------------------------------------------------------------
/docs/builds/opendtu_breakoutboard.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/builds/opendtu_breakoutboard.jpg
--------------------------------------------------------------------------------
/docs/builds/sol.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/builds/sol.webp
--------------------------------------------------------------------------------
/docs/builds/thumbnail.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/builds/thumbnail.jpg
--------------------------------------------------------------------------------
/docs/esp32_flash_download_tool.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/esp32_flash_download_tool.png
--------------------------------------------------------------------------------
/docs/nodemcu-esp32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/nodemcu-esp32.png
--------------------------------------------------------------------------------
/docs/nrf24l01plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/nrf24l01plus.png
--------------------------------------------------------------------------------
/docs/screenshots/01_LiveView.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/01_LiveView.png
--------------------------------------------------------------------------------
/docs/screenshots/02_NetworkAdmin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/02_NetworkAdmin.png
--------------------------------------------------------------------------------
/docs/screenshots/03_NtpAdmin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/03_NtpAdmin.png
--------------------------------------------------------------------------------
/docs/screenshots/04_MqttAdmin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/04_MqttAdmin.png
--------------------------------------------------------------------------------
/docs/screenshots/05_InverterAdmin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/05_InverterAdmin.png
--------------------------------------------------------------------------------
/docs/screenshots/06_DtuAdmin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/06_DtuAdmin.png
--------------------------------------------------------------------------------
/docs/screenshots/07_FirmwareUpgrade.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/07_FirmwareUpgrade.png
--------------------------------------------------------------------------------
/docs/screenshots/08_NetworkInfo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/08_NetworkInfo.png
--------------------------------------------------------------------------------
/docs/screenshots/09_NtpInfo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/09_NtpInfo.png
--------------------------------------------------------------------------------
/docs/screenshots/10_MqttInfo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/10_MqttInfo.png
--------------------------------------------------------------------------------
/docs/screenshots/11_SystemInfo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/11_SystemInfo.png
--------------------------------------------------------------------------------
/docs/screenshots/12_Eventlog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/12_Eventlog.png
--------------------------------------------------------------------------------
/docs/screenshots/13_InverterSettings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/13_InverterSettings.png
--------------------------------------------------------------------------------
/docs/screenshots/14_ConfigManagement.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/14_ConfigManagement.png
--------------------------------------------------------------------------------
/docs/screenshots/15_LimitSettings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/15_LimitSettings.png
--------------------------------------------------------------------------------
/docs/screenshots/16_PowerSettings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/16_PowerSettings.png
--------------------------------------------------------------------------------
/docs/screenshots/17_InverterInfo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/17_InverterInfo.png
--------------------------------------------------------------------------------
/docs/screenshots/18_Console.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/18_Console.png
--------------------------------------------------------------------------------
/docs/screenshots/19_Reboot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/19_Reboot.png
--------------------------------------------------------------------------------
/docs/screenshots/20_DeviceManager_Pin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/20_DeviceManager_Pin.png
--------------------------------------------------------------------------------
/docs/screenshots/21_DeviceManager_Display.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/21_DeviceManager_Display.png
--------------------------------------------------------------------------------
/docs/screenshots/22_Security.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/22_Security.png
--------------------------------------------------------------------------------
/docs/screenshots/23_Database.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/23_Database.png
--------------------------------------------------------------------------------
/docs/screenshots/README.md:
--------------------------------------------------------------------------------
1 | # OpenDTU Screenshots
2 |
3 | here are some screenshots of OpenDTU's web interface.
4 |
5 | ***
6 |
7 | 
8 |
9 | ***
10 |
11 | 
12 |
13 | ***
14 |
15 | 
16 |
17 | ***
18 |
19 | 
20 |
21 | ***
22 |
23 | 
24 |
25 | ***
26 |
27 | 
28 |
29 | ***
30 |
31 | 
32 |
33 | ***
34 |
35 | 
36 |
37 | ***
38 |
39 | 
40 |
41 | ***
42 |
43 | 
44 |
45 | ***
46 |
47 | 
48 |
49 | ***
50 |
51 | 
52 |
53 | ***
54 |
55 | 
56 |
57 | ***
58 |
59 | 
60 |
61 | ***
62 |
63 | 
64 |
65 | ***
66 |
67 | 
68 |
69 | ***
70 |
71 | 
72 |
73 | ***
74 |
75 | 
76 |
77 | ***
78 |
79 | 
80 |
81 | ***
82 |
83 | 
84 |
85 | ***
86 |
87 | 
88 |
89 | ***
90 |
91 | 
92 |
93 | ***
94 |
95 | 
96 |
--------------------------------------------------------------------------------
/docs/screenshots/Screenshot_2024-05-23_131208.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/RaBa64/OpenDTU-Database/88557e49d45c56dcb4cd5d83e6bea100410067ec/docs/screenshots/Screenshot_2024-05-23_131208.png
--------------------------------------------------------------------------------
/include/Display_Graphic_Diagram.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | #define MAX_DATAPOINTS 128
9 |
10 | class DisplayGraphicDiagramClass {
11 | public:
12 | DisplayGraphicDiagramClass();
13 |
14 | void init(Scheduler& scheduler, U8G2* display);
15 | void redraw(uint8_t screenSaverOffsetX, uint8_t xPos, uint8_t yPos, uint8_t width, uint8_t height, bool isFullscreen);
16 |
17 | void updatePeriod();
18 |
19 | private:
20 | void averageLoop();
21 | void dataPointLoop();
22 |
23 | uint32_t getSecondsPerDot();
24 |
25 | Task _averageTask;
26 | Task _dataPointTask;
27 |
28 | U8G2* _display = nullptr;
29 | std::array _graphValues = {};
30 | uint8_t _graphValuesCount = 0;
31 |
32 | uint8_t _chartWidth = MAX_DATAPOINTS;
33 |
34 | float _iRunningAverage = 0;
35 | uint16_t _iRunningAverageCnt = 0;
36 | };
37 |
--------------------------------------------------------------------------------
/include/I18n.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | struct LanguageInfo_t {
9 | String code;
10 | String name;
11 | String filename;
12 | };
13 |
14 | class I18nClass {
15 | public:
16 | I18nClass();
17 | void init(Scheduler& scheduler);
18 | std::list getAvailableLanguages();
19 | String getFilenameByLocale(const String& locale) const;
20 | void readDisplayStrings(
21 | const String& locale,
22 | String& date_format,
23 | String& offline,
24 | String& power_w, String& power_kw,
25 | String& yield_today_wh, String& yield_today_kwh,
26 | String& yield_total_kwh, String& yield_total_mwh);
27 |
28 | private:
29 | void readLangPacks();
30 | void readConfig(String file);
31 |
32 | std::list _availLanguages;
33 | };
34 |
35 | extern I18nClass I18n;
36 |
--------------------------------------------------------------------------------
/include/InverterSettings.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | #define INVERTER_UPDATE_SETTINGS_INTERVAL 60000l
8 |
9 | class InverterSettingsClass {
10 | public:
11 | InverterSettingsClass();
12 | void init(Scheduler& scheduler);
13 |
14 | private:
15 | void settingsLoop();
16 | void hoyLoop();
17 |
18 | Task _settingsTask;
19 | Task _hoyTask;
20 | };
21 |
22 | extern InverterSettingsClass InverterSettings;
23 |
--------------------------------------------------------------------------------
/include/Led_Single.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include "PinMapping.h"
5 | #include
6 | #include
7 |
8 | #define LEDSINGLE_UPDATE_INTERVAL 2000
9 |
10 | class LedSingleClass {
11 | public:
12 | LedSingleClass();
13 | void init(Scheduler& scheduler);
14 |
15 | void turnAllOff();
16 | void turnAllOn();
17 |
18 | private:
19 | void setLoop();
20 | void outputLoop();
21 |
22 | void setLed(const uint8_t ledNo, const bool ledState);
23 |
24 | Task _setTask;
25 | Task _outputTask;
26 |
27 | enum class LedState_t {
28 | On,
29 | Off,
30 | Blink,
31 | };
32 |
33 | LedState_t _ledMode[PINMAPPING_LED_COUNT];
34 | LedState_t _allMode;
35 | bool _ledStateCurrent[PINMAPPING_LED_COUNT];
36 | TimeoutHelper _blinkTimeout;
37 | };
38 |
39 | extern LedSingleClass LedSingle;
--------------------------------------------------------------------------------
/include/MessageOutput.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | #define BUFFER_SIZE 500
11 |
12 | class MessageOutputClass : public Print {
13 | public:
14 | MessageOutputClass();
15 | void init(Scheduler& scheduler);
16 | size_t write(uint8_t c) override;
17 | size_t write(const uint8_t* buffer, size_t size) override;
18 | void register_ws_output(AsyncWebSocket* output);
19 |
20 | private:
21 | void loop();
22 |
23 | Task _loopTask;
24 |
25 | AsyncWebSocket* _ws = nullptr;
26 | char _buffer[BUFFER_SIZE];
27 | uint16_t _buff_pos = 0;
28 | uint32_t _lastSend = 0;
29 | bool _forceSend = false;
30 |
31 | std::mutex _msgLock;
32 | };
33 |
34 | extern MessageOutputClass MessageOutput;
35 |
--------------------------------------------------------------------------------
/include/MqttHandleDtu.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class MqttHandleDtuClass {
8 | public:
9 | MqttHandleDtuClass();
10 | void init(Scheduler& scheduler);
11 |
12 | private:
13 | void loop();
14 |
15 | Task _loopTask;
16 | };
17 |
18 | extern MqttHandleDtuClass MqttHandleDtu;
19 |
--------------------------------------------------------------------------------
/include/MqttHandleInverterTotal.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 |
6 | class MqttHandleInverterTotalClass {
7 | public:
8 | MqttHandleInverterTotalClass();
9 | void init(Scheduler& scheduler);
10 |
11 | private:
12 | void loop();
13 |
14 | Task _loopTask;
15 | };
16 |
17 | extern MqttHandleInverterTotalClass MqttHandleInverterTotal;
18 |
--------------------------------------------------------------------------------
/include/MqttSettings.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include "NetworkSettings.h"
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | class MqttSettingsClass {
11 | public:
12 | MqttSettingsClass();
13 | void init();
14 | void performReconnect();
15 | bool getConnected();
16 | void publish(const String& subtopic, const String& payload);
17 | void publishGeneric(const String& topic, const String& payload, const bool retain, const uint8_t qos = 0);
18 |
19 | void subscribe(const String& topic, const uint8_t qos, const espMqttClientTypes::OnMessageCallback& cb);
20 | void unsubscribe(const String& topic);
21 |
22 | String getPrefix() const;
23 | String getClientId();
24 |
25 | private:
26 | void NetworkEvent(network_event event);
27 |
28 | void onMqttDisconnect(espMqttClientTypes::DisconnectReason reason);
29 | void onMqttConnect(const bool sessionPresent);
30 | void onMqttMessage(const espMqttClientTypes::MessageProperties& properties, const char* topic, const uint8_t* payload, const size_t len, const size_t index, const size_t total);
31 |
32 | void performConnect();
33 | void performDisconnect();
34 |
35 | void createMqttClientObject();
36 |
37 | MqttClient* _mqttClient = nullptr;
38 | Ticker _mqttReconnectTimer;
39 | MqttSubscribeParser _mqttSubscribeParser;
40 | std::mutex _clientLock;
41 | };
42 |
43 | extern MqttSettingsClass MqttSettings;
44 |
--------------------------------------------------------------------------------
/include/NtpSettings.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | class NtpSettingsClass {
5 | public:
6 | NtpSettingsClass();
7 | void init();
8 |
9 | void setServer();
10 | void setTimezone();
11 | };
12 |
13 | extern NtpSettingsClass NtpSettings;
--------------------------------------------------------------------------------
/include/PinMapping.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | #define PINMAPPING_FILENAME "/pin_mapping.json"
9 | #define PINMAPPING_LED_COUNT 2
10 |
11 | #define MAPPING_NAME_STRLEN 31
12 |
13 | struct PinMapping_t {
14 | char name[MAPPING_NAME_STRLEN + 1];
15 |
16 | int8_t nrf24_miso;
17 | int8_t nrf24_mosi;
18 | int8_t nrf24_clk;
19 | int8_t nrf24_irq;
20 | int8_t nrf24_en;
21 | int8_t nrf24_cs;
22 |
23 | int8_t cmt_clk;
24 | int8_t cmt_cs;
25 | int8_t cmt_fcs;
26 | int8_t cmt_gpio2;
27 | int8_t cmt_gpio3;
28 | int8_t cmt_sdio;
29 |
30 | int8_t w5500_mosi;
31 | int8_t w5500_miso;
32 | int8_t w5500_sclk;
33 | int8_t w5500_cs;
34 | int8_t w5500_int;
35 | int8_t w5500_rst;
36 |
37 | #if CONFIG_ETH_USE_ESP32_EMAC
38 | int8_t eth_phy_addr;
39 | bool eth_enabled;
40 | int eth_power;
41 | int eth_mdc;
42 | int eth_mdio;
43 | eth_phy_type_t eth_type;
44 | eth_clock_mode_t eth_clk_mode;
45 | #endif
46 |
47 | uint8_t display_type;
48 | uint8_t display_data;
49 | uint8_t display_clk;
50 | uint8_t display_cs;
51 | uint8_t display_reset;
52 |
53 | int8_t led[PINMAPPING_LED_COUNT];
54 | };
55 |
56 | class PinMappingClass {
57 | public:
58 | PinMappingClass();
59 | bool init(const String& deviceMapping);
60 | PinMapping_t& get();
61 |
62 | bool isValidNrf24Config() const;
63 | bool isValidCmt2300Config() const;
64 | bool isValidW5500Config() const;
65 | #if CONFIG_ETH_USE_ESP32_EMAC
66 | bool isValidEthConfig() const;
67 | #endif
68 |
69 | private:
70 | PinMapping_t _pinMapping;
71 | };
72 |
73 | extern PinMappingClass PinMapping;
74 |
--------------------------------------------------------------------------------
/include/README:
--------------------------------------------------------------------------------
1 |
2 | This directory is intended for project header files.
3 |
4 | A header file is a file containing C declarations and macro definitions
5 | to be shared between several project source files. You request the use of a
6 | header file in your project source file (C, C++, etc) located in `src` folder
7 | by including it, with the C preprocessing directive `#include'.
8 |
9 | ```src/main.c
10 |
11 | #include "header.h"
12 |
13 | int main (void)
14 | {
15 | ...
16 | }
17 | ```
18 |
19 | Including a header file produces the same results as copying the header file
20 | into each source file that needs it. Such copying would be time-consuming
21 | and error-prone. With a header file, the related declarations appear
22 | in only one place. If they need to be changed, they can be changed in one
23 | place, and programs that include the header file will automatically use the
24 | new version when next recompiled. The header file eliminates the labor of
25 | finding and changing all the copies as well as the risk that a failure to
26 | find one copy will result in inconsistencies within a program.
27 |
28 | In C, the usual convention is to give header files names that end with `.h'.
29 | It is most portable to use only letters, digits, dashes, and underscores in
30 | header file names, and at most one dot.
31 |
32 | Read more about using header files in official GCC documentation:
33 |
34 | * Include Syntax
35 | * Include Operation
36 | * Once-Only Headers
37 | * Computed Includes
38 |
39 | https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html
40 |
--------------------------------------------------------------------------------
/include/RestartHelper.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 |
6 | class RestartHelperClass {
7 | public:
8 | RestartHelperClass();
9 | void init(Scheduler& scheduler);
10 | void triggerRestart();
11 |
12 | private:
13 | void loop();
14 |
15 | Task _rebootTask;
16 | };
17 |
18 | extern RestartHelperClass RestartHelper;
19 |
--------------------------------------------------------------------------------
/include/Scheduler.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 |
6 | extern Scheduler scheduler;
--------------------------------------------------------------------------------
/include/SunPosition.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | class SunPositionClass {
9 | public:
10 | SunPositionClass();
11 | void init(Scheduler& scheduler);
12 |
13 | bool isDayPeriod() const;
14 | bool isSunsetAvailable() const;
15 | bool sunsetTime(struct tm* info) const;
16 | bool sunriseTime(struct tm* info) const;
17 | void setDoRecalc(const bool doRecalc);
18 |
19 | private:
20 | void loop();
21 | void updateSunData();
22 | bool checkRecalcDayChanged() const;
23 | bool getSunTime(struct tm* info, const uint32_t offset) const;
24 |
25 | Task _loopTask;
26 |
27 | bool _isSunsetAvailable = true;
28 | uint32_t _sunriseMinutes = 0;
29 | uint32_t _sunsetMinutes = 0;
30 |
31 | bool _isValidInfo = false;
32 | std::atomic_bool _doRecalc = true;
33 | uint32_t _lastSunPositionCalculatedYMD = 0;
34 | };
35 |
36 | extern SunPositionClass SunPosition;
37 |
--------------------------------------------------------------------------------
/include/Utils.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | class Utils {
9 | public:
10 | static uint32_t getChipId();
11 | static uint64_t generateDtuSerial();
12 | static int getTimezoneOffset();
13 | static bool checkJsonAlloc(const JsonDocument& doc, const char* function, const uint16_t line);
14 | static void removeAllFiles();
15 | static String generateMd5FromFile(String file);
16 | static void skipBom(File& f);
17 | };
18 |
--------------------------------------------------------------------------------
/include/W5500.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 | #include // required for esp_eth_handle_t
7 | #include
8 |
9 | #include
10 |
11 | class W5500 {
12 | private:
13 | explicit W5500(spi_device_handle_t spi, gpio_num_t pin_int);
14 |
15 | public:
16 | W5500(const W5500&) = delete;
17 | W5500& operator=(const W5500&) = delete;
18 | ~W5500();
19 |
20 | static std::unique_ptr setup(int8_t pin_mosi, int8_t pin_miso, int8_t pin_sclk, int8_t pin_cs, int8_t pin_int, int8_t pin_rst);
21 | String macAddress();
22 |
23 | private:
24 | static bool connection_check_spi(spi_device_handle_t spi);
25 | static bool connection_check_interrupt(gpio_num_t pin_int);
26 |
27 | esp_eth_handle_t eth_handle;
28 | esp_netif_t* eth_netif;
29 | };
30 |
--------------------------------------------------------------------------------
/include/WebApi_database.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | #define DATABASE_FILENAME "/database.bin"
9 |
10 | class WebApiDatabaseClass {
11 | public:
12 | WebApiDatabaseClass();
13 | void init(AsyncWebServer& server, Scheduler& scheduler);
14 | bool write(float energy);
15 |
16 | struct pvData {
17 | uint8_t tm_year;
18 | uint8_t tm_mon;
19 | uint8_t tm_mday;
20 | uint8_t tm_hour;
21 | float energy;
22 | };
23 |
24 | private:
25 | void onDatabase(AsyncWebServerRequest* request);
26 | void onDatabaseHour(AsyncWebServerRequest* request);
27 | void onDatabaseDay(AsyncWebServerRequest* request);
28 | static size_t readchunk(uint8_t* buffer, size_t maxLen, size_t index);
29 | static size_t readchunk_log(uint8_t* buffer, size_t maxLen, size_t index);
30 | static size_t readchunkHour(uint8_t* buffer, size_t maxLen, size_t index);
31 | static size_t readchunkDay(uint8_t* buffer, size_t maxLen, size_t index);
32 |
33 | AsyncWebServer* _server;
34 |
35 | Task _sendDataTask;
36 | void sendDataTaskCb();
37 | };
38 |
--------------------------------------------------------------------------------
/include/WebApi_device.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiDeviceClass {
8 | public:
9 | void init(AsyncWebServer& server, Scheduler& scheduler);
10 |
11 | private:
12 | void onDeviceAdminGet(AsyncWebServerRequest* request);
13 | void onDeviceAdminPost(AsyncWebServerRequest* request);
14 | };
15 |
--------------------------------------------------------------------------------
/include/WebApi_devinfo.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiDevInfoClass {
8 | public:
9 | void init(AsyncWebServer& server, Scheduler& scheduler);
10 |
11 | private:
12 | void onDevInfoStatus(AsyncWebServerRequest* request);
13 | };
14 |
--------------------------------------------------------------------------------
/include/WebApi_dtu.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiDtuClass {
8 | public:
9 | WebApiDtuClass();
10 | void init(AsyncWebServer& server, Scheduler& scheduler);
11 |
12 | private:
13 | void onDtuAdminGet(AsyncWebServerRequest* request);
14 | void onDtuAdminPost(AsyncWebServerRequest* request);
15 |
16 | Task _applyDataTask;
17 | void applyDataTaskCb();
18 | };
19 |
--------------------------------------------------------------------------------
/include/WebApi_eventlog.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiEventlogClass {
8 | public:
9 | void init(AsyncWebServer& server, Scheduler& scheduler);
10 |
11 | private:
12 | void onEventlogStatus(AsyncWebServerRequest* request);
13 | };
14 |
--------------------------------------------------------------------------------
/include/WebApi_file.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiFileClass {
8 | public:
9 | void init(AsyncWebServer& server, Scheduler& scheduler);
10 |
11 | private:
12 | void onFileGet(AsyncWebServerRequest* request);
13 | void onFileDelete(AsyncWebServerRequest* request);
14 | void onFileDeleteAll(AsyncWebServerRequest* request);
15 | void onFileListGet(AsyncWebServerRequest* request);
16 | void onFileUploadFinish(AsyncWebServerRequest* request);
17 | void onFileUpload(AsyncWebServerRequest* request, String filename, size_t index, uint8_t* data, size_t len, bool final);
18 | };
19 |
--------------------------------------------------------------------------------
/include/WebApi_firmware.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiFirmwareClass {
8 | public:
9 | void init(AsyncWebServer& server, Scheduler& scheduler);
10 |
11 | private:
12 | void onFirmwareUpdateFinish(AsyncWebServerRequest* request);
13 | void onFirmwareUpdateUpload(AsyncWebServerRequest* request, String filename, size_t index, uint8_t* data, size_t len, bool final);
14 | };
15 |
--------------------------------------------------------------------------------
/include/WebApi_gridprofile.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiGridProfileClass {
8 | public:
9 | void init(AsyncWebServer& server, Scheduler& scheduler);
10 |
11 | private:
12 | void onGridProfileStatus(AsyncWebServerRequest* request);
13 | void onGridProfileRawdata(AsyncWebServerRequest* request);
14 | };
15 |
--------------------------------------------------------------------------------
/include/WebApi_i18n.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiI18nClass {
8 | public:
9 | void init(AsyncWebServer& server, Scheduler& scheduler);
10 |
11 | private:
12 | void onI18nLanguages(AsyncWebServerRequest* request);
13 | void onI18nLanguage(AsyncWebServerRequest* request);
14 | };
15 |
--------------------------------------------------------------------------------
/include/WebApi_inverter.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiInverterClass {
8 | public:
9 | void init(AsyncWebServer& server, Scheduler& scheduler);
10 |
11 | private:
12 | void onInverterList(AsyncWebServerRequest* request);
13 | void onInverterAdd(AsyncWebServerRequest* request);
14 | void onInverterEdit(AsyncWebServerRequest* request);
15 | void onInverterDelete(AsyncWebServerRequest* request);
16 | void onInverterOrder(AsyncWebServerRequest* request);
17 | void onInverterStatReset(AsyncWebServerRequest* request);
18 | };
19 |
--------------------------------------------------------------------------------
/include/WebApi_limit.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiLimitClass {
8 | public:
9 | void init(AsyncWebServer& server, Scheduler& scheduler);
10 |
11 | private:
12 | void onLimitStatus(AsyncWebServerRequest* request);
13 | void onLimitPost(AsyncWebServerRequest* request);
14 | };
15 |
--------------------------------------------------------------------------------
/include/WebApi_maintenance.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiMaintenanceClass {
8 | public:
9 | void init(AsyncWebServer& server, Scheduler& scheduler);
10 |
11 | private:
12 | void onRebootPost(AsyncWebServerRequest* request);
13 | };
14 |
--------------------------------------------------------------------------------
/include/WebApi_mqtt.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiMqttClass {
8 | public:
9 | void init(AsyncWebServer& server, Scheduler& scheduler);
10 |
11 | private:
12 | void onMqttStatus(AsyncWebServerRequest* request);
13 | void onMqttAdminGet(AsyncWebServerRequest* request);
14 | void onMqttAdminPost(AsyncWebServerRequest* request);
15 | String getTlsCertInfo(const char* cert);
16 | };
17 |
--------------------------------------------------------------------------------
/include/WebApi_network.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiNetworkClass {
8 | public:
9 | void init(AsyncWebServer& server, Scheduler& scheduler);
10 |
11 | private:
12 | void onNetworkStatus(AsyncWebServerRequest* request);
13 | void onNetworkAdminGet(AsyncWebServerRequest* request);
14 | void onNetworkAdminPost(AsyncWebServerRequest* request);
15 | };
16 |
--------------------------------------------------------------------------------
/include/WebApi_ntp.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiNtpClass {
8 | public:
9 | void init(AsyncWebServer& server, Scheduler& scheduler);
10 |
11 | private:
12 | void onNtpStatus(AsyncWebServerRequest* request);
13 | void onNtpAdminGet(AsyncWebServerRequest* request);
14 | void onNtpAdminPost(AsyncWebServerRequest* request);
15 | void onNtpTimeGet(AsyncWebServerRequest* request);
16 | void onNtpTimePost(AsyncWebServerRequest* request);
17 | };
18 |
--------------------------------------------------------------------------------
/include/WebApi_power.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | class WebApiPowerClass {
8 | public:
9 | void init(AsyncWebServer& server, Scheduler& scheduler);
10 |
11 | private:
12 | void onPowerStatus(AsyncWebServerRequest* request);
13 | void onPowerPost(AsyncWebServerRequest* request);
14 | };
15 |
--------------------------------------------------------------------------------
/include/WebApi_prometheus.h:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | #pragma once
3 |
4 | #include
5 | #include
6 | #include
7 | #include