User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active


Used to check power from energy meter (SDM120, SDM230, ...) and performs the following actions

1. Send notification when consumed power is above a threshold (to avoid power outage)

2. Enabe/Disable electric heaters or other appliances, to reduced power consumption from the electric grid

3. Emergency lights: turn ON some LED devices in case of power outage, and turn off when power is restored

4. Show on DomBusTH LEDs red and green the produced/consumed power: red LED flashes 1..N times if power consumption is greater than 1..N kW;
green LED flashes 1..M times if photovoltaic produces up to 1..M kW

AN energy meter domESP1


The script is available on github, click here to see the project on GitHub, or  click here to get the script

File: scripts/lua/script_device_power.lua

Destination directory: DOMOTICZ_DIR/scripts/lua

To install the script, type the following commands from the Linux shell, ignoring the comments (starting with #). If you don't know how to do, search the web how to connect to your Linux device using putty or another ssh client.

#become root
sudo su -
#install/upgrade curl, a command to fetch files from the web
apt install curl
# go to domoticz directory
cd /home/pi/domoticz
# fetch the script
curl -o scripts/lua/script_device_power.lua
# now, edit the script modifying the first part with your configuration
nano scripts/lua/script_device_power.lua
Pin It