Documentation
¶
Index ¶
- Constants
- type DataObject
- type Telegram
- func (t Telegram) ActualElectricityPowerDelivered() (string, bool)
- func (t Telegram) ActualElectricityPowerReceived() (string, bool)
- func (t Telegram) InstantaneousCurrentL1() (string, bool)
- func (t Telegram) InstantaneousCurrentL2() (string, bool)
- func (t Telegram) InstantaneousCurrentL3() (string, bool)
- func (t Telegram) InstantaneousVoltageL1() (string, bool)
- func (t Telegram) InstantaneousVoltageL2() (string, bool)
- func (t Telegram) InstantaneousVoltageL3() (string, bool)
- func (t Telegram) MeterReadingElectricityDeliveredByClientTariff1() (string, bool)
- func (t Telegram) MeterReadingElectricityDeliveredByClientTariff2() (string, bool)
- func (t Telegram) MeterReadingElectricityDeliveredToClientTariff1() (string, bool)
- func (t Telegram) MeterReadingElectricityDeliveredToClientTariff2() (string, bool)
- func (t Telegram) MeterReadingGasDeliveredToClient(channel int) (string, bool)
- func (t Telegram) NumberOfLongPowerFailuresInAnyPhase() (string, bool)
- func (t Telegram) NumberOfPowerFailuresInAnyPhase() (string, bool)
- func (t Telegram) NumberOfVoltageSagsInPhaseL1() (string, bool)
- func (t Telegram) NumberOfVoltageSagsInPhaseL2() (string, bool)
- func (t Telegram) NumberOfVoltageSagsInPhaseL3() (string, bool)
- func (t Telegram) NumberOfVoltageSwellsInPhaseL1() (string, bool)
- func (t Telegram) NumberOfVoltageSwellsInPhaseL2() (string, bool)
- func (t Telegram) NumberOfVoltageSwellsInPhaseL3() (string, bool)
- func (t Telegram) PowerFailureEventLog() (string, bool)
- func (t Telegram) TariffIndicatorElectricity() (string, bool)
- func (t Telegram) TextMessage() (string, bool)
Constants ¶
const DateTimeFormat = "060102150405"
DateTimeFormat used in a telegram in the YYMMDDhhmmssX format. The ASCII presentation of timestamp with Year, Month, Day, Hour, Minute, Second, and an indication whether DST is active (X=S) or DST is not active (X=W).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataObject ¶
type DataObject struct { OBIS string // OBIS reduced ID-code Timestamp string Value string Unit string }
DataObject represent data object and it's reference to the OBIS as defined in EN-EN-IEC 62056-61:2002 Electricity metering – Data exchange for meter reading, tariff and load control – Part 61: OBIS Object Identification System.
func ParseDataObject ¶
func ParseDataObject(do string) (DataObject, error)
ParseDataObject will parse a single line into a DataObject.
type Telegram ¶
type Telegram struct { Header string Version string // Version information for P1 output. DateTime time.Time // Date-time stamp of the P1 message. DataObjects map[string]DataObject }
Telegram represent a single DSMR P1 message.
func ParseTelegram ¶
ParseTelegram will parse the DSMR telegram.
func (Telegram) ActualElectricityPowerDelivered ¶
ActualElectricityPowerDelivered returns the actual electricity power delivered (+P) in 1 Watt resolution.
func (Telegram) ActualElectricityPowerReceived ¶
ActualElectricityPowerReceived returns the actual electricity power received (-P) in 1 Watt resolution.
func (Telegram) InstantaneousCurrentL1 ¶
InstantaneousCurrentL1 returns the instantaneous current L1 in A resolution.
func (Telegram) InstantaneousCurrentL2 ¶
InstantaneousCurrentL2 returns the instantaneous current L2 in A resolution.
func (Telegram) InstantaneousCurrentL3 ¶
InstantaneousCurrentL3 returns the instantaneous current L3 in A resolution.
func (Telegram) InstantaneousVoltageL1 ¶
InstantaneousVoltageL1 returns the instantaneous voltage L1 in V resolution.
func (Telegram) InstantaneousVoltageL2 ¶
InstantaneousVoltageL2 returns the instantaneous voltage L3 in V resolution.
func (Telegram) InstantaneousVoltageL3 ¶
InstantaneousVoltageL3 returns the instantaneous voltage L3 in V resolution.
func (Telegram) MeterReadingElectricityDeliveredByClientTariff1 ¶
MeterReadingElectricityDeliveredByClientTariff1 returns the meter reading electricity delivered by client (Tariff 1) in 0,001 kWh.
func (Telegram) MeterReadingElectricityDeliveredByClientTariff2 ¶
MeterReadingElectricityDeliveredByClientTariff2 returns the meter reading electricity delivered by client (Tariff 2) in 0,001 kWh.
func (Telegram) MeterReadingElectricityDeliveredToClientTariff1 ¶
MeterReadingElectricityDeliveredToClientTariff1 returns the meter reading electricity delivered to client (Tariff 1) in 0,001 kWh.
func (Telegram) MeterReadingElectricityDeliveredToClientTariff2 ¶
MeterReadingElectricityDeliveredToClientTariff2 returns the meter reading electricity delivered to client (Tariff 2) in 0,001 kWh.
func (Telegram) MeterReadingGasDeliveredToClient ¶
MeterReadingGasDeliveredToClient returns the meter reading gas delivered to client in m3 with a mm3 resolution for the gas meter that is installed on the given channel.
func (Telegram) NumberOfLongPowerFailuresInAnyPhase ¶
NumberOfLongPowerFailuresInAnyPhase returns the number of power failures in any phase.
func (Telegram) NumberOfPowerFailuresInAnyPhase ¶
NumberOfPowerFailuresInAnyPhase returns the number of power failures in any phase.
func (Telegram) NumberOfVoltageSagsInPhaseL1 ¶
NumberOfVoltageSagsInPhaseL1 returns the number of voltage sags in phase L1.
func (Telegram) NumberOfVoltageSagsInPhaseL2 ¶
NumberOfVoltageSagsInPhaseL2 returns the number of voltage sags in phase L2.
func (Telegram) NumberOfVoltageSagsInPhaseL3 ¶
NumberOfVoltageSagsInPhaseL3 returns the number of voltage sags in phase L3.
func (Telegram) NumberOfVoltageSwellsInPhaseL1 ¶
NumberOfVoltageSwellsInPhaseL1 returns the number of voltage swells in phase L1.
func (Telegram) NumberOfVoltageSwellsInPhaseL2 ¶
NumberOfVoltageSwellsInPhaseL2 returns the number of voltage swells in phase L2.
func (Telegram) NumberOfVoltageSwellsInPhaseL3 ¶
NumberOfVoltageSwellsInPhaseL3 returns the number of voltage swells in phase L3.
func (Telegram) PowerFailureEventLog ¶
TODO update regex so it will match:
None: 1-0:99.97.0() Two: 1-0:99.97.0(2)(0-0:96.7.19)(101208152415W)(0000000240*s)(101208151004W)(0000000301*s)
PowerFailureEventLog returns the power failure event log (long power failures).
func (Telegram) TariffIndicatorElectricity ¶
TariffIndicatorElectricity returns the tariff indicator that can be used to switch tariff dependent loads e.g. boilers.
func (Telegram) TextMessage ¶
TextMessage returns text message of max 1024 characters.