I’m just getting started with OpenHAB but I’m having some difficulty with writing a rule containing a variable.
Essentially what I would like to do is echo out the string value of ‘Chromecast_YouTube’ and use it as part of my curl command. Can someone point out where I’m going wrong here please?
Also, what language/script is this? Where can I find documentation on using variables within these rules?
Here is my rule:
rule "Chromecast YouTube Content Changed" when Item Chromecast_YouTube changed then executeCommandLine('curl -H “Content-Type:application/json” "http://192.168.1.12:8008/apps/YouTube" -X POST -d '.Chromecast_YouTube, 5000) end
Here is my log:
2018-12-30 14:41:13.375 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Chromecast YouTube Content Changed': 'Chromecast_YouTube' is not a member of 'java.lang.String'; line 5, column 24, length 112
Thanks in advance.