User Tools

Site Tools


elster_meter

Electricity meters Elster

Two models are supported with the help of custom protocols:

  • A1170
  • A1140

There are custom protocol versions for 7bit Mediator devices. Turn to your local representative for more information.

- example.lua
function poll_meter(port, conn_num, init_mb_addr) 
 
    local params = {voltage =   {poll_t = {mbtcp_base = init_mb_addr,      code = "1B2B4B00", count = 10, name = 'U'}},     
                    current =   {poll_t = {mbtcp_base = init_mb_addr + 10, code = "1A2A4A00", count = 9,  name = 'I'}}, 
                    a_power =   {poll_t = {mbtcp_base = init_mb_addr + 20, code = "1C2C4C0C", count = 12, name = 'P'}}, 
                    r_power =   {poll_t = {mbtcp_base = init_mb_addr + 30, code = "1D2D4D0D", count = 12, name = 'R'}}, 
                    total_pwr = {poll_t = {mbtcp_base = init_mb_addr + 40, code = "1E2E4E0E", count = 12, name = 'tp'}}, 
                    cos_ =      {poll_t = {mbtcp_base = init_mb_addr + 50, code = "13234303", count = 12, name = 'cos_'}},  
                    freq_ =     {poll_t = {mbtcp_base = init_mb_addr + 60, code = "18284800", count = 10, name = 'freq'}}, 
                    energy   =  {poll_t = {mbtcp_base = init_mb_addr + 70}}       
        }
 
    if (not Connect(port,  conn_num)) then 
        print('Could not make Connect!')
        return 'timeout' 
    else        
        print('Connected!')
                                                   -- VOLTAGE READ 
        local all_read_flag = true 
        for k, p in pairs(params) do 
            if (k ~= 'energy') then 
                all_read_flag = all_read_flag and ReadStructure(port, p.poll_t)  
            else 
                all_read_flag = all_read_flag and ReadEnergy(port, p.poll_t)  
            end 
        end 
 
        if all_read_flag then 
              print('read all!')
              return 'cached'
        else 
             dbg_state = 'voltageData was  not read...'
             return 'undefined' 
        end 
        disconnect(port)
    end -- connect 
end