https://github.com/john30/modbuslogger
A logger for Modbus devices, especially Eastron SDM72D
https://github.com/john30/modbuslogger
Last synced: about 1 year ago
JSON representation
A logger for Modbus devices, especially Eastron SDM72D
- Host: GitHub
- URL: https://github.com/john30/modbuslogger
- Owner: john30
- Created: 2020-03-01T10:05:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-07T15:44:16.000Z (about 6 years ago)
- Last Synced: 2025-02-15T02:18:19.874Z (over 1 year ago)
- Language: TypeScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
modbuslogger
============
modbuslogger is a simple example of using the modbus-serial package for logging the data of a Modbus device, especially
the Eastron SDM72D. It can talk to a TCP Modbus server or directly to a serial connected Modbus device.
Usage
-----
```bash
usage: node index.js [-i deviceid] [-r registerid | -a] [destination]
with:
-i deviceid use device with deviceid (default: 1)
-r registerid read specified input register instead of all (multiple allowed)
-a read all holding registers as well
destination the destination to read from (default: 127.0.0.1), one of:
serial device with optional speed if other than 9600, e.g. /dev/ttyUSB1:19200
hostname or IP address with optional port if other than 502, e.g. modbussserver:1502
```
The most simple usage is with ```node index.js``` which will open a connection to a local Modbus TCP server (such as mbusd)
at port 502 and retrieving all input registers for device ID 1.
Sample output looks like this:
```text
Total system power:384
Import Wh since last reset:123123.339
Export Wh since last reset:0.020
Total kwh:123123.359
Settable total kWh:123123.359
Settable import kWh:123123.339
Settable export kWh:0.020
Import power:384
Export power:0
```
Installation
------------
A recent NodeJS is required including npm. In order to install the required modules, just run ```npm install```.