Hi Flavio,
the first part was related to a missing software site (OH 3rd party bundles) when building the core and other stuff. The link describes how to fix it.
thanks for your info - I checked implementing an activate method, but it doesn’t receives the .cfg parameters
services/rachio.cfg:
apiKey=12345
HandlerFactory.java
@Component(service = { ThingHandlerFactory.class,
RachioHandlerFactory.class }, immediate = true, configurationPid = "binding.rachio")
public class RachioHandlerFactory extends BaseThingHandlerFactory {
/**
* OSGi activation callback.
*
* @param config Service config.
*/
@Activate
protected void activate(Map<String, Object> config) {
logger.debug("RachioBridge: Activate");
for (HashMap.Entry<String, Object> ce : config.entrySet()) {
logger.debug(" {}: {}", ce.getKey(), ce.getValue());
Object e = ce.getValue();
}
}
debug output:
osgi> 2018-03-17 18:11:25.553 [DEBUG] [o.o.b.r.i.RachioHandlerFactory:66 ] - RachioBridge: Activate
2018-03-17 18:11:27.072 [DEBUG] [o.o.b.r.i.RachioHandlerFactory:68 ] - component.name: org.openhab.binding.rachio.internal.RachioHandlerFactory
2018-03-17 18:11:32.957 [DEBUG] [o.o.b.r.i.RachioHandlerFactory:68 ] - component.id: 99
Maybe you can help with another error while running “mvn install” I get a build error
[ERROR] .binding.rachio/META-INF/MANIFEST.MF:[0]
The package should be marked as "internal" if it is not exported.
[ERROR] .binding.rachio/META-INF/MANIFEST.MF:[0]
The package org should be marked as "internal" if it is not exported.
[ERROR] .binding.rachio/META-INF/MANIFEST.MF:[0]
The package org.openhab should be marked as "internal" if it is not exported.
[ERROR] .binding.rachio/META-INF/MANIFEST.MF:[0]
...
[ERROR] Failed to execute goal org.openhab.tools.sat:sat-plugin:0.4.1:report (default) on project org.openhab.binding.rachio:
[ERROR] Code Analysis Tool has found 4 error(s)!
[ERROR] Please fix the errors and rerun the build.
However, the MANIFEST.MF looks good for me:
Manifest-Version: 1.0
Bundle-ActivationPolicy: lazy
Bundle-ManifestVersion: 2
Bundle-Name: Rachio Binding
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-SymbolicName: org.openhab.binding.rachio;singleton:=true
Bundle-Vendor: openHAB
Bundle-Version: 2.3.0.qualifier
Bundle-ClassPath:
.,
lib/gson-2.7.jar
Import-Package:
com.google.gson,
javax.servlet,
javax.servlet.http,
org.apache.commons.net,
org.apache.commons.net.util;version="3.2.0",
org.eclipse.jdt.annotation;resolution:=optional,
org.eclipse.smarthome.config.core,
org.eclipse.smarthome.config.core.status,
org.eclipse.smarthome.config.discovery,
org.eclipse.smarthome.core.library.types,
org.eclipse.smarthome.core.thing,
org.eclipse.smarthome.core.thing.binding,
org.eclipse.smarthome.core.thing.binding.builder,
org.eclipse.smarthome.core.thing.type,
org.eclipse.smarthome.core.types,
org.openhab.binding.rachio,
org.openhab.binding.rachio.handler,
org.osgi.framework,
org.osgi.service.cm,
org.osgi.service.component.annotations;resolution:=optional,
org.osgi.service.http,
org.slf4j
Export-Package:
org.openhab.binding.rachio,
org.openhab.binding.rachio.handler
Service-Component: OSGI-INF/*.xml
The is no package org and org.openhab. I found a thread discussing some problems related to XML checking by the code analysis tool, but nothing related to MANIFEST.MF