Testers for Verisure openHAB 2 binding

Will it be possible to lock the door (doorman) with this binding?

/mike

At the moment I donā€™t think this binding will be possible to use. Iā€™ve set up a script that pulls data from the Verisure API to get the temperatures and alarm status of my home.
After a couple of weeks I got this e-mail:

We have discovered that someone with your user credentials generates a high
amount of data traffic.
We really appreciate that you enjoy our system, and that you integrated it
with yours, but the current setup do not support the feature to
retrieve/send information from ā€œMy Pagesā€, and to build your own
applications.
On 2016-07-19 there were 2 812 requests per 24 hours. Our acceptance level
> for calls towards ā€œMy Pagesā€ is 1 call per 30 minutes. At this level we
will not limit the access, for now. Please adjust your application
accordingly. We reserve the right to ā€œthrottleā€/lock out users that
generates to much load that interfere with our systems.

So this acceptance level of 1 call per 30 minutes makes any effort of making a binding useless, at the moment.

Hi

I am currently looking for a domotica system. I am a total newbie so if I seem to ask stupid questions, this might be due to my very limited knowledge so far :slight_smile:

A first question I have if it is possible to integrate Open HAB with Loxone hardware as I am thinking to use Loxone as the backbone of my Domotica. Unfortunately, I was unable to find any relevant information on that topic on the internet.

A second question fully relates to this topic. I have an extensive Verisure installation at home with several motion detectors, magnet contacts and fire alerters. However, I ask myself if there is a walkthrough for newbies on how to integrate this system to Open Hab. I tried to understand this topic but it is somehow like understanding Chinese unfurtunately at the moment :frowning:

If I understand it correctly, it should be possible to integrate the Verisure system to Open Hab but in a way that it pulls data no more then one time in each 30 minutes. You told that this might be not frequently enough but receiving data 1 time each 30 minutes to me does not seem to be a problem, right?

Hi,

I do not have any answer to your first questions, but about ā€œintegratingā€ with verisure Iā€™m currently using the following:
This is only tested on OpenHAB 1 so far, but Iā€™m in the process of migrating to OpenHAB2, I think itā€™ll work there as weel

  • NodeJS Verisure alaram-api to pull information from my verisure system, you have to set this up on your server so that the nodejs-command works from inside your Openhab-folder for example (nodejs ./configurations/scripts/alarm.js)

  • Iā€™ve created some items that pulls the information from Verisure once an hour or so, this is basically for the temperature sensors, you can look at these items on my Github

  • There are some rules to parse the JSON from the Verisure-API as well as handling me leaving the house and coming home, there are located here

To make my house go into HOME or AWAY mode faster than hourly Iā€™ve created a couple of extra adjustments:

  • If the house is in AWAY-mode but the motion sensor in my hallway i triggered, I pull the alarm-api to check if the alarm has been switched off, this is done here

  • I have a small arduino connected to a Versiure Smart Plug. The only thing this arduino does is to connect to the wireless network. The smart plug is switched OFF when the alarm is switched ON, and vice versa.
    So when the Arduino looses network connections, I pull the Verisure alarm-API to check if the alarm has been switched on.

There are still some additions I would like to do, like these:

  • Lock the door when going to night mode
  • Check if the door is locked (you can get this info by adjusting the verisure-api.js

Hope this helps you to get started!

Dear Stein

Thank you for your very helpful reply, I will take your advice into account and will contact you again in case if I have further questions, which might happen probably :wink:

Most important is that you succeeded well to add your verisure system to your domotica and that it seems to work pretty well, which I didnā€™t expect honestly as I thought that the verisure system would be very closed because it is a security device actuallyā€¦

Kind regards
Lode

I dont know if this helps, but i turned on mail notification on my Doorman and using ifttt to scan my gmail account. Then sets locked/unlocked status in OH2. I cant control the lock, but status is updated in less than a minutte.

I have built and fixed some issues with this binding, it is now hardcoded to a 10 minutes refresh rate.
This is good enough for me since I donā€™t use it for ā€œcoming homeā€ detection.

If you like to test:
https://dl.dropboxusercontent.com/u/26815772/org.openhab.binding.verisure-2.0.0-SNAPSHOT.jar
GitHub

1 Like

Just got a system installed and was exited when i found this thread, but im not sure what to input as Auth string in the config?

You should get the auth string from your browser when you login to myverisure. It is basically the username and password.
You use the developer tools in chrome and then you look at the https://mypages.verisure.com/j_spring_security_check request. In this you will find something like this in the content:
j_username=XXXX&j_password=YYYY. this is what you should use in the auth string,

2 Likes

Thanks.
Iā€™ll test this and give my feedback.

Have you built the jar-file som it can be downloaded directly?
Is there any documentation?

See the post above for jar file. Also see the github link for a simple readme.

Thanks! That did it, seems to be working well. Thanks

Thanks, just installing it.

Do you have any details on how to configure it using files instead of the paperui?

For the Bridge just add a verisure.things file to the things folder.
Content should be something like:
Bridge verisure:bridge:myverisure ā€œVerisure Bridgeā€ [authstring="", refresh=ā€œ600ā€, pin=ā€œXXXXXXā€]
The refresh and pin is optional.

Iā€™ve started using the binding, but wish you could give me some examples on how to define the things in the thing-file. Currently done the following:

verisure.things:

Bridge verisure:bridge:myverisure "Verisure Bridge" [authstring="{{alarm_authString}}", refresh="3600"]

alarm.items:

String alarm_current_status {channel="verisure:bridge:myverisure:status"}
Number alarm_current_status_number {channel="verisure:bridge:myverisure:statusnumeric"}
String alarm_current_status_no {channel="verisure:bridge:myverisure:alarmstatuslocalized"}
String alarm_changed_by {channel="verisure:bridge:myverisure:changername"}
DateTime alarm_time_changed {channel="verisure:bridge:myverisure:timestamp"}

When restarting the server I got the following errors:

2016-12-01 18:31:37.681 [ERROR] [risure.handler.VerisureBridgeHandler] - Supposed to handle a commandREFRESH
2016-12-01 18:31:37.683 [ERROR] [risure.handler.VerisureBridgeHandler] - Supposed to handle a commandREFRESH
2016-12-01 18:31:37.684 [ERROR] [risure.handler.VerisureBridgeHandler] - Supposed to handle a commandREFRESH
2016-12-01 18:31:37.685 [ERROR] [risure.handler.VerisureBridgeHandler] - Supposed to handle a commandREFRESH
2016-12-01 18:31:37.686 [ERROR] [risure.handler.VerisureBridgeHandler] - Supposed to handle a commandREFRESH

also alarm_time_changed and alarm_current_status_no both show the value of null.

1 Like

I guess {{alarm_authString}} is replaced with the actual values ?
You should see the things in the Inbox in PaperUI, then all you need to do is add them.
That we normally create the items, but you can also do it manually as you have done, however the channels would be different. I donā€™t have any of these in my items file.

Jarle

Hi I have installed it and im able to add my lock.

But my lock keeps state INITIALIZING

is there any ides how to solved this?

Iā€™m getting the following error in my logs. Also having the same issue as @Jakob_jensen mentioned. The lock only says ā€œIntializingā€

    2016-12-01 10:30:08.646 [ERROR] [ng.verisure.internal.VerisureSession] - Failed in updatestatus
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
        at com.google.gson.Gson.fromJson(Gson.java:822)[12:com.google.gson:2.3.1]
        at com.google.gson.Gson.fromJson(Gson.java:775)[12:com.google.gson:2.3.1]
        at com.google.gson.Gson.fromJson(Gson.java:724)[12:com.google.gson:2.3.1]
        at com.google.gson.Gson.fromJson(Gson.java:696)[12:com.google.gson:2.3.1]
        at org.openhab.binding.verisure.internal.VerisureSession.updateAlarmStatus(VerisureSession.java:171)[219:org.openhab.binding.verisure:2.0.0.201611290738]
        at org.openhab.binding.verisure.internal.VerisureSession.updateStatus(VerisureSession.java:60)[219:org.openhab.binding.verisure:2.0.0.201611290738]
        at org.openhab.binding.verisure.internal.VerisureSession.refresh(VerisureSession.java:355)[219:org.openhab.binding.verisure:2.0.0.201611290738]
        at org.openhab.binding.verisure.handler.VerisureBridgeHandler$1.run(VerisureBridgeHandler.java:57)[219:org.openhab.binding.verisure:2.0.0.201611290738]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_111]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_111]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8.0_111]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_111]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_111]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_111]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_111]
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
        at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:350)[12:com.google.gson:2.3.1]
        at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:70)[12:com.google.gson:2.3.1]
        at com.google.gson.Gson.fromJson(Gson.java:810)[12:com.google.gson:2.3.1]
        ... 14 more

Is the binding you downloaded from 29.11 ? if not try to download again.

Yes it is the latest binding you have shared here