- Platform information:
- Hardware: Raspi 3
- OS: Debian stretch
- Java Runtime Environment java version “1.8.0_171”
- openHAB version: 2.4.0
Hello,
on the page “https://www.openhab.org/docs/administration/runtime.html#automation” you wrote, we can ececute some scripts. So I create a file “/home/pi/hab/conf/thingInfo.script”, which is readable for all users.
But when I try to call it, I’ll get the error:
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.
openhab> smarthome:> thingInfo
Command not found: smarthome:
openhab> smarthome:>thingInfo
Command not found: smarthome:
openhab> smarthome:
Command not found: smarthome:
openhab> smarthome:>
redir>
redir> ^CingInfo
redir> thingInfo
redir>
openhab> smarthome:>
redir> thingInfo
redir> ^C
openhab> smarthome:>thingInfo
Command not found: smarthome:
openhab> smarthome:>thingInfo.script
Command not found: smarthome:
openhab> smarthome:> thingInfo.script
Command not found: smarthome:
openhab>
and so on, but nothing will happend. The content of the scriptfile:
var thingName = “zwave:device:18af13d3:node3”
var thingStatusInfo = getThingStatusInfo(thingName)
if ((thingStatusInfo !== null) && (thingStatusInfo.getStatus().toString() == "ONLINE")) {
logInfo("ThingStatus", "The thing is online.")
} else {
logError("ThingStatus", "The thing is offline or doesn't exist.")
}
What I do wrong? Must I load an extension to karaf? I’d not found some info about this problem…
Sincerely
Jens