This is a plugin for the free open-source Domoticz home automation system that read one or more PZEM-014, PZEM-016, PZEM-004T energy meters by Modbus connection (RS485 serial connection), providing the following data:
- active power
- active energy
- voltage
- current
- frequency
- power factor
The following items can be configured:
- Bitrate, by default 9600 bps
- Meter address, for example 1 (only one meter with address 1) or 11,12 (two devices with address 11 and 12: address should be separated by comma)
- Poll interval, in seconds: in case of a long list of devices, don't use very short poll intervals!
PZEM-014 and PZEM-016 have RS485 port: one or more modules can be connected together by a standard "sensor alarm cable" (2x 0.22mm² wires + shield), and then connected to Domoticz controller (Raspberry PI or other hardware) by using a cheap RS485/USB adapter or a RS485/net controller. Please remember that RS485 bus should be terminated in both ends by a 120 Ohm resistor.
PZEM-004T has TTL outputs, so it can be connected to the controller by a TTL to serial adapter.
Please note that while it's possible to easily connect many PZEM-016 and PZEM-014 to the same RS485 bus, to connect many PZEM-004T to a single TTL/USB interface some modifications are needed.
From Linux it's possible to change the address of a meter (by default it's set to 1) by using the following command, that changes address from 1 to 11:
mbpoll -mrtu -Pnone -a1 -b9600 -0 -1 -r2 /dev/ttyUSB0 11
/dev/ttyUSB0 have to be replaced with the right serial port.
Using other operating systems, please use a Modbus client to set the register address 2 (base-0) to the new slave address value, using function code 6.
This plugin does not open the serial port in exclusive-mode, so it's possible to share the same serial port for many different devices; for example, it was successfully tested with 1 PZEM-016 energy meter and 1 EMMETI MIRAI heat pump (same bitrate, with different slave address of course).
This plugin can be installed from Python Plugin Manager or Python Plugins Manager which also permit to update plugin easily or automatically.
Alternatively, it's possible to give the following commands from the linux shell:
cd ~/domoticz/plugins
git clone https://github.com/CreasolTech/domoticz-pzem-016
Then, in the future, to update the plugin it's possible to simply type
cd ~/domoticz/plugins/domoticz-pzem-016
git pull
It uses the python plugin module minimalmodbus , than can be installed by
sudo apt install pyserial
sudo pip3 install minimalmodbus
Restart Domoticz, then go to Setup -> Hardware and add the Emmeti Mirai heat pump plugin, specifying a name for that hardware and the serial port to connect heat pump.
Plugin can be easily translate in other languages: just copy and translate the rows below, and open an issue on github writing the modified lines with your translations, with the language code.
Words to translate in other languages (in double quotes):
English (en) Italian (it) YourLanguage (??)
"Power/Energy" "Potenza/Energia" ""
"Voltage" "Tensione" ""
"Current" "Corrente" ""
"Frequency" "Frequenza" ""
"Power Factor" "Fattore di Potenza" ""
Many thanks to:
- Moreno Risorti, that has tested the plugin with PZEM-004T
Below a list of modules, produced in Europe by Creasol, designed for Domoticz to be reliable and optimized for very very low power consumption.
Our industrial and home automation modules are designed to be
- very low power (around 10mW with relays OFF)
- reliable (no disconnections)
- bus connected (no radiofrequency interference, no battery to replace).
Modules are available in two version:
- with DomBus proprietary protocol, working with Domoticz only
- with Modbus standard protocol, working with Home Assistant, OpenHAB, Node-RED
Store website - Information website
Complete solution to make a Smart EVSE, charging the electric vehicle using only energy from renewable source (photovoltaic, wind, ...), or adding 25-50-75-100% of available power from the grid.
- Single-phase and three-phase, up to 32A (8kW or 22kW)
- Needs external contactor, RCCB (protection) and EV cable
- Optional power meter to measure charging power, energy, voltage and power factor
- Optional power meter to measure the power usage from the grid (not needed if already exists)
- Two max grid power thresholds can be programmed: for example, in Italy who have 6kW contractual power can drain from the grid Max (6* 1.27)=7.6kW for max 90 minutes followed by (6* 1.1)=6.6kW for another 90 minutes: in this case the EVSE module can drain ALL available power when programmed to charge at 100% minimizing the charge time and increasing the charging efficiency.
- Works without the domotic controller (stand-alone mode), and can also work in managed mode, with an automation in the home automation system setting the charging current
DomBusTH - Compact board to be placed on a blank cover, with temperature and humidity sensor and RGW LEDs
Compact board, 32x17mm, to be installed on blank cover with a 4mm hole in the middle, to exchange air for the relative humidity sensor. It can be installed in every room to monitor temperature and humidity, check alarm sensors, control blind motor UP/DOWN, send notifications (using red and green leds) and activate white led in case of power outage.
Includes:
- temperature and relative humidity sensor
- red, green and white LEDs
- 4 I/Os configurable as analog or digital inputs, pushbuttons, counters (water, gas, S0 energy, ...), NTC temperature and ultrasonic distance sensors
- 2 ports are configured by default as open-drain output and can drive up to 200mA led strip (with dimming function) or can be connected to the external module DomRelay2 to control 2 relays; they can also be configured as analog/digital inputs, pushbuttons and distance sensors.
Very compact, versatile and cost-effective module with 9 ports. Each port can be configured by software as:
- analog/digital inputs
- pushbutton and UP/DOWN pushbutton
- counters (water, gas, S0 energy, ...)
- NTC temperature and ultrasonic distance sensors
- 2 ports are configured by default as open-drain output and can drive up to 200mA led strip (with dimming function) or can be connected to the external module DomRelay2 to control 2 relays.
Very compact domotic module providing:
- 3x latching relays SPST, max current 15A (3kW): no power consumption when relays are On or Off!
- 1x 230V AC opto-isolated input to detect 230V and power outage, with zero-detection to switch relays/loads minimizing in-rush current
- 4x I/O lines, configurable as analog/digital inputs, temperature/distance sensor, counter, meter, ...
Versatile module designed to control gate or garage door.
- 2x relays SPST 5A
- 1x 10A 30V mosfet (led stripe dimming)
- 2x 0-10V analog output: each one can be configured as open-drain output to control external relay
- 2x I/O lines, configurable as analog/digital inputs, temperature/distance sensor, counter, ...
- 2x low voltage AC/DC opto-isolated inputs, 9-40V
- 1x 230V AC opto-isolated input
DIN rail low profile module, with 8 relays and very low power consumption:
- 6x relays SPST 5A
- 2x relays STDT 10A
- Only 10mW power consumption with all relays OFF
- Only 500mW power consumption with all 8 relays ON !!
Versatile module with 230V inputs and outputs, and 5 low voltage I/Os.
- 3x relays SPST 5A
- 3x 115/230Vac optoisolated inputs
- Single common for relays and AC inputs
- 5x general purpose I/O, each one configurable as analog/digital inputs, pushbutton, counter, temperature and distance sensor.
Module designed to control 3 lights already existing and actually controlled by 230V pushbuttons and step-by-step relays. In this way each light can be activated by existing pushbuttons, and by the domotic controller.
- 3x relays SPST 5A
- 3x 115/230Vac optoisolated inputs
- Single common for relays and AC inputs
- 5x general purpose I/O, each one configurable as analog/digital inputs, pushbutton, counter, temperature and distance sensor.
Each relay can toggle the existing step-relay, switching the light On/Off. The optoisolator monitors the light status. The 5 I/Os can be connected to pushbuttons to activate or deactivate one or all lights.
DIN rail module, low profile, with 12 relays outputs and very low power consumption.
- 12x relays SPST 5A
- Relays are grouped in 3 blocks, with a single common per block, for easier wiring
- Only 12mW power consumption with all relays OFF
- Only 750mW power consumption with all 12 relays ON !!
Module designed to interface alarm sensors (magnetc contact sensors, PIRs, tampers): it's able to monitor mains power supply (power outage / blackout) and also have 3 relays outputs.
- 12x low voltage inputs (analog/digital inputs, buttons, alarm sensors, balanced double/triple biased alarm sensors, counters, meters, temperature and distance sensors, ...)
- 3x 115/230Vac optoisolated inputs
- 2x relays SPST 5A
- 1x relay SPST 10A
Module designed to interface alarm sensors (magnetc contact sensors, PIRs, tampers), lights and appliances outputs, ...
- 12x low voltage inputs (analog/digital inputs, buttons, alarm sensors, balanced double/triple biased alarm sensors, counters, meters, temperature and distance sensors, ...)
- 1x 115/230Vac optoisolated input to detect power outage and for zero-crossing detection (to switch relays minimizing the in-rush current)
- 4x relays SPDT 10A (with Normally Open and Normally Closed contacts)
- 2x relays SPST 10A (with only Normally Open contacts)
DomBusTracker - Dual axis sun tracker controller working with Domoticz, Home Assistant, Node-RED, Modbus, ... and also working in standalone with no external controllers
Module that check a deep-hole sun sensor to detect the direction of maximal sun radiation, working also in case of cloudy weather.
- Controls two external actuators/motors (linear or not) to move motors to reach the best tilt / elevation and azimuth position to optimize photovoltaic production.
- Check current through the motors to detect internal limit switch (useful for linear actuators) and find where the tracker reach the final/initial position.
- Works autonomously (stand-alone), without any home automation system controller, but also can be interface by Domoticz (DomBus protocol) and Home Assistant, NodeRED, OpenHAB, ... (using Modbus protocol).
- Wire connection (RS485) to the domotic controller for the best reliability.
Simple module with 2 relays, to be used with DomBus modules (like DomBusTH and DomBus12) or other electronic boards with open-collector or open-drain outputs
- 2x SPST relays 5A (Normally Open contact)
- Overvoltage protection (for inductive loads, like motors)
- Overcurrent protection (for capacitive laods, like AC/DC power supply, LED bulbs, ...)
IoT board designed for NodeMCU v3 board using ESP8266 WiFi microcontroller
- 9÷24V power supply input, with high efficiency DC/DC regulator with 5V output
- 4x SPST relays 5A with overvoltage protection (varistor)
- 2x mosfet outputs (max 30V, 10A) for LED dimming or other DC loads
- 1x I²C interface for sensors, extended I/Os and more)
- 1x OneWire interface (DS18B20 or other 1wire sensors/devices)