Hello,
I’m using Somfy RTS wall plugs that are registered as Rollershutters in the system (that’s what I figured is what the binding wants). When I issue an
PLUG.sendCommand(0)
from a rule, I unfortunately get an exception
==> /var/log/openhab2/openhab.log <==
2017-10-25 20:39:16.626 [ERROR] [ternal.profiles.DefaultMasterProfile] - Exception occurred while calling handler: java.lang.NumberFormatException: Can't convert 0 to Command
java.util.concurrent.ExecutionException: java.lang.NumberFormatException: Can't convert 0 to Command
at org.eclipse.smarthome.core.common.SafeMethodCaller.executeDirectly(SafeMethodCaller.java:220) ~[?:?]
at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:189) ~[?:?]
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83) ~[?:?]
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.profiles.DefaultMasterProfile.onCommand(DefaultMasterProfile.java:51) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.CommunicationManager.lambda$2(CommunicationManager.java:223) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) [?:?]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) [?:?]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) [?:?]
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) [?:?]
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) [?:?]
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270) [?:?]
at java.util.concurrent.ConcurrentHashMap$ValueSpliterator.forEachRemaining(ConcurrentHashMap.java:3566) [?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) [?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) [?:?]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) [?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) [?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:?]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) [?:?]
at org.eclipse.smarthome.core.thing.internal.CommunicationManager.receiveCommand(CommunicationManager.java:218) [105:org.eclipse.smarthome.core.thing:0.9.0.201710101404]
at org.eclipse.smarthome.core.thing.internal.CommunicationManager.receive(CommunicationManager.java:95) [105:org.eclipse.smarthome.core.thing:0.9.0.201710101404]
at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:207) [98:org.eclipse.smarthome.core:0.9.0.201710101404]
at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:1) [98:org.eclipse.smarthome.core:0.9.0.201710101404]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:181) [98:org.eclipse.smarthome.core:0.9.0.201710101404]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.lang.NumberFormatException: Can't convert 0 to Command
at org.openhab.binding.rfxcom.internal.messages.RFXComRfyMessage.convertFromState(RFXComRfyMessage.java:237) ~[?:?]
at org.openhab.binding.rfxcom.handler.RFXComHandler.handleCommand(RFXComHandler.java:81) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.profiles.DefaultMasterProfile$1.call(DefaultMasterProfile.java:54) ~[?:?]
at org.eclipse.smarthome.core.thing.internal.profiles.DefaultMasterProfile$1.call(DefaultMasterProfile.java:1) ~[?:?]
at org.eclipse.smarthome.core.common.SafeMethodCaller.executeDirectly(SafeMethodCaller.java:218) ~[?:?]
... 27 more
which I don’t understand as the logs usually say that the PLUG was set to 0 or 100 when I press the up or down button in Basic UI. I realized that a sendCommand(UP) works, but that’s not working for me. Principally in the rule I can live with that, but in the sitemap file I have to do
mappings=[UP="ON",DOWN="OFF"]
and then the state is not reflected in Basic UI as the “real value” of the PLUG is 0 or 100.
Can I somehow send it the number value or is that impossible?