mhendriks / DSMR-API-V2

MIT License
14 stars 4 forks source link

Labels day/night tariff #1

Closed Draftdog closed 2 years ago

Draftdog commented 2 years ago

Hi @mhendriks,

When I connect to the dongle here at home I notice that the day and night tariffs have been switched, i.e. the values correspond to what I know are the opposite values. Briefly skimming through the source code only the translateFields property in edge/DSMRIndex.js would need to be updated. Not sure about other places though.

var translateFields = [
           [ "author",                    "Auteur" ]
          ,[ "identification",            "Slimme Meter ID" ]
          ,[ "timestamp",                 "Tijdcode" ]
          ,[ "p1_version",                "P1 Versie" ]
          ,[ "energy_delivered_tariff1",  "Energie Afgenomen teller 1 - Nacht" ]
          ,[ "energy_delivered_tariff2",  "Energie Afgenomen teller 2 - Dag" ]
          ,[ "energy_returned_tariff1",   "Energie Teruggeleverd teller 1 - Nacht" ]
          ,[ "energy_returned_tariff2",   "Energie Teruggeleverd teller 2 - Dag" ]

So in other words, on my device the tariff1 values correspond to the day tariffs.

Cheers -- Wouter

mhendriks commented 2 years ago

Wouter, T1 = night T2 = day

Think it is better to omit the day and night indication for EU usage. NL T1 = night

BE T2 = night