-
Notifications
You must be signed in to change notification settings - Fork 40
Disable "Invalid identification string" test #24
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
base: master
Are you sure you want to change the base?
Conversation
Disable "Invalid identification string" test as this prevents the code from working with devices that have a "9" instead of "3" or "5" as 4th character, but that work properly with the rest of the code.
…g-patch-1 Update parser.h
I don't know what a 3 or 5 means, neither do know what a 9 means, but I guess it will be safer to add 9 to the "allowed" list of values instead of removing all the checks at all, what do you think? Thanks |
Nice work! Apparently I'm not the only one that ran into these problems. Have a look at matthijskooijman#47 where the owner committed this PR (see matthijskooijman@ad23937. As your code (which is used as the base for ESPHome) is a fork of that code I want to ask you to commit my pull request. Another reasoning: what can be the downside of accepting my pull request? The check I propose to disable only checks on the value of position 'Z' (or 13) from within IEC 62056-21 specification which according to the standard should only allow 2400 baud ('3') or 9600 baud ('5') while the most common setting is 115200 baud. And the UART speed is controlled via ESPHome/DSMR settings. But for the code coming this far it must have been able to communicate and retrieve the ID string. So the baud settings must have been correct. There really is no added value in the validation that is done in this step :). |
I have a somewhat related issue, i'm trying to connect a Warmtelink from Vattenfall via ESPHome. But it seems the Warmte link is sending something that is non-complient:
|
#23 is an alternative version of this |
According to 13a in the spec posted above (#24 (comment)) that should mean that the warmtelink uses "mode A"? As I agree that removing the check makes sense as the value is not used for anything. Personally I would add a bit more details in the comments (this PR just comments out the code, the one in #23 removes code and all comments) but that is just my opinion as another random esphome user. |
The DSMR spec is based on mode D, and says to always use baud 115200 and that "This is not conforming to EN-IEC 62056-21 Mode D", so the DSMR spec is more relevant here. For DSMR 5 it also says that the number in the identifier should always be "5". So as far as I understand meters sending "9" or "-" are not following the standard. Some of the ones with "9" have been reported from meters used in some Swedish power grids. It is not standards compliant here either as the Swedish H1-port standard refers directly to the Dutch DSMR/P1 standard. (I am in Sweden but does not have a meter with this issue) Anyway the check still needs to be removed or be made optional to work with these meters. |
It's probably worth noting that this NWA-WARMTELINK unit is a device used to measure delivered hot water through a district heating grid, not the usual power meter. So it may not need to be compliant with DSMR, which might lead to a sloppy implementation. |
Disable "Invalid identification string" test as this prevents the code from working with devices that have a "9" instead of "3" or "5" as 4th character, but that work properly with the rest of the code.
See esphome/issues#6487 for more details