HMW-IO-12-Sw14-DR missing datapoints

Dear all,

I own a Homematic wired installations including a ccu2, which operates very well using openhab 1. Now I have started openhab 2 migration and failed due to not discovered datapoints for this homematic device type e.g. in PaperUI.

All tests have been done using latest openhabian build 2.1.0.201703310852 and latest CCU2 firmware 2.27.8. The HMW-IO-12-Sw14-DR is a Wired RS485 I/O Module with 12 inputs, 14 outputs. Accordingly there should be at least 26 data points for this thing.

I start with an almost clean openhab2 install (only homematic bindings available). The homematic bindings are triggered, by following things definition in /etc/openhab2/things/homematic.things:

Bridge homematic:bridge:ccu2 [ gatewayAddress=“192.168.X.Y”, timeout=120 ]
{
Thing HMW-IO-12-Sw14-DR LEQ0123123 “I/O Modul” @ “Garage”
Thing HMW-IO-12-Sw14-DR NEQ0123123 “I/O Modul” @ “Basement”
Thing GATEWAY-EXTRAS-CCU2 GWE00000000
}

In Karaf console, all tings are listed accordingly

openhab> smarthome:things
homematic:bridge:ccu2 (Type=Bridge, Status=ONLINE, Label=Homematic Bridge, Bridge=null)
homematic:HMW-IO-12-Sw14-DR:ccu2:LEQ0123123 (Type=Thing, Status=ONLINE, Label=I/O Modul, Bridge=homematic:bridge:ccu2)
homematic:GATEWAY-EXTRAS-CCU2:ccu2:GWE00000000 (Type=Thing, Status=ONLINE, Label=null, Bridge=homematic:bridge:ccu2)
homematic:HMW-IO-12-Sw14-DR:ccu2:NEQ0123123 (Type=Thing, Status=ONLINE, Label=I/O Modul, Bridge=homematic:bridge:ccu2)

But when I go to Paper UI, only 6 Digital Output datapoints are visible per HMW-IO-12-Sw14-DR. The other datapoints (Analog Outputs, Digitial Inputs, Analog Inputs) are missing. One thing which makes me courious is the following excerpt from homematic binding logging:

2017-04-02 19:21:19.594 [DEBUG] [atic.type.HomematicTypeGeneratorImpl] - Generating ThingType for device ‘HMW-IO-12-Sw14-DR’ with 53 datapoints
2017-04-02 19:21:19.596 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_OUTPUT|STATE, STATE
2017-04-02 19:21:19.597 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_OUTPUT|STATE, STATE
2017-04-02 19:21:19.599 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_OUTPUT|STATE, STATE
2017-04-02 19:21:19.600 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_OUTPUT|STATE, STATE
2017-04-02 19:21:19.600 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_OUTPUT|STATE, STATE
2017-04-02 19:21:19.601 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_OUTPUT|STATE, STATE
2017-04-02 19:21:19.602 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_ANALOG_OUTPUT|STATE, STATE
2017-04-02 19:21:19.603 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_ANALOG_OUTPUT|STATE, STATE
2017-04-02 19:21:19.603 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_ANALOG_OUTPUT|STATE, STATE
2017-04-02 19:21:19.604 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_ANALOG_OUTPUT|STATE, STATE
2017-04-02 19:21:19.605 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_ANALOG_OUTPUT|STATE, STATE
2017-04-02 19:21:19.606 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_ANALOG_OUTPUT|STATE, STATE
2017-04-02 19:21:19.607 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_ANALOG_OUTPUT|STATE, STATE
2017-04-02 19:21:19.607 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_ANALOG_OUTPUT|STATE, STATE
2017-04-02 19:21:19.608 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_INPUT|STATE, STATE
2017-04-02 19:21:19.609 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_INPUT|STATE, STATE
2017-04-02 19:21:19.609 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_INPUT|STATE, STATE
2017-04-02 19:21:19.610 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_INPUT|STATE, STATE
2017-04-02 19:21:19.611 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_INPUT|STATE, STATE
2017-04-02 19:21:19.611 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_INPUT|STATE, STATE
2017-04-02 19:21:19.612 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_ANALOG_INPUT|STATE, STATE
2017-04-02 19:21:19.613 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_ANALOG_INPUT|STATE, STATE
2017-04-02 19:21:19.613 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_ANALOG_INPUT|STATE, STATE
2017-04-02 19:21:19.614 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_ANALOG_INPUT|STATE, STATE
2017-04-02 19:21:19.615 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_ANALOG_INPUT|STATE, STATE
2017-04-02 19:21:19.615 [DEBUG] [binding.homematic.type.MetadataUtils] - Description not found for: DIGITAL_ANALOG_INPUT|STATE, STATE

For more details please see

Thank you very much for any support beforehand. I would be quite happy to finally upgrade to openhab 2 :slight_smile:

Best,

Michael

Hi Michael,

You can ignore the debug messages regarding the missing descriptions. This just means that no descriptive texts are available for these channels. In the trace file I could not see any errors and one of the DEBUG message says that 53 datapoints were found.

What happens if you press “SHOW MORE” in Paper UI’s “Things” page? Do the missing channels appear? Most of the channels are only displayed if show more is activated.

Martin

Thanks Martin for the quick response :slight_smile:

Indeed, after I found the “show more” button, the channels appear :slight_smile:

What struggles me is that “homematicHMW-IO-12-Sw14-DR:ccu2:LEQ0123123:21#STATE” is listed as STATE and not VALUE. It measures 0-10V analog input, which is transmitted using an integer number 0 … 1000 on homematic bus, therefore a VALUE representation is required to create an Number item.

I even double-checked, that when I go to Thing -> Edit -> Configuration Parameters that Channel 21 behaviour is an analog input signal.

Any hints appreciated. Thank you beforehand!

Michael

The channel type definitions are derived from the datapoints definitions returned by the CCU. In the log file I could only find one reference to this channel that says Received new (Boolean) value 'false' for 'NEQxxxxxx:21#STATE' from gateway with id 'ccu2'. This means that the CCU sends a boolean value.

The log contains another entry for channel 21: `Received new (Double) value ‘407.0’ for ‘LEQxxxxxx:21#VALUE’ from gateway with id ‘ccu2’``. This seems to be the input value.

Probably @gerrieg can help with this problem.

To avoid possible missunderstandings, I want to stress that there are two HMW-IO-12-Sw14-DR connected to the homematic bus (NEQxxxxxx and LEQxxxxxx).

Inside homematic binding logs I see plenty of log lines like “new (Double) value ‘407.0’ for ‘LEQxxxxxx:21#VALUE’ from gateway with id ‘ccu2’”, which matches the expected value and channel.

Like written above, in PaperUI the thing homematic:HMW-IO-12-Sw14-DR:ccu2:LEQxxxxxx’ only has a “21#STATE” channel, so the value 407.0 never shows up outside the homematic binding.

Please tell me, If I should provide more trace logs, because for me it looks like that there is a bug.

Hi all,
today I spend some more time on this issue and found a possible explanation. @MHerbst and @gerrieg may I ask you to verify this and change the code accordingly?

In file standard-datapoints.properties is a table, which maps the channel type to a data point name (see loadStandardDatapoints() in MetadataUtils.java. Next is an excerpt from this file:

DIGITAL_OUTPUT|STATE
DIGITAL_ANALOG_OUTPUT|FREQUENCY
DIGITAL_INPUT|FREQUENCY
DIGITAL_ANALOG_INPUT|VALUE

According to the configuration section *1) of my two HMW-IO-12-Sw14-DR the channels are named “ANALOG_OUTPUT” and “ANALOG_INPUT” without “DIGITAL_” prefix. Therefore I assume that the section standard-datapoints.properties should be written like:

DIGITAL_OUTPUT|STATE
ANALOG_OUTPUT|FREQUENCY
DIGITAL_INPUT|FREQUENCY
ANALOG_INPUT|VALUE

Then the channel 21 of my device should be mapped to an VALUE data point, which is my root problem like explained above.

*1) for reference, please find attached the output of the relevant REST service call:

http://openhabianpi:8080/rest/things/homematic%3AHMW-IO-12-Sw14-DR%3Accu2%3ALEQ0xxxxxx

see https://pastebin.com/MYsi6YdR

Thanks!

Michael

Only looking at the channel names I agree with you. Those two channel names seem to be wrong. Can you create an issue in the Github Repo?

Hello!

I just want to point out that I have the same problem with different devices, topic is located here: Homematic Binding: "Channel not found for datapoint" errors for definitely existing channels

After analysing your Trace log, i suspect that the type of the datapoint can be switched between digital and analog input. Depending on this config, the CCU sends either a STATE or a VALUE as metadata. I’m not sure, but i think i read that out of the metadata.

So please try this version of the binding: Download

You should see this in the logfile to know this testversion is active:

############### TESTVERSION ###############

If it works now -> fine. If not, please post a full trace log again.

I also changed the standard-datapoints.properties, thanks for your input!

@gerrieg please kindly find attached a TRACE log recorded using TESTVERSION jar.

https://pastebin.com/xRCA2vz9

I’m sorry to tell, that I still receive messages like
2017-04-17 12:54:46.789 [DEBUG] [ommunicator.AbstractHomematicGateway] - Received new (Double) value ‘331.0’ for ‘LEQ0123123:21#VALUE’ from gateway with id 'ccu2’
2017-04-17 12:54:46.790 [WARN ] [ematic.handler.HomematicThingHandler] - Channel not found for datapoint ‘LEQ0123123:21#VALUE’

Regarding your assumptions you are right, the homematic device can be toggled between digital and analog input and output (!) for certain ports.

Metadata is now correctly extracted, the VALUE datapoint is available. But now i have a big problem, a datapoint can change it’s metadata depending on how it is configured. The Channel not found warning is a consequence of this.
I have to think about how to implement this special case best. Which channels can be configured that way? 21 to 26?

Thanks Gerhard for this very quick reply!

For future reference:

  • HMW-IO-12-Sw14-DR Product Manual
  • Channel 1 to 6 are output to classic relays, which can only be toggled on or off
  • Channel 7 to 14 are open collector outputs, which can be configured between digital (on/off) or analog (frequency)
  • Channel 15 to 20 are TTL inputs, when connected to module GND they switch to closed. They can be configured between digital (on/off) or analog (frequency measurement)
  • Channel 21 to 26 are 0-10V inputs, which can be configured between digital (on/off) or analog (voltage measurement)

I’m really suprised, that this configuration would be new to the binding, because PaperUI provides inside thing configuration a user interface for these settings. (I have to admit, that this was never used by myself, because I did the initial configuration once using CCU2)

Best,

Michael

Hi Michael!

Please try this Testversion V2: Download

This version adds either a STATE or a VALUE datapoint to the channels 7-26. So you should always have both datapoints available. I can only test this very rudimentary, so i need your help. Thank you in advance.

I’m really suprised, that this configuration would be new to the binding

Yes, that’s new. I never saw a device before that changes it’s metadata. I would expect, that the CCU sends all possible datapoints for a channel.

Hello Gerhard,

please be welcome with new TRACE logs :slight_smile:

https://pastebin.com/bqWwuabP

This time it worked very well! Value datapoint for channel 21 was populated with the expected number. It only took quite some time and multiple restarts, until the number was visible in BasicUI frontend, but this may be related to openhab2 in general, not to the binding at all.

If you scan for “Can’t set value for datapoint”, then you will only find an additional “CALIBRATION” one. This feature haven’t been used by myself. In CCU you can enter a calibration number only for channel 21 to 26, to be added or subtracted to the measurement within the range -127 to +127.

2017-04-17 17:40:48.569 [WARN ] [ommunicator.parser.GetParamsetParser] - Can’t set value for datapoint ‘LEQ0975586:M_21#CALIBRATION’

The real value is well transmitted and to be displayed in UI:
2017-04-17 17:42:41.404 [DEBUG] [ommunicator.AbstractHomematicGateway] - Received new (Double) value ‘276.0’ for ‘LEQ0123123:21#VALUE’ from gateway with id 'ccu2’
2017-04-17 17:42:41.405 [TRACE] [converter.type.AbstractTypeConverter] - Converting FLOAT value ‘276.0’ with DecimalTypeConverter for ‘LEQ0123123:21#VALUE’

Can you give me a hint, when you are going to commit a final solution in the snapshot builds?

Thanks a lot!

Michael

Hi Michael!

That’s a strange device :slight_smile:
Added CALIBRATION datapoint if not available: Download Testversion V3

If you can confirm that it is working now, i can commit it tomorrow.

BR
Gerhard

Thanks again Gerhard for your effort!

For me it looks fine, please find trace at https://pastebin.com/tsALAvWm

Best,

Michael

Hi Michael!

I’m on vacation for two weeks now, i will look at it when i am back.

BR
Gerhard

Hi Michael!

The changes have been merged today: https://github.com/openhab/openhab2-addons/pull/2231

BR
Gerhard

Thanks a lot for your support and code changes!

Best,

Michael