Hi,
I have a simple groovy script to say the current time over my Amazon Echo:
import java.text.SimpleDateFormat
{
var SimpleDateFormat df = new SimpleDateFormat( "h:mm a" )
var String Timestamp
var String ChimeMessage
Timestamp = df.format( new Date() )
ChimeMessage = "It's " + Timestamp
NeosEcho_Speaker.sendCommand(ChimeMessage)
}
However, whenever I run it, I get the following error in the openhab.log file:
2020-11-07 00:11:35.895 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'bf7402e1fc' failed: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: NeosEcho_Speaker for class: Script1
Any idea what’s going on? Is there something wrong with the Groovy engine or is it human error?
Thanks,
Randy