openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.86k stars 3.57k forks source link

[gardena] Support for firmware 2.x is lacking in openHAB #7169

Closed CHTHSCH closed 1 year ago

CHTHSCH commented 4 years ago

Please see this thread https://community.openhab.org/t/gardena-binding-various-problems-errors/93358?u=chthsch where I documented a number of issues regarding the watering_computer in the Gardena binding.

Apologies, that I did not re-document here, what I had documented in the above mentioned thread.

CHTHSCH commented 4 years ago

This is the warning I get

2020-03-15 07:46:28.828 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:watering_computer:60da5fa7:810c2728-ce1b-4b26-9a4c-68eb24a6e164:outlet#valve_open' cannot be updated as device does not contain property 'outlet:valve_open'
2020-03-15 07:46:28.834 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:watering_computer:60da5fa7:810c2728-ce1b-4b26-9a4c-68eb24a6e164:outlet#manual_override' cannot be updated as device does not contain property 'outlet:manual_override'
2020-03-15 07:46:28.838 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:watering_computer:60da5fa7:810c2728-ce1b-4b26-9a4c-68eb24a6e164:outlet#button_manual_override_time' cannot be updated as device does not contain property 'outlet:button_manual_override_time'
2020-03-15 07:46:28.842 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:watering_computer:60da5fa7:810c2728-ce1b-4b26-9a4c-68eb24a6e164:ambient_temperature#temperature' cannot be updated as device does not contain property 'ambient_temperature:temperature'
2020-03-15 07:46:28.845 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:watering_computer:60da5fa7:810c2728-ce1b-4b26-9a4c-68eb24a6e164:ambient_temperature#frost_warning' cannot be updated as device does not contain property 'ambient_temperature:frost_warning'
CHTHSCH commented 4 years ago

And this is the error, when I try to switch:

2020-03-15 07:48:54.182 [WARN ] [internal.handler.GardenaThingHandler] - Ability 'outlet' not found in device 'Wasserhahn'
org.openhab.binding.gardena.internal.exception.GardenaException: Ability 'outlet' not found in device 'Wasserhahn'
    at org.openhab.binding.gardena.internal.model.Device.getAbility(Device.java:115) ~[bundleFile:?]
    at org.openhab.binding.gardena.internal.GardenaSmartImpl.sendCommand(GardenaSmartImpl.java:331) ~[bundleFile:?]
    at org.openhab.binding.gardena.internal.handler.GardenaThingHandler.handleCommand(GardenaThingHandler.java:228) [bundleFile:?]
    at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source) ~[?:?]
    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.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
    at com.sun.proxy.$Proxy1783.handleCommand(Unknown Source) [?:?]
    at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:74) [bundleFile:?]
    at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]
    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]
mplutka commented 4 years ago

There seem to be some more changes to the API (speaking of mower here): Many status informations are not reported anymore (e.g. collisions) and the duration_property is seconds (not minutes now).

kaikreuzer commented 4 years ago

@gerrieg Did you already start your spring season and could comment here?

gerrieg commented 4 years ago

I did firmware updates over the weekend and since then the same problems. I am trying to find out what has changed. Some properties i can receive via the official API (websocket), but some i haven't discovered yet. All in all, it will be a major change in the binding.

Therefore I recommend everyone not to do a firmware update at the moment.

CHTHSCH commented 4 years ago

Therefore I recommend everyone not to do a firmware update at the moment.

Just a note: I purchased the Gardena system new a few weeks ago. When I installed it, the firmware update started automatically.

andrexp commented 4 years ago

Just a note: I purchased the Gardena system new a few weeks ago. When I installed it, the firmware update started automatically.

Same for me.

Some properties i can receive via the official API (websocket), but some i haven't discovered yet. All in all, it will be a major change in the binding.

I did also some research with the official API via cURL commands. I think the most important props are available (signal level, battery, state) they are available for polling, too. But until now I did not figure out how to use the /command/{serviceId}-Control. I always getting error 401: Error: Unauthorized. Unfortunately this error is not documented.

gerrieg commented 4 years ago

I think it will be a mix of polling and websocket service. I'm running some tests and I think I have almost all the data now. I still have to check everything and then change the binding accordingly.

snakeru commented 4 years ago

Hi.

If there is something that requires a polling and can not be received over the websocket - then this probably is a bug. I doubt though that there is something because over the websocket you receive exactly same content as from GET /locations/{locationId}.

About 401 errors: could you provide more details? In particular, I'm concerned about your "-Control" part. Do you really have that in your URL? You shouldn't.

Besides that, pay attention to the content type you are sending, the system is sensitive to that.

All in all, this should be something like the example below. Please note that this is from memory so might be incorrect. I have also just found a bug in our README, we'll fix that ASAP (data must not be an array).

PUT /v1/command/2ea54f47-27ed-48b3-9fad-84bbe8f2277c:1 HTTP/1.1
Host: api.smart.gardena.dev 
Content-type: application/vnd.api+json

{
  "data": {
          "type": "VALVE_CONTROL", 
          "id": "some-random-id", 
          "attributes": 
          {
              "command": "START_SECONDS_TO_OVERRIDE",
              "seconds": 60
          }
    }
}
andrexp commented 4 years ago

Hey Alexey,

About 401 errors: could you provide more details? In particular, I'm concerned about your "-Control" part. Do you really have that in your URL? You shouldn't.

I just followed the examples in the swagger-tab from the documentation section. See screenshots below. Maybe I did something wrong?

screen

screen2

All other examples (GET locations, websocket etc.) are working properly for me.

snakeru commented 4 years ago

Hi @andrexp. I do not see Authorization header in your screenshot. Please compare this request to the GET /locations one and add the missing part.

andrexp commented 4 years ago

Hi again,

I do not see Authorization header in your screenshot. Please compare this request to the GET /locations one and add the missing part.

You are absolutely right. But as the example says there is no Authorization header required, i did not try it. Now I am getting code 202 - everything is fine. Maybe you could also correct this issue in the example in future.

SeeAge commented 4 years ago

Hi, I have the same issue here after updating the firmware.

I have 2 watering computer at the moment, one with old (still working) and one with new firmware (not working). If you need me to test something, let me know.

RauleNR commented 4 years ago

Same issue here. Bought the watering computer in early March 2020, everything worked well. But then immediately received an update which made the device useless for OpenHAB. I talked to a developer at Gardena who told me that they know about an OpenHAB binding, but they are not supporting it (yet), whatever that means.

At the moment I use IFTTT for controlling the valve (Webhook opens/closes it), but the delay is awful. Not talking about "Open for 50 minutes" means "Open for 50 seconds" in reality...

So I will also try to help if some testing is needed.

kojid0 commented 4 years ago

Hi there, just wanted to say that I face the same issue here. If there's anything I can test, let me know!

snakeru commented 4 years ago

Guys, could you please explicitly mention, what problems you are facing instead of "same issue here"? I tried following the original ticket mentioned in the first post, but it doesn't seem to have a clear listing either.

The issue of OpenHab not supporting new firmware could only be fixed by updating the OpenHab bindings. I could provide assistance in migrating to new API, should any questions arise.

RauleNR commented 4 years ago

My OpenHAB Log shows the following errors since the firmware of watering computer was updated. The bundled sensor can be accessed normally.

I think that's the same problem the other users have. I receive the error once a minute.

2020-04-08 11:12:22.257 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:watering_computer:b2f5a72e:52fcbea7-8886-4766-9694-ea66478e4760:outlet#valve_open' cannot be updated as device does not contain property 'outlet:valve_open'
2020-04-08 11:12:22.257 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:watering_computer:b2f5a72e:52fcbea7-8886-4766-9694-ea66478e4760:outlet#manual_override' cannot be updated as device does not contain property 'outlet:manual_override'
2020-04-08 11:12:22.257 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:watering_computer:b2f5a72e:52fcbea7-8886-4766-9694-ea66478e4760:outlet#button_manual_override_time' cannot be updated as device does not contain property 'outlet:button_manual_override_time'
2020-04-08 11:12:22.257 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:watering_computer:b2f5a72e:52fcbea7-8886-4766-9694-ea66478e4760:ambient_temperature#temperature' cannot be updated as device does not contain property 'ambient_temperature:temperature'
2020-04-08 11:12:22.258 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:watering_computer:b2f5a72e:52fcbea7-8886-4766-9694-ea66478e4760:ambient_temperature#frost_warning' cannot be updated as device does not contain property 'ambient_temperature:frost_warning'
snakeru commented 4 years ago

In this case this ticket would really benefit from renaming into: [gardena] Support for firmware 2.x is lacking in OpenHab.

@CHTHSCH would you mind renaming it?

CHTHSCH commented 4 years ago

In this case this ticket would really benefit from renaming into: [gardena] Support for firmware 2.x is lacking in OpenHab.

@CHTHSCH would you mind renaming it?

Done

kaikreuzer commented 4 years ago

Does this issue only concern the watering computer or also any other devices? My lawn mower is working perfectly with the current binding...

snakeru commented 4 years ago

Affected devices:

kaikreuzer commented 4 years ago

Ok, good to know, thanks! So I am just on the lucky side with the mower ;-)

RauleNR commented 4 years ago

The Sensor seems to have no issues. I just have to actively poll a new status for e.g. light level by sending a refresh command. But I don't know if it's bug, or a feature (battery device). :-)

snakeru commented 4 years ago

The Sensor seems to have no issues. I just have to actively poll a new status for e.g. light level by sending a refresh command. But I don't know if it's bug, or a feature (battery device). :-)

Yes, you are most certainly draining your battery with that. Though polling for soil moisture would drain it faster, so you still have some room for improvement ;-)

RauleNR commented 4 years ago

The Sensor seems to have no issues. I just have to actively poll a new status for e.g. light level by sending a refresh command. But I don't know if it's bug, or a feature (battery device). :-)

Yes, you are most certainly draining your battery with that. Though polling for soil moisture would drain it faster, so you still have some room for improvement ;-)

I know, I know :-) Actually polling period is 30min, I'm not sure about how often the sensor refreshes the values itself and I need the actual light level for switching on a bulb... But doing smart home stuff is a constant improvement process, isn't it :-)

BernhelmB commented 4 years ago

The issues with firmware 2.x also occur using the smart irrigation control, but in a slightly different way. I know you are working on the general topic and I am glad you do so. But in the case it can help for your work: All sensors are working quite fine The irrigation control is initializing well, but the control command does not do anything and also don't send any warn/failure. Here my logs-file:

2020-04-12 10:42:35.649 [ome.event.ItemCommandEvent] - Item 'Garten_IC_Hecke_Bewaesserungstimer' received command 10

2020-04-12 10:42:35.695 [nt.ItemStatePredictedEvent] - Garten_IC_Hecke_Bewaesserungstimer predicted to become 10

2020-04-12 10:42:35.793 [vent.ItemStateChangedEvent] - Garten_IC_Hecke_Bewaesserungstimer changed from 0 to 10

2020-04-12 10:42:37.537 [vent.ItemStateChangedEvent] - Garten_IC_Hecke_Bewaesserungstimer changed from 10 to 0

In the gardena app it is writing "Unbekannter Fehler" - in english "unknown error" i assume, and when I click on it I can delete the issue.

At the timestamps you can see that it rechange the value from 10 to 0 automatically after 2 seconds, this is no manual command from my side. All the time the valve is doing nothing, while doing everything fine when I use the original app.

One remark: The only issue it sends is the following warnings, but they are not new since the new firmware (and did not lead to issues last year, except filling the logs-file every 2 seconds, so when you are on it it would be great to get a fix):

2020-04-12 10:46:10.180 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:ic24:home:Bewaesserung:ic24#error' cannot be updated as device does not contain property 'ic24:error'

2020-04-12 10:46:10.190 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:ic24:home:Bewaesserung:ic24#valve_error_0' cannot be updated as device does not contain property 'ic24:valve_error_0'

2020-04-12 10:46:10.193 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:ic24:home:Bewaesserung:ic24#valve_error_1' cannot be updated as device does not contain property 'ic24:valve_error_1'

2020-04-12 10:46:10.199 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:ic24:home:Bewaesserung:ic24#valve_error_2' cannot be updated as device does not contain property 'ic24:valve_error_2'

2020-04-12 10:46:10.202 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:ic24:home:Bewaesserung:ic24#valve_error_3' cannot be updated as device does not contain property 'ic24:valve_error_3'

2020-04-12 10:46:10.206 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:ic24:home:Bewaesserung:ic24#valve_error_4' cannot be updated as device does not contain property 'ic24:valve_error_4'

2020-04-12 10:46:10.208 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:ic24:home:Bewaesserung:ic24#valve_error_5' cannot be updated as device does not contain property 'ic24:valve_error_5'

2020-04-12 10:46:10.212 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:ic24:home:Bewaesserung:ic24#valve_error_6' cannot be updated as device does not contain property 'ic24:valve_error_6'

Thanks a lot for all your great work and thank you for fixing the issues.

gerrieg commented 4 years ago

I just want to let you know that i'm currently working hard on a new version of the binding. It is a complete rewrite and i now use the official API: https://developer.1689.cloud/apis

Reading and receiving the data in real time is already working, now i will implement the commands. As soon as i am ready i will release a new version.

int5749 commented 4 years ago

I can confirm issue with

There was no yet any firmware update available for Sensor

Happy to assist in testing, but do not have deep knowledge in Java :-/

lmicheel commented 4 years ago

Hello,

i have currently issues with my mover as well, just updated the latest firmware and receive warnings in the log: 2020-04-13 10:58:23.138 [WARN ] [internal.handler.GardenaThingHandler] - Channel 'gardena:mower:home:73e83fc8-0ef4-4682-a80e-xxxxxxxxxxxx:mower#override_end_time' cannot be updated as device does not contain property 'mower:override_end_time'

Same issue is described her: https://community.openhab.org/t/problem-with-smart-sileno-life-mower-error-503-service-unavailable/95103/4

This means the mover device is affected from the API change as well. I would be happy supporting by testing the updated binding.

tarabas73 commented 4 years ago

Same for me, I'm ready for testing

thx @gerrieg

int5749 commented 4 years ago

I just want to let you know that i'm currently working hard on a new version of the binding. It is a complete rewrite and i now use the official API: https://developer.1689.cloud/apis

Reading and receiving the data in real time is already working, now i will implement the commands. As soon as i am ready i will release a new version.

Just imagine if you already looking for some testers ;-)

gerrieg commented 4 years ago

OK, i have something to test for you: Download Tested with mower, water control and sensor. Feedback welcome, especially for the other devices.

Important: This is a complete rewrite of the binding, all channels for the items are new. You also need a Gardena API key, please read the readme how to obtain one.

gerrieg commented 4 years ago

I've never had this error. Please post a TRACE log when the binding starts, but remove your password from the logfile!

RobZe89 commented 4 years ago

I've never had this error. Please post a TRACE log when the binding starts, but remove your password from the logfile!

After uninstall/remove/install the JAR file again everything works. I will test now the binding / items.

First thing I see is a problem with the UTF8 locales I think. I don‘t get the german äöü in the names of discription.

int5749 commented 4 years ago

I can confirm "issue" with UTF8

In addition I have got the following warning

20:32:05.575 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'gardena:irrigation_control:home:Irrigation' changed from INITIALIZING to ONLINE
20:32:05.887 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: null
        at org.openhab.binding.gardena.internal.handler.GardenaThingHandler.convertToState(GardenaThingHandler.java:117) ~[?:?]
        at org.openhab.binding.gardena.internal.handler.GardenaThingHandler.updateChannel(GardenaThingHandler.java:104) ~[?:?]
        at org.openhab.binding.gardena.internal.handler.GardenaAccountHandler.onDeviceUpdated(GardenaAccountHandler.java:148) ~[?:?]
        at org.openhab.binding.gardena.internal.GardenaSmartImpl.lambda$2(GardenaSmartImpl.java:357) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_171]
        at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_171]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) ~[?:1.8.0_171]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[?:1.8.0_171]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_171]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_171]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]
20:32:06.793 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: null
        at org.openhab.binding.gardena.internal.handler.GardenaThingHandler.convertToState(GardenaThingHandler.java:117) ~[?:?]
        at org.openhab.binding.gardena.internal.handler.GardenaThingHandler.updateChannel(GardenaThingHandler.java:104) ~[?:?]
        at org.openhab.binding.gardena.internal.handler.GardenaAccountHandler.onDeviceUpdated(GardenaAccountHandler.java:148) ~[?:?]
        at org.openhab.binding.gardena.internal.GardenaSmartImpl.lambda$2(GardenaSmartImpl.java:357) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_171]
        at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_171]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) ~[?:1.8.0_171]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[?:1.8.0_171]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_171]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_171]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]

I have uninstalled embedded Binding removed all manual things let all tasks finish installed jar (by adding to addons) wait for everything to finish created bridge in *.things which was fine

Error occurs when I have added first thing to bridge

I did a restart and of OH and same issue arises once thing (not bridge) is being initialized

Afterwards it seems to work in general as I can get name for IC as well as name for valve. Now need to create all items to start more testing

int5749 commented 4 years ago
Starte Bewässerung mit Dauer
gardena:irrigation_control:home:Irrigation:valve_1_commands#start_seconds_to_override
Switch

From things config in PaperUI.

I'm struggling as this shall be a switch, but should be duration? So shouldn't this be a Number instead?

gerrieg commented 4 years ago

This should fix the encoding: Download

start_seconds_to_override is a Switch and it uses the commandDuration for the duration.

Do you still have the NullPointerException?

RauleNR commented 4 years ago

Everything is working fine on OH2.5 I've uninstalled the old binding. Afterwards I copied the new binding to the OH addons folder, added the new account data including API key in PaperUI (no things file needed here). Then I found both things (sensor and water control) in inbox via auto discovery. The new things have a bunch of new channels and the old channels won't work anymore, so I deleted them. Switching the valve now works again, now in combination with a timer as in the Gardena app. So big thanks to @gerrieg

I suppose valve_commands#commandDuration is set back to 20mins after a restart of OH, but that's ok.

Unfortunately not all channels have refreshed since yesterday. I'm not sure whether it depends on an issue, or if it's just energy saving:

Water Control:

Sensor:

int5749 commented 4 years ago

Hi, I have just installed latest version and still got

22:32:18.832 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: null
        at org.openhab.binding.gardena.internal.handler.GardenaThingHandler.convertToState(GardenaThingHandler.java:117) ~[?:?]
        at org.openhab.binding.gardena.internal.handler.GardenaThingHandler.updateChannel(GardenaThingHandler.java:104) ~[?:?]
        at org.openhab.binding.gardena.internal.handler.GardenaAccountHandler.onDeviceUpdated(GardenaAccountHandler.java:148) ~[?:?]
        at org.openhab.binding.gardena.internal.GardenaSmartImpl.lambda$2(GardenaSmartImpl.java:357) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_171]
        at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_171]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) ~[?:1.8.0_171]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[?:1.8.0_171]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_171]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_171]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]

Seems to be less warning, but still some. I'm currently running on 2.5.4-snapshot

UTF-8 issue is solved in PaperUI

Do you think it's worth to test on 2.5.5??

Regards int5749

int5749 commented 4 years ago

Just recognized that there is still a minor UTF-8 coding issue for sensor Lichtintensität

and I'm currently missing frostwaring on Sensor and watering computer. Are those no longer supported?

andrexp commented 4 years ago

Hi,

I also have some null-pointer exceptions to offer:

I installed the latest binding after the "encoding"-fix and added my account settings and API key. Afterwards I wanted to discover my SILENO life but PaperUI says Internal Server Error 500 and the following shows up in log file:

22:37:02.780 [ERROR] [ig.discovery.internal.PersistentInbox] - Could not post event of type 'updated'.
java.lang.NullPointerException: null
    at org.eclipse.smarthome.config.discovery.dto.DiscoveryResultDTOMapper.map(DiscoveryResultDTOMapper.java:41) ~[?:?]
    at org.eclipse.smarthome.config.discovery.inbox.events.InboxEventFactory.map(InboxEventFactory.java:129) ~[?:?]
    at org.eclipse.smarthome.config.discovery.inbox.events.InboxEventFactory.createUpdatedEvent(InboxEventFactory.java:115) ~[?:?]
    at org.eclipse.smarthome.config.discovery.internal.PersistentInbox.postEvent(PersistentInbox.java:538) ~[?:?]
    at org.eclipse.smarthome.config.discovery.internal.PersistentInbox.notifyListeners(PersistentInbox.java:524) ~[?:?]
    at org.eclipse.smarthome.config.discovery.internal.PersistentInbox.add(PersistentInbox.java:230) ~[?:?]
    at org.eclipse.smarthome.config.discovery.internal.PersistentInbox.thingDiscovered(PersistentInbox.java:376) ~[?:?]
    at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl$1.run(DiscoveryServiceRegistryImpl.java:265) ~[?:?]
    at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl$1.run(DiscoveryServiceRegistryImpl.java:1) ~[?:?]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_152]
    at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.thingDiscovered(DiscoveryServiceRegistryImpl.java:262) ~[?:?]
    at org.eclipse.smarthome.config.discovery.AbstractDiscoveryService.thingDiscovered(AbstractDiscoveryService.java:279) ~[?:?]
    at org.openhab.binding.gardena.internal.discovery.GardenaDeviceDiscoveryService.deviceDiscovered(GardenaDeviceDiscoveryService.java:160) ~[?:?]
    at org.openhab.binding.gardena.internal.discovery.GardenaDeviceDiscoveryService.lambda$0(GardenaDeviceDiscoveryService.java:111) ~[?:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_152]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_152]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_152]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?: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]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]

I think there was also an error when I was creating the openhab-thing Gardena Smart Home Account:

22:33:23.624 [ERROR] [ig.discovery.internal.PersistentInbox] - Could not post event of type 'added'.
java.lang.NullPointerException: null
    at org.eclipse.smarthome.config.discovery.dto.DiscoveryResultDTOMapper.map(DiscoveryResultDTOMapper.java:41) ~[?:?]
    at org.eclipse.smarthome.config.discovery.inbox.events.InboxEventFactory.map(InboxEventFactory.java:129) ~[?:?]
    at org.eclipse.smarthome.config.discovery.inbox.events.InboxEventFactory.createAddedEvent(InboxEventFactory.java:85) ~[?:?]
    at org.eclipse.smarthome.config.discovery.internal.PersistentInbox.postEvent(PersistentInbox.java:532) ~[?:?]
    at org.eclipse.smarthome.config.discovery.internal.PersistentInbox.notifyListeners(PersistentInbox.java:524) ~[?:?]
    at org.eclipse.smarthome.config.discovery.internal.PersistentInbox.add(PersistentInbox.java:222) ~[?:?]
    at org.eclipse.smarthome.config.discovery.internal.PersistentInbox.thingDiscovered(PersistentInbox.java:376) ~[?:?]
    at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl$1.run(DiscoveryServiceRegistryImpl.java:265) ~[?:?]
    at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl$1.run(DiscoveryServiceRegistryImpl.java:1) ~[?:?]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_152]
    at org.eclipse.smarthome.config.discovery.internal.DiscoveryServiceRegistryImpl.thingDiscovered(DiscoveryServiceRegistryImpl.java:262) ~[?:?]
    at org.eclipse.smarthome.config.discovery.AbstractDiscoveryService.thingDiscovered(AbstractDiscoveryService.java:279) ~[?:?]
    at org.openhab.binding.gardena.internal.discovery.GardenaDeviceDiscoveryService.deviceDiscovered(GardenaDeviceDiscoveryService.java:160) ~[?:?]
    at org.openhab.binding.gardena.internal.discovery.GardenaDeviceDiscoveryService.lambda$0(GardenaDeviceDiscoveryService.java:111) ~[?:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_152]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_152]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_152]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?: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]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]

I am currently on OH 2.5.3

Greetings Andre

tarabas73 commented 4 years ago

started to test and I can activate the Valve again and also the Status Feedback is working. Still struggling with the commandDuration:

I use Thing and items files

Items:

Number:Time GardenaSmartControl_1_Duration "Gardena Smart Control 1 - Vorne - Bewässerungsdauer"  {channel="gardena:water_control:MyGardena:Gardena_Smart_Controller_1:valve#duration"}

Number:Time GardenaSmartControl_1_CommandDuration "Gardena Smart Control 1 - Vorne - Bewässerungsdauer"  {channel="gardena:water_control:MyGardena:Gardena_Smart_Controller_1:valve_commands#commandDuration"}

Duration is working, but commandDuration not ?

2020-04-22 00:02:08.450 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/GardenaSmartControl_1_CommandDuration' with an invalid status value '20 %unit%'.

2020-04-22 00:02:09.351 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/GardenaSmartControl_1_CommandDuration' with an invalid status value '19 %unit%'.

2020-04-22 00:02:13.887 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/GardenaSmartControl_1_CommandDuration' with an invalid status value '18 %unit%'.

2020-04-22 00:02:14.185 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/GardenaSmartControl_1_CommandDuration' with an invalid status value '17 %unit%'.

2020-04-22 00:02:14.818 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/GardenaSmartControl_1_CommandDuration' with an invalid status value '18 %unit%'.

2020-04-22 00:02:14.928 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/GardenaSmartControl_1_CommandDuration' with an invalid status value '19 %unit%'.

gerrieg commented 4 years ago

@RauleNR yes, commandDuration is reset after a restart. This is not a Gardena property, it is only available in the binding itself. This is partly energy-saving and partly not all time stamps seem to be sent. My rfLinkState_timestamp is also empty.

@int5749 Frostwarning is not supported anymore. I'll report it to Gardena, maybe they'll implement it. I checked all Lichtintensität translations, they are all OK.

@andrexp This looks like another issue and not related to the binding. Did you uninstall and reinstall the binding? I have a sileno and it is working.

@tarabas73 Where do the POST's come from? And why is %unit% included there as value? Can you set the commandDuration on the console?

Today i try to simulate a irrigation_control and fix the NullPointerException.

int5749 commented 4 years ago

@int5749 Frostwarning is not supported anymore. I'll report it to Gardena, maybe they'll implement it. I checked all Lichtintensität translations, they are all OK.

Thanks for checking with Gardena, even this is not that important, just recognized this. UTF Error still visible in PAperUI but also not an urgent topic.

Just recognized, that Values seems not being updated for Sensor? :-/ There is a huge difference between Gardena App and Openhab thing? soilHumidity 28% (App) vs. 52% (openHAB).

Regards

RobZe89 commented 4 years ago

For the mower I am missing the property in the new binding. It shows the next start while charging or the next schedule mower#timestamp_next_start

gerrieg commented 4 years ago

Fixed NullPointerException in state conversion with irrigation control: Download

@RobZe89 I miss it too. According to Gardena, this will be delivered later.

andrexp commented 4 years ago

@gerrieg: I just moved the downloaded .jar file into my addons-folder and fixed the permissions. The "old" gardena binding was not installed. There was only a snapshot .jar file which I was playing with. Of course I removed this file first. Should I do something else?

gerrieg commented 4 years ago

@andrexp What devices do you have? Do they all have a name in the Gardena App?

andrexp commented 4 years ago

@andrexp What devices do you have? Do they all have a name in the Gardena App?

Yes they have. I have currently only a SILENO life 750 mower which is named "Robocut" :-) I also tried to clean OH cache and updated to OH 2.5.4. Still the same error. The addition of a Gardena Acount Thing seems to fail already. After adding the account information I get the null-pointer exception for 'added'-event as decribed above.

gerrieg commented 4 years ago

I have a suspicion. I have a normal Sileno and not a Sileno life. Maybe this mower sends another device type. I need a TRACE log when the binding starts. Please send the log by mail.