Hello,
I have made a sonos binding with openhab. Now I want to execute the command for playing a certain radio station.
I have following code:
in the items:
Number Radio_Station "Radio" <network>
in the sitemap:
Selection item=Radio_Station mappings=[1=MNM, 2=JoeFM, 3=StuBru]
in the rules:
rule “Select Radio Station”
when
Item Radio_Station received command
then
switch(receivedCommand) {
case 1 : {sonos="[MNM:RINCON_B8E9375A1DFE01400:radio]"}
case 2 : {sonos="[JoeFM:RINCON_B8E9375A1DFE01400:radio]"}
case 3 : {sonos="[VRT Studio Brussel:RINCON_B8E9375A1DFE01400:radio]"}
}
end
this give and error in my log:
2016-01-04 13:45:31.156 [ERROR] [o.o.c.s.ScriptExecutionThread ] - Error during the execution of rule 'Select Radio Station2': org.eclipse.xtext.util.PolymorphicDispatcher$NoSuchMethodException: Couldn't find method ''_assignValue'' for objects [JvmVoid: (eProxyURI: default.rules#xtextLink_::0.2.1.2.0.0.1.1.1.0.0::0::/1), <null> sonos <XStringLiteralImpl>, [JoeFM:RINCON_B8E9375A1ECE01400:radio], org.eclipse.xtext.xbase.interpreter.impl.DefaultEvaluationContext@27cf0, org.eclipse.xtext.util.CancelIndicator$1@190bff9]
Does anyone know why it can’t execute the command?
Kind regards