[SOLVED] No channels created from thing-type.xml

I took it upon me to learn Java and binding development and I made some progress. A first test version of a binding to get data from a Philips Air Purifier is getting along quite nice; the Diffie-Hellman key exchange, the Thing creation, the device status query into a Java object all work fine.

However, as a beginner on this topic, I somehow overlook an important piece of information. For some reason, the channels are not created. The relevant pieces of code are below (I am now testing with just one channel).


<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="philipsair"
	xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">

	<!-- Philips Air Purifier Thing Type -->
	<thing-type id="philipsair">
		<label>Philips Air Purifier</label>
			Provides air quality data from the Philips Air Cleaner and Humidifier.
			In order to connect, the connection with the App (iOS or Android) must have been created first.
			<channel id="temperature" typeId="temperature" />
			<parameter name="ipAddress" type="text" required="true">
				<label>IP Address</label>
				<description>IP address of the Philips air cleaner and humidifier</description>
			<parameter name="refresh" type="integer" min="1" required="false">
				<label>Refresh interval</label>
				<description>The refresh interval in minutes.</description>
	<channel-type id="temperature">
		<description>Current temperature</description>
		<state readOnly="true"/>


public class PhilipsAirJsonResponse {

    public BifgDecimal temperature;

    public BigDecimal getTemperature() {
        return temperature;


    private void startAutomaticRefresh() {
        if (refreshJob == null || refreshJob.isCancelled()) {
            Runnable runnable = () -> {
                try {
                    airResponse = getPhilipsAirData();
                    for (Channel channel : getThing().getChannels()) {
                        logger.debug("Update channel {}", channel);
                        updateChannel(channel.getUID().getId(), airResponse);
                } catch (Exception e) {
                    logger.error("Exception occurred during execution: {}", e.getMessage(), e);
                logger.debug("Refresh job done");
            PhilipsAirConfiguration config = getConfigAs(PhilipsAirConfiguration.class);
            refreshJob = scheduler.scheduleWithFixedDelay(runnable, 0, config.refreshRate, TimeUnit.SECONDS);

The airResponse object gets the required data from the JSON response, but no channels are found to update.
I looked at other bindings, but could not see a relevant difference related to this (except for bindings that created dynamic channels). I must be blind somehow, so what am I missing?

Would be easier to help if you commit your work to your github repo and post the according link. With just your snippets it is hard to tell what needs to be changed.

Will do, thanks.

The source of this pre-alpha binding version is on GitHub.
Any comments, feedback is appreciated. I’m here to learn but my immediate need is to get the channels created.

Anyone? ;o)

openhab> smarthome:items list
LR_PA_Temp (Type=NumberItem, State=NULL, Label=Temperature, Category=temperature)
openhab> smarthome:links list
LR_PA_Temp -> philipsair:fan:ac2790:temperature
openhab> smarthome:things list
philipsair:fan:ac2790 (Type=Thing, Status=ONLINE, Label=Air Purifier Livingroom, Bridge=null)
openhab> smarthome:things show philipsair:fan:ac2790
UID: philipsair:fan:ac2790
Type: philipsair:fan
Label: Air Purifier Livingroom
Status: ONLINE

No properties

Configuration parameters:
        ipAddress :
        refreshRate : 120

No channels

I tried your binding, but found an issue:

If you update the jar you need to recreate the thing.

I created a thing in PaperUi with automatic item linking and had the channel. Could it be you have no channels configured and linked to items?

1 Like

Thanks, Hilbrand. I did change to ‘fan’ at some point. Must have overlooked this one…

UPDATE: That did it!