Closed kirantpatil closed 7 years ago
I zipped the directory as .zip file and then renamed as .jar file and added it to /opt/openhab2/addons directory and it is still not showing in console of karaf "bundle:list" as shown below
$ ls /opt/openhab2/addons/ org.openhab.binding.snavxbee2 <= git source code org.openhab.binding.snavxbee2.jar <= converted .zip file to .jar file org.openhab.ui.iconset.climacons-2.0.0-SNAPSHOT.jar <= this binding is appearing in karaf console README
Just put this file in the /addons directory You should then see :
openhab> bundle:list . . 198 | Active | 80 | 2.0.1.201701171601 | SNAVXbee2 Binding
You will need to add in the thing file : Bridge snavxbee2:bridge:gateway[ serialPort="/dev/ttyUSB0", baudRate=9600 ]
You will need to adapt serialPort and baudRate to match your device. to see more details about what it is doing : openhab> log:set DEBUG org.openhab.binding.snavxbee2 openhab> log:tail Hope it helps.
Thank you Sir. I will test and revert back for any issues.
Please provide one sample item configured to either bulb or door to check for driving input from app to device.
Can we send commands to device using karaf? If there is one please provide. So that I can check communication between Openhab and device.
One small correction : openhab> log:set TRACE org.openhab.binding.snavxbee2 openhab> log:tail
You can use discovery to discover new devices : smarthome:discovery start snavxbee2
Your xbee should be sending IOSampling Data and you should see it in the log. the created thing should look like :
snavxbee2:sample:gateway:64BITADDRESS
Then you will need to add items using : one of the supported channel :
AD0DIO0 AD1DIO1 AD2DIO2 AD3DIO3 DIO4 DIO5 DIO10 DIO11 DIO12
So the created item should match to snavxbee2:sample:gateway:64BITADDRESS:AD1DIO1......
Again this was designed to work with XbeeS2 from digi....
I am getting below error and no discovery is happening.
openhab> log:set TRACE org.openhab.binding.snavxbee2 openhab> smarthome:discovery start snavxbee2 openhab> log:tail 14:01:39.627 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start 14:01:39.808 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app 14:01:39.827 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /ui 14:01:39.847 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel 14:01:39.869 [ERROR] [org.openhab.binding.snavxbee2 ] - FrameworkEvent ERROR - org.openhab.binding.snavxbee2 org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.snavxbee2 [180] Unresolved requirement: Import-Package: gnu.io
at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
14:02:28.884 [WARN ] [nternal.DiscoveryServiceRegistryImpl] - No discovery service for binding id 'snavxbee2' found! 14:04:15.324 [WARN ] [nternal.DiscoveryServiceRegistryImpl] - No discovery service for binding id 'snavxbee2' found! 14:19:54.089 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'xbee.things' 14:19:54.175 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'xbee.things' 14:20:24.709 [WARN ] [nternal.DiscoveryServiceRegistryImpl] - No discovery service for binding id 'snavxbee2' found! 14:23:16.156 [WARN ] [nternal.DiscoveryServiceRegistryImpl] - No discovery service for binding id 'snavxbee2' found! 14:23:23.684 [WARN ] [nternal.DiscoveryServiceRegistryImpl] - No discovery service for binding id 'snavxbee2' found!
9 | Active | 80 | 2.3.0.201506221200 | JAX-RS Gson Provider 10 | Active | 80 | 5.3.1.201602281253 | OSGi JAX-RS Connector 11 | Active | 80 | 2.3.1 | Gson 12 | Active | 80 | 18.0.0 | Guava: Google Core Libraries for Java 13 | Active | 80 | 3.0.0.v201312141243 | Google Guice (No AOP) 14 | Active | 80 | 1.5.8 | swagger-annotations 15 | Active | 80 | 3.19.0.GA | Javassist 17 | Active | 80 | 3.5.1 | JmDNS 20 | Active | 80 | 1.1.0.Final | Bean Validation API 22 | Active | 80 | 2.0.1 | javax.ws.rs-api 24 | Active | 80 | 3.2.0.v201101311130 | ANTLR Runtime 27 | Active | 80 | 1.6.0 | Commons Codec 28 | Active | 80 | 3.2.1 | Commons Collections 29 | Active | 80 | 1.1 | Commons Exec 30 | Active | 80 | 2.2.0 | Commons IO 31 | Active | 80 | 2.6 | Commons Lang 36 | Active | 80 | 4.2.3 | Apache HttpClient OSGi bundle 37 | Active | 80 | 4.2.3 | Apache HttpCore OSGi bundle 53 | Active | 80 | 4.0.8 | Apache Karaf :: Shell :: Core 56 | Active | 80 | 4.0.8 | Apache Karaf :: Wrapper :: Core 57 | Active | 80 | 3.1.0.7 | Apache ServiceMix :: Bundles :: commons-httpclient 62 | Active | 80 | 2.11.0.v20150805-0538 | EMF Common 63 | Active | 80 | 2.11.1.v20150805-0538 | EMF Ecore 64 | Active | 80 | 2.11.1.v20150805-0538 | EMF XML/XMI Persistence 65 | Active | 80 | 3.7.0.v20150402-1709 | Common Eclipse Runtime 66 | Active | 80 | 3.6.0.v20150318-1503 | Extension Registry Support 92 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Config Core 93 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Configuration Discovery 94 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Config Dispatcher 95 | Active | 75 | 0.9.0.b2 | Eclipse SmartHome Config XML 96 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Core 97 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Core Audio 98 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome AutoUpdate Binding 99 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Core Binding XML 100 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Core ID 101 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Core Persistence 102 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Scheduler Service 103 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Core Thing 104 | Active | 75 | 0.9.0.b2 | Eclipse SmartHome Core Thing XML 105 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Transformation Service 106 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Core Voice 107 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Console 108 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Console for OSGi runtime Karaf 109 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome JavaSound I/O, Fragments: 167 110 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Monitor 111 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Net I/O Bundle 112 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome REST Interface Bundle 113 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Core REST API 114 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome REST mDNS Announcer 115 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Sitemap REST API 116 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome SSE REST API 117 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Voice REST API 118 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Bonjour/MDS Service Discovery Bundle 119 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Web Audio Support 120 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Model Core 121 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Item Model 122 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Item Model Runtime 123 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Persistence Model 124 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Persistence Runtime 125 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Rule Model 126 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Rule Runtime 127 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Script 128 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Script Runtime 129 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Sitemap Model 130 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Sitemap Runtime 131 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Thing Model 132 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Thing Model Runtime 133 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Json Storage Service 134 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome UI 135 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome UI Icons 136 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Classic IconSet 137 | Active | 80 | 2.9.2 | Xtend Runtime Library 138 | Active | 80 | 2.9.2 | Xtend Macro Interfaces 139 | Active | 80 | 2.9.2 | Xtext 140 | Active | 80 | 2.9.2 | Xtext Common Types 141 | Active | 80 | 2.9.2 | JSR-45 Smap installer 142 | Active | 80 | 2.9.2 | Xtext Utility 143 | Active | 80 | 2.9.2.v20160428-1452 | Xbase Model 144 | Active | 80 | 2.9.2 | Xbase Runtime Library 160 | Active | 80 | 2.2.0 | JUPnP Library 161 | Active | 80 | 1.9.6 | MIME streaming extension 162 | Active | 80 | 5.0.2 | Require-Bundle Fix :: org.objectweb.asm 164 | Active | 90 | 2.0.0.b5 | openHAB Core 165 | Active | 80 | 2.0.0.b5 | openHAB Karaf Integration 167 | Resolved | 80 | 2.0.0.b5 | openHAB Sound Support, Hosts: 109 168 | Active | 80 | 2.0.0.b5 | openHAB Dashboard UI 173 | Active | 80 | 3.2.0 | Commons Net 174 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Basic UI, Fragments: 176 175 | Active | 80 | 0.9.0.b2 | Eclipse SmartHome Paper UI, Fragments: 178 176 | Resolved | 80 | 2.0.0.b5 | openHAB Basic UI Fragment, Hosts: 174 177 | Active | 80 | 2.0.0.b5 | HABPanel User Interface 178 | Resolved | 80 | 2.0.0.b5 | openHAB Paper UI Theme Fragment, Hosts: 175 179 | Active | 80 | 2.0.0.201612122156 | Animated Climacons Iconset 180 | Installed | 80 | 2.0.1.201701171601 | SNAVXbee2 Binding openhab>
Thanks.
xbee.thngs file added at /opt/openhab2/conf/things directory and its content as below.
Bridge snavxbee2:bridge:gateway[ serialPort="/dev/ttyUSB0", baudRate=9600 ]
Resolved the gnu.io import issue by using below link https://github.com/openhab/openhab2-addons/pull/362#issuecomment-173125977
I am facing two new issues as below.
error 1. while starting the openhab error 2. after starting smarthome:discovery start operation
openhab> log:set TRACE org.openhab.binding.snavxbee2 openhab> smarthome:discovery start snavxbee2 openhab> log:tail 15:11:46.112 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'xbee.things' 15:11:46.703 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start 15:11:46.902 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app 15:11:47.036 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /ui 15:11:47.118 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel 15:11:47.152 [DEBUG] [org.openhab.binding.snavxbee2 ] - BundleEvent STARTING - org.openhab.binding.snavxbee2 15:11:47.164 [DEBUG] [org.openhab.binding.snavxbee2 ] - BundleEvent STARTED - org.openhab.binding.snavxbee2 15:11:47.166 [DEBUG] [org.openhab.binding.snavxbee2 ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=binding.snavxbee2, component.id=151, service.id=275, service.bundleid=180, service.scope=bundle} - org.openhab.binding.snavxbee2 15:11:47.309 [DEBUG] [ee2.internal.SNAVXbee2HandlerFactory] - Creating SNAV HANDLER ------------------------------------------------------------ 15:11:47.320 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing 'snavxbee2:bridge:gateway' has been added. 15:11:47.329 [DEBUG] [.discovery.SNAVXbee2DiscoveryService] - In SNAVXbee2DiscoveryService contructor [snavxbee2:sample, snavxbee2:tosr0xt, snavxbee2:xbeeapi] 15:11:47.329 [DEBUG] [.discovery.SNAVXbee2DiscoveryService] - In ACTIVATE !!!!! 15:11:47.330 [DEBUG] [org.openhab.binding.snavxbee2 ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=278, service.bundleid=180, service.scope=singleton} - org.openhab.binding.snavxbee2 15:11:47.385 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - In the brige, Initialising config : /dev/ttyUSB0 9600 15:11:47.395 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'snavxbee2:bridge:gateway' changed from UNINITIALIZED to INITIALIZING 15:11:52.213 [ERROR] [com.digi.xbee.api.XBeeDevice ] - There was a timeout while executing the requested operation. com.digi.xbee.api.exceptions.TimeoutException: There was a timeout while executing the requested operation. at com.digi.xbee.api.XBeeDevice.enterATCommandMode(XBeeDevice.java:426)[180:org.openhab.binding.snavxbee2:2.0.1.201701171601] at com.digi.xbee.api.XBeeDevice.determineOperatingMode(XBeeDevice.java:376)[180:org.openhab.binding.snavxbee2:2.0.1.201701171601] at com.digi.xbee.api.XBeeDevice.open(XBeeDevice.java:213)[180:org.openhab.binding.snavxbee2:2.0.1.201701171601] at org.openhab.binding.snavxbee2.handler.SNAVXbee2BridgeHandler.initialize(SNAVXbee2BridgeHandler.java:230)[180:org.openhab.binding.snavxbee2:2.0.1.201701171601] at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:713)[103:org.eclipse.smarthome.core.thing:0.9.0.b2] at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)[103:org.eclipse.smarthome.core.thing:0.9.0.b2] at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:179)[96:org.eclipse.smarthome.core:0.9.0.b2] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_111] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_111] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_111] at java.lang.Thread.run(Thread.java:745)[:1.8.0_111] 15:11:52.227 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'snavxbee2:bridge:gateway' changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Illegal status UNINITIALIZED. Bindings only may set UNKNOWN, ONLINE, OFFLINE or REMOVED. 15:11:52.226 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while initializing handler of thing 'snavxbee2:bridge:gateway': java.lang.IllegalArgumentException: Illegal status UNINITIALIZED. Bindings only may set UNKNOWN, ONLINE, OFFLINE or REMOVED. java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Illegal status UNINITIALIZED. Bindings only may set UNKNOWN, ONLINE, OFFLINE or REMOVED. at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_111] at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_111] at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:188)[96:org.eclipse.smarthome.core:0.9.0.b2] at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:81)[96:org.eclipse.smarthome.core:0.9.0.b2] at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:65)[96:org.eclipse.smarthome.core:0.9.0.b2] at org.eclipse.smarthome.core.thing.internal.ThingManager$9.run(ThingManager.java:710)[103:org.eclipse.smarthome.core.thing:0.9.0.b2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_111] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_111] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_111] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_111] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_111] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_111] at java.lang.Thread.run(Thread.java:745)[:1.8.0_111] Caused by: java.lang.IllegalArgumentException: Illegal status UNINITIALIZED. Bindings only may set UNKNOWN, ONLINE, OFFLINE or REMOVED. at org.eclipse.smarthome.core.thing.internal.ThingManager$1.ensureValidStatus(ThingManager.java:184)[103:org.eclipse.smarthome.core.thing:0.9.0.b2] at org.eclipse.smarthome.core.thing.internal.ThingManager$1.statusUpdated(ThingManager.java:149)[103:org.eclipse.smarthome.core.thing:0.9.0.b2] at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateStatus(BaseThingHandler.java:386)[103:org.eclipse.smarthome.core.thing:0.9.0.b2] at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateStatus(BaseThingHandler.java:415)[103:org.eclipse.smarthome.core.thing:0.9.0.b2] at org.openhab.binding.snavxbee2.handler.SNAVXbee2BridgeHandler.initialize(SNAVXbee2BridgeHandler.java:243)[180:org.openhab.binding.snavxbee2:2.0.1.201701171601] at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:713)[103:org.eclipse.smarthome.core.thing:0.9.0.b2] at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)[103:org.eclipse.smarthome.core.thing:0.9.0.b2] at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:179)[96:org.eclipse.smarthome.core:0.9.0.b2] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_111] ... 3 more 15:12:42.802 [DEBUG] [.discovery.SNAVXbee2DiscoveryService] - In StartScan ! !!!!! 15:12:42.803 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - StartSerach in Bridge Handler 1 15:12:42.806 [ERROR] [nternal.DiscoveryServiceRegistryImpl] - Cannot trigger scan for thing types '[snavxbee2:sample, snavxbee2:bridge, snavxbee2:tosr0xt, snavxbee2:xbeeapi]' on 'SNAVXbee2DiscoveryService'! java.lang.NullPointerException at org.openhab.binding.snavxbee2.handler.SNAVXbee2BridgeHandler.startSearch(SNAVXbee2BridgeHandler.java:66)[180:org.openhab.binding.snavxbee2:2.0.1.201701171601] at org.openhab.binding.snavxbee2.discovery.SNAVXbee2DiscoveryService.startScan(SNAVXbee2DiscoveryService.java:54)[180:org.openhab.binding.snavxbee2:2.0.1.201701171601] at org.eclipse.smarthome.config.discovery.AbstractDiscoveryService.startScan(AbstractDiscoveryService.java:199)[93:org.eclipse.smarthome.config.discovery:0.9.0.b2] at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScan(DiscoveryServiceRegistryImpl.java:381)[93:org.eclipse.smarthome.config.discovery:0.9.0.b2] at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScans(DiscoveryServiceRegistryImpl.java:366)[93:org.eclipse.smarthome.config.discovery:0.9.0.b2] at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.startScan(DiscoveryServiceRegistryImpl.java:216)[93:org.eclipse.smarthome.config.discovery:0.9.0.b2] at org.eclipse.smarthome.config.discovery.internal.console.DiscoveryConsoleCommandExtension.runDiscoveryForBinding(DiscoveryConsoleCommandExtension.java:117)[93:org.eclipse.smarthome.config.discovery:0.9.0.b2] at org.eclipse.smarthome.config.discovery.internal.console.DiscoveryConsoleCommandExtension.execute(DiscoveryConsoleCommandExtension.java:60)[93:org.eclipse.smarthome.config.discovery:0.9.0.b2] at org.eclipse.smarthome.io.console.ConsoleInterpreter.execute(ConsoleInterpreter.java:52)[107:org.eclipse.smarthome.io.console:0.9.0.b2] at org.eclipse.smarthome.io.console.karaf.internal.CommandWrapper.execute(CommandWrapper.java:58)[108:org.eclipse.smarthome.io.console.karaf:0.9.0.b2] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[53:org.apache.karaf.shell.core:4.0.8] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[53:org.apache.karaf.shell.core:4.0.8] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[53:org.apache.karaf.shell.core:4.0.8] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[53:org.apache.karaf.shell.core:4.0.8] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[53:org.apache.karaf.shell.core:4.0.8] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[53:org.apache.karaf.shell.core:4.0.8] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[53:org.apache.karaf.shell.core:4.0.8] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[53:org.apache.karaf.shell.core:4.0.8] at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:274)[53:org.apache.karaf.shell.core:4.0.8] at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
@g1velo, Please share your items configuration entries.
the items are saving using URL http://localhost:8080/rest/items/DefaultXBeeCOORDINATOR0013A20040E7782D00030000_SNAVXbee2BindingAD0DIO0Port.
I am not getting to see the file in /opt/openhab2/conf/items directory which is show in log file 13:16:41.272 [WARN ] [thome.io.rest.core.item.ItemResource] - Received HTTP PUT request at 'items/DefaultXBeeCOORDINATOR0013A20040E7782D00030000_SNAVXbee2BindingAD0DIO0Port' with an invalid item type 'SwitchItem'. 13:16:57.438 [INFO ] [smarthome.event.ItemAddedEvent ] - Item 'DefaultXBeeCOORDINATOR0013A20040E7782D00030000_SNAVXbee2BindingAD0DIO0Port' has been added.
Hi, First of all the Bridge has to be up before trying anything else. the error :
> 15:11:47.385 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - In the brige, Initialising config : /dev/ttyUSB0 9600
> 15:11:47.395 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'snavxbee2:bridge:gateway' changed from UNINITIALIZED to INITIALIZING
> 15:11:52.213 [ERROR] [com.digi.xbee.api.XBeeDevice ] - There was a timeout while executing the requested operation.
> com.digi.xbee.api.exceptions.TimeoutException: There was a timeout while executing the requested operation.
> at com.digi.xbee.api.XBeeDevice.enterATCommandMode(XBeeDevice.java:426)[180:org.openhab.binding.snavxbee2:2.0.1.201701171601]
> at com.digi.xbee.api.XBeeDevice.determineOperatingMode(XBeeDevice.java:376)[180:org.openhab.binding.snavxbee2:2.0.1.201701171601]
> at com.digi.xbee.api.XBeeDevice.open(XBeeDevice.java:213)[180:org.openhab.binding.snavxbee2:2.0.1.201701171601]
> at org.openhab.binding.snavxbee2.handler.SNAVXbee2BridgeHandler.initialize(SNAVXbee2BridgeHandler.java:23
make me think that you can't open you device with the Digi Xbee Java library. We have to solve this first..
Yes, can you please share your items configuration file contents ?
I don't see the point to configure items as long as the SerialPort connection is not working..
I am also testing other way ie using digi XBee device as coordinator and REX3S as router.
XBee device with your binding is recognizing REX3S as device but not specifying it either as Router as shown below.
So I need the item configurations to check if I can send some commands to REX3S ("000D6F000BABC298") device.
17:26:21.794 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'snavxbee2:bridge:gateway' changed from UNINITIALIZED to INITIALIZING 17:26:21.811 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - In the brige, Initialising config : /dev/ttyUSB0 9600 17:26:22.197 [DEBUG] [xbee2.handler.SNAVXbee2BridgeHandler] - ------------------------------------------------------------ Local Node ID : COORDINATOR 17:26:22.198 [DEBUG] [xbee2.handler.SNAVXbee2BridgeHandler] - Port /dev/ttyUSB0 open, 17:26:22.201 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'snavxbee2:bridge:gateway' changed from INITIALIZING to ONLINE 17:26:22.203 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - bridge startAutomaticRefresh() 17:26:22.203 [DEBUG] [ee2.internal.SNAVXbee2HandlerFactory] - Creating SNAV HANDLER ------------------------------------------------------------ 17:26:22.204 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - in class org.openhab.binding.snavxbee2.handler.SNAVXbee2Handler method : contructor(Thing) 17:26:22.208 [DEBUG] [ee2.internal.SNAVXbee2HandlerFactory] - Creating SNAV HANDLER ------------------------------------------------------------ 17:26:22.208 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - in class org.openhab.binding.snavxbee2.handler.SNAVXbee2Handler method : contructor(Thing) 17:26:22.229 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - Nummber of things in config : 2 17:26:22.229 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - Nummber of things in config : 2 17:26:22.230 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - KKKEYS : IOChannel 17:26:22.230 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - KKKEYS : IOChannel 17:26:22.230 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - VVVValues: not used yet 17:26:22.230 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - KKKEYS : Xbee64BitsAddress 17:26:22.230 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - VVVValues: 0013A20040E7782D 17:26:22.231 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - startAutomaticRefresh() 17:26:22.230 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - VVVValues: not used yet 17:26:22.231 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - KKKEYS : Xbee64BitsAddress 17:26:22.231 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - VVVValues: 000D6F000BABC298 17:26:22.231 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - startAutomaticRefresh() 17:26:22.231 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - The scheduled thread is running ! 17:26:22.232 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - 111 Synced sending command : b to : 0013A20040E7782D 17:26:22.232 [DEBUG] [g.snavxbee2.handler.SNAVXbee2Handler] - The scheduled thread is running ! 17:26:22.232 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - 111 Synced sending command : b to : 000D6F000BABC298 17:26:22.233 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'snavxbee2:sample:gateway:0013A20040E7782D' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING 17:26:22.233 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'snavxbee2:sample:gateway:000D6F000BABC298' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING 17:26:22.238 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'snavxbee2:sample:gateway:000D6F000BABC298' changed from INITIALIZING to ONLINE 17:26:22.239 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'snavxbee2:sample:gateway:0013A20040E7782D' changed from INITIALIZING to ONLINE 17:27:22.208 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - automatic discovery started : false 17:27:22.209 [DEBUG] [xbee2.handler.SNAVXbee2BridgeHandler] - Bridge Automatic running Discovery 17:28:46.719 [DEBUG] [.discovery.SNAVXbee2DiscoveryService] - In StartScan ! !!!!! 17:28:46.722 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - StartSerach in Bridge Handler 1 17:28:46.757 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - Xbee discoverin running 3: true 17:28:46.864 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - devices discoverered 12 : COORDINATOR 0013A20040E7782D 17:28:47.473 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - devices discoverered 12 : 000D6F000BABC298 17:29:01.827 [INFO ] [xbee2.handler.SNAVXbee2BridgeHandler] - >> Discovery process finished successfully. 17:29:03.758 [DEBUG] [.discovery.SNAVXbee2DiscoveryService] - number of devices in list : 2 17:29:03.759 [DEBUG] [.discovery.SNAVXbee2DiscoveryService] - bridge : snavxbee2:bridge:gateway 17:29:05.785 [DEBUG] [.discovery.SNAVXbee2DiscoveryService] - Unable to get DD for device : 000D6F000BABC298 17:29:07.816 [DEBUG] [.discovery.SNAVXbee2DiscoveryService] - ::::::::::::::::::: THingUID Discovered : snavxbee2:sample:gateway:000D6F000BABC298 17:29:07.820 [DEBUG] [xbee2.devices.IOLineXBeeDeviceConfig] - thingUID : snavxbee2:sample 17:29:07.826 [DEBUG] [binding.snavxbee2.devices.XBeeConfig] - Trying it 7 17:29:07.827 [DEBUG] [binding.snavxbee2.devices.XBeeConfig] - Setting timeout for to 3000 for 000D6F000BABC298 tuid : snavxbee2:sample 17:29:09.859 [DEBUG] [.discovery.SNAVXbee2DiscoveryService] - Discovered device submitted 17:29:10.032 [DEBUG] [.discovery.SNAVXbee2DiscoveryService] - devices : 0013A20040E7782D type : ZigBee : 00030000 : 40E7782D 17:29:10.033 [DEBUG] [.discovery.SNAVXbee2DiscoveryService] - ::::::::::::::::::: THingUID Discovered : snavxbee2:sample:gateway:0013A20040E7782D 17:29:10.033 [DEBUG] [xbee2.devices.IOLineXBeeDeviceConfig] - thingUID : snavxbee2:sample 17:29:10.034 [DEBUG] [binding.snavxbee2.devices.XBeeConfig] - Trying it 7 17:29:10.034 [DEBUG] [binding.snavxbee2.devices.XBeeConfig] - Setting timeout for to 3000 for 0013A20040E7782D tuid : snavxbee2:sample 17:29:10.147 [DEBUG] [binding.snavxbee2.devices.XBeeConfig] - Setting timeout for 60000 tuid : snavxbee2:sample 17:29:10.148 [DEBUG] [binding.snavxbee2.devices.XBeeConfig] - setting device : 0013A20040E7782D IOLine : DIO1/AD1 IOMode : Analog to Digital Converter 17:29:10.202 [DEBUG] [binding.snavxbee2.devices.XBeeConfig] - setting device : 0013A20040E7782D IOLine : DIO2/AD2 IOMode : Analog to Digital Converter 17:29:10.261 [DEBUG] [binding.snavxbee2.devices.XBeeConfig] - setting device : 0013A20040E7782D IOLine : DIO3/AD3 IOMode : Analog to Digital Converter 17:29:10.315 [DEBUG] [binding.snavxbee2.devices.XBeeConfig] - setting device : 0013A20040E7782D IOLine : DIO4/AD4 IOMode : Digital input 17:29:10.368 [DEBUG] [binding.snavxbee2.devices.XBeeConfig] - setting device : 0013A20040E7782D IOLine : DIO5/AD5 IOMode : Digital input 17:29:10.420 [DEBUG] [binding.snavxbee2.devices.XBeeConfig] - setting device : 0013A20040E7782D IOLine : DIO11/PWM1 IOMode : Digital output, Low 17:29:10.473 [DEBUG] [binding.snavxbee2.devices.XBeeConfig] - setting device : 0013A20040E7782D IOLine : DIO12 IOMode : Digital output, Low 17:29:10.634 [DEBUG] [binding.snavxbee2.devices.XBeeConfig] - Config Changes : true 17:29:10.635 [DEBUG] [.discovery.SNAVXbee2DiscoveryService] - Discovered device submitted 17:29:41.024 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - dataReceived bridge method 17:29:41.026 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - number of things in the collection : 3 17:29:41.026 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - tuid found in thing registry : snavxbee2:bridge 17:29:41.027 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - tuid found in thing registry : snavxbee2:sample 17:29:41.027 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - tuid found in thing registry : snavxbee2:sample
Note: Coordinator is sending command 'b' as shown below in log file and it is getting received at REX3S device.
111 Synced sending command : b to : 000D6F000BABC298
If I send some string from REX3S serial port and it is getting received at COORDINATOR as below from log file.
17:52:16.010 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - dataReceived bridge method
17:52:16.010 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - number of things in the collection : 3
17:52:16.011 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - tuid found in thing registry : snavxbee2:bridge
17:52:16.011 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - tuid found in thing registry : snavxbee2:sample
17:52:16.012 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - tuid found in thing registry : snavxbee2:sample
17:52:22.207 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - automatic discovery started : false
17:52:22.208 [DEBUG] [xbee2.handler.SNAVXbee2BridgeHandler] - Bridge Automatic running Discovery
17:52:22.316 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - devices discoverered 12 : COORDINATOR 0013A20040E7782D
17:52:23.688 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - devices discoverered 12 : 000D6F000BABC298
17:52:37.277 [INFO ] [xbee2.handler.SNAVXbee2BridgeHandler] - >> Discovery process finished successfully.
Ok ! So there would be a few things to fix in the code..
During the discovery, I check the 'DD' parameter which is available for DIGI XBee devices. This value helps me to know what kind of device is connected. ( My first test was done with a TORS0xT device. From this 'DD' I applyy some configuration changes on the ADxDIOX port. ( So you may have to reconfigure it now.
I have to change the code to learn the port configuration from the device when the DD is not a well knowed DD.
the message :
111 Synced sending command : b to : 000D6F000BABC298
will be removed with the last commit I've done. ( I was the command to get temperature from my TOSR0xT device.
to be able to read info from the xbee device I used item filelike this :
Switch Xbee2switch "Xbee2switch" (All) { channel = "snavxbee2:sample:gateway:0013A20041472E56:DIO12" } Switch Xbee2switch1 "Xbee2switch1" (All) { channel = "snavxbee2:sample:gateway:0013A20041472E56:DIO11" }
Number Xbee2temp "Temp [SCALE(10ktemp.scale):%s]" (All) { channel = "snavxbee2:sample:gateway:0013A20041472E56:AD2DIO2" }
OK Sir. I will test it tomorrow and get back to you.
On Jan 20, 2017 9:39 PM, "g1velo" notifications@github.com wrote:
Ok ! So there would be a few things to fix in the code..
During the discovery, I check the 'DD' parameter which is available for DIGI XBee devices. This value helps me to know what kind of device is connected. ( My first test was done with a TORS0xT device. From this 'DD' I applyy some configuration changes on the ADxDIOX port. ( So you may have to reconfigure it now.
I have to change the code to learn the port configuration from the device when the DD is not a well knowed DD.
the message :
111 Synced sending command : b to : 000D6F000BABC298
will be remove with the last commit I've done. ( I was the command to get temperature from my TOSR0xT device.
to be able to read info from the xbee device I used item fril like this :
Switch Xbee2switch "Xbee2switch" (All) { channel = "snavxbee2:sample:gateway:0013A20041472E56:DIO12" } Switch Xbee2switch1 "Xbee2switch1" (All) { channel = "snavxbee2:sample:gateway:0013A20041472E56:DIO11" }
Number Xbee2temp "Temp [SCALE(10ktemp.scale):%s]" (All) { channel = "snavxbee2:sample:gateway:0013A20041472E56:AD2DIO2" }
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/g1velo/SNAVXbee2/issues/1#issuecomment-274110334, or mute the thread https://github.com/notifications/unsubscribe-auth/ABH5xzyRHF34EIkZE7AUpJBfbmWQuvXkks5rUNw9gaJpZM4LmgNW .
I added items as below with Destination address as below. Switch Xbee2switch "Xbee2switch" (All) { channel = "snavxbee2:sample:gateway:000D6F000BABC298:DIO12" }
But when I click on switch it is not sending any command to destination device. Log file details:
12:39:13.268 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'snavxbee2:sample:gateway:000D6F000BABC298' changed from INITIALIZING to ONLINE
12:39:13.269 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'snavxbee2:sample:gateway:0013A20040E7782D' changed from INITIALIZING to ONLINE
12:39:54.131 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'xbee.items'
12:39:54.141 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link 'Xbee2switch-snavxbee2:sample:gateway:000D6F000BABC298:DIO12' has been added.
12:39:54.166 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'xbee.items'
12:40:13.227 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - automatic discovery started : false
12:40:13.228 [DEBUG] [xbee2.handler.SNAVXbee2BridgeHandler] - Bridge Automatic running Discovery
12:42:13.432 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - dataReceived bridge method
12:42:13.434 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - number of things in the collection : 3
12:42:13.436 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - tuid found in thing registry : snavxbee2:bridge
12:42:13.437 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - tuid found in thing registry : snavxbee2:sample
12:42:13.438 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - tuid found in thing registry : snavxbee2:sample
12:43:58.093 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'Xbee2switch' received command OFF
12:43:58.119 [INFO ] [marthome.event.ItemStateChangedEvent] - Xbee2switch changed from NULL to OFF
12:44:01.379 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type MAP
12:44:01.380 [WARN ] [.core.transform.TransformationHelper] - couldn't transform value because transformationService of type 'MAP' is unavailable
12:44:09.181 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'Xbee2switch' received command ON
12:44:09.189 [INFO ] [marthome.event.ItemStateChangedEvent] - Xbee2switch changed from OFF to ON
12:45:13.227 [TRACE] [xbee2.handler.SNAVXbee2BridgeHandler] - automatic discovery started : false
12:45:13.228 [DEBUG] [xbee2.handler.SNAVXbee2BridgeHandler] - Bridge Automatic running Discovery
Please let me know, what should I need to do.
Sir, please provide me any debug build, so that I can use it to report back the device characteristics.
Hi,
Please provide the steps to install this bundle on OH2.
How to test it with the device?
Thanks.