Closed paul43210 closed 3 years ago
I have the same problem.
[hab.binding.exec.handler.ExecHandler] - An exception occurred while formatting the command line with the current time and input values : 'Format specifier '%2$s''
OpenHAB 2.1.0 OpenHAB-AddOns 2.2.0-SNAPSHOT Linux raspberrypi2 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux java version "1.8.0_152" Java(TM) SE Runtime Environment (build 1.8.0_152-b16) Java HotSpot(TM) Client VM (build 25.152-b16, mixed mode)
Same problem here.
There is a link to a jar file in pull request #2671 which fixes this problem. This file can be manually installed in openhab to get the functionality you are looking for.
Did one of you ever take a look at https://github.com/openhab/openhab2-addons/pull/2012? Does this maybe answer to some of the demands requirments, I can't look into @kgoderis agenda by maybe he would like some help in wrapping that one up.
@martinvw I slowly but steadily working through my pending PR. I have not followed all the issues raised wrt Exec as I sense they will be solved by https://github.com/openhab/openhab2-addons/pull/2012
Hello, same issue i'm still facing in version 2.4
I'm facing this issue with openHAB 2.5.2. Is it possible this problem is still open?
Update: the problem occurs in case the argument (channel exec:command:XXX:input) is set using postUpdate instead of sendCommand. It looks like the argument is not propagated in this case the the second arg is undefined. From my understanding the argument is just an internal variable and nothing that actually receives a command. It may make sense to handle both cases...
The same problem for me, OH version: "openHAB 2.5.7-1 (Release Build)". It just throws out the error after each reboot, even if I'm using only "sendCommand" method for updating of the "Input" channel. The only workaround that I found is to change the "Input" channel in the Paper UI (Control) to whatever manually.
Related to
This bug is related to a discussion in the forums: https://community.openhab.org/t/an-exception-occurred-while-formatting-the-command-line/33385
Expected
It is expected that the value of the String item is replaces the %2$s on the command line of and exec2 Thing.
Issue
As soon as the %2$s is added, the command no longer executes. I experience this error:
Using %1$s works as it adds the date/time as expected.
I have attempted to create things & items using habmin, and actual files with no success. The value of the input string has been set.
Steps and settings
The simplest setting i have tried are:
Context
I am trying to replicate behavior of exec1 where there was a separate command for ON, OFF and GET. By using the %2$s, I should be able to pass the state of my switch to the command line.
Your Environment
I am running OpenHAB 2.1.0 Running on Ubuntu xenial. openjdk version "1.8.0_131" OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11) OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)