Hi,
We installed DIYOnXBee binding on OH2 as below and it is sending packet to END DEVICE as configured in items.cfg file but when we send a packet from END DEVICE it is not getting received at OH2 Event Bus, since we could not see any incoming packet event in Karaf log.
###Install DIYOnXBee on OH2:
-
Download a nightly build of the binding here.
-
Add that(org.openhab.binding.diyonxbee-1.10.0-SNAPSHOT.jar) jar file in addons directory.
-
Create openhab.cfg file in conf/services directory and add below lines (I am using Ubuntu).
diyonxbee:serialPort=/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AI036OKB-if00-port0
diyonxbee:baudRate=9600 -
Add below line to items/demo.items file
Switch Living_Motion “Bewegung [MAP(de.map):%s]” (GF_Living,GPresence) { diyonxbee="<0013A20040E7782D:MOTION" } -
We configured the item to the switch created at Habpanel UI.
-
Click on the Switch to ON and it sent command MOTION=ON to END DEVICE which is captured using XCTU as below
- From XCTU if we send Transmit Request packet with COORDINATOR DEVICE address, it is getting received which we verified using “cutecom” app using /dev/ttyUSB0. But it is not getting informed to OH2 event bus, since we could not see any message in Karaf log.
###Please find the Karaf log details below:
openhab> log:tail
15:44:42.118 [ERROR] [org.apache.felix.fileinstall ] - Failed to install artifact: /home/fabritronix/Openhab_diyonxbee/addons/org.openhab.binding.diyonxbee-1.10.0-SNAPSHOT.jar
org.osgi.framework.BundleException: A bundle is already installed with the name “org.openhab.binding.diyonxbee” and version “1.10.0.201703020211”
at org.eclipse.osgi.container.ModuleContainer.install(ModuleContainer.java:254)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.storage.Storage.install(Storage.java:517)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.BundleContextImpl.installBundle(BundleContextImpl.java:146)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.installOrUpdateBundle(DirectoryWatcher.java:1036)[4:org.apache.felix.fileinstall:3.5.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:952)[4:org.apache.felix.fileinstall:3.5.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:871)[4:org.apache.felix.fileinstall:3.5.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:485)[4:org.apache.felix.fileinstall:3.5.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)[4:org.apache.felix.fileinstall:3.5.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312)[4:org.apache.felix.fileinstall:3.5.6]
15:44:43.462 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘demo.items’
15:44:43.611 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘rrd4j.persist’
15:44:44.660 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘demo.rules’
15:44:44.991 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘demo.script’
15:44:45.447 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘demo.sitemap’
15:44:45.590 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link ‘Weather_Temperature-yahooweather:weather:berlin:temperature’ has been added.
15:44:45.595 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link ‘Sun_Azimuth-astro:sun:home:position#azimuth’ has been added.
15:44:45.597 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link ‘Moon_Azimuth-astro:moon:home:position#azimuth’ has been added.
15:44:45.599 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link ‘Sunset_Time-astro:sun:home:set#start’ has been added.
15:44:45.600 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link ‘Sun_Elevation-astro:sun:home:position#elevation’ has been added.
15:44:45.601 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link ‘Moon_Phase-astro:moon:home:phase#name’ has been added.
15:44:45.603 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link ‘Sunrise_Time-astro:sun:home:rise#start’ has been added.
15:44:45.605 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link ‘Moon_Elevation-astro:moon:home:position#elevation’ has been added.
15:44:45.606 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link ‘CurrentDate-ntp:ntp:demo:dateTime’ has been added.
15:44:45.686 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘demo.things’
15:44:46.329 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start
15:44:46.784 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing ‘ntp:ntp:demo’ has been added.
15:44:46.842 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘ntp:ntp:demo’ changed from UNINITIALIZED to INITIALIZING
15:44:46.974 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
15:44:47.037 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
15:44:47.070 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing ‘yahooweather:weather:berlin’ has been added.
15:44:47.120 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘yahooweather:weather:berlin’ changed from UNINITIALIZED to INITIALIZING
15:44:47.323 [INFO ] [.diyonxbee.internal.DiyOnXBeeBinding] - opening XBee communication on ‘/dev/ttyUSB0’
15:44:47.326 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing ‘astro:sun:home’ has been added.
Stable Library
Native lib Version = RXTX-2.2pre2
Java lib Version = RXTX-2.1-7
WARNING: RXTX Version mismatch
Jar version = RXTX-2.1-7
native lib Version = RXTX-2.2pre2
15:44:47.411 [INFO ] [smarthome.event.ThingAddedEvent ] - Thing ‘astro:moon:home’ has been added.
15:44:47.421 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘astro:sun:home’ changed from INITIALIZING to ONLINE
log4j:WARN No appenders could be found for logger (com.rapplogic.xbee.api.InputStreamThread).
log4j:WARN Please initialize the log4j system properly.
15:44:47.746 [INFO ] [ulation.internal.HueEmulationServlet] - Started Hue Emulation service at /api
15:44:47.828 [INFO ] [ome.event.GroupItemStateChangedEvent] - GF_Living changed from NULL to UNDEF through Heating_GF_Living
15:44:52.106 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber ‘org.eclipse.smarthome.core.thing.link.ThingLinkManager@7a3361b5’ takes more than 5000ms.
15:44:52.107 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘yahooweather:weather:berlin’ changed from INITIALIZING to ONLINE
##Note
For windows we if configure serial port as COM3, it is saying as “Could not find port COM3”
Installed RXTX library for ubuntu