Giter VIP home page Giter VIP logo

openhab-addons's Introduction

openHAB Add-ons

GitHub Actions Build Status Jenkins Build Status EPL-2.0 Crowdin

This repository contains the official set of add-ons that are implemented on top of openHAB Core APIs. Add-ons that got accepted in here will be maintained (e.g. adapted to new core APIs) by the openHAB Add-on maintainers.

To get started with binding development, follow our guidelines and tutorials over at https://www.openhab.org/docs/developer.

If you are interested in openHAB Core development, we invite you to come by on https://github.com/openhab/openhab-core.

Add-ons in other repositories

Some add-ons are not in this repository, but still part of the official openHAB distribution. An incomplete list of other repositories follows below:

Development / Repository Organization

openHAB add-ons are Java .jar files.

The openHAB build system is based on Maven. The official IDE (Integrated development environment) is Eclipse.

You find the following repository structure:

.
+-- bom       Maven buildsystem: Bill of materials
|   +-- openhab-addons  Lists all extensions for other repos to reference them
|   +-- ...             Other boms
|
+-- bundles   Official openHAB extensions
|   +-- org.openhab.binding.airquality
|   +-- org.openhab.binding.astro
|   +-- ...
|
+-- features  Part of the runtime dependency resolver ("Karaf features")
|
+-- itests    Integration tests. Those tests require parts of the framework to run.
|   +-- org.openhab.binding.astro.tests
|   +-- org.openhab.binding.avmfritz.tests
|   +-- ...
|
+-- src/etc   Auxilary buildsystem files: The license header for automatic checks for example
+-- tools     Static code analyser instructions
|
+-- CODEOWNERS  This file assigns people to directories so that they are informed if a pull-request
                would modify their add-ons.

Command line build

To build all add-ons from the command-line, type in:

mvn clean install

Most of the time you do not need to build all bindings, but only the binding you are working on. To simply build only your binding use the -pl option. For example to build only the astro binding:

mvn clean install -pl :org.openhab.binding.astro

If you have a binding that has dependencies that are dynamically as specified in the feature.xml you can create a .kar instead of a .jar file. A .kar file will include the feature.xml and when added to openHAB will load and activate any dependencies specified in the feature.xml file. To create a .kar file run maven with the goal karaf:kar:

mvn clean install karaf:kar -pl :org.openhab.binding.astro

To improve build times you can add the following options to the command:

Option Description
-DskipChecks Skip the static analysis (Checkstyle, FindBugs)
-DskipTests Skip the execution of tests
-Dmaven.test.skip=true Skip the compilation and execution of tests
-Dfeatures.verify.skip=true Skip the Karaf feature verification
-Dspotless.check.skip=true Skip the Spotless code style checks
-o Work offline so Maven does not download any updates
-T 1C Build in parallel, using 1 thread per core
-pl :<add-on directory> Build a single add-on

For example you can skip checks and tests during development with:

mvn clean install -DskipChecks -DskipTests -pl :org.openhab.binding.astro

Adding these options improves the build time but could hide problems in your code. Parallel builds are also less easy to debug and the increased load may cause timing sensitive tests to fail.

Translations

Add-on translations are managed via Crowdin. The English translation is taken from the openHAB-addons GitHub repo and automatically imported in Crowdin when changes are made to the English i18n properties file. When translations are added or updated and approved in Crowdin, a pull request is automatically created by Crowdin. Therefore translations should not be edited in the openHAB-addons repo, but only in Crowdin. Otherwise translation are overridden by the automatic process.

To fill the English properties file run the following maven command on an add-on:

mvn i18n:generate-default-translations

This command can also update the file when things or channel are added or updated.

In some cases the command does not work, and requires the full plug-in name. In that case use:

mvn org.openhab.core.tools:i18n-maven-plugin:3.4.0:generate-default-translations

Code Quality

To check if your code is following the code style run:

mvn spotless:check

To reformat your code so it conforms to the code style you can run:

mvn spotless:apply

Integration Tests

When your add-on also has an integration test in the itests directory, you may need to update the runbundles in the itest.bndrun file when the Maven dependencies change. Maven can resolve the integration test dependencies automatically by executing:

mvn clean install -DwithResolver -DskipChecks

The build generates a .jar file per bundle in the respective bundle /target directory.

How to develop via an Integrated Development Environment (IDE)

We have assembled some step-by-step guides for different IDEs on our developer documentation website:

https://www.openhab.org/docs/developer/#setup-the-development-environment

Happy coding!

openhab-addons's People

Contributors

andrewfg avatar ccutrer avatar clinique avatar cweitkamp avatar dalgwen avatar digitaldan avatar florian-h05 avatar fwolter avatar givimad avatar hilbrand avatar holgerfriedrich avatar j-n-k avatar jimtng avatar jlaur avatar kaikreuzer avatar lolodomo avatar lsiepel avatar marcelrv avatar markus7017 avatar mherwege avatar mhilbush avatar mlobstein avatar morph166955 avatar mvalla avatar openhab-bot avatar robnielsen avatar skinah avatar ssalonen avatar wborn avatar yfre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openhab-addons's Issues

Discovery Auto-approve

Hello Kai,

I can see that the auto-approve is enabled in the services.cfg:

org.openhab.autoapprove:enabled=true

However the things I Discover are not auto approved, they are just going into the Inbox. What am I missing?

Thank you.

auto-approve : "no binding found that supports...."

osgi> smarthome inbox approve sonos:zoneplayer:RINCON_000E58D8407A01400
14:32:59.304 DEBUG o.e.s.c.t.ManagedThingProvider[:53] - Creating thing for type 'sonos:zoneplayer'.
14:32:59.307 WARN o.e.s.c.t.ManagedThingProvider[:62] - Cannot create thing. No binding found that supports creating a thing of type sonos:zone player.

Setting the plug-in level to 4, and auto-start to true in the Run Configuration does not solve this, although the binding is started, is discovering all the players and so forth

Uniq certificate per openHAB instance

We need to replace pre-created certificate distributed with openHAB with a uniq certificate which should be generated during the first run on openHAB on a user's machine. Right now all openHABs have the same certificate (if user does nothing to change that) which is very insecure - anybody is able to implement man in the middle attack using publicly available certificate.

jmDNS reports more output even when logging workaround used

I am using openHAB2 when having an AppleTV running in my home network.

From to time I get excessive log output on console from jmDNS implementation.
This can be suppressed by two additional log configuration entries. The classes reporting the log output are in subpackages of javax.jmdns. It seems that setting to OFF will not be inherited to subpackages.

    <logger name="javax.jmdns.impl" level="OFF"/>
    <logger name="javax.jmdns.impl.constants" level="OFF"/>

I will add a PR to fix this.

auto-approve creates Items?

osgi> smarthome items
sonos_zoneplayer_RINCON_000E58D8407A01400_state (Type=StringItem, State=Uninitialized)
sonos_zoneplayer_RINCON_000E58D8146C01400_localcoordinator (Type=SwitchItem, State=Uninitialized)
sonos_zoneplayer_RINCON_000E58D83FD001400_alarmproperties (Type=StringItem, State=No running alarm)
sonos_zoneplayer_RINCON_000E58C6267E01400_add (Type=StringItem, State=Uninitialized)
sonos_zoneplayer_RINCON_000E58D8403A01400_localcoordinator (Type=SwitchItem, State=Uninitialized)
sonos_zoneplayer_RINCON_000E58C6268A01400_previous (Type=SwitchItem, State=Uninitialized)
sonos_zoneplayer_RINCON_000E58D8405C01400_zonename (Type=StringItem, State=Master Bedroom)

osgi> smarthome links list
sonos_zoneplayer_RINCON_000E58D8405C01400_radio -> sonos:zoneplayer:RINCON_000E58D8405C01400:radio
sonos_zoneplayer_RINCON_000E58D8405601400_alarmrunning -> sonos:zoneplayer:RINCON_000E58D8405601400:alarmrunning
sonos_zoneplayer_RINCON_000E58D83FC801400_currenttitle -> sonos:zoneplayer:RINCON_000E58D83FC801400:currenttitle
sonos_zoneplayer_RINCON_000E58B74CE301400_playlinein -> sonos:zoneplayer:RINCON_000E58B74CE301400:playlinein

It is not really a bug, but I was not expecting this to happen either.....

Target platform definition problem

Kai,
Target Platform definition ("reloading the platform") after latest pull of commits from the Master yields problems with unresolved package constraints. Also, seems Run/Debug configuration Plug-in list is empty
K

IE not supported

Hi, I am not sure if this is mentioned somewhere, but none of the UIs of the latest release does work correctly in Windows IE. Chrome does fine btw.

Building with my binding

I am trying to build openhab2 using mvn clean package command, but i can't make the runtime load my binding handler and so on. i.e., If i declare a Thing in the .Things it says:
Cannot register handler. No handler factory for thing...
Am i missing something? I had the binding to the launch on eclipse.
Do I need to add to the pom.xml of distribution?

I can run my binding fine on eclipse...

Can anyone help.
Thank you.

IDE plug-ins unstable download

Hello All,

I've been having some trouble with the Eclipse setup. The main issues are:

  • The plugins download faills on login update and the openHAB2 gets compiling errors;
  • The openHAB2_Runtime.launch and openhab.target files somehow are changed in a way that running the Runtime fails with the following problems:

org.eclipse.jetty.deploy
org.eclipse.jetty.osgi.boot
org.eclipse.jetty.osgi.httpservice
org.eclipse.jetty.webapp
org.eclipse.jetty.xml
org.eclipse.xtend.lib

Something to do with the version of the packages that need to be imported...

Does anyone is having the same issues?

TY
Pedro G.

Exception when restoring state in Sonos binding

When calling restoreAll, I get the following exception:


15:12:50.068 DEBUG o.e.s.c.t.i.ThingManager[:161] - Delegating command 'ON' for item 'sonos_zoneplayer_RINCON_B8E93780863601400_restoreall' to handler for channel 'sonos:zoneplayer:RINCON_B8E93780863601400:restoreall'
15:12:50.072 ERROR o.e.s.c.t.i.ThingManager[:166] - Exception occured while calling handler: null
java.lang.NullPointerException: null
    at java.math.BigDecimal.<init>(BigDecimal.java:739)
    at org.eclipse.smarthome.core.library.types.DecimalType.<init>(DecimalType.java:50)
    at org.eclipse.smarthome.core.library.types.DecimalType.valueOf(DecimalType.java:58)
    at org.openhab.binding.sonos.handler.ZonePlayerHandler.restoreState(ZonePlayerHandler.java:979)
    at org.openhab.binding.sonos.handler.ZonePlayerHandler.restoreAllPlayerState(ZonePlayerHandler.java:271)
    at org.openhab.binding.sonos.handler.ZonePlayerHandler.handleCommand(ZonePlayerHandler.java:233)
    at org.eclipse.smarthome.core.thing.internal.ThingManager.receiveCommand(ThingManager.java:164)
    at org.eclipse.smarthome.core.events.AbstractEventSubscriber.receiveCommand(AbstractEventSubscriber.java:135)
    at org.eclipse.smarthome.core.events.AbstractEventSubscriber.handleEvent(AbstractEventSubscriber.java:105)
    at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
1

2.0.0 Alpha discussion thread

I propose to put some early feedback on yesterday's release in this separate thread?

to start of with, Kai, next to the write-up/tables you made i the documentation folder, what are the essential features we are missing before it can be put into production? If nothing essential I will move over very shortly and take it from there.

Target platform reload fails and mvm clean install fails

Just tried to reload the target OH2 platform and it fails on "Problems occurred getting the plug-ins in this container
Unable to locate installable unit org.eclipse.xtend.sdk.feature.group"

and then subsequently "mvn clean install" fails with

[ERROR] Internal error: java.lang.RuntimeException: Failed to resolve target definition /Users/kgoderis/Documents/openHAB2.0/openhab2/targetplatform/openhab.target: Could not find "org.eclipse.smarthome.feature.runtime.model.feature.group/0.7.0.201409021706" in the repositories of the current location -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Failed to resolve target definition /Users/kgoderis/Documents/openHAB2.0/openhab2/targetplatform/openhab.target

embedded systems

I wonder, what exactly are the minimal requirements to a java runtime for executing your openHAB2 framework. I've tried (naively) to run it with ejre(oracle), which was configured with a compact1 profile. Obviously it has failed, due to missing dependencies (SAX-Parser). I doubt the adventure to modularize a monolithic solution like java, myself.

I try to figure out, whether a hardware platform arm/sflt 400MHz 64MB of RAM and <50MB flash would be suitable for it? Besides, this platform bundles a lot of wireless modules, that's why it became interesting for us.

So I expect the minimal hardware requirements would be widely above the 64MB of RAM or Flash, especially when I look forward into productive environment beyond a minimal solution as presently available. And there is no chance to reduce those requirements, or am I to doubtful?

Switching On/Off Homematic power switch failes

With the current build it is possible to establish a connection to the CCU2 with the OpenHAB 1.5 bundles in OpenHAB 2.0. Thanks a lot for the quick response!

I'm able to communicate with different Homematic devices and get the state from a door contact sensor and different power switches as expected.

But I am not able to change the state of the power switch using the OpenHAB 2.0 UI. There is no reaction in the power switch. When changing the state of the power switch using the CCU2 UI, the switch reacts as expected and the new state is reflected in the OpenHAB 2.0 UI. So everything works fine using the CCU2 interface.

It seems as only the state can be collected, but the state of the device can't be changed. There is no error message in the log.

I applied the following rule in OpenHAB 2.0:

rule "SwitchPlug changed" when Item SwitchPlug changed then if(SwitchPlug.state == ON) sendCommand(SwitchPlug, ON) else sendCommand(SwitchPlug, OFF) end
Do I miss something?

Editing the config files causes infinate loop

When I run the latest OH2 snapshot and modify one of the config files (e.g. demo.items, demo.things, etc) there seems an infinate loop with processing/refreshing.

The only way to stop this is by closing.
e.g.:
08:09:59.840 INFO o.e.s.m.c.i.ModelRepositoryImpl[:97] - Refreshing model 'demo.items' 08:09:59.841 DEBUG o.e.s.m.i.i.GenericItemProvider[:147] - Processing binding configs for items from model 'demo.items'08:09:59.842 DEBUG o.e.s.m.i.i.GenericItemProvider[:126] - Read items from model 'demo.items' 08:09:59.844 INFO o.e.s.m.c.i.ModelRepositoryImpl[:97] - Refreshing model 'demo.sitemap' 08:09:59.846 INFO o.e.s.m.c.i.ModelRepositoryImpl[:97] - Refreshing model 'demo.items' 08:09:59.847 DEBUG o.e.s.m.i.i.GenericItemProvider[:147] - Processing binding configs for items from model 'demo.items'08:09:59.847 DEBUG o.e.s.m.i.i.GenericItemProvider[:126] - Read items from model 'demo.items' 08:09:59.850 INFO o.e.s.m.c.i.ModelRepositoryImpl[:97] - Refreshing model 'demo.sitemap' 08:09:59.852 INFO o.e.s.m.c.i.ModelRepositoryImpl[:97] - Refreshing model 'demo.items' 08:09:59.854 DEBUG o.e.s.m.i.i.GenericItemProvider[:147] - Processing binding configs for items from model 'demo.items'08:09:59.854 DEBUG o.e.s.m.i.i.GenericItemProvider[:126] - Read items from model 'demo.items' 08:09:59.857 INFO o.e.s.m.c.i.ModelRepositoryImpl[:97] - Refreshing model 'demo.sitemap' 08:09:59.859 INFO o.e.s.m.c.i.ModelRepositoryImpl[:97] - Refreshing model 'demo.items' 08:09:59.860 DEBUG o.e.s.m.i.i.GenericItemProvider[:147] - Processing binding configs for items from model 'demo.items'08:09:59.860 DEBUG o.e.s.m.i.i.GenericItemProvider[:126] - Read items from model 'demo.items' 08:09:59.863 INFO o.e.s.m.c.i.ModelRepositoryImpl[:97] - Refreshing model 'demo.sitemap' 08:09:59.865 INFO o.e.s.m.c.i.ModelRepositoryImpl[:97] - Refreshing model 'demo.items' 08:09:59.866 DEBUG o.e.s.m.i.i.GenericItemProvider[:147] - Processing binding configs for items from model 'demo.items'08:09:59.866 DEBUG o.e.s.m.i.i.GenericItemProvider[:126] - Read items from model 'demo.items' 08:09:59.868 INFO o.e.s.m.c.i.ModelRepositoryImpl[:97] - Refreshing model 'demo.sitemap'

NPE when discovering new ZonePlayer

After deleting all my things ("smarthome things clear") and triggering a new discovery ("smarthome discovery start sonos"), I receive the following NPE in the log:

16:43:57.912 INFO  o.e.s.c.d.i.PersistentInbox[:86] - Added new thing 'sonos:zoneplayer:RINCON_B8E93780863601400' to inbox.
16:43:57.913 DEBUG o.o.b.s.h.ZonePlayerHandler[:164] - Discovered UDN 'RINCON_B8E93780863601400' for thing 'sonos:zoneplayer:RINCON_B8E93780863601400'
16:43:57.922 DEBUG o.o.b.s.h.ZonePlayerHandler[:109] - Exception during poll : {}
java.lang.NullPointerException: null
    at org.openhab.binding.sonos.handler.ZonePlayerHandler.getHandlerByName(ZonePlayerHandler.java:1249)
    at org.openhab.binding.sonos.handler.ZonePlayerHandler.updateCurrentURIFormatted(ZonePlayerHandler.java:579)
    at org.openhab.binding.sonos.handler.ZonePlayerHandler$1.run(ZonePlayerHandler.java:103)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
16

Rules on Raspberry Pi

Hello Kai,

We are having an issue with rules on the raspberry pi not finding the items: "The name 'HF_Switch2' cannot be resolved to an item or type." Everything is working fine on the PC running on Eclipse.

Thank you in advance.
Regards,
Pedro.

Zoneplayer does not switch between ONLINE and OFFLINE

When I plug my Sonos speaker from the network, the binding still continues to send update events and keeps the status at ONLINE. Instead it should notice that the device is not reachable anymore and set the status to OFFLINE and stop sending events for it.
Clearly, once the device is reachable again, it should come back to ONLINE.

Current IDE environment is having an issue

Following the steps as in https://github.com/openhab/openhab2/blob/master/docs/sources/development/ide.md
is not creating a working basic IDE. Project setup is missing references that prevent compilation.

Reproduce steps:

  1. download yoxos,
  2. create a clone of the repository.
    execute the step:

Create a new workspace and choose File->Import->General->Existing Projects into Workspace, enter >your repository root folder and press "Finish". All project should directly compile without errors.

After workspace is created, instead of compiling without errors, there are 100+ errors.
This due to missing components.
screenshot 1

Unable to run openhab2 with Build #66

I am trying to setup IDE so that I can learn how to build custom binding. First I spent couple of hours setting up IDE but I keep get validation error during openHAB_Runtime execution.

missingcontraints

Then I tried to run prebuild openhab2 run time. Downloaded latest build (Build #66 (Nov 21, 2014 3:01:50 AM). Again got errors.

!SESSION 2014-11-21 12:58:01.225 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_40
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -console

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:04.034
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.core.persistence.manager. The reference is: Reference[name =
ModelRepository, interface = org.eclipse.smarthome.model.core.ModelRepository, policy = dynamic, cardinality = 0..1, target = null, bind = setModelRepository, unbind = unsetModelRepository]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:04.035
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.core.persistence.manager. The reference is: Reference[name = PersistenceService, interface = org.eclipse.smarthome.core.persistence.PersistenceService, policy = dynamic, cardinality = 0..n, target = null, bind = addPersistenceService, unbind = removePersistenceService]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:04.035
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.core.persistence.manager. The reference is: Reference[name = ItemRegistry, interface = org.eclipse.smarthome.core.items.ItemRegistry, policy = dynamic, cardinality = 0..1, target = null, bind = setItemRegistry, unbind = unsetItemRegistry]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:04.039
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.model.persistence.extensions. The reference is: Reference[name = PersistenceService, interface = org.eclipse.smarthome.model.persistence.PersistenceService, policy = dynamic, cardinality = 0..n, target = null, bind = addPersistenceService, unbind = removePersistenceService]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:05.629
!MESSAGE Could not bind a reference of component ConfigDescriptionRegistry. The reference is: Reference[name = ConfigDescriptionProvider, interface = org.eclipse.smarthome.config.core.ConfigDescriptionProvider, policy = dynamic, cardinality = 0..n, target = null, bind = addConfigDescriptionProvider, unbind = removeConfigDescriptionProvider]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:05.636
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistry. The reference is: Reference[name = DiscoveryService, interface = org.eclipse.smarthome.config.discovery.DiscoveryService, policy = dynamic, cardinality = 0..n, target = null, bind = addDiscoveryService, unbind = removeDiscoveryService]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:05.876
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.core.itemregistry. The reference is: Reference[name = ItemProvider, interface = org.eclipse.smarthome.core.items.ItemProvider, policy = dynamic, cardinality = 0..n, target = null, bind = addProvider, unbind = removeProvider]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:05.877
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.core.itemregistry. The reference is: Reference[name = EventPublisher, interface = org.eclipse.smarthome.core.events.EventPublisher, policy = dynamic, cardinality = 0..1, target = null, bind = setEventPublisher, unbind = unsetEventPublisher]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:05.933
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.core.binding.BindingInfoRegistry. The reference is: Reference[name = BindingInfoProvider, interface = org.eclipse.smarthome.core.binding.BindingInfoProvider, policy = dynamic, cardinality = 0..n, target = null, bind = addBindingInfoProvider, unbind = removeBindingInfoProvider]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:05.974
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.core.thing.ThingRegistry. The reference is: Reference[name = ThingProvider, interface = org.eclipse.smarthome.core.thing.ThingProvider, policy = dynamic, cardinality = 0..n, target = null, bind = addProvider, unbind = removeProvider]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:05.981
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.core.thing.internal.ThingManager. The reference is: Reference[name = ThingHandlerFactory, interface = org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory, policy = dynamic, cardinality = 0..n, target = null, bind = addThingHandlerFactory, unbind = removeThingHandlerFactory]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:05.983
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.core.thing.type.ThingTypeRegistry. The reference is: Reference[name = ThingTypeProvider, interface = org.eclipse.smarthome.core.thing.binding.ThingTypeProvider, policy = dynamic, cardinality = 0..n, target = null, bind = addThingTypeProvider, unbind = removeThingTypeProvider]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:06.657
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.core.thing.managedthingprovider. The reference is: Reference[name = ThingHandlerFactory, interface = org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory, policy = dynamic, cardinality = 0..n, target = null, bind = addThingHandlerFactory, unbind = removeThingHandlerFactory]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:06.693
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.ui. The reference is: Reference[name = ItemUIProvider, interface = org.eclipse.smarthome.ui.items.ItemUIProvider, policy = dynamic, cardinality = 0..n, target = null, bind = addItemUIProvider, unbind = removeItemUIProvider]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:06.694
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.ui. The reference is: Reference[name = IconProvider, interface = org.eclipse.smarthome.ui.icon.IconProvider, policy = dynamic, cardinality = 0..n, target = null, bind = addIconProvider, unbind = removeIconProvider]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:06.694
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.ui.chart. The reference is: Reference[name = ChartProvider, interface = org.eclipse.smarthome.ui.chart.ChartProvider, policy = dynamic, cardinality = 0..n, target = null, bind = addChartProvider, unbind = removeChartProvider]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:06.724
!MESSAGE Could not bind a reference of component org.eclipse.smarthome.ui.chart.defaultprovider. The reference is: Reference[name = PersistenceService, interface = org.eclipse.smarthome.core.persistence.PersistenceService, policy = dynamic, cardinality = 0..n, target = null, bind = addPersistenceService, unbind = removePersistenceService]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:07.653
!MESSAGE Could not bind a reference of component org.openhab.core.compat1x.actionservicefactory. The reference is: Reference[name = ActionService, interface = org.openhab.core.scriptengine.action.ActionService, policy = dynamic, cardinality = 0..n, target = null, bind = addActionService, unbind = removeActionService]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:07.656
!MESSAGE Could not bind a reference of component org.openhab.core.compat1x.persistenceservicefactory. The reference is: Reference[name = PersistenceService, interface = org.openhab.core.persistence.PersistenceService, policy = dynamic, cardinality = 0..n, target = null, bind = addPersistenceService, unbind = removePersistenceService]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:07.669
!MESSAGE Could not bind a reference of component org.openhab.core.compat1x.autoupdateproviderdelegate. The reference is: Reference[name = AutoUpdateBindingProvider, interface = org.openhab.core.autoupdate.AutoUpdateBindingProvider, policy = dynamic, cardinality = 0..n, target = null, bind = addAutoUpdateBindingProvider, unbind = removeAutoUpdateBindingProvider]

!ENTRY org.eclipse.equinox.ds 1 0 2014-11-21 12:58:07.671
!MESSAGE Could not bind a reference of component org.openhab.core.compat1x.bindingconfigreaderfactory. The reference is: Reference[name = BindingConfigReader, interface = org.openhab.model.item.binding.BindingConfigReader, policy = dynamic, cardinality = 0..n, target = null, bind = addBindingConfigReader, unbind = removeBindingConfigReader]

OpenHAB 2 Loading time on Raspberry Pi

Hello Kai,

I was wondering if there is some ways of reducing the OpenHAB 2 load time on Raspberry Pi (which is about 3 minutes), maybe by reducing the number of plugins (if some may be dispensable)? Because after everything is up it runs pretty well!

Thank you.
Regards.
Pedro

DSL based on Thing.xtext fails

Kai, is ESH in OH2 up to date? based on the Thing.xtext DSL I tried to define a .thing as follows:

Bridge irtrans:ethernet:livingroom [ipAddress="192.168.0.55", portNumber="21000", refreshInterval="50", timeOut="200", bufferSize="1024"]
{Thing irtrans:blaster:thing1 [led="E", remote="samsung", command="*"]}

It fails with following errors:

14:14:07.970 DEBUG o.e.s.m.t.i.GenericThingProvider[:134] - Creating thing for type 'irtrans:ethernet' with UID 'irtrans:ethernet:livingroom.
SLF4J: Failed toString() invocation on an object of type [org.eclipse.smarthome.core.thing.ThingTypeUID]
java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:192)
at com.google.common.base.Joiner.toString(Joiner.java:436)
at com.google.common.base.Joiner.appendTo(Joiner.java:111)
at com.google.common.base.Joiner.appendTo(Joiner.java:152)
at com.google.common.base.Joiner.join(Joiner.java:193)
at com.google.common.base.Joiner.join(Joiner.java:183)
at com.google.common.base.Joiner.join(Joiner.java:201)
at org.eclipse.smarthome.core.thing.UID.toString(UID.java:88)
at org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:304)
at org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:276)
at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:230)

14:14:07.980 DEBUG o.e.s.m.t.i.GenericThingProvider[:134] - Creating thing for type '[FAILED toString()]' with UID '[FAILED toString()].

14:14:08.220 ERROR o.e.s.c.c.r.AbstractRegistry[:107] - Could not inform the listener 'org.eclipse.smarthome.config.discovery.internal.PersistentInbox@1d521927' about the 'ADDED' event!: null
java.lang.NullPointerException: null
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:192)
at com.google.common.base.Joiner.toString(Joiner.java:436)
at com.google.common.base.Joiner.appendTo(Joiner.java:111)
at com.google.common.base.Joiner.appendTo(Joiner.java:152)
at com.google.common.base.Joiner.join(Joiner.java:193)

and so on...

playerItem rendering in Classic UI

Kai,
in order to fully test and integrate playerItems, we would need something to support it in the UI. I am no hero at doing UI's, but I can imagine a widget with 6 buttons to present play/stop and so forth?

Running ESH/OH2 parallel to OH1.x

I just wanted to start a new thread on how to migrate from a OH1.x environment to a OH2 ESH-backed environment, given that (1) there will be a compatibility binding available in OH2 to support OH1 bindings on the one hand and (2) the path to migration of each binding will be long and depending on community effort.

I see some possible scenarios here:

  1. Run ESH/OH2 next to OH1.x on the same host (possible? possible from OSGi and java VM point of view?), and have those 2 interact via
    a. OSGi bus
    b. MQTT
    c. ....?
  2. Pray the Gods to be merciful to Kai and have OH1.x compat. lib in place without too many hiccups
  3. Same as 1. but without interaction, loosing thus some functionality, and having to operate 2 GUI's to control things
  4. ... ?

mvn clean install fails due to dependencies not found

Hi all,

I'm author of another home automation framework called JMom NG. Since I prefer working in a larger opensource project and you guys are tackling my biggest concern with openHAB (usability), I like to help with the development op openHAB.

And now the stupid question: I cloned into the repo and in Eclipse all is fine... I then tried to run mvn clean install and I get exceptions due to missing dependencies.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31.777 s
[INFO] Finished at: 2014-12-07T16:00:32+01:00
[INFO] Final Memory: 79M/727M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2:single (distro-assembly) on project distribution: Failed to create assembly: Unable to 
resolve dependencies for assembly 'runtime': Failed to resolve dependencies for: runtime: Missing:
[ERROR] ----------
[ERROR] 1) org.eclipse.smarthome.binding:org.eclipse.smarthome.binding.lifx:jar:0.8.0-SNAPSHOT
[ERROR] 
[ERROR] Try downloading the file manually from the project website.
[ERROR] 
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.eclipse.smarthome.binding -DartifactId=org.eclipse.smarthome.binding.lifx -Dversion=0.8.0-SNAPSHOT -Dpackaging=jar -Dfile=
/path/to/file
[ERROR] 
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=org.eclipse.smarthome.binding -DartifactId=org.eclipse.smarthome.binding.lifx -Dversion=0.8.0-SNAPSHOT -Dpackaging=jar -Dfile=/p
ath/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR] 
[ERROR] 2) org.openhab.ui:org.openhab.ui.paperui:jar:2.0.0-SNAPSHOT
[ERROR] 
[ERROR] Try downloading the file manually from the project website.
[ERROR] 
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.openhab.ui -DartifactId=org.openhab.ui.paperui -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
[ERROR] 
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=org.openhab.ui -DartifactId=org.openhab.ui.paperui -Dversion=2.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -Dr
epositoryId=[id]

I looked into the eclipse smarthome repository and the dependency for org.eclipse.smarthome.binding.lifx is indeed not published. The paperui dependency/module I also can not find in the cloned openHAB2 project.

What am I missing?

Kind regards,
Ronald

configuration = getConfigAs(); error on integers

I'm struggling with getting the item configuration via getConfigAs()

e.g. MaxCubeBridgeConfiguration configuration = getConfigAs(MaxCubeBridgeConfiguration.class);
This works fine for string items, but for integers it seems to fail

the description

        <parameter name="port" type="integer">
                <context>port</context>
                <label>MAX! Cube LAN gateway port</label>
                <description>Port of the LAN gateway</description>
                <default>62910</default>
                <required>false</required>
            </parameter>

23:25:36.073 WARN o.e.s.c.core.Configuration[:59] - Could not set field value for field 'port': Can not set int field org.openhab.binding.max.config.MaxCubeBridgeConfiguration.port to java.lang.String
java.lang.IllegalArgumentException: Can not set int field org.openhab.binding.max.config.MaxCubeBridgeConfiguration.port to java.lang.String
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
at sun.reflect.UnsafeIntegerFieldAccessorImpl.set(Unknown Source)
at java.lang.reflect.Field.set(Unknown Source)
at org.eclipse.smarthome.config.core.Configuration.as(Configuration.java:57)
at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.getConfigAs(BaseThingHandler.java:129)
at org.openhab.binding.max.internal.handler.MaxCubeBridgeHandler.initialize(MaxCubeBridgeHandler.java:141)
at org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory.registerHandler(BaseThingHandlerFactory.java:109)
at org.eclipse.smarthome.core.thing.internal.ThingManager.registerHandler(ThingManager.java:290)
at org.eclipse.smarthome.core.thing.internal.ThingManager.thingAdded(ThingManager.java:221)
at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyTrackers(ThingRegistryImpl.java:142)
23:25:36.073 WARN o.e.s.c.core.Configuration[:59] - Could not set field value for field 'refreshInterval': Can not set java.lang.Long field org.openhab.binding.max.config.MaxCubeBridgeConfiguration.refreshInterval to java.lang.String

Openhab2 issues?

Hi,

I'm a fan of OpenHab and can't wait for version 2.
But let me quote from you website and your GitHub repo startpage:
"openHAB 2 is currently under heavy development"

There are 70 commits in 5 months, that's for me personal not the definition of heavy development.
I don't want to be offensive, it's just an identification.

Are there any issues or changes in your plan that cause this not so fast progress?

Kind regards

blanks in installation path are not permitted

Hi, using the latest release with Windows 8.1 it is not possible to have blanks in the installation path. In this case, the jar will not be found and openHAB simple does not start.

ESH random behaviour on updateState()

This related to Sonos, or the ESH event bus, or auto-approve. Anyways, I am experiencing random behaviour which is hard to replicate. This is what happens:

In the openhab.log :

11:09:55.852 TRACE o.e.s.i.t.u.UpnpIOServiceImpl[:75]- A GENA subscription 'RenderingControl' for device 'uuid:RINCON_000E58D6F22801400' is established
...
11:09:56.128 TRACE o.o.b.s.h.ZonePlayerHandler[:294]- Received pair 'VolumeMaster':'50' (service 'RenderingControl') for thing 'sonos:zoneplayer:RINCON_000E58D6F22801400'
11:09:56.128 DEBUG o.o.b.s.h.ZonePlayerHandler[:381]- Updating Volume of ZPH 'sonos:zoneplayer:RINCON_000E58D6F22801400' to '50'

which is generated by the following code block:

    case "VolumeMaster": {
        logger.debug("Updating Volume of ZPH '{}' to '{}'",this.getThing().getUID(),new PercentType(stateMap.get("VolumeMaster")));
        updateState(new ChannelUID(getThing().getUID(), VOLUME),
                (stateMap.get("VolumeMaster") != null) ? new PercentType(
                        stateMap.get("VolumeMaster")) : UnDefType.UNDEF);
        break;

but, in events.log we have the following:

2014-11-15 11:10:55 - sonos_zoneplayer_RINCON_000E58D6F22801400_zonename state updated to Bedroom Georges
2014-11-15 11:10:55 - sonos_zoneplayer_RINCON_000E58D6F22801400_zonegroup state updated to Undefined
2014-11-15 11:10:55 - sonos_zoneplayer_RINCON_000E58D6F22801400_alarmproperties state updated to No running alarm
2014-11-15 11:10:55 - sonos_zoneplayer_RINCON_000E58D6F22801400_led state updated to ON

and in the console we have:

osgi> smarthome items sonos_zoneplayer_RINCON_000E58D6F22801400*
...
sonos_zoneplayer_RINCON_000E58D6F22801400_zonename (Type=StringItem, State=Bedroom Georges)
....
sonos_zoneplayer_RINCON_000E58D6F22801400_volume (Type=DimmerItem, State=Uninitialized)

So:

  1. updateState() call does not generate event in events.log. Item not yet created? timing issue?
  2. Item does exist in console, but not defined yet
  3. issuing a "smarthome item send ... INCREASE" to an uninitialised Item does update the value

./create_openhab_binding_skeleton.sh broken

Using the latest snapshot of the master repo:

Karel-Goderis-MacBook-Air-10:binding kgoderis$ ./create_openhab_binding_skeleton.sh 2NHelios
[INFO] Scanning for projects...
Downloading: https://repo.eclipse.org/content/repositories/snapshots/org/openhab/targetplatform/2.0.0-SNAPSHOT/maven-metadata.xml
Downloading: https://repo.eclipse.org/content/repositories/snapshots/org/openhab/targetplatform/2.0.0-SNAPSHOT/targetplatform-2.0.0-SNAPSHOT-openhab.target
[ERROR] Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact org.openhab:targetplatform:target:openhab:2.0.0-SNAPSHOT -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Could not resolve target platform specification artifact org.openhab:targetplatform:target:openhab:2.0.0-SNAPSHOT
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:166)

war file

Hi,

Looking for some scripts or options to create war file? any help or pointers?

Thank you,
Sridhar

OSGILogListener.NLogListener will run in NPE when running in Concierge

While trying to run openHAB2 in Concierge framework, I ran into a NullPointerException in code:

Logger logger = LoggerFactory.getLogger("OSGi");
Marker marker = MarkerFactory.getMarker(entry.getBundle().getSymbolicName());

The method LogEntry.getBundle() can return a bundle reference, but also null.
See http://www.osgi.org/javadoc/r5/enterprise/org/osgi/service/log/LogEntry.html#getBundle()

I will provide a fix like that:

Logger logger = LoggerFactory.getLogger("OSGi");
String markerName = entry.getBundle() == null ? "unknownBundle" : entry.getBundle().getSymbolicName();
Marker marker = MarkerFactory.getMarker(markerName);

Error Importing Project

Hi,
I followed your Setup-Instructions "Setting up a development environment for openHAB 2" but I got an error message "Error Importing Projects"

My OS: OS X 10.9.4

log file

!SESSION 2014-07-18 08:36:57.126 -----------------------------------------------
eclipse.buildId=4.4.0.I20140606-1215
java.version=1.7.0_65
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -showlocation openHAB2
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -showlocation openHAB2

!ENTRY org.eclipse.core.net 1 0 2014-07-18 08:39:01.178
!MESSAGE System property http.nonProxyHosts has been set to local|.local|169.254/16|.169.254/16 by an external source. This value will be overwritten using the values from the preferences

!ENTRY com.yoxos.yim.core 4 4 2014-07-18 08:39:08.509
!MESSAGE Login With Persisted Credentials

!ENTRY com.yoxos.yim.core 4 4 2014-07-18 08:39:08.624
!MESSAGE Login With Persisted Credentials

!ENTRY com.yoxos.yim.core 4 4 2014-07-18 08:39:10.339
!MESSAGE Login With Persisted Credentials

!ENTRY com.yoxos.provisioning.core 4 4 2014-07-18 08:47:40.796
!MESSAGE Error Importing Projects
!STACK 0
java.lang.reflect.InvocationTargetException
at org.eclipse.team.internal.ui.ProjectSetImporter.importProjectSet(ProjectSetImporter.java:189)
at org.eclipse.team.internal.ui.ProjectSetImporter.importProjectSet(ProjectSetImporter.java:67)
at org.eclipse.team.internal.ui.wizards.ImportProjectSetOperation.runForFile(ImportProjectSetOperation.java:84)
at org.eclipse.team.internal.ui.wizards.ImportProjectSetOperation.run(ImportProjectSetOperation.java:99)
at com.yoxos.provisioning.team.internal.TeamInitializer.importProjectSet(TeamInitializer.java:143)
at com.yoxos.provisioning.team.internal.TeamInitializer.doTheWork(TeamInitializer.java:92)
at com.yoxos.provisioning.team.internal.TeamInitializer.run(TeamInitializer.java:55)
at com.yoxos.provisioning.internal.RuntimeUtil$1.run(RuntimeUtil.java:82)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.team.core.TeamException: The following errors occurred while importing projects. Some projects may not be loaded.
at org.eclipse.team.internal.ui.ProjectSetImporter.importProjectSet(ProjectSetImporter.java:123)
... 8 more
Root exception:
org.eclipse.team.core.TeamException: The following errors occurred while importing projects. Some projects may not be loaded.
at org.eclipse.team.internal.ui.ProjectSetImporter.importProjectSet(ProjectSetImporter.java:123)
at org.eclipse.team.internal.ui.ProjectSetImporter.importProjectSet(ProjectSetImporter.java:67)
at org.eclipse.team.internal.ui.wizards.ImportProjectSetOperation.runForFile(ImportProjectSetOperation.java:84)
at org.eclipse.team.internal.ui.wizards.ImportProjectSetOperation.run(ImportProjectSetOperation.java:99)
at com.yoxos.provisioning.team.internal.TeamInitializer.importProjectSet(TeamInitializer.java:143)
at com.yoxos.provisioning.team.internal.TeamInitializer.doTheWork(TeamInitializer.java:92)
at com.yoxos.provisioning.team.internal.TeamInitializer.run(TeamInitializer.java:55)
at com.yoxos.provisioning.internal.RuntimeUtil$1.run(RuntimeUtil.java:82)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Contains: Failed to read project description file from location '/Users/luigi/openhab-dev/workspace/openhab2/features/org.openhab.dependencies.feature/.project'.
org.eclipse.core.internal.resources.ResourceException()[567]: java.io.FileNotFoundException: /Users/luigi/openhab-dev/workspace/openhab2/features/org.openhab.dependencies.feature/.project (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:146)
at org.eclipse.core.internal.resources.ProjectDescriptionReader.read(ProjectDescriptionReader.java:951)
at org.eclipse.core.internal.resources.Workspace.loadProjectDescription(Workspace.java:1974)
at org.eclipse.egit.core.internal.ProjectReferenceImporter.importProjects(ProjectReferenceImporter.java:270)
at org.eclipse.egit.core.internal.ProjectReferenceImporter.run(ProjectReferenceImporter.java:107)
at org.eclipse.egit.core.GitProjectSetCapability$1.run(GitProjectSetCapability.java:107)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.egit.core.GitProjectSetCapability.addToWorkspace(GitProjectSetCapability.java:104)
at org.eclipse.team.internal.ui.ProjectSetImporter.importProjectSet(ProjectSetImporter.java:109)
at org.eclipse.team.internal.ui.ProjectSetImporter.importProjectSet(ProjectSetImporter.java:67)
at org.eclipse.team.internal.ui.wizards.ImportProjectSetOperation.runForFile(ImportProjectSetOperation.java:84)
at org.eclipse.team.internal.ui.wizards.ImportProjectSetOperation.run(ImportProjectSetOperation.java:99)
at com.yoxos.provisioning.team.internal.TeamInitializer.importProjectSet(TeamInitializer.java:143)
at com.yoxos.provisioning.team.internal.TeamInitializer.doTheWork(TeamInitializer.java:92)
at com.yoxos.provisioning.team.internal.TeamInitializer.run(TeamInitializer.java:55)
at com.yoxos.provisioning.internal.RuntimeUtil$1.run(RuntimeUtil.java:82)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Howto use Homematic Binding OpenHAB 1.5 in OpenHAB 2.0

I'm currently exploring OpenHAB 2.0 based on Eclipse Smart Home for a demonstration setup.

For demonstration purposes I want to use several Homematic devices. I got the information, that it should be possible to use the Homematic bindings from 1.5 in 2.0 using a compatibilty layer.

I cloned the current development state for OpenHAB 2.0 and downloaded the Homematic addons from version 1.5. Then I dropped the bindings into the addons directory and created the openhab.cfg containing the IP-address for the Homematic CCU2.

When starting the OpenHAB 2.0 framework, the following exception/error is thrown.

13:39:00.343 INFO  org.jupnp.UpnpServiceImpl[:192]- Starting UPnP service...
13:39:00.435 INFO  o.j.t.i.o.HttpServiceServletContainerAdapter[:62]- Registering UPnP callback servlet as /upnpcallback
13:39:00.869 WARN  o.o.b.h.i.u.LocalNetworkInterface[:53]- Found multiple local interfaces! Replacing 192.168.0.213 with 192.168.15.1
13:39:00.874 WARN  o.o.b.h.i.u.LocalNetworkInterface[:53]- Found multiple local interfaces! Replacing 192.168.15.1 with 192.168.10.1
13:39:00.921 INFO  o.o.b.h.i.bus.HomematicBinding[:92]- HomematicConfig[host=192.168.0.154,callbackHost=192.168.10.1,callbackPort=9123,aliveInterval=300]
13:39:00.922 INFO  o.o.b.h.i.c.HomematicCommunicator[:66]- Starting Homematic communicator
13:39:00.924 DEBUG o.o.b.h.i.c.ItemDisabler[:54]- Starting ItemDisabler
13:39:00.940 INFO  o.o.b.h.i.c.HomematicCommunicator[:76]- Homematic ServerId[name=CCU,version=2.11.6,address=LEQ0392835]
13:39:00.954 INFO  o.o.b.h.i.c.client.CcuClient[:78]- Starting CcuClient
13:39:00.955 DEBUG o.o.b.h.i.c.c.BinRpcClient[:44]- Starting BinRpcClient
13:39:01.015 ERROR o.o.b.h.i.c.HomematicCommunicator[:93]- Could not start Homematic communicator: null
java.lang.NullPointerException: null
            at javax.xml.bind.ContextFinder.handleClassCastException(ContextFinder.java:95)
            at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:204)
            at javax.xml.bind.ContextFinder.find(ContextFinder.java:375)
            at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:618)
            at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:565)
            at org.openhab.binding.homematic.internal.communicator.client.CcuClient.loadTclRegaScripts(CcuClient.java:334)
            at org.openhab.binding.homematic.internal.communicator.client.CcuClient.start(CcuClient.java:81)
            at org.openhab.binding.homematic.internal.communicator.HomematicCommunicator.start(HomematicCommunicator.java:82)
            at org.openhab.binding.homematic.internal.bus.HomematicBinding.updated(HomematicBinding.java:95)
            at org.eclipse.equinox.internal.cm.ManagedServiceTracker$1.run(ManagedServiceTracker.java:276)
            at org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36)
13:39:01.025 INFO  o.o.b.h.i.c.HomematicCommunicator[:120]- Shutting down Homematic communicator
13:39:01.040 DEBUG o.o.b.h.i.c.s.BinRpcCallbackServer[:55]- Shutting down BinRpcCallbackServer

The exception is connected to "loadTclRegaScripts".

I checked the whole setup with the OpenHAB 1.5 framework. In this setup everything is fine and I'm able to switch Homematic devices ON/OFF using the OpenHAB 1.5 UI. So the setup and configuration of the CCU2 seems to be fine.

Does anyone have an idea, what is the problem with OpenHAB 2.0 and the Homematic bindings from 1.5. Should this work? Do I miss something?

Installing IDE

Kai,
Please correct me if I am wrong, but to better understand how things will work in an ESH+OH2 environment: the ESH core will be distributed as set of .jar plug-in's that will sit in the ./runtime/server/plugins folder, right? And so, OH2's dev environment will basically be quite empty and focus only on the binding/userland stuff. Forking and cloning the OH2 repository, it feels as if all the ESH jars are missing in the Target Platform definition. Should these be manually be added to the dev environment, or should ESH be "installed" in some way before the env. can be set up? I am a bit confused here

OpenCloseType not accepted on Raspberry Pi

Hello Kai,

We have an item of type contact that receives updates from the channel state, It works fine on the PC, but on the Raspberry Pi it is not accepted:

DEBUG o.e.s.c.i.items.ItemUpdater[:77] - Received update of a not accepted type (OpenClosedType) for item hanfun_alert_alert1_state

Thank in advance.
Regards,
Pedro.

Sonos binding does not support INCREASE/DECREASE for volume

Sending INCREASE or DECREASE to the volume channel results in this exception:

15:07:52.533 INFO  runtime.busevents[:21] - sonos_zoneplayer_RINCON_B8E93780863601400_volume received command INCREASE
15:07:52.534 DEBUG o.e.s.c.t.i.ThingManager[:161] - Delegating command 'INCREASE' for item 'sonos_zoneplayer_RINCON_B8E93780863601400_volume' to handler for channel 'sonos:zoneplayer:RINCON_B8E93780863601400:volume'
15:07:52.542 ERROR o.e.s.c.t.i.ThingManager[:166] - Exception occured while calling handler: null
java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Integer.java:454)
    at java.lang.Integer.valueOf(Integer.java:582)
    at org.openhab.binding.sonos.handler.ZonePlayerHandler.setVolume(ZonePlayerHandler.java:1047)
    at org.openhab.binding.sonos.handler.ZonePlayerHandler.handleCommand(ZonePlayerHandler.java:206)
    at org.eclipse.smarthome.core.thing.internal.ThingManager.receiveCommand(ThingManager.java:164)
    at org.eclipse.smarthome.core.events.AbstractEventSubscriber.receiveCommand(AbstractEventSubscriber.java:135)
    at org.eclipse.smarthome.core.events.AbstractEventSubscriber.handleEvent(AbstractEventSubscriber.java:105)
    at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)

KNX 2.0 - General Discussion Thread

[New thread to discuss KNX 2.0]

Just did a small loading test for the new binding and defined a single Bridge with about 2500 GroupAddressThings underneath it. In the develop environment it took less than a second to create the 2500 Things, and about 7 seconds to create all the associated ThingHandlers. (with full debugging info set on)

After that there we no hiccups in processing incoming data, with about 4 to 8 telegrams arriving each second.

Having a "light-weight" GroupAddressThing does not seem to hamper performance at all....

Received update of a not accepted type (UnDefType) for item Things

When adding a new item via discovery there is an error in the log
Received update of a not accepted type (UnDefType) for item Things
At that time I don't believe any update is done yet. Note that after this, it does seem the state is update as it is followed by Things state updated to Undefined

e.g.
20:25:36.084 INFO o.e.s.c.d.i.PersistentInbox[:86] - Added new thing 'maxcube:thermostatplus:ThermostatPlus_KEQ0544242' to inbox.
20:25:36.099 DEBUG o.o.b.m.i.d.MaxCubeDevicesDiscover[:59] - Adding new MAX! Thermostat with id 'KEQ9015432' to smarthome inbox
20:25:36.224 DEBUG o.o.c.i.i.AutoApproveService[:44] - Approving inbox entry 'DiscoveryResult [thingUID=maxcube:thermostat:Thermostat_KEQ9015432, properties={serialNumber=KEQ9015432}, flag=NEW, label=Thermostat: Plug Adapter Muurverwarming (KEQ9015432), bridgeUID=maxcube:bridge:MaxCube_KEQ0565026]'
20:25:36.224 DEBUG o.e.s.c.t.ManagedThingProvider[:53] - Creating thing for type 'maxcube:thermostat'.
20:25:36.505 DEBUG o.e.s.c.d.i.PersistentInbox[:199] - Discovery result removed from inbox, because it was added as a Thing to the ThingRegistry.
20:25:36.505 INFO runtime.busevents[:25] - maxcube_thermostat_Thermostat_KEQ9015432 state updated to Undefined
20:25:36.505 DEBUG o.e.s.c.i.items.ItemUpdater[:77] - Received update of a not accepted type (UnDefType) for item Things
20:25:36.505 INFO runtime.busevents[:25] - Things state updated to Undefined

TypeParser:parseState applied on ESHCallType fails

When feeding an apparently correct set of input values to TypeParser's parseState, it catches an IllegalArgumentException, and returns null to the calling method

List<Class<? extends State>> types = [class org.openhab.library.tel.types.ESHCallType, class org.eclipse.smarthome.core.types.UnDefType](this is the correct list for ESHCallItem)
String s = 0473700645##026469334 (this is a correctly formatted string according to ESHCallType's constructor)

the methode invoked is public org.openhab.library.tel.types.ESHCallType org.openhab.library.tel.types.ESHCallType.valueOf(java.lang.String) , which is the correct method returned by type.getMethod("valueOf", String.class)

(State) valueOf.invoke(type, s) throws the exception

However, I am unable to fully debug as breakpoints set in ESHCallType.java seem to be ignored, and manual debug stepping gets me into "reflection" code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.