Gardena Binding - Error "Expected a string but was BEGIN_OBJECT "

gardena
Tags: #<Tag:0x00007f182af40058>

(Thomas Kleemann) #1

After adding more components to my Gardena Smart System, suddenly the binding is throwing this error:

'gardena:account:home' changed from OFFLINE (COMMUNICATION_ERROR): java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 26065 path $.devices[3].abilities[2].properties[0].value to OFFLINE (COMMUNICATION_ERROR): java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 26064 path $.devices[3].abilities[2].properties[0].value

Also on a fresh installed OH 2.3 system the same error occured.

My smart devices are:

  • smart Pump
  • smart Irrigation Control with six valves
  • smart Sensor

Any experience with this behavior?


(Jam) #2

I face the same problem! Can anybody help?

Thx


(Christian) #3

Hello,

i’ve just installed the latest OpenHab Version and the Gardena Binding.
After i’ve configured the Home Account, it shows mit initializing, but after refresh, i get an Offline Status with an Error Message called: Status: OFFLINE - COMMUNICATION_ERROR java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 41843 path $.devices[4].abilities[2].properties[0].value

I can see another error in the Log called: [WARN ] [.core.thing.binding.BaseThingHandler] - Handler GardenaAccountHandler tried updating the thing status although the handler was already disposed.

What i am doing wrong?
Please help me.

Thank’s a lot in advance

Christian


(Gerhard Riegler) #4

i’ve just installed the latest OpenHab Version and the Gardena Binding.

The stable or the snapshot? This is already fixed in the 2.4.0 snapshot and i’ve also added support for the smart Irrigation Control with six valves.


(Christian) #5

Hello Gerhard,

i’ve downloaded the OpenHabian 1.4.1 Image for Raspberry Pi3 B+ on that page

The link for the file is https://bintray.com/openhab/bin/download_file?file_path=openhabianpi-raspbian-201804031720-gitdba76f6-crc9e93c3eb.img.xz

Thanks for helping me.

Greetings
Christian


(Gerhard Riegler) #6

Hi Christian!

The update is not included in this release, i made the changes on 17.06. This file is from 03.04. I don’t use openHabian, so i don’t know the details, but you can try to add the newest gardena binding to the openhab addons folder and make sure it get’s loaded.

Regards,
Gerhard


(Christian) #8

Hello Gerhard,

now i could switch through the openHABian System to openHAB 2.4.0~20180708221346-1 (Build #1309)
and installed the gardena binding version 2.4.0 snapshot. My Account is now online.

Thank you very much,

Greetings
Christian


(Christian) #9

Hello Gerhard,

now i also implemented the things and items through the openHAB2 Homekit Plugin, and set the tags via REST APi. Everthing worsk fine.
Are you using the gardena binding with Apple Homekit Home.App?
If yes, is there also possible to setup for example a time to start the WaterControl. At the moment i can start and stop the WaterControl, but in the Gardena App you can setup minutes to open the valve for example 30 minutes or so.
Is this also possible?
And another qestion: If i turn the WaterControl on via HomeKit App and turn it off via Gardena App, the Homekit App still shows me that it’s on. Is it possible to refreh the status automatically?

Thank you very much

Best regards
Christian


(Gerhard Riegler) #10

Hi Christian!

I don’t use the Homekit plugin, because it never worked reliably for me. I’m using Homebridge with the openHAB2 plugin, i have no problems with that.

Minutes to open the valve:

Switch  Watering_Valve      "Valve"             { channel="gardena:watering_computer:home:myValve:outlet#valve_open" }
Number  Watering_Duration   "Duration [%d min]" { channel="gardena:watering_computer:home:myValve:outlet#button_manual_override_time" }
Watering_Duration.sendCommand(30) // eg. 30 minutes
Watering_Valve.sendCommand(ON)

Due your refresh problem: The Gardena Item always refreshes in the configured interval (Bridge). If the Homekit app does not show the correct status, it’s Homekit plugin issue.

Regards,
Gerhard


(Christian) #11

Hello Gerard,

thank you for your response.
I understand, so your configuration above is set in the homebridge.conf and not in openHAB2 Json DB?
Is it possible to send me the whole config, because i don’t really know what to do whith this little snipset :slight_smile:

Another question: Do you also have a config for control the valves from the irrigation control?

Thank you very much

Best regards
Christian


(Gerhard Riegler) #12

Hi!

so your configuration above is set in the homebridge.conf and not in openHAB2 Json DB?

Which config? The one from my previous post? This is only openHab (Items and a Rule snippet)
Regarding openHab i never use PaperUI, i have everything in things and items file.

because i don’t really know what to do whith this little snipset

Then please read the openHab docs, these are basic things.

Do you also have a config for control the valves from the irrigation control?

See Gardena Docs

Regards,
Gerhard


(Tanzbaer2) #13

Hi @gerrieg,

Thank you for pointing to the current version of the binding. However, unfortunately, I do not find it on the linked website - there seem to be only full openHAB packages. Is it possible to install the latest version of the binding with the current stable version of openHAB? If so: What do I need to do? I do not want to switch to the snapshot openHAB releases, but want to stay with the stable ones.

Thank you!


(Gerhard Riegler) #14

Hi @tanzbaer2

Just download openhab-addons-2.4.0-SNAPSHOT.kar, rename .kar to .zip and extract the files. There you will find the gardena binding jar file that you need to copy to the addons folder.

Make sure the correct version is loaded via the karaf console:

bundle:list | grep Gardena

Is it possible to install the latest version of the binding with the current stable version of openHAB?

I think so, you have to try it.


(Tanzbaer2) #15

Hi @gerrieg,

Just download openhab-addons-2.4.0-SNAPSHOT.kar, rename .kar to .zip and extract the files. There you will find the gardena binding jar file that you need to copy to the addons folder.

Thank you, that worked!