State O-Matic Binding - Monitor your Washingmachine / Dishwasher / Electric Car Etc

The log level is handled by openhab. All bindings follow the same pattern. There is nothing to implement as I see it. I can change log level in the latest openhab snapshot using karaf console.

Maybe I misunderstood the feature request?

Best regards s

Sorry, my mistake the request concerned my earlier entry on the Cost parameter.

Regards Holger

Ok why not. Iā€™ll try to give this binding some love some time soon.

Best regards s

@Seaside, iā€™m testing your binding,but iā€™ve got a question for you: is it normal that energy(measured and estimated) and also total energy are always null? Power is okay but all energy items keep reporting null as value.

Thanks for all your job!

Hello again, i had to uninstall the binding because i had so many 5000ms errors that forced the system to reboot many times during the day.
Are you aware about this issue?
Iā€™m running OH4.0.0 snapshotā€¦

Thanks

Not completely sure what error you are facing. Energy seems to work for me. Supply some logs and how to reproduce and I will have a look. Best is to report a github issue if you can.

Best regards s

i will send you the log here, also later i will try to report errors also on github with detailed explanation:

2023-01-05 13:32:18.382 [WARN ] [ab.core.internal.events.EventHandler] - Dispatching event to subscriber 'org.openhab.binding.omatic.internal.event.OMaticEventSubscriber@ab750f' takes more than 5000ms.
2023-01-05 13:32:18.389 [WARN ] [ab.core.internal.events.EventHandler] - Dispatching event to subscriber 'org.openhab.binding.omatic.internal.event.OMaticEventSubscriber@ab750f' takes more than 5000ms.
2023-01-05 13:32:19.640 [ERROR] [ore.common.registry.AbstractRegistry] - Cannot inform the listener "org.openhab.core.thing.internal.ChannelLinkNotifier@481860" about the "ADDED" event: 'void org.openhab.core.library.types.DecimalType.<init>(double)'
java.lang.NoSuchMethodError: 'void org.openhab.core.library.types.DecimalType.<init>(double)'
	at org.openhab.binding.omatic.internal.api.model.OMaticMachineUtil.getStateFromDecimalType(OMaticMachineUtil.java:86) ~[?:?]
	at org.openhab.binding.omatic.internal.handler.OMaticMachineThingHandler.refreshChannel(OMaticMachineThingHandler.java:277) ~[?:?]
	at org.openhab.binding.omatic.internal.handler.OMaticMachineThingHandler.handleCommand(OMaticMachineThingHandler.java:241) ~[?:?]
	at org.openhab.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:180) ~[?:?]
	at org.openhab.core.thing.internal.ChannelLinkNotifier.lambda$3(ChannelLinkNotifier.java:72) ~[?:?]
	at org.openhab.core.thing.internal.ChannelLinkNotifier.call(ChannelLinkNotifier.java:96) ~[?:?]
	at org.openhab.core.thing.internal.ChannelLinkNotifier.added(ChannelLinkNotifier.java:72) ~[?:?]
	at org.openhab.core.thing.internal.ChannelLinkNotifier.added(ChannelLinkNotifier.java:1) ~[?:?]
	at org.openhab.core.common.registry.AbstractRegistry.notifyListeners(AbstractRegistry.java:367) ~[?:?]
	at org.openhab.core.common.registry.AbstractRegistry.notifyListenersAboutAddedElement(AbstractRegistry.java:400) ~[?:?]
	at org.openhab.core.thing.link.ItemChannelLinkRegistry.notifyListenersAboutAddedElement(ItemChannelLinkRegistry.java:181) ~[?:?]
	at org.openhab.core.thing.link.ItemChannelLinkRegistry.notifyListenersAboutAddedElement(ItemChannelLinkRegistry.java:1) ~[?:?]
	at org.openhab.core.common.registry.AbstractRegistry.added(AbstractRegistry.java:175) ~[?:?]
	at org.openhab.core.common.registry.AbstractRegistry.added(AbstractRegistry.java:1) ~[?:?]
	at org.openhab.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:60) ~[?:?]
	at org.openhab.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:79) ~[?:?]
	at org.openhab.core.common.registry.AbstractProvider.notifyListenersAboutAddedElement(AbstractProvider.java:83) ~[?:?]
	at org.openhab.core.common.registry.AbstractManagedProvider.add(AbstractManagedProvider.java:67) ~[?:?]
	at org.openhab.core.common.registry.AbstractRegistry.add(AbstractRegistry.java:346) ~[?:?]
	at org.openhab.core.io.rest.core.internal.link.ItemChannelLinkResource.link(ItemChannelLinkResource.java:259) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179) ~[bundleFile:3.4.5]
	at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) ~[bundleFile:3.4.5]
	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201) ~[bundleFile:3.4.5]
	at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:104) ~[bundleFile:3.4.5]
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59) ~[bundleFile:3.4.5]
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96) ~[bundleFile:3.4.5]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPut(AbstractHTTPServlet.java:234) ~[bundleFile:3.4.5]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) ~[bundleFile:3.1.0]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273) ~[bundleFile:3.4.5]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550) ~[bundleFile:9.4.46.v20220331]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:74) ~[bundleFile:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[bundleFile:9.4.46.v20220331]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:294) ~[bundleFile:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[bundleFile:9.4.46.v20220331]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:90) ~[bundleFile:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [bundleFile:9.4.46.v20220331]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [bundleFile:9.4.46.v20220331]
	at java.lang.Thread.run(Thread.java:833) [?:?]

with binding installed, no errors, when added a new thing, and configured parameters, and created just a new link to a new item for Energy (Measured), it started to display errors and the item still has status NULL.
as reported, after sometime, these errors force openhab to restart itself.

let me know if i can help more,

thanks

EDIT: the error starts when i create the thingā€¦

Seems like some of the constructors for DecimalType has been removed in openHAB 4.
This binding has no official support for openHAB 4. I have fixed the construction now so If you test the latest BETA2 version it might work. I have not tested myself since Iā€™m still on openHAB 3.4.

BR S

finally i had time to test the new BETA and itā€™s perfect! thanks a lot for your fast update!
but again i have the energy thing not displayed on its item and i donā€™t understand why.
some screens below if can help:

this is the item the measure the energy:

and this is from state-o-matic thing:

iā€™ve seen the value is 0.0 maybe it canā€™t report values so low like 0.0xxx?

thanks again!

hello again, today i have faced the same issue that slows down openhab:

2023-01-15 16:08:50.133 [WARN ] [ab.core.internal.events.EventHandler] - Dispatching event to subscriber 'org.openhab.binding.omatic.internal.event.OMaticEventSubscriber@10070b6' takes more than 5000ms.

as suggested, iā€™m using the beta2 jarā€¦

State-O-Matic doesnt work with my washingmachine. It seems that some programs falls lower than 4.5 watt so Iā€™m getting 3-4 finished messages. I tried to expand the idle time threshold to no avail. Can I somehow adjust the bottom power to 2.9 watt?

Hi!

Yes you can change bottom power to something lower. What you then risk is that it might think you have it running when it is in fact idle. I would suggest you increase the timeout (idle time). What time are you using right now? I have a brand new LG washingmachine that is idling a lot at very low values, but it is working good with a longer timeout. Best way of getting good values is to plot the power in grafana or similar to actutally see the graph of the consumption for one cycle.

Regards, S

hi! have you got time to check the issue of my previous post? i had to disable your binding to avoid system crashā€¦but i would like to use it because is really useful!

@rubenfuser I had the same issues sometimes on my old RPi 3 - where I had so much automation, items, bindings and other stuff running and simply not enough ressources available to process all the stuff.
Since I switched to a newer (and more powerful) hardware, I didnā€™t see this problems anymore.

So, maybe this is not related to this binding but an overall topic of your system?

BR,
MW

@mwildbolz thanks, this is a nice questionā€¦i will try to install the binding on a test environment (rpi3) with less settings, and i will check if this issue come again also on a basic configuration.
thanks for the hint, i will have a look and keep posted.

bye!

Hi firstly thanks for this binding, I have solar panels so I am trying to organise my dishwashers and washing machine to run during the sunny time of the day or at night when we have cheaper electricity.

When I studied the power consumption to get the base readings I saw that my dishwasher has a long drying cycle at the end where it is pulling 4w, then when it does turn off there is a small peak which somehow triggers another start in the binding. In the graphs this only looks like 6w but I have set the binding at 40w. What granularity is the binding using for power and how can I easily see what the real peaks are?

Thanks

Granularity for that is 1W. I would suggest you take a look at the events.log.

cat /opt/openhab/userdata/logs/events.log  |grep "MyItem"

There you can see all values.

BR S

No not yet, just switched out my laptop and Iā€™m setting up my development environment again.
Iā€™m not sure if openHAB 4 changes will brake compatibility with openHAB 3.x either, so there is some investigation to do. I donā€™t want to support multiple openHAB versions unless it is absolutely needed.

BR S

Thanks - yes I was just looking at the standard OH3 analyse graphs which must not be getting every event so missed small peaks.

I have a strange used case so not sure if anyone else has a solution. As follows:

I am attaching simple zigbee buttons to each of my washing machines/dishwashers etc
When you turn on the washing machine and want it to run either from solar or nighttime tariif you then press the zigbee button. This will stop the machine and then restart it when either there is solar power or at 11pm what ever comes first. If you donā€™t press the zigbee button it will just run immediately.

Your binding gets a bit confused because a cycle starts then stops. So I would ideally want to ignore any cycle that appears to only last a minute or less. Any ideas how to do this. I could set the active threshold quite high because most machines donā€™t draw a lot of enery at first but this is not ideal.

Do you have a rule or similar that checks the result? I do this on some things I have, but then I check the running time. If the running time is not long enough, simply ignore sending notifications or whatever it is you are doing.

if (runningTime > 300) //5 mins {
     sendEnergyReport();
     sendNotificationItIsDone();
} 

The running time is mapped in channel so you associated it with an item and check that on completion.

BR S

1 Like