Skip to content

Commit

Permalink
prep release
Browse files Browse the repository at this point in the history
  • Loading branch information
dj-nitehawk committed Jul 4, 2024
1 parent f59b4ee commit 0248aa7
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.x
dotnet-version: 8.x

- name: Publish Binaries
working-directory: src/Server
Expand Down
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

---

This application allows you to monitor most chinese hybrid inverters such as `sako, epever, easun, mpp, voltronic, axpert, etc.` in realtime via USB port as an alternative to the wifi kit/module and cloud based apps such as smartess, watchpower, smartclient, etc. which can be at times unreliable.
This application allows you to monitor chinese hybrid inverters such as `MPPSolar, Epever, Must,, Easun, Voltronic Axpert, etc.` in realtime via USB/Serial port as an alternative to the wifi module and cloud based apps such as SmartESS, Watchpower, Smartclient, etc. which can be at times unreliable.

For this to work, you need to connect a linux computer such as a raspberry/orange pi or any other linux computer to the inverter via USB cable. Windows will not work due to the non-existence of a working device driver.
For this to work, you need to connect a linux computer such as a raspberry/orange pi or any other linux computer to the inverter via USB/Serial cable. Windows will not work due to the non-existence of a working device driver.

Once your inverter is connected via USB, a new device path should appear in `/dev/hidraw0`. Once that's available and if your inverter supports the **Voltronic** communication protocol, all you have to do is execute the `InverterMon.Server` executable. The the binaries can be downloaded from the [releases section](https://github.com/dj-nitehawk/Hybrid-Inverter-Monitor/releases). Make sure to choose the correct architecture (x64/arm) for your machine.
Once your inverter is connected via a data cable, a new device path should appear either in `/dev/hidrawX` or `/dev/ttyUSBX`. Once that's available and if your inverter supports the **Voltronic** communication protocol, all you have to do is execute the `InverterMon.Server` executable. The binaries can be downloaded from the [releases section](https://github.com/dj-nitehawk/Hybrid-Inverter-Monitor/releases). Make sure to choose the correct architecture (x64/arm) for your machine.

After the application has started successfully, you can simply open up a web browser and navigate to `http://ip.address.of.machine` to see the dashboard. It may take up to 5 seconds for the data to show up initially.

If you have a firewall, please open port `80` to facilitate communication.

In order to make the application/server automatically start at bootup, follow the below procedure to create a `systemd` service.
In order to make the application/server automatically start at boot, follow the below procedure to create a `systemd` service.

# Auto Start Configuration Steps

Expand All @@ -24,9 +24,11 @@ open the following file (or the correct one for your OS):

add the following text to the end:
```
KERNEL=="hidraw0", SYMLINK="hidraw0", TAG+="systemd"
KERNEL=="ttyUSB1", SYMLINK="ttyUSB1", TAG+="systemd"
```

if your device is mounted as a **hidraw** device, change the value above to `hidrawX`.

create a new file for the service

`sudo nano /etc/systemd/system/invertermon.service`
Expand All @@ -35,7 +37,9 @@ copy/paste the following:
```ini
[Unit]
Description=Hybrid Inverter Monitor
After=dev-hidraw0.device

#change here if device is hidraw
After=dev-ttyUSB1.device

[Service]
Type=simple
Expand Down Expand Up @@ -64,12 +68,12 @@ restart the machine to check if the service was configured correctly.
# JK BMS Support
If you have a JK BMS + JK RS485 adapter + USB->TTL adapter, simply wire them up correctly and plug it in to the computer.
The app will try to connect to the BMS via serial port by default at address `/dev/ttyUSB0`.
If your USB->TTL device is mounted at a different device path, simply upate the `appsettings.json` file with the correct path like so:
If your USB->TTL device is mounted at a different device path, simply update the `appsettings.json` file with the correct path like so:
```json
{
"LaunchSettings": {
"JkBmsAddress": "/dev/ttyUSB1",
"JkBmsAddress": "/dev/ttyUSB1"
}
}
```
<img src="jk-screenshot.png"/>
<img src="jk-screenshot.png"/>
34 changes: 17 additions & 17 deletions src/Server/Properties/PublishProfiles/FolderProfile.pubxml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<DeleteExistingFiles>true</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>x64</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>D:\DOWNLOADS\invertermon</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish/>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
<ProjectGuid>b608f59f-4c72-43fd-820c-a0badf4591af</ProjectGuid>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<PropertyGroup>
<DeleteExistingFiles>true</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>x64</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>D:\DOWNLOADS\invertermon</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
<ProjectGuid>b608f59f-4c72-43fd-820c-a0badf4591af</ProjectGuid>
<SelfContained>true</SelfContained>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>false</PublishTrimmed>
</PropertyGroup>
</Project>
6 changes: 4 additions & 2 deletions src/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## changelog
- revert pre-allocating of pv graph
- cache charge ampere values on first call and prevent refetching from inverter

- reduce jk bms charge ampere value cache size for faster updates
- upgrade project to .net 8
- misc. minor code refactors

0 comments on commit 0248aa7

Please sign in to comment.