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?
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)
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.
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.
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!
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
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.