Hello there ,
I have a problem when declaring and item, i want so publish a message to the topic , normally this works but in this case the message messes up the parser for the items.
what i want to do is the following:
publish the message from between the brackets ( “{“status”:“OFF”}”) to the topic lights/0x1234/rgbw/4
if i declare my swithch item like this :
Switch mqttsw1 "MQTT" {mqtt=">[broker:lights/0x1234/rgbw/4:command:ON:"{"status":"ON"}"],>[broker:lights/0x1234/rgbw/4:command:OFF:"{"status":"OFF"}"]"}
then i get an error :
Binding configuration of type 'mqtt' of item 'mqttsw1' could not be parsed correctly. org.eclipse.smarthome.model.item.BindingConfigParseException: Configuration 'broker:lights/0x1234/rgbw/4:command:ON:MAP(milight.map):TURNON' is not a valid outbound configuration: Configuration requires 5 parameters separated by ':' at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:50)[176:org.openhab.core.compat1x:2.0.0] at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:312)[123:org.eclipse.smarthome.model.item:0.9.0.b4] at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:284)[123:org.eclipse.smarthome.model.item:0.9.0.b4] at org.eclipse.smarthome.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:167)[123:org.eclipse.smarthome.model.item:0.9.0.b4] at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:347)[123:org.eclipse.smarthome.model.item:0.9.0.b4] at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:207)[122:org.eclipse.smarthome.model.core:0.9.0.b4] at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:120)[122:org.eclipse.smarthome.model.core:0.9.0.b4] at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:272)[122:org.eclipse.smarthome.model.core:0.9.0.b4] at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.access$1(FolderObserver.java:265)[122:org.eclipse.smarthome.model.core:0.9.0.b4] at org.eclipse.smarthome.model.core.internal.folder.FolderObserver$WatchQueueReader.processWatchEvent(FolderObserver.java:146)[122:org.eclipse.smarthome.model.core:0.9.0.b4] at org.eclipse.smarthome.core.service.AbstractWatchQueueReader.run(AbstractWatchQueueReader.java:122)[98:org.eclipse.smarthome.core:0.9.0.b4] at java.lang.Thread.run(Thread.java:748)[:1.8.0_131] 2017-06-04 02:02:41.130 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'lights.items' 2017-06-04 02:02:41.135 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type 'mqtt' of item 'mqttsw1' could not be parsed correctly. org.eclipse.smarthome.model.item.BindingConfigParseException: Configuration 'broker:lights/0x1234/rgbw/4:command:ON:MAP(milight.map):TURNON' is not a valid outbound configuration: Configuration requires 5 parameters separated by ':' at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:50)[176:org.openhab.core.compat1x:2.0.0] at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:312)[123:org.eclipse.smarthome.model.item:0.9.0.b4] at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:284)[123:org.eclipse.smarthome.model.item:0.9.0.b4] at org.eclipse.smarthome.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:167)[123:org.eclipse.smarthome.model.item:0.9.0.b4] at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:347)[123:org.eclipse.smarthome.model.item:0.9.0.b4] at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:207)[122:org.eclipse.smarthome.model.core:0.9.0.b4] at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:120)[122:org.eclipse.smarthome.model.core:0.9.0.b4] at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:272)[122:org.eclipse.smarthome.model.core:0.9.0.b4] at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.access$1(FolderObserver.java:265)[122:org.eclipse.smarthome.model.core:0.9.0.b4] at org.eclipse.smarthome.model.core.internal.folder.FolderObserver$WatchQueueReader.processWatchEvent(FolderObserver.java:146)[122:org.eclipse.smarthome.model.core:0.9.0.b4] at org.eclipse.smarthome.core.service.AbstractWatchQueueReader.run(AbstractWatchQueueReader.java:122)[98:org.eclipse.smarthome.core:0.9.0.b4] at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
Is there a way to transform the contents of my message ("{“status”:“OFF”}") so that it doesn’t interfere with the syntax?