Digital Loggers

Customize your power controller using simple, powerful BASIC scripting.


Scheduling Events with Scripts

Firmware versions 1.6.0 and later support scheduling through a BASIC scripting language. Have a look at the examples below.  Need some help?  Call (408) 330-5599 or send an email.


Hardware Requirements - EEPROM

User-defined scripts are stored in non-volatile EEPROM.  The current Web Power Switch 7, DIN Relay II/IIII, 110-240V Power Switch and Ethernet Power Controller 5 include expanded EEPROM.   Scripting can be used on earlier models (ie. Web Power Switch III or VPDU) with small EEPROM, but they will be lost after power-off.  Scripting is included in the latest firmware.  


Real Time Clock (RTC) - Helpful but not required.

You don't need an RTC with battery backup to schedule events.  You can synchronize the internal clock in any product to a Network Time Protocall server source using the NTP command.  The advantage of a battery-backed-up RTC is that its time setting will survive both a loss of power and a simultaneous loss of network connectivity. The current Web Power Switch, Ethernet Power Controller  and 110-240V Power Switch include a battery-backed-up RTC.

 

Setting it up

Feel free to read the scripting page for a quick overview of the BASIC script language.  Log in as admin and click the scripting link.  After entering a command on each line, press <return> and the command will be copied.  If there's a syntax error in the command, the screen will refresh without changes. After you've entered a script, check the "Enable Scripting" checkbox.  Once enabled, start the script using the RUN button or any other method described on the scripting page.   Have a look at these example scripts:

 


Simple Lighting Economizer



This simple program shuts the lights off at 21:30 (9:30PM) daily.  Users can turn them on using a web browser, iphone, android phone, etc.  Should they forget to turn them off, the web power switch takes care of it.  One customer controls hotel HVAC equipment similarly using a DIN relay.


Reboot a Server Periodically

This example reboots a file server every Friday the 13th at noon.  Line 1, the TIME command synchronizes the internal clock to an NTP server located at 64.90.182.55.  Line 5 uses the WAIT command to select the reboot time.  Line 10 uses the WOL command to wake the device at MAC address 01:02:03:04:05 by transmitting a WOL "magic packet".


 Ring School Bells at 8AM on Mondays

 

In this example (derived from an actual customer use), a DIN Relay is used to ring a school bell every Monday at exactly 8AM.  The DIN relay first syncs to a public time server, then it waits until 08:00 on a Monday.  After that, it rings the bell attached to relay 1 for a few seconds.