-
Notifications
You must be signed in to change notification settings - Fork 63
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
Refactor of name mapping, added E.ON Hungary #137
Conversation
This reverts commit 0ce469d.
object["value_parser"] | ||
for object in v5_objects | ||
if object["obis_reference"] == obis_references.DEVICE_TYPE | ||
][0] |
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.
Ah right, here we don't have the key anymore. I don't think we really need one, but we could reintroduce it by structuring it like so:
{
obis.EQUIPMENT_IDENTIFIER:
{
'value_parser': CosemParser(ValueParser(str)),
'value_name': 'EQUIPMENT_IDENTIFIER'
},
But im fine with leaving it like this. The advantage is that we don't have a single dict structure where keys can conflict
Thats a lot of refactoring! Thanks for the hard work. I've looked through it and i don't see anything to comment on. Did you want to add anything or can we merge the changes? If so, i will do so on a later time |
I think its fine, and it can be merged. Thank you for this repo and your work! :) |
I've put your changes in 1.3.0 (https://pypi.org/project/dsmr-parser/) thanks again! |
'checksum_support': True, | ||
'objects': { | ||
obis.P1_MESSAGE_TIMESTAMP: CosemParser(ValueParser(timestamp)), | ||
obis.LUXEMBOURG_EQUIPMENT_IDENTIFIER: CosemParser(ValueParser(str)), # "COSEM logical equipment name" | ||
obis.EQUIPMENT_IDENTIFIER_GAS: CosemParser(ValueParser(str)), # This obis is already defined, so it is not possible to "rename" it to "EQUIPMENT_SERIAL_NUMBER" | ||
obis.ELECTRICITY_ACTIVE_TARIFF: CosemParser(ValueParser(str)), | ||
obis.EON_HU_CIRCUIT_BREAKER_STATUS: CosemParser(ValueParser(str)), # Does not show up always | ||
obis.ACTUAL_SWITCH_POSITION: CosemParser(ValueParser(str)), # This seems to be wrong in documentation, it's not 0-0:96.50.68, but 0-0:96.3.10 |
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.
Might be manufacturer specific. At least one instance of Sanxing SX631 (S34U18) follows the documentation: 0-0:96.50.68(ON)
#136
So let's try it again :)
Follow up of #134 and #136
Notes: