Smappee Binding

Hello, the “Service location name” is the name of your smappee device. You will find the name in the settings where you have entered the serial number of the device.

I renamed my “service location name” via Smappee.app to “Home” and restarted OH2. Now the thing is online and started reporting values.

Some docu on services/smappee.cfg would be great.
Thanks much

Btw: I’m rounding the values on item level like this [%.0f Watt]

I’m getting some issues with the new update on polling. When I first initialize everything is fine but after a reboot it will be uninitialized till I reconfigure the Smappee thing with a new polling interval

this is the error by the way:

2017-11-21 13:37:04.041 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occurred while initializing handler of thing 'smappee:smappee:b298eb12': java.lang.NumberFormatException: For input string: "2.0"
java.util.concurrent.ExecutionException: java.lang.NumberFormatException: For input string: "2.0"
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_152]
	at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_152]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:194)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at org.eclipse.smarthome.core.thing.internal.ThingManager.doInitializeHandler(ThingManager.java:738)[105:org.eclipse.smarthome.core.thing:0.9.0.b5]
	at org.eclipse.smarthome.core.thing.internal.ThingManager.initializeHandler(ThingManager.java:664)[105:org.eclipse.smarthome.core.thing:0.9.0.b5]
	at org.eclipse.smarthome.core.thing.internal.ThingManager.access$12(ThingManager.java:639)[105:org.eclipse.smarthome.core.thing:0.9.0.b5]
	at org.eclipse.smarthome.core.thing.internal.ThingManager$2.apply(ThingManager.java:681)[105:org.eclipse.smarthome.core.thing:0.9.0.b5]
	at org.eclipse.smarthome.core.thing.internal.ThingManager$2.apply(ThingManager.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b5]
	at org.eclipse.smarthome.config.core.BundleProcessorVetoManager.bundleFinished(BundleProcessorVetoManager.java:68)[94:org.eclipse.smarthome.config.core:0.9.0.b5]
	at org.eclipse.smarthome.config.xml.osgi.AbstractAsyncBundleProcessor.informListeners(AbstractAsyncBundleProcessor.java:253)[97:org.eclipse.smarthome.config.xml:0.9.0.b5]
	at org.eclipse.smarthome.config.xml.osgi.AbstractAsyncBundleProcessor.access$3(AbstractAsyncBundleProcessor.java:251)[97:org.eclipse.smarthome.config.xml:0.9.0.b5]
	at org.eclipse.smarthome.config.xml.osgi.AbstractAsyncBundleProcessor$1.run(AbstractAsyncBundleProcessor.java:242)[97:org.eclipse.smarthome.config.xml:0.9.0.b5]
	at java.lang.Thread.run(Thread.java:748)[:1.8.0_152]
Caused by: java.lang.NumberFormatException: For input string: "2.0"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)[:1.8.0_152]
	at java.lang.Integer.parseInt(Integer.java:580)[:1.8.0_152]
	at java.lang.Integer.parseInt(Integer.java:615)[:1.8.0_152]
	at org.openhab.binding.smappee.handler.SmappeeHandler.initialize(SmappeeHandler.java:107)[188:org.openhab.binding.smappee:2.2.0.201711142111]
	at org.eclipse.smarthome.core.thing.internal.ThingManager$9.call(ThingManager.java:741)[105:org.eclipse.smarthome.core.thing:0.9.0.b5]
	at org.eclipse.smarthome.core.thing.internal.ThingManager$9.call(ThingManager.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b5]
	at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:181)[98:org.eclipse.smarthome.core:0.9.0.b5]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_152]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_152]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_152]
	... 1 more

Also, would it be possible to also include gas and water values?

Ok,
working on an update for the smappee binding.
I will let it autodetect

  • power plugs
  • detected appliances
  • sensors (gas/water)

hang on folks :slight_smile:

Any news??? Smappee is stil valid or now There are newest and better energy monitor…?? I m searching a monitor fully integrated with openhab2

working on it, coding of the new things and interaction with the smappee api is almost done. I’m testing the binding myself before I commit this changeset.

Excellent. I would be more than happy to test in case you have a jar file at hand. I’m currently running your binding connecting nicely against my smappe to poll data and do some graphing. The first few rules in case of “high power consumption” sending Telegram messages are also active and running smoothly.

poll data and do some graphing. The first few rules in case of “high power consumption” sending Telegram messages are also active and running smoothly.

Would be great if you could share your conf-files for described functions !

thx
merit

Ok, binding is updated.
Now it can auto-discover detected appliances / sensors and you can use the smappee plugs.

Binding configuration + manual config samples -> https://github.com/openhab/openhab2-addons/pull/2815

Before upgrading, remove the original smappee thing (or do a force remove afterwards) since the id of the binding has changed. Then configure a Smappee monitoring thing with the same settings (smappee username/pwd ect…) and it will start autodetecting everything. You can also use manual config files, samples are provided in the link above.

Just found jar file v2.2.0 dated 30.Oct.2017 - is this realy the last updated version?

thx
merit

Hello,

I just tried to install the 2.3.0 SNAPSHOT of the binding. After entering the information on Paper UI (Things ADD -> Smappee binding…) I recieved in the logs:

018-02-04 20:16:50.218 [hingStatusInfoChangedEvent] - ‘smappee:smappee:9f208917’ changed from UNINITIALIZED to INITIALIZING

==> /var/log/openhab2/openhab.log <==

2018-02-04 20:16:50.203 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.initialize()’ on ‘org.openhab.binding.smappee.handler.SmappeeHandler@1223359’: null

java.lang.NullPointerException: null

at org.openhab.binding.smappee.handler.SmappeeHandler.initialize(SmappeeHandler.java:76) [237:org.openhab.binding.smappee:2.3.0.201801302128]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]

at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [109:org.eclipse.smarthome.core:0.10.0.b1]

at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.b1]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

at java.lang.Thread.run(Thread.java:748) [?:?]

Any tipps?

Yours Pleff

@Detlef_Bartetzko latest commit should be ok, can you try again ?

I cannot get the plugs to work - they do not turn on or off when trying to switch them in the UI. What logs do you need in order to debug ?

@NTanghe, first thanks for your Smappee plugin, it runs almost great. Almost, as after a couple of hours, sometimes days, it just stops working. After a reboot of my Raspberry Pi it works again - for another couple of hours. See picture attached. Looks like a memory leak etc. Could you have a look?


Thanks
Thomas

I just had a log at debug level and I found this: (Servicelocation in the path have been removed by me)

23:15:20.104 [DEBUG] [org.eclipse.jetty.client.HttpReceiver] - Request/Response succeeded: Result[HttpRequest[POST /dev/v1/servicelocation/xxxx/actuator/2/on HTTP/1.1]@3c061057 > HttpResponse[HTTP/1.1 500 Server Error]@20fe6eb6] null

I have the same problem… it stops after some time

Resolved after restarting openhab service

Regards,

Bart

Ok, last build fixes the issue of the scheduled task to stop in case there are severe communication errors.
For the plugs that can’t be set, I will have to contact smappee for a solution.

1 Like

OK, let me know if I can assist somehow. I can use the Smappee API from my .NET solution just fine, plugs are working, meter values, serviceloacations etc. are working perfectly.