Skip to content
This repository was archived by the owner on Apr 8, 2019. It is now read-only.

Functions

Guy Verschuere edited this page Aug 12, 2017 · 4 revisions

sw($name,$action='toggle',$info='')

Switches a switch on or of.
$name = name of the device, or array of devices
$action = 'On', 'Off'. Of none provided toggle is used.
$info = extra text to sent to the logfile
sw('lighthall','Off');
sw(array('lighthall','lightupstairs'),'Off');

sl($name,$level,$info='')

Sets the level of a dimmer
sl('dimmerdining',0)
sl('dimmerdining',50)
sl('dimmerdinging',100)

ud($name,$nvalue,$svalue,$info="")

Updates the nvalue and svalue of a device

double($name,$action,$comment='',$wait=1500000)

Executes 2 times the sw function with a little pause. I've had sometimes issues with Fibaro wallplugs that don't update their status when sending a single command
double('computerdesk','On');

telegram($msg,$silent=true,$to=1)

Sends a telegram message. If second or thirth option isn't specified it's sent without notification sound and only the chatid1.
telegram('This is a silent test message')
telegram('This is a message with sound',false)
telegram('This is a message with sound sent to 2 different chatids',false,2)

lg($msg)

Logs $msg to a logfile

checkport($ip,$port)

pingport($ip,$port)

RefreshZwave($node)

Zwavecancelaction()

ZwaveCommand($node,$command)

ControllerBusy($retries)

convertToHours($time)