Gardena Binding irrigation control issue

Hello,
I tried several things but nothing helped so I hope you have some additional ideas for my issues. Last year, all my gardena smart system worked well controlled by openhab using Openhab 2.3.
Now during the winter I updated openhab (2.5.2 and now in the hope of problem solving 2.5.3-1) and the gardena system with the newest software. All my sensors are working properly and are giving the correct values to my openhab system.
What does not work is watering with my irrigation control via openhab.
But watering is possible via the origina gardena app, so it don’t seem to be a hardware or cloud service topic but in the interface between openhab and gardena.
When I activate one of the valves using the basic UI, in openhab everything seems to be correct in the first place but then a warning is coming up:

2020-03-22 20:37:45.443 [ome.event.ItemCommandEvent] - Item ‘Garten_IC_Hecke_Bewaesserungstimer’ received command 10

2020-03-22 20:37:45.468 [nt.ItemStatePredictedEvent] - Garten_IC_Hecke_Bewaesserungstimer predicted to become 10

2020-03-22 20:37:45.575 [vent.ItemStateChangedEvent] - Garten_IC_Hecke_Bewaesserungstimer changed from 0 to 10

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

2020-03-22 20:37:53.932 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:

java.lang.IllegalArgumentException: Illegal status UNINITIALIZED. Bindings only may set UNKNOWN, ONLINE, OFFLINE or REMOVED.

at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$1.ensureValidStatus(ThingManagerImpl.java:215) ~[?:?]

at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$1.statusUpdated(ThingManagerImpl.java:185) ~[?:?]

at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateStatus(BaseThingHandler.java:357) ~[?:?]

at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateStatus(BaseThingHandler.java:372) ~[?:?]

at org.openhab.binding.gardena.internal.handler.GardenaThingHandler.updateStatus(GardenaThingHandler.java:317) ~[?:?]

at org.openhab.binding.gardena.internal.handler.GardenaAccountHandler.onDeviceUpdated(GardenaAccountHandler.java:153) ~[?:?]

at org.openhab.binding.gardena.internal.GardenaSmartImpl$RefreshDevicesThread.run(GardenaSmartImpl.java:560) ~[?:?]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_222]

at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:1.8.0_222]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_222]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:1.8.0_222]

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

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

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

During the starting a quite similar error is occuring:

2020-03-22 20:19:28.594 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.initialize()’ on ‘org.openhab.binding.gardena.internal.handler.GardenaThingHandler@1bb6e01’: Illegal status INITIALIZING. Bindings only may set UNKNOWN, ONLINE, OFFLINE or REMOVED.

java.lang.IllegalArgumentException: Illegal status INITIALIZING. Bindings only may set UNKNOWN, ONLINE, OFFLINE or REMOVED.

at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$1.ensureValidStatus(ThingManagerImpl.java:215) ~[?:?]

at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$1.statusUpdated(ThingManagerImpl.java:185) ~[?:?]

at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateStatus(BaseThingHandler.java:357) ~[?:?]

at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateStatus(BaseThingHandler.java:372) ~[?:?]

at org.openhab.binding.gardena.internal.handler.GardenaThingHandler.updateStatus(GardenaThingHandler.java:317) ~[?:?]

at org.openhab.binding.gardena.internal.handler.GardenaThingHandler.initialize(GardenaThingHandler.java:73) ~[?:?]

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

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

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

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

at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]

at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

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

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

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

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

Interesting point is that in the Gardena app I instantly get an error “Im Masterkanal liegt ein Fehler vor, bitte checke den Masterkanal fĂŒr weitere Details” (Roughly translated: Error in the masterchannel , please check the masterchannel for more details). The only option I get is to reset the error and after that the app is working properly again. The error is only coming again when I try to control the valve via openhab.

Any ideas what I can do to solve this? Or could that be an issue in the actual binding with changed interfaces due to a gardena firmware update and I am quite early to test the new years version? Is there anyone already running the irrigation control with the actual firmware/openhab-version?

There were very many changes between OH 2.3 and 2.5.x. Did you review the 2.4 & 2.5 Release Notes for any breaking changes?

People would not be able to assist much without more configuration details. (Things, Items)

There is also information in the binding documentation on debug logging.

From that log I’m guessing that some additional restrictions were put in place post openHAB 2.3 on what states bindings are allowed to set for things.

If this is not a very commonly used binding it might just be that no-one realized it broke the binding until now.

From a quick peek at the code if there are no other issues it might be as simple as changing line 312 of GardenaThingHandler.java from:

newStatus = thing.getStatus();

to

newStatus = ThingStatus.UNKNOWN;

or

newStatus = ThingStatus.OFFLINE;

You might want to create an issue on github:

If the original binding author @gerrieg is still around they might be able to help you.

1 Like