Comfoair binding: set target_temperatur

Dear all,

I am using the comfoair binding 1.9 with openhab 2.0 with connected serial cable to the comfoair 200.
I am able to read different kinds of temperature and successfully control the fan level.

Regarding comfort temperature (target_temperature), I can successfully read the value from device.
But, if I would like to write the value (e.g. by hab panel) I get an exception from comfoair binding.

The item is configured in
comfoair.items:
Number Lueftung_Komfortemperatur “Zieltemperatur [%d]” (Lueftung) {comfoair=“target_temperatur”}

openhab.log:
13:12:04.831 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘Lueftung_Komfortemperatur’ received command 17
13:12:04.922 [INFO ] [marthome.event.ItemStateChangedEvent] - Lueftung_Komfortemperatur changed from 18 to 17
13:12:05.054 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Lueftung_Komfortemperatur] {bridgemarker=true, item=Lueftung_Komfortemperatur, command=17} | {org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler}={event.topics=openhab/*, service.pid=org.openhab.comfoair, component.name=org.openhab.binding.comfoair, component.id=223, service.id=363, service.bundleid=227, service.scope=bundle} | Bundle(org.openhab.binding.comfoair_1.9.0 [227])]
java.lang.NullPointerException
at org.openhab.binding.comfoair.handling.ComfoAirCommandType.getAffectedReadCommands(ComfoAirCommandType.java:421)[227:org.openhab.binding.comfoair:1.9.0]
at org.openhab.binding.comfoair.internal.ComfoAirBinding.internalReceiveCommand(ComfoAirBinding.java:107)[227:org.openhab.binding.comfoair:1.9.0]
at org.openhab.core.binding.AbstractBinding.receiveCommand(AbstractBinding.java:97)[176:org.openhab.core.compat1x:2.0.0]
at org.openhab.core.events.AbstractEventSubscriber.handleEvent(AbstractEventSubscriber.java:42)[176:org.openhab.core.compat1x:2.0.0]
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415)[6:org.apache.karaf.services.eventadmin:4.0.8]
at org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:90)[6:org.apache.karaf.services.eventadmin:4.0.8]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_65]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_65]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]

Does somebody now this problem? Is the issue related to write the value to the comfoair or more linked to internal handling of the binding or configuration of the binding?

Thanks a lot for support.

Best,
Rüdiger

PS: Despite of this target_temperature issue, it looks that the comfoair binding works with comfoair 200.

I do have exactly the same error thrown. For completeness, my CCEase is physically disconnected, all other controls work fine, too - including fan control. Binding version is 1.9, OpenHAB2 is 2.0.0 Java 1.8.0_121.

Dear all,

I further analyzed the code. The exception occurs if the binding is searching for affected_keys.
As for

ComfoAirCommandType.java

TARGET_TEMPERATUR {
    {
        key = "target_temperatur";
        data_type = DataTypeTemperature.class;
        change_command = 0xd3;
        change_data_size = 1;
        change_data_pos = 0;
        read_command = 0xd1;
        read_reply_command = 0xd2;
        read_reply_data_pos = new int[] { 0 };
    }

there is not change_affected listed and the following command:

public static Collection<ComfoAirCommand> getAffectedReadCommands(String key, Set<String> usedKeys) {
    Map<Integer, ComfoAirCommand> commands = new HashMap<Integer, ComfoAirCommand>();
    ComfoAirCommandType commandType = ComfoAirCommandType.getCommandTypeByKey(key);
    if (commandType.read_reply_command != 0) {
        Integer getCmd = commandType.read_command == 0 ? null : new Integer(commandType.read_command);
        Integer replyCmd = new Integer(commandType.read_reply_command);
        ComfoAirCommand command = new ComfoAirCommand(key, getCmd, replyCmd, null);
        commands.put(command.getReplyCmd(), command);
    }

will access the null pointer at commandType.change_affected:

    for (String affectedKey : commandType.change_affected) {

If change_affected keys would be listed, the exception would no longer occur. However, the functionality seems not to be affected.

Best,
Rüdiger