Verisure returns exception error

Hi guys!

My System;

  • openHAB 4.2.2
  • Ubuntu 20.04 LTS
  • Verisure binding 4.2.2

Today I noticed an error message from Verisure binding.

ll, support=null, typename=null], typename=Device], type=null, state=CLOSE, wired=false, reportTime=2021-03-18T13:20:39.000Z, typename=DoorWindow]], communicationState=[], mice=[], doorlocks=[], smartplugs=[], userTrackings=[], typename=Installation]]])
19:43:58.775 [DEBUG] [ing.verisure.internal.VerisureSession] - HTTP GET: https://mypages.verisure.com/batterywizard/choose/device?_
19:43:58.825 [WARN ] [ing.verisure.internal.VerisureSession] - Failed to query for door&window status: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
19:43:58.830 [DEBUG] [ing.verisure.internal.VerisureSession] - HTTP GET: https://mypages.verisure.com/batterywizard/choose/device?_
19:43:58.858 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'ZWave_Node_008_TZWP102_Telldus_socket_and_energy_meter_Electric_meter_watts' changed from 25.278 to 472.258
19:43:58.869 [WARN ] [ing.verisure.internal.VerisureSession] - Failed to query for door&window status: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
19:43:58.871 [DEBUG] [ing.verisure.internal.VerisureSession] - HTTP GET: https://mypages.verisure.com/batterywizard/choose/device?_
19:43:58.903 [WARN ] [ing.verisure.internal.VerisureSession] - Failed to query for door&window status: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
19:43:58.904 [DEBUG] [ing.verisure.internal.VerisureSession] - HTTP GET: https://mypages.verisure.com/batterywizard/choose/device?_
19:43:58.938 [WARN ] [ing.verisure.internal.VerisureSession] - Failed to query for door&window status: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
19:43:58.939 [DEBUG] [ing.verisure.internal.VerisureSession] - HTTP GET: https://mypages.verisure.com/batterywizard/choose/device?_
19:43:58.975 [WARN ] [ing.verisure.internal.VerisureSession] - Failed to query for door&window status: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
19:43:58.977 [DEBUG] [ing.verisure.internal.VerisureSession] - HTTP GET: https://mypages.verisure.com/batterywizard/choose/device?_
19:43:59.010 [WARN ] [ing.verisure.internal.VerisureSession] - Failed to query for door&window status: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
19:43:59.014 [DEBUG] [ing.verisure.internal.VerisureSession] - HTTP GET: https://mypages.verisure.com/batterywizard/choose/device?_
19:43:59.050 [WARN ] [ing.verisure.internal.VerisureSession] - Failed to query for door&window status: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
19:43:59.053 [DEBUG] [ing.verisure.internal.VerisureSession] - Querying API for user presence status
19:43:59.056 [DEBUG] [ing.verisure.internal.VerisureSession] - postVerisureAPI URL: https://m-api01.verisure.com/graphql Data:[{"operationName":"userTrackings","variables":{"hideNotifications":false,"offset":0,"pagesize":0,"giid":"60758098062"},"query":"query userTrackings($giid: String!) {\ninstallation(giid: $giid) {\n userTrackings {\n isCallingUser\n webAccount\n status\n xbnContactId\n currentLocationName\n deviceId\n name\n currentLocationTimestamp\n deviceName\n currentLocationId\n __typename\n}\n __typename\n}\n}\n"}]
19:43:59.060 [DEBUG] [ing.verisure.internal.VerisureSession] - Setting cookie with vid smt5oc4rg4tq9glej5tlbs6pb4
19:43:59.063 [DEBUG] [ing.verisure.internal.VerisureSession] 

I noticed this error message after upgrading to OH 4.2.2 from 4.2.1 but I cannot say that it is depending on the upgrade. It may have existed for a while.

Searching in the community forum I could not find any simular but I found an answer in another forum that says:

The error message you got "expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2" usually indicates that the JSON response from the server is an object ({}) instead of an array ([]). To fix this, you need to update your code to handle the response correctly.

My verisure system contains 7 door/windows sensor and that number corresponds to the number of error messages,
I have deleted all items for detection of low battery but that did not help to get rid of the error messages.

I have also noticed that the binding stops frequently, Still active when using bundle:list in karaf console but the items says ā€˜ERROR:BRIDGE’.

If I go into the bridge thing and just saves the thing all things go online for a while and then goes into ERROR:BRIDGE again.
So I am wondering if any of you have seen this or anything simular?
My reflection is that the binding needs to be updated based on the answer I found but that is just a guess from me.

So if any of you have som tips for correcting this problem I am thankful.

Regards,
Olle.

I’ll just add a ā€œme tooā€ here. Running openhab 4.1.1 on Windows I get the error message:

[ng.verisure.internal.VerisureSession] - Failed to query for door&window status: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $

…which is not exactly like yours, but similar.

I was able to get the verisure binding up and ā€œrunningā€, but it never updated any values after starting. It updated the values once upon startup, and then nothing.

Is the binding currently broken? Or is there some trick to make it work?

I just realized I experience exactly the same issue with my 3.2-installation. I would guess there has been some changes in the Verisure-end that causes this to break - not the binding code since my installation has been working perfectly for a long time.

I think it was @jannegpriv who built the Verisure-integration but not sure if he is active and/or if he has some thoughts on what’s causing this?

I got more basic problems since I could no longer login, the API had been changed so I fixed that in this ticket.

I’m running a fix for that in my openHAB 4.2.0.M3 production environment and it will be a part of the 4.3.0 release and it has been back-ported to 4.2.3.

1 Like

Hmm, strange since authentication (and pull of initial value) still seems to work in the the 3.X
Anyway, I guess I just have to bite the bullet and finally do the upgrade to OH4…

Thanks!

AfterI upgraded my test system and production system all errors/warnings are gone,
I also upgraded my test system to 4.3.1 without any problems.

Thank you.
Olle

Nice to hear @Olle ! :slight_smile: