elster_meter
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
elster_meter [2020/12/23 13:30] – emozolyak | elster_meter [2022/01/15 20:54] (current) – ↷ Links adapted because of a move operation 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Electricity meters Elster ====== | ====== Electricity meters Elster ====== | ||
- | {{ :: | + | {{ network: |
Two models are supported with the help of [[custom_protocols? | Two models are supported with the help of [[custom_protocols? | ||
* A1170 | * A1170 | ||
* A1140 | * A1140 | ||
+ | There are custom protocol versions for 7bit Mediator devices. Turn to your local representative for more information. | ||
+ | |||
+ | <code lua - example.lua> | ||
+ | function poll_meter(port, | ||
+ | | ||
+ | local params = {voltage = | ||
+ | current = | ||
+ | a_power = | ||
+ | r_power = | ||
+ | total_pwr = {poll_t = {mbtcp_base = init_mb_addr + 40, code = " | ||
+ | cos_ = {poll_t = {mbtcp_base = init_mb_addr + 50, code = " | ||
+ | freq_ = | ||
+ | energy | ||
+ | } | ||
+ | | ||
+ | if (not Connect(port, | ||
+ | print(' | ||
+ | return ' | ||
+ | else | ||
+ | print(' | ||
+ | -- VOLTAGE READ | ||
+ | local all_read_flag = true | ||
+ | for k, p in pairs(params) do | ||
+ | if (k ~= ' | ||
+ | all_read_flag = all_read_flag and ReadStructure(port, | ||
+ | else | ||
+ | all_read_flag = all_read_flag and ReadEnergy(port, | ||
+ | end | ||
+ | end | ||
+ | | ||
+ | if all_read_flag then | ||
+ | print(' | ||
+ | return ' | ||
+ | else | ||
+ | | ||
+ | | ||
+ | end | ||
+ | disconnect(port) | ||
+ | end -- connect | ||
+ | end | ||
+ | </ |
elster_meter.1608730243.txt.gz · Last modified: 2020/12/23 13:30 by emozolyak