Reads DDS238 meters via modbus
Project description
python-dds238
This library is very useful when reading the chinese DDS238 (and its variants: DDS238-2, ...) power meter.
This library supposes that you're using an USB-to-RS485 dongle. It doesn't work yet for modbus-over-TCP (though if you want to propose an MR, i'd accept it gladly !).
Installation
To install the library, simply type:
$ pip3 install python-dds238
Usage
I'ts very simple:
>>> from dds238 import DDS238
>>> meter = DDS238(modbus_device='/dev/ttyUSB0', meter_id=20)
>>> meter.voltage
215.4
>>> meter.power
1632
>>> meter.export_energy
1288.2
DOC
| current
| Returns the current in Amperes
|
| export_energy
| Returns the exported energy, in kWh
|
| frequency
| Returns the frequency in Herz
|
| import_energy
| Returns the imported energy, in kWh
|
| power
| Returns the power in Watts. Positive is import. Negative power is exported
|
| power_factor
| Returns the power factor (0-1 scalar)
|
| reactive_power
| Return the reactive power in VAr
|
| voltage
| Returns the voltage in Volts
|
| ----------------------------------------------------------------------
|
| change_address(self, address: int, baudrate=9600)
| Change the modbus address and the baudrate of the current device. USE AT YOUR OWN RISK !
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python-dds238-0.0.5.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for python_dds238-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18e80ca6d6764f8a19e548974ed29c8f34b0be131fc866d4b78b21f411de63f8 |
|
MD5 | 7b1aeb68f0131bffddab20a1cd5c81a5 |
|
BLAKE2b-256 | 3d835338a262eb7b5d4e8d0ad19d6aeb8ab516be425c1a7a26152d49d7e43ea0 |