' pingamp.txt
Sub Main()
ping=xap.getfromraw(rawmessage, "ping.results,ping_amp")
if GetGlobal("PingAmp") <> "Fail" and ping = "Fail" then
' this is my starCOM task to turn on X10 devices
ExecuteX10Appl "AmpFan",0
SetGlobal "PingAmp", ping
elseif GetGlobal("PingAmp") <> "Success" and ping = "Success" then
ExecuteX10Appl "AmpFan",1
SetGlobal "PingAmp", ping
end if
End Sub
Create a Floorplan raw device for Ping:
- alias = Amp
- source = mi4.ping.myserver
- class = ping.status
- section = ping.results
- item = ping_amp
- script to run on update = pingamp
Don't forget to create a device called ping_amp in xAP Ping.
No comments:
Post a Comment