Pull requests welcome, see issues or Docs: Roadmap.
- Windows 11
- Visual Studio 2022
- Microsoft Visual Studio Installer Projects 2022 to build the installer project into an MSI.
Configure these:
- GoodWeFileReader input (for debugging)
- CSV output (for debugging, broken, might finish later for reporting to documents folder? For taxes and stuff)
The console, using (beta) System.CommandLine
can do the following things, for testing/debugging/force-syncing without having to run the whole service loop:
PVBridge.exe sync 2020-12-22
PVBridge.exe sync # Live status
PVBridge.exe sync 2021-06-01[T15:15] 2021-06-09
See CodeCaster.PVBridge.Service.CommandLine
.
These are the main parts of the application.
src/CodeCaster.PVBridge.Logic/InputToOutputLoop.cs
Main loop of the logic that determines the current status of the service (a shutdown is actually kindof a hibernate on Windows 10 and up), continues where it left off to sync the possible backlog of data.
src/CodeCaster.PVBridge.Logic/InputToOutputLoopStatus.cs
Bookkeeping for where we are.
src/CodeCaster.PVBridge.Logic/InputToOutputWriter.cs
Reads from inputs, writes to outputs.
A "Snapshot" contains realtime system info, such as power, temperature and cumulative generation (Wh) at the moment of taking the snapshot.
An "DaySummary" is a the summary of data of a given day, like total power generated.
Set as Startup Projcet: CodeCaster.PVBridge.Service.
Then hit F5 to run it as a service (as long as it says "commandLineArgs": "service run"
in Properties/launchSettings.json
).
- Run the Configuration UI, or
- Have a configuration file in "C:\ProgramData\PVBridge\PVBridge.AccountConfig.json".
- Close the Services MSC.
- From an elevated command prompt, execute:
sc delete PVBridge
.
Peculiarity: when the inverter loses its internet connection, it aggregates its data internally for each five minute block and uploads it when connectivity is restored. This is however not rounded on 5 minutes, but can be :01, :06, :11 and so on.
- Build the solution in release.
- Rebuild the Installer project.
- When rebuilding a new MSI with the same version, uninstall the old one first or it won't install.
- Navigate to
src\CodeCaster.PVBridge.Installer\Release
. - Rename
CodeCaster.PVBridge.Installer.msi
toPVBridge.1.2.3.msi
. - Test upgrade, uninstall, reinstall.
- Push tag, wait for release.
- Upload msi to release.
- TODO: automate.