[SOLVED] Installing the binding meross-java by atzbert (Issue)

I own two of Meross’s smart plugs MSS425e, however since these generally cannot be flashed with tasmota I was looking for a different solution to add them to openhab without using IFTTT. I found atzbert’s binding https://github.com/atzbert/meross-java which is based on the project https://github.com/albertogeniola/MerossIot .
I am running openhab2.5M3
I followed the instructions (here):

git clone https://github.com/atzbert/meross-java.git
apt-get install maven
cd meross-java
mvn clean install


cp target/meross-java-0.1.0-SNAPSHOT.jar /usr/share/openhab2/addons
sudo chown openhab:openhab meross-java-0.1.0-SNAPSHOT.jar
sudo systemctl start openhab2.service

At this point the binding was still not present in the PaperUI (Configuration -> Bindings).
I checked the status in karaf console

openhab-cli console
bundle:list | grep meros

to my surprise this resulted in:

293 │ Active  │  80 │ 0.1.0.SNAPSHOT        │ meross-java

If I am not mistaken, the requirements also seem to be quite standard (bundle:requirements meross-java):

osgi.wiring.package; (osgi.wiring.package=com.fasterxml.jackson.annotation) resolved by:
   osgi.wiring.package; com.fasterxml.jackson.annotation 2.9.9 from com.fasterxml.jackson.core.jackson-annotations_2.9.9 [206]
osgi.wiring.package; (osgi.wiring.package=com.fasterxml.jackson.core) resolved by:
   osgi.wiring.package; com.fasterxml.jackson.core 2.9.9 from com.fasterxml.jackson.core.jackson-core_2.9.9 [207]
osgi.wiring.package; (osgi.wiring.package=com.fasterxml.jackson.core.type) resolved by:
   osgi.wiring.package; com.fasterxml.jackson.core.type 2.9.9 from com.fasterxml.jackson.core.jackson-core_2.9.9 [207]
osgi.wiring.package; (osgi.wiring.package=com.fasterxml.jackson.databind) resolved by:
   osgi.wiring.package; com.fasterxml.jackson.databind 2.9.9 from com.fasterxml.jackson.core.jackson-databind_2.9.9 [208]
osgi.wiring.package; (osgi.wiring.package=com.google.common.collect) resolved by:
   osgi.wiring.package; com.google.common.collect 21.0.0 from com.google.guava_21.0.0 [23]
osgi.wiring.package; (osgi.wiring.package=org.slf4j) resolved by:
   osgi.wiring.package; org.slf4j 1.7.25 from org.ops4j.pax.logging.pax-logging-api_1.10.2 [6]
osgi.ee; (&(osgi.ee=JavaSE)(version=1.8)) resolved by:
   osgi.ee; JavaSE [1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 1.8.0] from org.eclipse.osgi_3.12.100.v20180210-1608 [0]

Has anybody an idea, what I am missing?
Thanks a lot in advance

1 Like

That’s because it is not a binding it’s only a java library
What I would do instead is write a python script leveraging the python libraries from https://github.com/albertogeniola/MerossIot and interface with openhab via the rest api or MQTT in the script then run the script as a service


Thanks for the quick response. Well okay, that explains it.
Hmmm, so basically there is no difference in comfort whether I use the java library or the python library? Then I will go with your suggestion. Can you point me to an example how it should look like? Up to now, I only executed python scripts in openhab, but a solution involving mqtt would be a lot nicer.


1 Like

When you have something working please post it in the forum in the Solutions&Tutorial topic

Sure thing, I got a first version working and published my method here: Meross: python library with mqtt
Thanks again for pointing me in the right direction.