Testers for Verisure openHAB 2 binding

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

New jar-file based on upcoming 2.5.5 release.

  • Added support for Verisure Event Log thing
  • README
[23:07:32] openhabian@openhab:/usr/share/openhab2/addons$ md5sum org.openhab.binding.verisure-2.5.5-SNAPSHOT.jar 
b3ad7e83b01bcb6c6166b241f9e032b1  org.openhab.binding.verisure-2.5.5-SNAPSHOT.jar

Next step will be to add support for Verisure Gateway thing, since I discovered that it is possible to query for its status, maybe not so much interesting stuff and nothing to control but it is still a part of the Verisure System with an own unique device ID.

Take care out there! :pray:

are you sure the link is correct?
download produces org.openhab.binding.vwweconnect-2.5.5-SNAPSHOT.jar, not the verisure one

Updated! :slight_smile:

ok, I’ll test it later today

I’m really interested to catch the moment when an alarm is raised. Did you saw those events in the event log? This would allow to trigger other actions and have a real integration. The Verisure App is showing those events, but the vsure command line tool didn’t show them.

seems to work, good job :slight_smile:

and I found the entries I was looking for

eventCategory	"DISARM"
eventCategory	"ARM"
eventCategory	"INTRUSION"
eventCategory	"TECHNICAL"

This allows to implement a trigger channel with those events (channel eventLog needs to be updated before the channel is triggerd"

New jar-file based on upcoming 2.5.5 release.

  • Added support for Verisure Gateway thing
  • README
[17:05:18] openhabian@openhab:/usr/share/openhab2/addons$ md5sum org.openhab.binding.verisure-2.5.5-SNAPSHOT.jar 
8315305049a2d7e1836a82c0e94e663f  org.openhab.binding.verisure-2.5.5-SNAPSHOT.jar

Take care out there! :pray:

1 Like

Seems like 2.5.5 is already released, so I will aim for 2.5.6! :slight_smile:

New jar-file based on upcoming 2.5.7 release.
You need to remove older 2.5.x version from /usr/share/openhab/addons and also rediscover your things if you want to try out the new event trigger channels!

[23:58:22] openhabian@openhab:/usr/share/openhab2/addons$ md5sum org.openhab.binding.verisure-2.5.7-SNAPSHOT.jar 
17837576362d63add05252cd3bd8279c  org.openhab.binding.verisure-2.5.7-SNAPSHOT.jar

  • Updated again after code review
  • Added support for trigger channels
  • README

Really appreciated if you try it out since I have high hopes for getting it official in upcoming 2.5.7.

Stay safe! :pray:

FLASH:

Finally merged to 2.5.x, thanks for all your help making this possibe! :grinning: :pray:

@jannegpriv congrats of the approval of the binding.
It was a fast process. :slight_smile:

New binding jar based on OH2.5.9 with better handling of Eventlog queries that fails.

Hi @jannegpriv, long time…
I’ve been running a fairly old (and stable) version and decided to upgrade to 2.5.9 the other day.
Most things seems working, but I have some trouble getting my locks working properly.

I’m trying to to basic lock/unlock. Sending ON or OFF to the item gives me the following back:

2020-10-11 11:37:30.309 [DEBUG] [nternal.handler.VerisureThingHandler] - handleCommand, channel: verisure:smartLock:XXXXYYYY:XXXXZZZZ:setSmartLockStatus, command: ON
2020-10-11 11:37:30.316 [WARN ] [nternal.handler.VerisureThingHandler] - Unknown command! ON

Something obvious missing here?

BR
/t

Hi @prybil!

Are you using auto-discovery?
Since a lot have changed I would then suggest that you rediscover your things, the fault you get indicates that the command is sent to wrong thing which I cannot explain.

BR,

/Janne

Yes, that did it.

Some attributes have changed and some have been removed, to the better it seems.
Thank you very much for your good work.

BR
/t

No problem, I’m just glad that you can use it! :slight_smile: