Digital Loggers

Downloadable scripts for your use.


Updated 10/23/2023

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 Turn on fans if the temperature exceeds 120°. Keep them on until it's below 80°.
Change the limits as desired.
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)

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