Skip to content
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

Added support for for Tauron ZE.314 used in Poland. #48

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/dsmr/fields.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,18 @@ constexpr char slave_valve_position::name_progmem[];
constexpr ObisId slave_delivered::id;
constexpr char slave_delivered::name_progmem[];

/* extra field for Tauron ZE.314 */
constexpr ObisId meter_time::id;
constexpr char meter_time::name[];

constexpr ObisId meter_date::id;
constexpr char meter_date::name[];

constexpr ObisId total_imported_inductive_reactive_energy::id;
constexpr char total_imported_inductive_reactive_energy::name[];

constexpr ObisId total_imported_capacitive_reactive_energy::id;
constexpr char total_imported_capacitive_reactive_energy::name[];

constexpr ObisId absolute_active_instantaneous_power::id;
constexpr char absolute_active_instantaneous_power::name[];
7 changes: 7 additions & 0 deletions src/dsmr/fields.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,13 @@ DEFINE_FIELD(slave_valve_position, uint8_t, ObisId(0, SLAVE_MBUS_ID, 24, 4, 0),
* E meter) (Note: 4.x spec has "hourly meter reading") */
DEFINE_FIELD(slave_delivered, TimestampedFixedValue, ObisId(0, SLAVE_MBUS_ID, 24, 2, 1), TimestampedFixedField, units::m3, units::dm3);

/* extra field for Tauron ZE.314 */
DEFINE_FIELD(meter_time, String, ObisId(1, 0, 0, 9, 1), StringField, 0, 8);
DEFINE_FIELD(meter_date, String, ObisId(1, 0, 0, 9, 2), StringField, 0, 8);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these strings always a fixed length? Then maybe it would be good to define a DateField and TimeField similar to the existing TimestampField (which is just a subclass of StringField, so it would work pretty much the same, but might be a bit more clear).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it looks like fixed length. OK, I will define DateField and TimeField.

DEFINE_FIELD(total_imported_inductive_reactive_energy, FixedValue, ObisId(1, 0, 5, 8, 0), FixedField, units::kvarh, units::kvarh);
DEFINE_FIELD(total_imported_capacitive_reactive_energy, FixedValue, ObisId(1, 0, 8, 8, 0), FixedField, units::kvarh, units::kvarh);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

units:kvarh is not defined yet, did you forget to commit that addition maybe?

Copy link

@SzczepanLeon SzczepanLeon Feb 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is my mistake with kvarh. It is fixed now.

My meter, ZE.314, from Tauron use EDIS codes, not OBIS, so part A-B: is missing.
So in my code I added to each line that 1-0: part. And with that change I can use DSMR parser. So telegram from my meter is useless for test purposes.

Maybe it could be good to add EDIS support to DSMR parser? I know it is not DSMR specyfic, but, It is best OBIS parser that I found.

DEFINE_FIELD(absolute_active_instantaneous_power, FixedValue, ObisId(1, 0, 15, 7, 0), FixedField, units::kW, units::W);

} // namespace fields

} // namespace dsmr
Expand Down