[SOLVED] [Main] Konnected Binding

When I disconnect a Konnected module the state of the Items (sensors) does not change on the sitemap. Does the Konnected binding update the state when there is a read failure? It seems like the .map is not working. Maybe I need a separate rule to update the sensors? I have looked into checking the state of the Thing but it seems like this should be easier than that or even automatic. Am I missing something trivial?

The reason for this:
If the module goes dead I do not want to falsely believe the doors/windows are still closed.

alarmsensors.map

ON=CLOSED
OFF=OPEN
NULL=ERROR
-=ERROR (UNKNOWN)

Matt

Thanks for pointing this out. I need to look into this. I may need to put a routine that updates all offline channels to null.

Please let me know if I can help in some way.

Hi There,

I am struggling to get the Konnected Alarm Panel to configure correctly with the right API endpoint.

I have the following working

  • OPenhab is stable
  • Konnected binding is installed
  • Upnp is enabled on my router.
  • The Konnected ā€œThingā€ is discoverable, and i can add it and it stays online.

I have not got the following working

  • When I add a channel and Item through the paperUI, the Konnected status page shows the API endpoint NOT as the IP address of my openhab instance but of 10.0.3.1.
  • I have tried to configure a .things file to force the correct discovery between openhab and the Konnected system. But I only get an error ā€œUNINITIALIZED - HANDLER_INITIALIZING_ERRORā€

Questions I have

  • Can I add the Konnected Things, Channels, items via the PaperUI or do I have to do this via .things, .items files as described in the binding docs - https://www.openhab.org/addons/bindings/konnected/

  • What is the correct syntax in the .things file for the location of the openhab server.
    In the documentation is says " ```
    [ipAddress=ā€œhttp://192.168.30.153:9586ā€, macAddress=ā€œ1586517ā€]"

  • Do i need to provide the ip address and port of the KONNECTED Status panel.

  • The macAddress doesnā€™t appear to be a true mac address rather the panel ID number. Is this correct?

_ would anyone mind sharing their .things file with me to illustrate the correct configuration and sequence they went through to make openhab discover the Konnected panel AND provide the correct API endpoint in the Konnected Status page?

Thank you very much!!

With the things especially the preferred method is through paperUI and to let the binding disover and add the proper things. The reference in the documentation to the things file was included for those who with to use .things files.

As listed above i would not recommend using things files and would stick to the things discovered by the binding

Yes you need both in the ipAddress field if you are going to use things files.

this is correct the macAddress is the panelID number. However i have left the label as macAddress as the panel reports its panel ID number under the macAddress field via UPNP. This should really be changed as i agree it is confusing

As to the ipAddress issue. The binding grabs the ipAddress from the framework that it is reporting as the ipAddress of the system. That is what it uses as its ipAddress to report to the panels as the openhab endpoint. From what you are describing there is something that is getting mixed up with the ipadress from the framework.

What is your network setup? Are you running in docker?

Turn on debug logging for the konnected binding and send me the full log file of it starting up.

Thank you very much! I have since got things working and am over the moon. I had removed .things files which you suggested.

The setting I was missing was the Openhan -> Configuration -> System -> Network setting AND turning on Primary Address (IP of openhab server) and Broadcast address. (A broadcast address on 198.1.168.x). Once I enabled this, the Konnected status page showed the correct API endpoint on my openhab instance. I am running this under a QNAP .qpkg installation. I have not sure why this setting was disabled. Hope this help someone out in the future.

2 Likes

Hi all,

Just did a Firmware update on my Konnected.
Now it does not report correctly, all zones are not updating on motion.

If I run through the setup again I can get one zone working, but on rebooting openhab I lose the settings. How can I remove all settings to do with the Binding and start from scratch?

I have removed my items , things and uninstalled the Binding, when re-installing the binding some settings (zones) come back and are not linked (still dont work if I do link them)

@crockernr I want to make sure i understand as it is not clear from your post. Do you have more than one konnected alarm board? You mention getting one ā€œzoneā€ to work which is strange to me because if one zone works then other ā€œzonesā€ on the same board should also work unless something has changed with the new firmware that i am unaware of.

I think you probably already know this but to clarify for others who may read this thread the zones as used on the konnected module refer to each of the terminals 1-6 on the board.

But to answer your question all you need to do to restart from scratch is remove all things, items and the binding. If you then reinstall the binding it will find the alarm panels on the network. Which will then need to be added.

As with the initial setup the alarm panel will only populate with two zones and you will need to add the channels for any other zones that you have and use on that panel. (actuators or sensors)

once you have everything added back and installed turn debug logging on and send me a logfile. Also what version of openhab are you running, and are you running the version of the binding from within paper ui or a different version. Thanks

Yes, just one of the 6 zones (zone 1) works
I have single alarm board.

I have run through and deleted the things, items and binding. Once I reinstall the binding, it seems to pickup the default zones plus the zone Ā¹ for some reason, itā€™s like its caching somethingā€¦

Iā€™ll run through it again and collect the logs.

Iā€™m running OH 2.4.0 and using the binding from paperui.

Is it actually possibly to use a things file rather than PaperUI? I have it successfully working in PaperUI, but when I try to convert to a things file it will not register correctly. The thing and itā€™s channels will show up in PaperUI (with some channels added yet not in my file). The module will no go online.

Here is the file Iā€™m using.

Thing konnected:module:4391111 "Konnected Shed" [ipAddress="192.168.1.2:12391", macAddress="4391111", retry_count="2", request_timeout="30"]{
Channels:
	Type switch      : KonnectedS_1      "Shed Windows"          [zone=1]
	Type switch      : KonnectedS_2      "Shed Shop Motion"      [zone=2]
	Type switch      : KonnectedS_3      "Shed Office Motion"    [zone=3]
	Type switch      : KonnectedS_4      "Shed Heat Detector"    [zone=4]
	Type switch      : KonnectedS_5      "Shed Door"          	 [zone=5] 

}

1 Like

It should be able to. can you send me log files with debug logging turned on?

I wonder if someone can help me. I think Iā€™m getting an error when adding a konnected device from the inbox. Here are my logs when I add the thing

2020-01-29 18:46:49.476 [vent.ItemStateChangedEvent] - living_room_blinds_rs changed from 9 to 0
2020-01-29 18:47:03.826 [me.event.InboxRemovedEvent] - Discovery Result with UID 'konnected:module:14221621' has been removed.
2020-01-29 18:47:03.920 [hingStatusInfoChangedEvent] - 'konnected:module:14221621' changed from UNINITIALIZED to INITIALIZING
2020-01-29 18:47:03.944 [hingStatusInfoChangedEvent] - 'konnected:module:14221621' changed from INITIALIZING to UNKNOWN
==> /var/log/openhab2/openhab.log <==
2020-01-29 18:47:04.255 [ERROR] [ome.core.thing.link.ThingLinkManager] - Exception occurred while informing handler: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:887) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:852) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:801) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:773) ~[?:?]
	at org.openhab.binding.konnected.internal.handler.KonnectedHandler.sendSetSwitchState(KonnectedHandler.java:510) ~[?:?]
	at org.openhab.binding.konnected.internal.handler.KonnectedHandler.getSwitchState(KonnectedHandler.java:487) ~[?:?]
	at org.openhab.binding.konnected.internal.handler.KonnectedHandler.handleCommand(KonnectedHandler.java:105) ~[?:?]
	at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:233) ~[?:?]
	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) [?:?]
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $
	at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385) ~[?:?]
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213) ~[?:?]
	... 16 more
==> /var/log/openhab2/events.log <==
2020-01-29 18:47:05.142 [hingStatusInfoChangedEvent] - 'konnected:module:14221621' changed from UNKNOWN to ONLINE
==> /var/log/openhab2/openhab.log <==
2020-01-29 18:47:11.999 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /konnected/device/a4cf12d90135
java.lang.NullPointerException: null
	at org.openhab.binding.konnected.internal.servlet.KonnectedHTTPServlet.service(KonnectedHTTPServlet.java:107) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[29:javax.servlet-api:3.1.0]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) ~[85:org.eclipse.jetty.servlet:9.4.11.v20180605]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) ~[85:org.eclipse.jetty.servlet:9.4.11.v20180605]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[82:org.eclipse.jetty.security:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) ~[85:org.eclipse.jetty.servlet:9.4.11.v20180605]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.Server.handle(Server.java:531) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) [84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) [84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) [75:org.eclipse.jetty.io:9.4.11.v20180605]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [75:org.eclipse.jetty.io:9.4.11.v20180605]
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) [75:org.eclipse.jetty.io:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at java.lang.Thread.run(Thread.java:748) [?:?]

This is what I get when I restart the device:

2020-01-29 18:51:08.855 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /konnected/device/a4cf12d90135
java.lang.NullPointerException: null
	at org.openhab.binding.konnected.internal.servlet.KonnectedHTTPServlet.service(KonnectedHTTPServlet.java:107) ~[?:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[29:javax.servlet-api:3.1.0]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) ~[85:org.eclipse.jetty.servlet:9.4.11.v20180605]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) ~[85:org.eclipse.jetty.servlet:9.4.11.v20180605]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[82:org.eclipse.jetty.security:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) ~[85:org.eclipse.jetty.servlet:9.4.11.v20180605]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.Server.handle(Server.java:531) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) [84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) [84:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) [75:org.eclipse.jetty.io:9.4.11.v20180605]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [75:org.eclipse.jetty.io:9.4.11.v20180605]
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) [75:org.eclipse.jetty.io:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) [87:org.eclipse.jetty.util:9.4.11.v20180605]
	at java.lang.Thread.run(Thread.java:748) [?:?]

Turn debug logging on and attach the whole log file.

Thanks

I think I enabled debug mode

log:set DEBUG org.openhab.binding.Konnected

but im still seeing the same in the log. Do I need to view a different log? IS debugging still enabled after a reboot?

EDIT

I think I have everything going. looks likes there were issues with my Items. After sorting those out and then removing and reading the thing it seems to work and im getting data from the Konnected device when the input status change.

I will do some more testing and come back if I have any more issues :slight_smile: thanks for pointing me to the debug mode. I think that helped.


Ok I think I enabled the logging. I was using an uppercase K in the previous command which I think was the issue. I now see two debug lines in the log but the rest is the same. are you expecting more here?

2020-01-31 18:24:33.273 [DEBUG] [nternal.servlet.KonnectedHTTPServlet] - The raw json data is: 

2020-01-31 18:24:33.282 [DEBUG] [nternal.servlet.KonnectedHTTPServlet] - The path of the response was: 

2020-01-31 18:24:33.287 [WARN ] [org.eclipse.jetty.server.HttpChannel] - /konnected/device/a4cf12d90135

java.lang.NullPointerException: null

	at org.openhab.binding.konnected.internal.servlet.KonnectedHTTPServlet.service(KonnectedHTTPServlet.java:107) ~[?:?]

	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[29:javax.servlet-api:3.1.0]

	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) ~[?:?]

	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) ~[?:?]

	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[?:?]

	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) ~[?:?]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) ~[?:?]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) ~[?:?]

	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) ~[?:?]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.eclipse.jetty.server.Server.handle(Server.java:531) ~[84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352) [84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) [84:org.eclipse.jetty.server:9.4.11.v20180605]

	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281) [75:org.eclipse.jetty.io:9.4.11.v20180605]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [75:org.eclipse.jetty.io:9.4.11.v20180605]

	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) [75:org.eclipse.jetty.io:9.4.11.v20180605]

	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762) [87:org.eclipse.jetty.util:9.4.11.v20180605]

	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680) [87:org.eclipse.jetty.util:9.4.11.v20180605]

	at java.lang.Thread.run(Thread.java:748) [?:?]

This is what I get when I re add the device

2020-01-31 18:30:37.963 [me.event.InboxRemovedEvent] - Discovery Result with UID 'konnected:module:14221621' has been removed.

==> /var/log/openhab2/openhab.log <==

2020-01-31 18:30:37.968 [DEBUG] [ted.internal.KonnectedHandlerFactory] - The callback ip address obtained from the Network Address Service was:10.0.0.10

2020-01-31 18:30:37.976 [DEBUG] [ted.internal.KonnectedHandlerFactory] - the port for the callback is: 8080

2020-01-31 18:30:37.981 [DEBUG] [ed.internal.handler.KonnectedHandler] - The callback ip address is: 10.0.0.10:8080

2020-01-31 18:30:37.985 [DEBUG] [ted.internal.KonnectedHandlerFactory] - Adding thinghandler for thing 14221621 to webhook.

2020-01-31 18:30:37.989 [DEBUG] [nternal.servlet.KonnectedHTTPServlet] - Trying to Start Webhook at /konnected.

2020-01-31 18:30:38.007 [DEBUG] [nternal.servlet.KonnectedHTTPServlet] - Started Konnected Webhook servlet at /konnected

==> /var/log/openhab2/events.log <==

2020-01-31 18:30:38.021 [hingStatusInfoChangedEvent] - 'konnected:module:14221621' changed from UNINITIALIZED to INITIALIZING

==> /var/log/openhab2/openhab.log <==

2020-01-31 18:30:38.023 [DEBUG] [ed.internal.handler.KonnectedHandler] - Checking configuration on thing konnected:module:14221621

2020-01-31 18:30:38.026 [DEBUG] [ed.internal.handler.KonnectedHandler] - The RequestTimeout Parameter is Configured as: 30

2020-01-31 18:30:38.028 [DEBUG] [ed.internal.handler.KonnectedHandler] - The Retry Count Parameter is Configured as: 2

==> /var/log/openhab2/events.log <==

2020-01-31 18:30:38.034 [hingStatusInfoChangedEvent] - 'konnected:module:14221621' changed from INITIALIZING to UNKNOWN

==> /var/log/openhab2/openhab.log <==

2020-01-31 18:30:38.034 [DEBUG] [ed.internal.handler.KonnectedHandler] - The Auth_Token is: konnected:module:14221621

2020-01-31 18:30:38.037 [DEBUG] [ed.internal.handler.KonnectedHandler] - The Channel konnected:module:14221621:Zone_6 is not linked to an item

2020-01-31 18:30:38.040 [DEBUG] [ed.internal.handler.KonnectedHandler] - The Channel konnected:module:14221621:Out is not linked to an item

2020-01-31 18:30:38.045 [DEBUG] [ed.internal.handler.KonnectedHandler] - The payload is: {"sensors":[],"actuators":[],"dht_sensors":[],"ds18b20_sensors":[],"token":"konnected:module:14221621","apiUrl":"http://10.0.0.10:8080/konnected","blink":true,"discovery":true}

2020-01-31 18:30:38.047 [DEBUG] [onnected.internal.KonnectedHTTPUtils] - The String url we want to put is : http://10.0.0.123:22221/settings

2020-01-31 18:30:38.049 [DEBUG] [onnected.internal.KonnectedHTTPUtils] - The payload we want to put is: {"sensors":[],"actuators":[],"dht_sensors":[],"ds18b20_sensors":[],"token":"konnected:module:14221621","apiUrl":"http://10.0.0.10:8080/konnected","blink":true,"discovery":true}

2020-01-31 18:30:38.923 [DEBUG] [onnected.internal.KonnectedHTTPUtils] - 

2020-01-31 18:30:38.928 [DEBUG] [ed.internal.handler.KonnectedHandler] - The response of the put request was: 

This is what I get when I link the things to Items

Link 'Front_Door_Sensor-konnected:module:14221621:Zone_6' has been added.

2020-01-31 18:33:19.266 [.ItemChannelLinkAddedEvent] - Link 'Siren-konnected:module:14221621:Out' has been added.

==> /var/log/openhab2/openhab.log <==

2020-01-31 18:33:19.273 [DEBUG] [ed.internal.handler.KonnectedHandler] - The command payload  is: {"pin":9}

2020-01-31 18:33:19.304 [DEBUG] [ed.internal.handler.KonnectedHandler] - The channelUID is: konnected:module:14221621:Out and the zone is :

2020-01-31 18:33:19.311 [DEBUG] [ed.internal.handler.KonnectedHandler] - getasstring: konnected:module:14221621:Out getID: Out getGroupId: null toString:konnected:module:14221621:Out

2020-01-31 18:33:19.318 [DEBUG] [onnected.internal.KonnectedHTTPUtils] - The String url we want to get is : http://10.0.0.123:22221/device

2020-01-31 18:33:19.333 [DEBUG] [ed.internal.handler.KonnectedHandler] - The command payload  is: {"pin":8}

2020-01-31 18:33:19.637 [DEBUG] [onnected.internal.KonnectedHTTPUtils] - []

2020-01-31 18:33:19.645 [DEBUG] [onnected.internal.KonnectedHTTPUtils] - The String url we want to get is : http://10.0.0.123:22221/device

2020-01-31 18:33:19.646 [ERROR] [ome.core.thing.link.ThingLinkManager] - Exception occurred while informing handler: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $

	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:887) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:852) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:801) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:773) ~[?:?]

	at org.openhab.binding.konnected.internal.handler.KonnectedHandler.sendSetSwitchState(KonnectedHandler.java:510) ~[?:?]

	at org.openhab.binding.konnected.internal.handler.KonnectedHandler.getSwitchState(KonnectedHandler.java:487) ~[?:?]

	at org.openhab.binding.konnected.internal.handler.KonnectedHandler.handleCommand(KonnectedHandler.java:105) ~[?:?]

	at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:233) ~[?:?]

	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) [?:?]

Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $

	at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385) ~[?:?]

	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213) ~[?:?]

	... 16 more

2020-01-31 18:33:19.872 [DEBUG] [onnected.internal.KonnectedHTTPUtils] - []

2020-01-31 18:33:19.876 [ERROR] [ome.core.thing.link.ThingLinkManager] - Exception occurred while informing handler: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $

	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:887) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:852) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:801) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:773) ~[?:?]

	at org.openhab.binding.konnected.internal.handler.KonnectedHandler.sendSetSwitchState(KonnectedHandler.java:510) ~[?:?]

	at org.openhab.binding.konnected.internal.handler.KonnectedHandler.getSwitchState(KonnectedHandler.java:487) ~[?:?]

	at org.openhab.binding.konnected.internal.handler.KonnectedHandler.handleCommand(KonnectedHandler.java:105) ~[?:?]

	at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:233) ~[?:?]

	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) [?:?]

Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $

	at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385) ~[?:?]

	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:213) ~[?:?]

.Items

Switch Front_Door_Sensor "Front Door" (gKHDS) {channel="konnected:module:14221621:Zone_6"}

Switch Siren "Siren" (gKHS) {channel="konnected:module:14221621:Out"}

Glad you got it worked out.

1 Like

PIR on Konnected board ā€œGhostsā€ when connected to OpenHab

My Konnected system is set up with two PIR Motion sensors, one works fine, It shows 7 ohms at closed state. The other PIR ā€œGhostsā€ - By that I mean the blue Konnected indicator light constantly flickers on and off when there is not motion. (It shows 14 ohms at closed state, and I replaced it with a new PIR, also around 14 ohms that ALSO ghosts) I tried 4 different boards I swapped pins with the PIR that does work andstill get flickering (and on/off/on/off in the Openhab logs.) I did get the system to stabilize for a week on one board until I unplugged it and plugged it back in and it started ghosting/flickering and registering on/off in the OpenHab logs - I did notice that upon erasing the PROM and reflashing, and then removing the Thing from OpenHab that the flickering did not start again until I reimported and configured the device in Openhab. The blue light sequence is something like: flicker, pause one second, flicker,flicker, pause one second, flicker,flicker - somewhat random, but constant. Iā€™ve contacted Konnected and they are at a loss. I also tried a short test wiring of the PIR in case I had some sort of induced impedence on the wiring.

It might be a dumb question, but do the Konnected devices READ data from Openhab? I am wondering if I have some sort of looping going on via the binding.

@Douglas_Wielfaert

No the konnected devices merely send data to openhab.

The blue light is an activity light on the wifi module. So that means it is sending data or trying to send data.

To debug please turn debug logging on and send me a complete log file when the problem is happening.

Also do you know how to login to the status page of the konnected device? If so please send me a screenshot of that page. (you access it at http://ipadressofdevice:secretport)

This address and port can be found under the discovered thing properties in paperUI.

So I suppose it took three weeks of reading posts, lurking in this thread and finally daring to post that led to a quick solution. I wondered about the power to the Konnected board and today Konnected support asked for the specs on the PS that I got from them. I found a quality 4 amp 12v PS from an old router and using that immediately stabilized the board! I may be circling back later to ask about Java errors, but for now, Iā€™m good.

Thanks for your work on the binding!

@Douglas_Wielfaert glad you got it sorted.