wolffshots / phocus

Communication app to fetch data from an inverter over serial and output to mqtt
zlib License
4 stars 1 forks source link

Generalise port implementation for IP comms in addition to serial #60

Open wolffshots opened 4 weeks ago

wolffshots commented 4 weeks ago

This is in preparation for being able to run the app on a separate device to the one that actually communicates with the inverter. The goal is to be able to run this project on my main server with a more beefy system and higher reliability than a Raspberry Pi (which is how it is currently deployed) and replace the Pi with an ESP board running esphome-stream-server powered by the serial port directly rather than having to externally power the Pi.

Long term goal is to Dockerise the project (#59) and then I can work on improving efficiency further and implementing more robust healthchecks which can restart the project properly. Currently it just dispatches a command to restart the systemd service when certain issues are encountered.

codacy-production[bot] commented 4 weeks ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for aa2122d1c025b0cc0c5103870621793ee1776ebe[^1] :white_check_mark: 74.60%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (aa2122d1c025b0cc0c5103870621793ee1776ebe) | Report Missing | Report Missing | Report Missing | | | Head commit (2c59dd2a4a58eee1a832e065e884ff7371c5b4cc) | 869 | 680 | 78.25% | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#60) | 126 | 94 | **74.60%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more [^1]: Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

codecov[bot] commented 4 weeks ago

Codecov Report

Attention: Patch coverage is 71.54472% with 35 lines in your changes missing coverage. Please review.

Project coverage is 75.99%. Comparing base (84731ae) to head (2c59dd2). Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
main.go 17.14% 28 Missing and 1 partial :warning:
serial/serial.go 85.71% 4 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #60 +/- ## ========================================== - Coverage 82.14% 75.99% -6.15% ========================================== Files 10 12 +2 Lines 672 854 +182 ========================================== + Hits 552 649 +97 - Misses 109 189 +80 - Partials 11 16 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.