add some documentation for the use of the telegram as an object
This commit is contained in:
parent
a137ef0e02
commit
1b522fc7f0
65
README.rst
65
README.rst
@ -210,43 +210,40 @@ Accessing the telegrams information as attributes directly:
|
|||||||
telegram.CURRENT_ELECTRICITY_USAGE.unit
|
telegram.CURRENT_ELECTRICITY_USAGE.unit
|
||||||
Out[5]: 'kW'
|
Out[5]: 'kW'
|
||||||
|
|
||||||
The telegram object has an iterator, can be used to find all the elements in the current telegram:
|
The telegram object has an iterator, can be used to find all the information elements in the current telegram:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
for attr, value in telegram:
|
[attr for attr, value in telegram]
|
||||||
print(attr)
|
Out[11]:
|
||||||
|
['P1_MESSAGE_HEADER',
|
||||||
Out[7]:
|
'P1_MESSAGE_TIMESTAMP',
|
||||||
P1_MESSAGE_HEADER
|
'EQUIPMENT_IDENTIFIER',
|
||||||
P1_MESSAGE_TIMESTAMP
|
'ELECTRICITY_USED_TARIFF_1',
|
||||||
EQUIPMENT_IDENTIFIER
|
'ELECTRICITY_USED_TARIFF_2',
|
||||||
ELECTRICITY_USED_TARIFF_1
|
'ELECTRICITY_DELIVERED_TARIFF_1',
|
||||||
ELECTRICITY_USED_TARIFF_2
|
'ELECTRICITY_DELIVERED_TARIFF_2',
|
||||||
ELECTRICITY_DELIVERED_TARIFF_1
|
'ELECTRICITY_ACTIVE_TARIFF',
|
||||||
ELECTRICITY_DELIVERED_TARIFF_2
|
'CURRENT_ELECTRICITY_USAGE',
|
||||||
ELECTRICITY_ACTIVE_TARIFF
|
'CURRENT_ELECTRICITY_DELIVERY',
|
||||||
CURRENT_ELECTRICITY_USAGE
|
'LONG_POWER_FAILURE_COUNT',
|
||||||
CURRENT_ELECTRICITY_DELIVERY
|
'VOLTAGE_SAG_L1_COUNT',
|
||||||
LONG_POWER_FAILURE_COUNT
|
'VOLTAGE_SAG_L2_COUNT',
|
||||||
VOLTAGE_SAG_L1_COUNT
|
'VOLTAGE_SAG_L3_COUNT',
|
||||||
VOLTAGE_SAG_L2_COUNT
|
'VOLTAGE_SWELL_L1_COUNT',
|
||||||
VOLTAGE_SAG_L3_COUNT
|
'VOLTAGE_SWELL_L2_COUNT',
|
||||||
VOLTAGE_SWELL_L1_COUNT
|
'VOLTAGE_SWELL_L3_COUNT',
|
||||||
VOLTAGE_SWELL_L2_COUNT
|
'TEXT_MESSAGE_CODE',
|
||||||
VOLTAGE_SWELL_L3_COUNT
|
'TEXT_MESSAGE',
|
||||||
TEXT_MESSAGE_CODE
|
'DEVICE_TYPE',
|
||||||
TEXT_MESSAGE
|
'INSTANTANEOUS_ACTIVE_POWER_L1_POSITIVE',
|
||||||
DEVICE_TYPE
|
'INSTANTANEOUS_ACTIVE_POWER_L2_POSITIVE',
|
||||||
INSTANTANEOUS_ACTIVE_POWER_L1_POSITIVE
|
'INSTANTANEOUS_ACTIVE_POWER_L3_POSITIVE',
|
||||||
INSTANTANEOUS_ACTIVE_POWER_L2_POSITIVE
|
'INSTANTANEOUS_ACTIVE_POWER_L1_NEGATIVE',
|
||||||
INSTANTANEOUS_ACTIVE_POWER_L3_POSITIVE
|
'INSTANTANEOUS_ACTIVE_POWER_L2_NEGATIVE',
|
||||||
INSTANTANEOUS_ACTIVE_POWER_L1_NEGATIVE
|
'INSTANTANEOUS_ACTIVE_POWER_L3_NEGATIVE',
|
||||||
INSTANTANEOUS_ACTIVE_POWER_L2_NEGATIVE
|
'EQUIPMENT_IDENTIFIER_GAS',
|
||||||
INSTANTANEOUS_ACTIVE_POWER_L3_NEGATIVE
|
'HOURLY_GAS_METER_READING']
|
||||||
EQUIPMENT_IDENTIFIER_GAS
|
|
||||||
HOURLY_GAS_METER_READING
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
|
Loading…
Reference in New Issue
Block a user