From 16f09202fb61b85b1c50f7bccfc8419e718b5f9c Mon Sep 17 00:00:00 2001 From: PolarGoose <35307286+PolarGoose@users.noreply.github.com> Date: Tue, 2 Dec 2025 20:56:49 +0100 Subject: [PATCH] Improve Readme: * Add a reference to PlatformIO package * Improve "How to work with the code" section Improve `build-win.ps1` script: * Add `-SkipAutomaticLocation` flag to `Launch-VsDevShell.ps1` to not change the current directory. --- README.md | 11 +++++------ build-win.ps1 | 8 ++++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ae8936b..e57d7b5 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Note: [dlms_packet_decryptor.h](https://github.com/esphome-libs/dsmr_parser/blob ## Usage from PlatformIO The library is available on the PlatformIO registry:
-**TODO: configure deployment to PlatformIO ** +[esphome/dsmr_parser](https://registry.platformio.org/libraries/esphome/dsmr_parser) # Examples * How to use the parser @@ -36,8 +36,6 @@ The library is available on the PlatformIO registry:
[matthijskooijman](https://github.com/matthijskooijman) is the original creator of this DSMR parser. [glmnet](https://github.com/glmnet) and [zuidwijk](https://github.com/zuidwijk) continued work on this parser in the fork [glmnet/arduino-dsmr](https://github.com/glmnet/arduino-dsmr). They used the parser to create [ESPHome DSMR](https://esphome.io/components/sensor/dsmr/) component. After that, the work on the `arduino-dsmr` parser stopped. -Since then, some issues and unmerged pull requests have accumulated. Additionally, the dependency on the Arduino framework causes various issues for some ESP32 boards. -This fork addresses the existing issues and makes the parser usable on any platform. ## The reasons `dsmr_parser` fork was created * Dependency on the Arduino framework limits the applicability of this parser. For example, it is not possible to use it on Linux. @@ -46,9 +44,10 @@ This fork addresses the existing issues and makes the parser usable on any platf * Lack of support for encrypted DSMR messages. # How to work with the code -* You can open the code using any IDE that supports CMake. - * `build-windows.ps1` script needs `Visual Studio 2022` to be installed. - * `build-linux.sh` script needs `clang` to be installed. +* You can open the code using any IDE that supports CMake. It will allow you to modify the code and run the tests. +* Notes if you want to run the build scripts: + * `build-win.ps1` needs `Visual Studio` to be installed. + * `build-linux.sh` needs `clang` to be installed. # References * [DSMR parser in Python](https://github.com/ndokter/dsmr_parser/tree/master) - alternative DSMR parser implementation in Python. diff --git a/build-win.ps1 b/build-win.ps1 index f5885c8..91e9e85 100644 --- a/build-win.ps1 +++ b/build-win.ps1 @@ -46,14 +46,14 @@ Info "Find Visual Studio installation path" $vswhereCommand = Get-Command -Name "${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" $installationPath = & $vswhereCommand -prerelease -latest -property installationPath -Info "Open Visual Studio 2022 Developer PowerShell amd64" -& "$installationPath\Common7\Tools\Launch-VsDevShell.ps1" -Arch amd64 +Info "Open Visual Studio Developer PowerShell amd64" +& "$installationPath\Common7\Tools\Launch-VsDevShell.ps1" -SkipAutomaticLocation -Arch amd64 BuildAndTest -buildType Debug -arch amd64 BuildAndTest -buildType Release -arch amd64 -Info "Open Visual Studio 2022 Developer PowerShell x86" -& "$installationPath\Common7\Tools\Launch-VsDevShell.ps1" -Arch x86 +Info "Open Visual Studio Developer PowerShell x86" +& "$installationPath\Common7\Tools\Launch-VsDevShell.ps1" -SkipAutomaticLocation -Arch x86 BuildAndTest -buildType Debug -arch x86 BuildAndTest -buildType Release -arch x86