Testers for Verisure openHAB 2 binding

Big thanks to @noppes123, @seime, @tnemrap and @Fredrik_Wendel for the initial beta testing of the adapted binding that now uses the new Verisure API! :slight_smile:

If someone else wants to test the binding:
Latest jar-file.

openhab@openhab2:/usr/share/openhab2/addons $ md5sum org.openhab.binding.verisure-2.5.0-SNAPSHOT.jar 
830f90c3f9d5183965acf0e554969355  org.openhab.binding.verisure-2.5.0-SNAPSHOT.jar

If you have tested an earlier version of the binding and configured things in the PaperUI, I strongly suggest to start all over again and remove all things-configuration including the bridge.
NOTE: The things modelling have been changed since previous versions, consult the updated README!

Happy testing! :slight_smile:

1 Like

Seems to be working ok even with my non-admin user that you previously fixed.
Will be monitoring for issues and reporting back.

Thx

/t

Gr8 to hear! :slight_smile:

The binding works great in general. Thanks for all the hard work!
But when the VeriSure webservice has some issue and comes with an unexpected response - in this case the alarm stayed in a ‘preparing to disarm’ state because there was some ‘API issue’ - then the response (see below) is not handled by the parsing logic:

2019-06-12 06:54:41.951 [INFO ] [ng.verisure.internal.VerisureSession] - Status code 503 body <!DOCTYPE html >
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>My Pages is temporarily unavailable</title>
  <style type="text/css">
    html, body {
      color: #666;
  ...
</head>
<body>
  <div class="main logo">
    <div class="verisure-266x56"></div>
  </div>
  <div class="main box">
    <!-- Any relative links or includes on the error page itself will be resolved to absolute URLs by the
client according to the URL in its address bar.
     So images, CSS files, external JavaScript files, etc. will be referenced using incorrect URLs if the
links on your error page are page-relative -->

    <div class="header">
My Pages is temporarily unavailable, please try again later.
    </div>
    <div class="flag-wrapper">
      <div class="se"></div>
      <div>Mina Sidor Àr för tillfÀllet inte tillgÀngligt, försök igen senare.</div>
    </div>
   ...

The alarm status remained PENDING. I tried a few times to set the alarm state to DISARMED, same status. The funny thing is that the alarm was actually already disabled the first time (or maybe the second attempt). The VeriSure App gave a disarm pending state as well (don’t recall the exact message). After a while (I checked about 20 minutes later) everything was ok and the status was reported correct (DISARMED).

Perhaps you can check for a “My Pages is temporarily unavailable” text? :grin:

Thanks for the report! :slight_smile:

I saw the same logs in my production environment this morning between 06.21 and 07.13, so it seems like the Verisure service experienced some problems during that time.

Since we get a 503 HTTP response the fix will be to catch that when determining if we’re still are logged in, and then wait for the next poll interval to see if the Verisure service is up again.

I’ve also found a couple of other log printouts that I will try to fix in the next build.

The binding currently logs a lot, especially using DEBUG, I should probably move some logs to use TRACE level instead.

1 Like

Anyone else got this error from today at around 14:07:

errorGroup":"SERVICE_UNAVAILABLE","errorCode":"SYS_00004","errorMessage":"XBN Database is not activated

I wonder if they’ve changed something in the API?

Yup. Same from 14:13.

OK, then I got work to do during midsummer :slight_smile:

1 Like

Same here.
Good way to spend your holiday
 .:wink: (if the familiy agrees :grin:)

(if the familiy agrees :grin:)

Fortunately my kids are grown up, so me and my better half have got plenty of time to spend on our hobbies. :slight_smile:

But since I made a temp. fix for the issue, it looks like verisure has decided to change to another API server from today around 14.00 (so it was an easy fix this time), I will perhaps have some time for herring and snaps on Friday :slight_smile:

The binding should probably implement automatic handling of this since we now know the failure code for when this happens. Hopefully the change will be done for some time to come, but you never know.

New jar-file

openhab@openhab2:/usr/share/openhab2/addons $ md5sum org.openhab.binding.verisure-2.5.0-SNAPSHOT.jar 
6d2ad9237f100674f8daeb4fbb812a06  org.openhab.binding.verisure-2.5.0-SNAPSHOT.jar
1 Like

Thanks! And have a nice midsommar!

Same to you! :beers:

New jar-file up for test.

openhab@openhab2:/usr/share/openhab2/addons $ md5sum org.openhab.binding.verisure-2.5.0-SNAPSHOT.jar 
a5b12e83b0120f9dbd31a765dd658d3f  org.openhab.binding.verisure-2.5.0-SNAPSHOT.jar

This version handles 2 different API servers, m-api01 and m-api02.

2 Likes

Hi Jan,
Just installed the new binding and will be esting the coming days.
Thanks!

I had the updated binding running for 2 days without issues. Status is reported properly, alarm on.off works. I noticed just two small hickups in openhab.log, most likely due to failure on VeriSure webservice:

11:00:35.003 [WARN ] [ng.verisure.internal.VerisureSession] - Failed to set session cookie and auth login, HTTP result code: 500
11:10:35.717 [WARN ] [ng.verisure.internal.VerisureSession] - Failed to set session cookie and auth login, HTTP result code: 500

I would say it is stable and earns its place in the openhab-addons ‘hall of fame’. :grin:

BTW, I didn’t run with debug log level.

Hi, anybody knows if this works for the spanish site?

Works in different countries, so give it a try. :grinning:

Thanks! :slight_smile:

Got a few of these lately.
Perhaps need to throttle down?

2019-07-01 23:20:58.873 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:01.798 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:01.809 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:01.863 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:02.102 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:02.120 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:02.363 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:02.429 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:03.104 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:03.108 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:03.157 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-05 22:29:25.637 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-05 22:29:26.546 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-05 22:29:26.938 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429

I might have something here.
I have a goodnight process that among other things closes all locks. Maybe I have to introduce a sleep statement or something to slow down API access?

/t

2019-07-06 22:50:53.366 [INFO ] [ipse.smarthome.model.script.Wallmote] - Close all locks
2019-07-06 22:50:54.533 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-06 22:50:55.142 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-06 22:50:55.235 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-06 22:50:55.518 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429