-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[smaenergymeter] Fix handling of broadcast frames #11718
Conversation
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/sma-energy-meter-binding-yields-unplausible-values/128180/6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thank you much!
...gymeter/src/main/java/org/openhab/binding/smaenergymeter/internal/packet/PacketListener.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.smaenergymeter/src/main/resources/OH-INF/thing/energyMeter.xml
Show resolved
Hide resolved
I've updated PR as there are some troubles with amount of changes I introduced. We're clearing issues out in forum topic mentioned earlier. |
9d0c4d5
to
0ab493c
Compare
@lsiepel None of review checklist mention empty method bodies, sets over lists. Use of primitives over complex types is subjective matter related to nullnes, which in above case when elements are mapped by config mapper, is not wrong. I probably could find dozen of such use cases in existing codebase, yet nobody fight with them. I'll fix the socket leak if I can. I won't touch nit picks. You decide whether you do for users, continuous improvement or continuous waiting. |
Tried to fix all comments by a uploading a commit to your repository but permissions are lacking. Could you allow me to perform a commit? |
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
I now have triage access, but no write access, could you check again, thanks. |
@lsiepel done, you should have write access now. |
Signed-off-by: Leo Siepel <leosiepel@gmail.com> Signed-off-by: Leo Siepel <leosiepel@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final comments
...va/org/openhab/binding/smaenergymeter/internal/discovery/SMAEnergyMeterDiscoveryService.java
Show resolved
Hide resolved
...src/main/java/org/openhab/binding/smaenergymeter/internal/handler/SMAEnergyMeterHandler.java
Outdated
Show resolved
Hide resolved
...gymeter/src/main/java/org/openhab/binding/smaenergymeter/internal/packet/PacketListener.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Only remains the question about usage of https://www.openhab.org/docs/developer/guidelines.html#e-runtime-behavior |
No answer? |
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Seems not, i changed it to As the configuration is extended with the poperty
I'll add a notice to the distro file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you @lsiepel for having considered all comments |
* Fix handling of broadcast frames for SMA meter openhab#11497. Added support for multiple meters in single multicast group openhab#3429. Signed-off-by: Łukasz Dywicki <luke@code-house.org> Co-authored-by: Leo Siepel <leosiepel@gmail.com>
* Fix handling of broadcast frames for SMA meter openhab#11497. Added support for multiple meters in single multicast group openhab#3429. Signed-off-by: Łukasz Dywicki <luke@code-house.org> Co-authored-by: Leo Siepel <leosiepel@gmail.com>
The smaenergymeter binding released in 4.2.0M3 shows a huge build up of UDP multicast frames, causing delays of up to half an hour between the real measurment and the reported value in openhab. The broadcast frames fix introduces clearly a new issue, keeping the bindung un-usable.
|
This will be clearly better to create a new issue. If not, your message could be simply not seen or forgotten in a short time. |
* Fix handling of broadcast frames for SMA meter openhab#11497. Added support for multiple meters in single multicast group openhab#3429. Signed-off-by: Łukasz Dywicki <luke@code-house.org> Co-authored-by: Leo Siepel <leosiepel@gmail.com> Signed-off-by: Paul Smedley <paul@smedley.id.au>
* Fix handling of broadcast frames for SMA meter openhab#11497. Added support for multiple meters in single multicast group openhab#3429. Signed-off-by: Łukasz Dywicki <luke@code-house.org> Co-authored-by: Leo Siepel <leosiepel@gmail.com> Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
* Fix handling of broadcast frames for SMA meter openhab#11497. Added support for multiple meters in single multicast group openhab#3429. Signed-off-by: Łukasz Dywicki <luke@code-house.org> Co-authored-by: Leo Siepel <leosiepel@gmail.com>
* Fix handling of broadcast frames for SMA meter openhab#11497. Added support for multiple meters in single multicast group openhab#3429. Signed-off-by: Łukasz Dywicki <luke@code-house.org> Co-authored-by: Leo Siepel <leosiepel@gmail.com>
SMA Energy Meter improvements
There are two outstanding issues which are closely related to how UDP traffic is handled by SMA energy meter binding.
This PR addresses both by separating several concerns into their own places, separating network communication from data parsing and port management. Starting point for fix were odd values reported by meter binding in #11497. Additionally it introduces support for handling of multiple meters requested in #3429 which is impossible prior provided fixes.
This work wouldn't be possible without amazing analysis made by Thomas: https://community.openhab.org/t/sma-energy-meter-binding-yields-unplausible-values/128180/4.