[SOLVED] [Main] Konnected Binding

I assume that for me to connect a beeper, I just put it in a zone, change that zone to an actuator and adjust the pulses.

Correct

1 Like

Hey Zachary, Any idea why it wont discover devices anymore. I had to reset the konnected device as it got stuck in a bootloop. and now it wont show it as being discovered.

nevermind, i needed to install the UPNP service as mentioned in the first few posts again after updating to the openhab snapshot 2.4

nevermind, i needed to install the UPNP service as mentioned in the first few posts again after updating to the openhab snapshot 2.4

:+1: glad you got it worked out.

1 Like

Happy to report that the binding has now been merged! Should be part of the snapshots builds and into the 2.4. M6 testing releases. For those not running snapshots and until testing M6 is released i will place a .jar in the first post of this thread that can be used that is equivalent to what will be in the release.

2 Likes

@volfan6415
I canā€™t seem to get my modules to communicate with my openhab after update. I didnā€™t read the remove channels and things part until after I ran into troubles and deleted them afterwards, but now its does not work. How do you factory reset these things?

oof.

EDIT: Ignore me. I fixed it by reflashing the module and erasing memory. Thatā€™s what I get for not reading.

1 Like

I will say that earlier versions of the binding were not as clear with the discovery flag being set correctly. So it is possible that your devices had discovery disabled and you didnā€™t realize it. I ran into that issue last night myself. :slight_smile: This has been corrected with the newest version so going forward this wonā€™t be a problem as long as you remember to turn discovery back on and have the setting sync before you remove the thing. (assuming you have it disabled.) But as the articles mention i would only disable device discovery if you are having specific problems. In most cases its best to leave it on.

@volfan6415
Actually I do need help. Iā€™ve upgraded to the latest snapshot build of openhab and its just not updating the modules. When I first added them it said Online, but after I added all the channels, pushed the update button for manual update, I tested them and it did not work. After I restarted Openhab the module says ā€œUnknownā€. The device status web page says there are no sensors or actuators.

Log to follow, I think I need to re-enable debug level

yes please enable debug log level and send it over. Also there were two major bugs (tiny lines of code but had major effect) that i didnā€™t discover until today. They have been merged but not sure if they made it into the snapshot that you are running.

Granted those bugs dealt with the sensor type reporting as a contact type instead of a switch type. So the module still should come online properly.

@volfan6415
https://puu.sh/C3zAO/011507ff7d.log

EDIT:
Also worth to note that I just did the update so Iā€™m running build #1430
https://ci.openhab.org/job/openHAB-Distribution/1430/

Here is a log that only includes start up, and attempting to send manual update to module.

https://puu.sh/C3zMb/628975a57f.log

@Rsslone thanks! I was able to reproduce the issue. I have a fix i would like for you to try and see if it corrects it on your system as well. Link to the .jar for you to test on the snapshot is below. Make sure to uninstall the binding before placing this one in the addons folder. (you will need to do the feature:install command as above).

You might have an issue where multiple versions of the binding end up installed so make sure that the one below is the only one running.

https://drive.google.com/file/d/1AZFryNTNxjF0SxdfHfyuKMBS4yO-y01d/view?usp=sharing

Thanks!

If it fixes it for you as well i will get the code pushed up.

1 Like

@volfan6415

Pardon the word spaghetti but I left most of my trial and error issues there so you can read what was going on as I tried to get these working. I donā€™t know if Iā€™m slow or something but the process was not as straight forward as I think it should have been. If anything the update button is not doing what it should be doing and the console is saying something about switches not being supported, other than that I got everything to function as intended.

EDIT: Oh wait these are not contact items anymore, i see. I got my Main module to work but I canā€™t get the AUX module to accept the config. I got one or two sensors to show up on the list but when I tried to recreate the missing channels in hope the config would send, now im at zero " Binary Sensors " lol. Iā€™m pressing the update switch but nothing is updating. I finally got it to accept my channel config by restarting the whole openhab itself Also the logs keep saying something about switches are not supported by the binding, idk if that was intentional but these should really be contacts. :thinking: I changed them to switches to comply with what the binding was wanting though and it seems to have fixed the issue I crossed out below.

Okay so I confirm that the openhab instance is sending the config to the modules, and I can send commands from openhab to the module (aka actuator commands to my buzzer). There however is an issue with the contact sensors not sending updates to openhab. And on boot or manual update they are not getting the states of the contacts. I read the logs myself and noticed it is matching the channel to the things correctly but nothing is updating. For example I tested my back door sensor and here is what the logs said and what I noticed. this was because I had to change from contact items to switch items for them to work

Full Logs

https://puu.sh/C4gea/1adb619030.log
Updated - https://puu.sh/C4gYR/5d35f0a18c.log

Also idk if this would matter, but I went back to Build #1403

Pardon the word spaghetti but I left most of my trial and error issues there so you can read what was going on as I tried to get these working. I donā€™t know if Iā€™m slow or something but the process was not as straight forward as I think it should have been. If anything the update button is not doing what it should be doing and the console is saying something about switches not being supported, other than that I got everything to function as intended.

Glad you got it working. :slight_smile: The update button (as well as the other items that send http:// get requests to the modules need some ironing out on my part). As with all http:// commands there is some delay in the process and everyoneā€™s setup is different so there will be some fine tuning to get this exactly right. I think that right now i have the binding timing out too fast. So i need to add in some redundancy so that the binding doesnā€™t time out as fast and set the binding to offline as quickly. This is what i think explains what you have been seeing with the item going offline/online alot. What happens right now is that the binding sets the thing offline whenever there is a communication error with the binding. But then if the module sends a command update back it put its back online. In looking at your logs i am seeing timeout errors that send it offline and then updates that put it back online. I think what i may do is centralize all of the http requests to one ā€œclientā€ on the binding. That way they can all be managed and arenā€™t jumping in the way of each other.

EDIT: Oh wait these are not contact items anymore, i see. I got my Main module to work but I canā€™t get the AUX module to accept the config. I got one or two sensors to show up on the list but when I tried to recreate the missing channels in hope the config would send, now im at zero " Binary Sensors " lol. Iā€™m pressing the update switch but nothing is updating. I finally got it to accept my channel config by restarting the whole openhab itself Also the logs keep saying something about switches are not supported by the binding, idk if that was intentional but these should really be contacts. :thinking: I changed them to switches to comply with what the binding was wanting though and it seems to have fixed the issue I crossed out below.

So there was a design change, sorry that wasnā€™t as clear. Both sensors and actuators are switch types now. The difference is that one channel type is read only and the other accepts commands.

I assume this is the log entry you are referring to: ā€œChannel@6ff6c38 is of type konnected:actuator which is not supported by the konnected bindingā€

If so thanks for pointing it out. What i was doing was a series of If - if - if - else ā€¦ when it should be if - else if - else if - else. The else was getting triggered everytime when it really should only be triggered if you have added a channel type that is not one of the channel types that was defined. You can safely ignore that log entry for now.

Okay so I confirm that the openhab instance is sending the config to the modules, and I can send commands from openhab to the module (aka actuator commands to my buzzer). There however is an issue with the contact sensors not sending updates to openhab. And on boot or manual update they are not getting the states of the contacts. I read the logs myself and noticed it is matching the channel to the things correctly but nothing is updating. For example I tested my back door sensor and here is what the logs said and what I noticed. this was because I had to change from contact items to switch items for them to work

Also idk if this would matter, but I went back to Build #1403

i have tested the updated jar with both and was seeing similar behavior it should not matter.

I am going to work on the update with the http get commands which should hopefully smooth out many of these issues.

Thanks again for the testing and the logs!

Iā€™m curious about your reasons for this change. Contact type has the OPEN / CLOSED states built into it, with switches its OFF / ON and you need to use transformations to change it so its appropriate to the purpose. (not a problem in my case I already had them set up anyways)

Okay let me know when you have a new version and Iā€™ll give it a run.

See for the discussion during the design https://github.com/openhab/openhab2-addons/pull/3702#discussion_r232207726

But the underlying motivation behind the switch was because of the binary nature of the information 0/1 which it was felt is more consistently modeled as on/off.

1 Like

So Iā€™ve just recently trashed my old Paradox alarm and replaced it with the Konnected. Last night I was able to get 3 konnected boards added and was starting on creating items for the zones. However, today I find that 2 boards not longer show as online.

  1. UNINITIALIZED - HANDLER_CONFIGURATION_PENDING
  2. online
  3. unknown (this is the main alarm board).

Any suggestions?

Hereā€™s what I got in the logs

10:38:28.906 [ERROR] [org.openhab.binding.konnected        ] - bundle org.openhab.binding.konnected:2.4.0.201811191745 (200)[org.openhab.binding.konnected.internal.KonnectedHandlerFactory(12)] : The deactivate method has thrown an exception
java.lang.NullPointerException: null
    at org.openhab.binding.konnected.internal.KonnectedHandlerFactory.unregisterWebHookServlet(KonnectedHandlerFactory.java:108) ~[?:?]
    at org.openhab.binding.konnected.internal.KonnectedHandlerFactory.deactivate(KonnectedHandlerFactory.java:73) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
    at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) ~[39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) ~[39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.SingleComponentManager.disposeImplementationObject(SingleComponentManager.java:381) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.SingleComponentManager.deleteComponent(SingleComponentManager.java:156) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.SingleComponentManager.ungetService(SingleComponentManager.java:985) [39:org.apache.felix.scr:2.1.2]
    at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$2.run(ServiceFactoryUse.java:260) [?:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$2.run(ServiceFactoryUse.java:1) [?:?]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryUngetService(ServiceFactoryUse.java:258) [?:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.ungetService(ServiceFactoryUse.java:160) [?:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.ungetService(ServiceConsumer.java:50) [?:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.ungetService(ServiceRegistrationImpl.java:593) [?:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.ungetService(ServiceRegistry.java:540) [?:?]
    at org.eclipse.osgi.internal.framework.BundleContextImpl.ungetService(BundleContextImpl.java:666) [?:?]
    at com.eclipsesource.jaxrs.publisher.internal.ResourceTracker.delegateAddService(ResourceTracker.java:48) [20:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]
    at com.eclipsesource.jaxrs.publisher.internal.ResourceTracker.addingService(ResourceTracker.java:40) [20:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]
    at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) [?:?]
    at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) [?:?]
    at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) [?:?]
    at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) [?:?]
    at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) [?:?]
    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) [?:?]
    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) [?:?]
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [?:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) [?:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) [?:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) [?:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225) [?:?]
    at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) [?:?]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:891) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:877) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:944) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:727) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1053) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1007) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) [39:org.apache.felix.scr:2.1.2]
    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) [?:?]
    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) [?:?]
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [?:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) [?:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) [?:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) [?:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225) [?:?]
    at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) [?:?]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:891) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:877) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:944) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:727) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:661) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:427) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:339) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:381) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:263) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) [39:org.apache.felix.scr:2.1.2]
    at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) [39:org.apache.felix.scr:2.1.2]
    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) [?:?]
    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) [?:?]
    at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [?:?]
    at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) [?:?]
    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908) [?:?]
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [?:?]
    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) [?:?]
    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) [?:?]
    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) [?:?]
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168) [?:?]
    at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) [?:?]
    at org.eclipse.osgi.container.Module.start(Module.java:467) [?:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) [?:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1614) [?:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) [?:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) [?:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [?:?]
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]

@tracstarr Which version are are using? This looks like the error that RSSlone was having that should be corrected in a pull request that was just merged this morning.

Ok, Iā€™ll get latest. I was using the snapshot from last night.

Where can I find this build? Or did it not build? Jenkins isnā€™t showing (or i canā€™t find) the build from the checkin. I can see your checkin in github.