Skip to content

Commit

Permalink
Merge branch 'master' into fix/eastron-config-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinying committed Dec 17, 2024
2 parents 4d448b0 + be8b4b3 commit f44bdbf
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 5 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [1.4.0](https://github.com/gavinying/modpoll/compare/v1.3.3...v1.4.0) (2024-11-15)


### Features

* Add example config for Eastron SDM120 ([#72](https://github.com/gavinying/modpoll/issues/72)) ([2dde6b9](https://github.com/gavinying/modpoll/commit/2dde6b9b413a1c7fba19ba88dc8f1e7df8287c25))
* Allow HEX number in configuration file ([#70](https://github.com/gavinying/modpoll/issues/70)) ([6324269](https://github.com/gavinying/modpoll/commit/63242699b75b5169abc8064c1546faa92a8754de))
* Publish MQTT message for each single reference. ([adb869f](https://github.com/gavinying/modpoll/commit/adb869faeb375ec92d1158bd87c0389de7eceb09))


### Bug Fixes

* Rename doc include config_template.csv ([#73](https://github.com/gavinying/modpoll/issues/73)) ([8003ff3](https://github.com/gavinying/modpoll/commit/8003ff33a42143766223f2b02307cd17409b4059))

## [1.3.3](https://github.com/gavinying/modpoll/compare/v1.3.2...v1.3.3) (2024-10-15)


Expand Down
Binary file not shown.
83 changes: 83 additions & 0 deletions contrib/eastron/SDM120M.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
device,SDM120M,1,,,

poll,input_register,0,2,BE_BE,
ref,voltage,0,float32,r,Volts

poll,input_register,6,2,BE_BE,
ref,current,6,float32,r,Amps

poll,input_register,12,2,BE_BE,
ref,power_active,12,float32,r,Watts

poll,input_register,18,2,BE_BE,
ref,power_apparent,18,float32,r,VA

poll,input_register,24,2,BE_BE,
ref,power_reactive,24,float32,r,VAr

poll,input_register,30,2,BE_BE,
ref,power_factor,30,float32,r

poll,input_register,36,2,BE_BE,
ref,phase_angle,36,float32,r,Degrees

poll,input_register,70,10,BE_BE,
ref,frequency,70,float32,r,Hz
ref,import_energy_active,72,float32,r,kWh
ref,export_energy_active,74,float32,r,kWh
ref,import_energy_reactive,76,float32,r,kWh
ref,export_energy_reactive,78,float32,r,kWh

poll,input_register,84,12,BE_BE,
ref,total_demand_power_active,84,float32,r,Watts
ref,maximum_total_demand_power_active,86,float32,r,Watts
ref,import_demand_power_active,88,float32,r,Watts
ref,maximum_import_demand_power_active,90,float32,r,Watts
ref,export_demand_power_active,92,float32,r,Watts
ref,maximum_export_demand_power_active,94,float32,r,Watts

poll,input_register,258,2,BE_BE,
ref,total_demand_current,258,float32,r,Amps

poll,input_register,264,2,BE_BE,
ref,maximum_total_demand_current,264,float32,r,Amps

poll,input_register,342,4,BE_BE,
ref,total_energy_active,342,float32,r,kWh
ref,total_energy_reactive,344,float32,r,kVArh

poll,holding_register,0,4,BE_BE,
ref,demand_time,0,float32,r,Seconds
ref,demand_period,2,float32,r,Seconds

poll,holding_register,12,2,BE_BE,
ref,relay_pulse_width,12,float32,rm,Millisecs

poll,holding_register,18,4,BE_BE,
ref,network_parity_stop,18,float32,r
ref,meter_id,20,float32,r

poll,holding_register,28,2,BE_BE,
ref,baud,28,float32,r

poll,holding_register,86,2,BE_BE,
ref,pulse1_output_mode,86,float32,r

poll,holding_register,63744,1,BE_BE,
ref,display_scroll_timing,63744,uint16,r,Seconds

poll,holding_register,63760,1,BE_BE,
ref,pulse1_divisor,63760,uint16,r

poll,holding_register,63776,1,BE_BE,
ref,measurement_mode,63776,uint16,r

poll,holding_register,63792,2,BE_BE,
ref,indicator_mode,63792,float32,r

poll,holding_register,64512,3,BE_BE,
ref,serial_number,64512,uint32,r
ref,meter_code,64514,uint16,r

poll,holding_register,64515,1,BE_BE,
ref,software_version,64515,uint16,r
2 changes: 1 addition & 1 deletion docs/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It is mainly to describe the device address and register mappings.

Here is the basic structure of modbus configure file.

.. literalinclude:: ../examples/example.csv
.. literalinclude:: ../examples/config_template.csv
:language: default
:emphasize-lines: 8-10
:linenos:
Expand Down
4 changes: 2 additions & 2 deletions modpoll/arg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def get_parser():
parser.add_argument(
"--interval",
type=float,
default=1.0,
help="The time interval in seconds between two polling, Defaults to 1.0",
default=0.5,
help="The time interval in seconds between two polling, Defaults to 0.5",
)
parser.add_argument(
"--tcp", help="Act as a Modbus TCP master, connecting to host TCP"
Expand Down
2 changes: 1 addition & 1 deletion modpoll/modbus_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def __init__(
config_file: str,
mqtt_handler: Optional[MqttHandler] = None,
timeout: float = 3.0,
interval: float = 1.0,
interval: float = 0.5,
daemon: bool = False,
mqtt_publish_topic_pattern: Optional[str] = None,
mqtt_diagnostics_topic_pattern: Optional[str] = None,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "modpoll"
version = "1.3.3"
version = "1.4.0"
description = "A New Command-line Tool for Modbus and MQTT"
authors = ["Ying Shaodong <[email protected]>"]
repository = "https://github.com/gavinying/modpoll"
Expand Down

0 comments on commit f44bdbf

Please sign in to comment.