Can't figure my binding 'No thing types can be added with this binding'

I have started working on a binding to integrate with the AirTouch air-conditioning controller.

At the moment I have two problems.

  1. I can’t manually configure my binding.
    On the things page when I add my Thing, it says…

Add Manually
No thing types can be added with this binding.

  1. I have implemented Discovery, and my code finds the airtouch and calls thingDiscovered(discoveryResult);
    However, my AirTouch4Handler#initialize() is never called.

It feels like I am missing something simple.

Do I need to register a DiscoveryListener and then call configurationUpdated on my handler somehow?

You need to implement ThingTypeProvider or rely on XML declaration, like this: connectorio-addons/thing-types.xml at db6837d92e772eb81f45bcc99b9c74f32a6d7b13 · ConnectorIO/connectorio-addons · GitHub

(linking external 3.0.x addon so it is easier to navigate)

Discovery is another part of framework. It leads to detection of things which needs to be defined/declared separately. If you look back at your discovery code you for sure have there “ThingTypeUID”. This stands for <binding-id>:<thing-type-id> from above XML sample. Note - pay attention to bindingId attribute which needs to be in sync with other places in your code.

Best,
Łukasz

Thank you @splatch for your reply.

I have found that I can use AIRTOUCH4_CONTROLLER_THING_TYPE.getAsString() when building the ThingUID. That is safer, and has the prefix already prepended.

Thanks for the tip on that.

For the xml configuration for thing-types.xml it was there, but I had renamed the binding from airtouch4 to airtouch, and neglected to update the line at the top of thing-types.xml as follows…

<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="airtouch4"

changing that to

<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="airtouch"

has let me manually create it.

Additionally, discovery is now working. It find the device and adds it to the inbox.

Thanks again for your quick reply.