-
-
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
[modbus][sunspec] Support for SunSpec meters #7441
Conversation
This commit adds support for SunSpec compatible meters. They are auto discovered and handled as separate things even if they are part of another device. This is due to the nature of the SunSpec format wich also handles the different report types as different blocks. Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
Travis tests were successfulHey @mrbig, |
...nspec/src/main/java/org/openhab/binding/modbus/sunspec/internal/parser/MeterModelParser.java
Outdated
Show resolved
Hide resolved
...org.openhab.binding.modbus.sunspec/src/main/resources/ESH-INF/thing/meter-channel-groups.xml
Outdated
Show resolved
Hide resolved
.../org.openhab.binding.modbus.sunspec/src/main/resources/ESH-INF/thing/meter-channel-types.xml
Outdated
Show resolved
Hide resolved
.../org.openhab.binding.modbus.sunspec/src/main/resources/ESH-INF/thing/meter-channel-types.xml
Outdated
Show resolved
Hide resolved
.../org.openhab.binding.modbus.sunspec/src/main/resources/ESH-INF/thing/meter-channel-types.xml
Outdated
Show resolved
Hide resolved
Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
Travis tests were successfulHey @mrbig, |
...s.sunspec/src/main/java/org/openhab/binding/modbus/sunspec/internal/dto/MeterModelBlock.java
Outdated
Show resolved
Hide resolved
This way we could get rid of ~250 loc. Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
…decimal dots Some older installations of OpenHAB returned this values incorrectly Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
Travis tests were successfulHey @mrbig, |
Please note, I've included one more quick fix that technically reverts this change It caused problems when this bundle was run on OH 2.5.3 and I didn't want to risk the same issue in release. |
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
Thanks again for reviewing and merging this! |
* [sunspec] Support for SunSpec meters This commit adds support for SunSpec compatible meters. They are auto discovered and handled as separate things even if they are part of another device. This is due to the nature of the SunSpec format wich also handles the different report types as different blocks. * [sunspec] fixed file endings and missing unit declaration * [sunspec] meter block dto refactored This way we could get rid of ~250 loc. * [sunspec] make sure we don't fail if the address/block size contains decimal dots Some older installations of OpenHAB returned this values incorrectly Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu> Signed-off-by: Eugen Freiter <freiter@gmx.de>
* [sunspec] Support for SunSpec meters This commit adds support for SunSpec compatible meters. They are auto discovered and handled as separate things even if they are part of another device. This is due to the nature of the SunSpec format wich also handles the different report types as different blocks. * [sunspec] fixed file endings and missing unit declaration * [sunspec] meter block dto refactored This way we could get rid of ~250 loc. * [sunspec] make sure we don't fail if the address/block size contains decimal dots Some older installations of OpenHAB returned this values incorrectly Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
* [sunspec] Support for SunSpec meters This commit adds support for SunSpec compatible meters. They are auto discovered and handled as separate things even if they are part of another device. This is due to the nature of the SunSpec format wich also handles the different report types as different blocks. * [sunspec] fixed file endings and missing unit declaration * [sunspec] meter block dto refactored This way we could get rid of ~250 loc. * [sunspec] make sure we don't fail if the address/block size contains decimal dots Some older installations of OpenHAB returned this values incorrectly Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
* [sunspec] Support for SunSpec meters This commit adds support for SunSpec compatible meters. They are auto discovered and handled as separate things even if they are part of another device. This is due to the nature of the SunSpec format wich also handles the different report types as different blocks. * [sunspec] fixed file endings and missing unit declaration * [sunspec] meter block dto refactored This way we could get rid of ~250 loc. * [sunspec] make sure we don't fail if the address/block size contains decimal dots Some older installations of OpenHAB returned this values incorrectly Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu> Signed-off-by: CSchlipp <christian@schlipp.de>
* [sunspec] Support for SunSpec meters This commit adds support for SunSpec compatible meters. They are auto discovered and handled as separate things even if they are part of another device. This is due to the nature of the SunSpec format wich also handles the different report types as different blocks. * [sunspec] fixed file endings and missing unit declaration * [sunspec] meter block dto refactored This way we could get rid of ~250 loc. * [sunspec] make sure we don't fail if the address/block size contains decimal dots Some older installations of OpenHAB returned this values incorrectly Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
* [sunspec] Support for SunSpec meters This commit adds support for SunSpec compatible meters. They are auto discovered and handled as separate things even if they are part of another device. This is due to the nature of the SunSpec format wich also handles the different report types as different blocks. * [sunspec] fixed file endings and missing unit declaration * [sunspec] meter block dto refactored This way we could get rid of ~250 loc. * [sunspec] make sure we don't fail if the address/block size contains decimal dots Some older installations of OpenHAB returned this values incorrectly Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
* [sunspec] Support for SunSpec meters This commit adds support for SunSpec compatible meters. They are auto discovered and handled as separate things even if they are part of another device. This is due to the nature of the SunSpec format wich also handles the different report types as different blocks. * [sunspec] fixed file endings and missing unit declaration * [sunspec] meter block dto refactored This way we could get rid of ~250 loc. * [sunspec] make sure we don't fail if the address/block size contains decimal dots Some older installations of OpenHAB returned this values incorrectly Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
* [sunspec] Support for SunSpec meters This commit adds support for SunSpec compatible meters. They are auto discovered and handled as separate things even if they are part of another device. This is due to the nature of the SunSpec format wich also handles the different report types as different blocks. * [sunspec] fixed file endings and missing unit declaration * [sunspec] meter block dto refactored This way we could get rid of ~250 loc. * [sunspec] make sure we don't fail if the address/block size contains decimal dots Some older installations of OpenHAB returned this values incorrectly Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
* [sunspec] Support for SunSpec meters This commit adds support for SunSpec compatible meters. They are auto discovered and handled as separate things even if they are part of another device. This is due to the nature of the SunSpec format wich also handles the different report types as different blocks. * [sunspec] fixed file endings and missing unit declaration * [sunspec] meter block dto refactored This way we could get rid of ~250 loc. * [sunspec] make sure we don't fail if the address/block size contains decimal dots Some older installations of OpenHAB returned this values incorrectly Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu> Signed-off-by: Daan Meijer <daan@studioseptember.nl>
* [sunspec] Support for SunSpec meters This commit adds support for SunSpec compatible meters. They are auto discovered and handled as separate things even if they are part of another device. This is due to the nature of the SunSpec format wich also handles the different report types as different blocks. * [sunspec] fixed file endings and missing unit declaration * [sunspec] meter block dto refactored This way we could get rid of ~250 loc. * [sunspec] make sure we don't fail if the address/block size contains decimal dots Some older installations of OpenHAB returned this values incorrectly Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
This is the last of my PRs of the new modbus/sunspec binding. First PR is #6331. This is also a split of the legacy PR #4220
Related issue: #3216
This one introduces a new inverter type for smart meters. The specification handles 4 meter types, but they share a common dataset. The only difference is in that 2, 3 phase inverters use more registers.
As with the others I've organized the channels into channel group by phase, so the thing type descriptions could be simpler to maintain.
Raw data is first parsed by the MeterModelParser into simple (unitless) types, then MeterHandler scales them and matches them with the correct unit and channel.
Thank you