0.0
No commit activity in last 3 years
No release in over 3 years
Ruby interface to the EKM Omnimeter Pulse
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 10.2
~> 2.14

Runtime

~> 1.1
 Project Readme

ekm-omnimeter

This ruby gem provides an interface to EKM Omnimeter Pulse meters that are connected to a EKM iSerial TCP/IP Ethernet to RS-485 Serial Converter.

EKM Metering offers a range of digital utility metering and control devices, including the Omnimeter Pulse Meter line of smart meters. The Omnimeter Pulse Meter contains a revenue-grade universal kWh power meter, three pulse counting inputs for water and/or gas metering, and 2 controllable 50 mA at 12 volts relay outputs that can toggle 120v circuits when connected to their EKM Switch120 power cord.

TODO:

  • Add specs
  • Add daemon to monitor meter's output at regular intervals

Requirements

Contact, feedback and bugs

This interface was not developed or reviewed by EKM Metering. They bare no responsibility for its quality, performance, or results. Use at your own risk.

Please file bugs / issues and feature requests on the issue tracker

Install

gem install ekm-omnimeter

Examples

require 'ekm-omnimeter'

# Connect to the meter
m = EkmOmnimeter::Meter.new(
  :power_configuration => :single_phase_3wire,  # Valid values are  :single_phase_2wire, :single_phase_3wire, :three_phase_3wire, :three_phase_4wire
  :meter_number=>300000001,                     # Your nine digit meter id
  :remote_address=>'192.168.1.125',             # The IP address of your iSerial device
  :remote_port => 50000)                        # The port on which your iSerial device is listening

# These values change based on the value of :power_configuration in the constructor
m.meter_number			    # 000300000234
m.remote_address		    # 192.168.0.125
m.remote_port			    # 50000
m.volts			            # 248.7
m.amps			            # 21.6
m.watts			            # 2664

# Read meter values
m.meter_timestamp	        # 2014-04-04 12:48:06
m.last_read_timestamp	    # 2014-04-04 12:48:17 -0400
m.remote_address            # 192.168.1.125
m.remote_port               # 50000
m.meter_number              # 000300000001
m.address					# 000300000001
m.total_kwh					# 4583.51
m.total_forward_kwh			# 4507.610000000001
m.total_reverse_kwh			# 75.9
m.net_kwh					# 4431.710000000001
m.total_kwh_t1				# 2826.64
m.total_kwh_t2				# 1756.87
m.total_kwh_t3				# 0.0
m.total_kwh_t4				# 0.0
m.reverse_kwh_t1			# 47.93
m.reverse_kwh_t2			# 27.97
m.reverse_kwh_t3			# 0.0
m.reverse_kwh_t4			# 0.0
m.volts_l1					# 123.9
m.volts_l2					# 124.8
m.volts_l3					# 0.0
m.amps_l1					# 18.4
m.amps_l2					# 3.2
m.amps_l3					# 0.0
m.watts_l1					# 2276
m.watts_l2					# 384
m.watts_l3					# 0
m.watts_total				# 2664
m.power_factor_1	        #  1.0
m.power_factor_2	        # C0.99
m.power_factor_3	        # C0.0
m.maximum_demand			# 22640.0
m.maximum_demand_period		# 15        (in minutes, can be 15, 30 or 60)
m.ct_ratio					# 400
m.pulse_1_count				# 3
m.pulse_1_ratio				# 1000
m.pulse_2_count				# 6
m.pulse_2_ratio				# 3
m.pulse_3_count				# 0
m.pulse_3_ratio				# 1000
m.reactive_kwh_kvarh		# 812.63
m.total_kwh_l1				# 2165.46
m.total_kwh_l2				# 2417.42
m.total_kwh_l3				# 0.0
m.reverse_kwh_l1			# 0.0
m.reverse_kwh_l2			# 75.9
m.reverse_kwh_l3			# 0.0
m.resettable_total_kwh		# 4583.51
m.resettable_reverse_kwh	# 75.9
m.reactive_power_1			# 24
m.reactive_power_2			# 60
m.reactive_power_3			# 0
m.total_reactive_power		# 84
m.frequency					# 60.04
m.pulse_1_input				# low
m.pulse_2_input				# high
m.pulse_3_input				# high
m.current_direction_l1	    # forward
m.current_direction_l2	    # forward
m.current_direction_l3	    # forward
m.output_1		   	   	   	# off
m.output_2		   	   	   	# off
m.kwh_data_decimal_places	# 2
m.auto_reset_max_demand	    # off
m.settable_pulse_per_kwh_ratio	# 800

Special Thanks

  • EKM Metering - for an awesome piece of hardware
  • Ian Duggan - for introducing me to ruby