Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Parameters on Channel
Parameters on Channel [message #1791274] Wed, 27 June 2018 12:29 Go to next message
Zachary Christiansen is currently offline Zachary ChristiansenFriend
Messages: 1
Registered: June 2018
Junior Member
I am trying to parameters to a few of my channels. I get the parameters to show up but i get null pointer exceptions in my code as seen below. What am i doing wrong? If i remove the decleration of the the extra parameter the binding runs fine with no errors.

Here is the link to my full code. https://github.com/volfan6415/konnected-openhab

   
    <!-- Zone Channel Type -->
    <channel-type id="zone">
        <item-type>String</item-type>
        <label>Pin</label>
        <description>The Zone Channel for adding Sensors</description>
        <config-description-ref uri="channel-type:konnected:zone" />
    </channel-type>
    </thing:thing-descriptions>



<config-description uri="channel-type:konnected:zone">
           <parameter name="config_isActuator" type="boolean">
                <label>IsActuator</label>
              <description>Is the thing connected an actuator</description>
                <default>false</default>
            </parameter>
</config-description>



2018-06-26 15:25:59.169 [ERROR] [.c.thing.link.ThingLinkManager:302  ] - Exception occurred while informing handler: nulljava.lang.NullPointerException: null
	at org.openhab.binding.konnected.internal.KonnectedHandler.channelLinked(KonnectedHandler.java:124)
	at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:300)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

2018-06-26 15:25:59.170 [ERROR] [.c.thing.link.ThingLinkManager:302  ] - Exception occurred while informing handler: nulljava.lang.NullPointerException: null
	at org.openhab.binding.konnected.internal.KonnectedHandler.channelLinked(KonnectedHandler.java:124)
	at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:300)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

2018-06-26 15:25:59.174 [ERROR] [.c.thing.link.ThingLinkManager:302  ] - Exception occurred while informing handler: nulljava.lang.NullPointerException: null
	at org.openhab.binding.konnected.internal.KonnectedHandler.channelLinked(KonnectedHandler.java:124)
	at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:300)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

2018-06-26 15:25:59.175 [ERROR] [.c.thing.link.ThingLinkManager:302  ] - Exception occurred while informing handler: nulljava.lang.NullPointerException: null
	at org.openhab.binding.konnected.internal.KonnectedHandler.channelLinked(KonnectedHandler.java:124)
	at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:300)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

2018-06-26 15:25:59.177 [ERROR] [.c.thing.link.ThingLinkManager:302  ] - Exception occurred while informing handler: nulljava.lang.NullPointerException: null
	at org.openhab.binding.konnected.internal.KonnectedHandler.channelLinked(KonnectedHandler.java:124)
	at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:300)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

2018-06-26 15:25:59.178 [ERROR] [.c.thing.link.ThingLinkManager:302  ] - Exception occurred while informing handler: nulljava.lang.NullPointerException: null
	at org.openhab.binding.konnected.internal.KonnectedHandler.channelLinked(KonnectedHandler.java:124)
	at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:300)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Re: Parameters on Channel [message #1791371 is a reply to message #1791274] Thu, 28 June 2018 12:25 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
Did you check whether "current" or "current.getConfiguration()" is null in line https://github.com/volfan6415/konnected-openhab/blob/master/src/main/java/org/openhab/binding/konnected/internal/KonnectedHandler.java#L124?

If the latter, might it simply be that there isn't any configuration set on the channel?
If it is "current" that is null, you might want to change
        Channel current = thing.getChannel(channel.getAsString());

to
        Channel current = thing.getChannel(channel.getId());

as the getChannel method expects an Id and not a (fully) UID.

Hope this helps!
Kai
Previous Topic:Binding with communication profile
Next Topic:ESH Google IoT core binding
Goto Forum:
  


Current Time: Sun Dec 01 18:18:26 GMT 2024

Powered by FUDForum. Page generated in 0.03466 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top