Testers for Verisure openHAB 2 binding

The README was erronously showing all timestamps as being of String type but they are defined as DateTime type in the things definition file.

If you change your timestamp items types to DateTime and use the following formatting:

DateTime SmartLockLastUpdated "SmartLock Last Updated [%1$tY-%1$tm-%1$td %1$tR]"

you will hopefully get consistent formatting.

This page is a good source for different DateTime formatting options.

1 Like

Hi Jan,

While we are on the topic of the README
:grin:
The broadbandConnection describes the connected channel to get the connection status (as does the thing-types.xml), but the example later on defines a status channel.

And I would like to suggest one tiny addition to the README: you could mention the exact Karaf command to set the DEBUG log level and add a reference to the Karaf documentation.

Hi Jan,

On the topic of the README
:grin:
The broadbandConnection describes the connected channel to get the connection status (as does the thing-types.xml), but the example later on defines a status channel.

And I would like to suggest one small addition to the README: you could mention the exact Karaf command to set the DEBUG log level.

Thanks for the comments, I’ll do another revision of the README! :slight_smile:

I’ve seen similar error since I upgraded to 2.5. Works fine approximately 24h. Anyone seeing the same? Solution?

New jar-file based on 2.5.x branch.

  • A lot of code review changes have been implemented
  • Implemented support for Mice Detection since I managed to get hands of a Verisure Mice Detection device :slight_smile:
  • README has been updated a lot

NOTE: Changes made to Broadband Connection status requires you to delete/re-discover thing again.

[22:00:15] openhabian@openhab:/usr/share/openhab2/addons$ md5sum org.openhab.binding.verisure-2.5.2-SNAPSHOT.jar 
7cc0cc18430aef54dd2df7094bc58d23  org.openhab.binding.verisure-2.5.2-SNAPSHOT.jar

Would really appreciate If you could try this version, hopefully it is not so far away of getting this binding official! :slight_smile:

1 Like

New jar-file with better handling of failed logins and also use background threads for bridge/things initialization, previous post updated!
Updated again with some code enhancements.

1 Like

Small error I noticed in the readme
temperature Number:Temperature This channel reports the current humidity->temperature in percentage.

Thanks for the finding, README has been updated! :slight_smile:

New jar-file based on upcoming 2.5.4 release.

  • A lot of code review changes have been implemented that has forced changes to a lot of code
  • README

NOTE: Changes made to SmartPlug and channel hazardous that is now a Switch (On/Off) instead of a String.

[22:30:58] openhabian@openhab:/usr/share/openhab2/addons$ md5sum org.openhab.binding.verisure-2.5.4-SNAPSHOT.jar 
a25d2697820771b743265219b87d316d  org.openhab.binding.verisure-2.5.4-SNAPSHOT.jar

Take care out there! :pray:

2 Likes

Updated once more, previous post updated.

Hi @jannegpriv, I tried your binding and it works like charme :+1:

Wouldn’t it make sense to change the channels Location, Installation Site Name and Installation Site Id into thing properties rather than channels (for all things except the Account). Those values are static, relate to the Account and do create redundant information for all attached Things.

Is there no alarm status for the smoke detectors? temp and humidity are good, but the alarm status is essential. How to obtain the alarm source when the system reports an alarm?

Is there a way to query the history? (“Verlauf” in mypages)

I could contribute German translations if you are interested.

Works like a charm, absolutely love it :slight_smile:

1 Like

@jannegpriv I found a Python library, which also reads the event log:

Does that help to integrate that feature?

Is there a way to find out, which sensor raised the alarm?

Wouldn’t it make sense to change the channels Location, Installation Site Name and Installation Site Id into thing properties rather than channels (for all things except the Account). Those values are static, relate to the Account and do create redundant information for all attached Things.

We’ve had that discussion here, ao I will not comment it here too.

Is there no alarm status for the smoke detectors? temp and humidity are good, but the alarm status is essential. How to obtain the alarm source when the system reports an alarm?
Is there a way to find out, which sensor raised the alarm?

Actually I don’t know, there is no obvious query that I’ve found for getting alarm status for a device. I think that it is implemented as a push notice to the Verisure App and not a part of the Web API.

Is there a way to query the history? (“Verlauf” in mypages)

Yes, there is an API query for the event log. I’m not really sure how to model it? It would be a new Thing called EventLog with channels like:

  • lastEventType
  • lastEventCategory
  • lastEventTime

Then you would always get the latest event. But how do you model a list of events? You could have channels for last, secondLast, thirdLast but that it kind of ugly?

I would go for

  • channels for lastTime, lastMessage, lastDevice
  • eventLog - a JSON array,
    wich holds the last x events and could be formatted by a UI sniplet

eventLog - a JSON array,

Do you have any reference to a binding implementing such an array?

you just need to declare a Java class with an ArrayList, put in the elements and then finally use gson.toJson() to build the JSON strong. Let me know if you need help, I could provide you some code.

I found out 2 important things with regards to alarms

  • usually you don’t get a Push/SMS from them when an alarm was detected and could be resolved by calling the alarm contact(s). On demand this could be requested, call the hotline and set it up for you (AFAIK this is not possible in the App nor the Web UI)
  • The alarm is shown in the event log of the App, same as activate/deactivate. However, using the vsure command line utility retrieving the event log I don’t see those events just open/close of the contacts. Therefor there must be a 2nd API call to retrieve the full list, which would then allow to extract those events and map them to a channel.

you just need to declare a Java class with an ArrayList, put in the elements and then finally use gson.toJson() to build the JSON strong. Let me know if you need help, I could provide you some code.

I was more thinking on how to represent it in the things modelling, but I will use a String representation for that channel. Then I’ll implement the following channels:

  • lastEventType - String
  • lastEventCategory -String
  • lastEventTime - DateTime
  • eventLog - String (JSON array of last x events where x is either hardcoded or a new config parameter)

sounds good