Digital Loggers

Downloadable scripts for your use.


Updated 01/28/2025

Advanced Power Control - Lua Scripting

On its own, a power switch isn't very smart.  Add custom functionality using the built-in simple Lua scripting language. It's really simple. No programming experience is required.  Give it a try!

 

Hardware Requirements

WiFi capable power controller such as the LPC PRO, EPCR 5/6/7, DIN4, DC3, 222 or ISO32

This page describes the Lua based scripting language used in DLI products with WiFi capability only. 
WOL_after_switch_on.lua Send Wake-On-LAN to a PC after switch 1 is turned on
Control_temperature_with_fans.lua Older version to turn on fans if the temperature exceeds a defined maximum. Keep them on until it's below a defined temperature. This example check every x seconds
Change the limits as desired.
Monitor_temperature_for_fan_control.lua Updated version to monitor temperature and turns fans on/off based on defined triggers of TEMP_TOO_HOT and TEMP_OKAY.
This example uses an event trigger available in firmware 1.8.x.0 and higher.
Reverse cycle.lua Turn an outlet or relay on then off. This is designed for use as an autoping action, usually in a DIN relay.
Autoping - reboot router & modem Reboot the modem and/or router as needed as an autoping action.
*Thanks to Eric C. for providing this sample.
Notify of network reboot.lua Reboots modem and router, then sends a notification that the network devices were rebooted.
This script has a limitation that if autoping completely fails and is disabled, the notification will not be sent until it is re-enabled.
Mike's_autoping_failure_with_notify.lua Power cycles the router and modem and will wait and send a notification after the network is restored.
This is a more sophisticated version of the above and will work even with extended outages. (Updated 10-22-23)
6 Monitor critical outlets.lua Monitor critical outlets so that if accidentaly turned off, they will be turned back on automatically.
7 Log_Temp_and_Humidity.lua Log the temperature and humidity every 2 hours.
8 Astronomy_Sun.lua Initiate actions based on sunrise/sunset or dawn/dusk. (Requires firmware 1.11.8.0 or higher)
9 Countdown.lua This script periodically toggles the outlets while displaying a running countdown to the next toggle.
*Special thanks to Mike Gut for offering it here.

Need additional help? Email support@digital-loggers.com

* Customer contributions are encouraged
** Scripts supplied are not necessarily tested by DLI

Return to the main script page.

Have a smart script or unique way to use your switch?  Let us know!

engineering@digital-loggers.com