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
Number Lueftung_Komfortemperatur “Zieltemperatur [%d]” (Lueftung) {comfoair=“target_temperatur”}

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 ] [] - 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.event.EventHandler}={event.topics=openhab/*,,,,, service.bundleid=227, service.scope=bundle} | Bundle(org.openhab.binding.comfoair_1.9.0 [227])]
at org.openhab.binding.comfoair.handling.ComfoAirCommandType.getAffectedReadCommands([227:org.openhab.binding.comfoair:1.9.0]
at org.openhab.binding.comfoair.internal.ComfoAirBinding.internalReceiveCommand([227:org.openhab.binding.comfoair:1.9.0]
at org.openhab.core.binding.AbstractBinding.receiveCommand([176:org.openhab.core.compat1x:2.0.0]
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent([]
at java.util.concurrent.Executors$[:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker([:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$[: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.


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

        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.