having trouble with a script i am pinging a device with nodered and get back a number or false
how can i use this to set a item either on or off ? any help welcome
if ping == false {
setitem.sendCommand(OFF)
}else if ping (not equal) false {
setitem.sendCommand(ON)
}
end
sorry about the misleading title i am using nodered to ping every 60 seconds it either comes back with a number if its on the network or false if not its put in to an item but i need to be able to set another item either on or off if its on the network i know the if and else if is wrong but was asking how to set out to write to the setitem.sendCommand(ON) or setitem.sendCommand(OFF)