Testers for Verisure openHAB 2 binding

I updated the binding on the same link on 29/11, did download after that time ?

I’ll download again today and test further

i downloded and installed it yesterday

im new at openhab so im not sure what kind og data you will need from mee to help with the problem that lock just stand in INITIALIZING state.

when i was on my way to finde out what homeautomation software to use i tried Home Assistent and the verisure addin work there with out any problems and whitout delay (dont now how they have done this) but maybe that a place to look for inspiration.

im not a programmer but will be happy to help if i can to get this to work. i like openhab and this is the missing part for me to end up running openhab 100 %

addon added and logged in to my.verisure and found my climate controller, but still initiliazing

Hi, seems like the latest binding still gives initializing on the components.
The Verisure bridge seems to work fine, with the correct status being fetched.

I still get some error is my log when OpenHAB tries to fetch data from Verisure, getting this:

2016-12-06 06:36:32.795 [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

Downloaded the binding yesterday.

I just looked at the state of the thing after installing and it said online and alarm status updates worked, noticed now that my climate things don’t work even if they report online status

@jarlebh Any progress on this? Is there more logging if I switch to debug-logging for the Verisure-binding?
Anything else I should test?

I got the binding to work with my Doorman lock. But I had to change quite a bit of the code. I’m NOT a java developer and I don’t have much experience with openHAB so my code probably looks like shit and I need to test it quite well :slight_smile: I added a switch to the Door thing to lock/unlock from openHAB.

In VerisureObjectHandler.java, bridgeHandlerInitialized(ThingHandler thingHandler, Bridge bridge) method gave a compiler error. I used the RFXCOM binding as a reference and moved the code from bridgeHandlerInitialized to initilize and bridgeStatusChanged.

I don’t have alarm or any other equipment from verisure, so I don’t know if they work with the original binding.

Hi were do i get the version were INITIALIZING problem is solved ?

i don’t think it is fixed yet

For Info i have solved this with using this phyton

and then createt some bash script i call from openhab rule

I also get the Initializing status:
openhab> things
verisure:bridge:myverisure (Type=Bridge, Status=INITIALIZING, Label=Verisure Bridge, Bridge=null)

and same exception stack trace as Stein Tore:
2017-02-11 23:39:40.061 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'verisure.things’
2017-02-11 23:39:41.582 [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 $

Will there be continued development on this binding, would be cool to be able to integrate my Verisure equipment,

BR,

/Janne

HI All.

To get real time updates I have added support for refresh to the binding (same link as before). Basically this is what you need todo:
This requires that you have conected your openhab to myopenhab.

Create an email account that allows forwarding without verifying receiver, I use outlook.com (gmail does not work)
Setup a new user in verisure app/pages with this email and send all events to this user.
Forward email to IFTTT using the email trigger. https://ifttt.com/email
Make a rule in IFTTT that updates an openhab item with the subject of the email
Create a rule like this.
rule "React to refresh"
when
Item Verisure_EMail changed
then
sendCommand(verisure_bridge_1_status, RefreshType.REFRESH)
end
Now the binding should referesh everytime there is an event from Verisure. :smile:

1 Like

looks good, now the climate works, what is the command to set the temperature, fan etc, i use the verisure plugin on my panasonic hatepump

Hi!

Seems like I’m getting a little bit further with the latest jar-file.

openhab@openhab2:/var/log/openhab2 $ grep -i verisure *.log |grep -i bridge
events.log:2017-02-18 18:18:16.744 [ThingAddedEvent ] - Thing ‘verisure:bridge:myverisure’ has been added.
events.log:2017-02-18 18:18:16.749 [hingStatusInfoChangedEvent] - ‘verisure:bridge:myverisure’ changed from UNINITIALIZED to INITIALIZING
events.log:2017-02-18 18:18:37.302 [hingStatusInfoChangedEvent] - ‘verisure:bridge:myverisure’ changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR)

Communication error???

The log reveals that the binding tries to log in to the UK site, which is probably fine, but does it succeed? 200 looks OK, or?

verisure.log:2017-02-18 20:38:28.614 [DEBUG] [risure.handler.VerisureBridgeHandler] - VerisureBridgeHandler - Thread is up and running!
verisure.log:2017-02-18 20:38:28.616 [DEBUG] [ng.verisure.internal.VerisureSession] - areWeLoggedIn() - Checking if we are logged in
verisure.log:2017-02-18 20:38:28.815 [DEBUG] [ng.verisure.internal.VerisureSession] - Status code 302. Redirected. Probably not logged in
verisure.log:2017-02-18 20:38:30.816 [DEBUG] [ng.verisure.internal.VerisureSession] - Attempting to log in to mypages.verisure.com
verisure.log:2017-02-18 20:38:31.031 [DEBUG] [ng.verisure.internal.VerisureSession] - httpGetURL: https://mypages.verisure.com/uk/start.html
verisure.log:2017-02-18 20:38:31.131 [DEBUG] [ng.verisure.internal.VerisureSession] - Status code:200 contentType:text/html;charset=UTF-8
verisure.log:2017-02-18 20:38:31.563 [DEBUG] [ng.verisure.internal.VerisureSession] - areWeLoggedIn() - Checking if we are logged in
verisure.log:2017-02-18 20:38:31.653 [DEBUG] [ng.verisure.internal.VerisureSession] - Status code 302. Redirected. Probably not logged in
verisure.log:2017-02-18 20:38:33.656 [DEBUG] [ng.verisure.internal.VerisureSession] - Attempting to log in to mypages.verisure.com
verisure.log:2017-02-18 20:38:34.023 [DEBUG] [ng.verisure.internal.VerisureSession] - httpGetURL: https://mypages.verisure.com/uk/start.html
verisure.log:2017-02-18 20:38:34.129 [DEBUG] [ng.verisure.internal.VerisureSession] - Status code:200 contentType:text/html;charset=UTF-8
verisure.log:2017-02-18 20:38:34.483 [DEBUG] [ng.verisure.internal.VerisureSession] - areWeLoggedIn() - Checking if we are logged in
verisure.log:2017-02-18 20:38:34.505 [DEBUG] [ng.verisure.internal.VerisureSession] - Status code 302. Redirected. Probably not logged in
verisure.log:2017-02-18 20:38:36.507 [DEBUG] [ng.verisure.internal.VerisureSession] - Attempting to log in to mypages.verisure.com
verisure.log:2017-02-18 20:38:36.640 [DEBUG] [ng.verisure.internal.VerisureSession] - httpGetURL: https://mypages.verisure.com/uk/start.html
verisure.log:2017-02-18 20:38:36.773 [DEBUG] [ng.verisure.internal.VerisureSession] - Status code:200 contentType:text/html;charset=UTF-8
verisure.log:2017-02-18 20:38:37.242 [DEBUG] [risure.handler.VerisureBridgeHandler] - Thread finished

I tried to manually add a climate sensor, but it is stuck in Initializing:

openhab@openhab2:/var/log/openhab2 $ grep -i verisure *.log |grep -i climate
events.log:2017-02-18 18:17:29.733 [ThingAddedEvent ] - Thing ‘verisure:climatesensor:b6328d8a’ has been added.
events.log:2017-02-18 18:17:56.335 [hingStatusInfoChangedEvent] - ‘verisure:climatesensor:b6328d8a’ changed from UNINITIALIZED to INITIALIZING
verisure.log:2017-02-18 18:17:55.955 [DEBUG] [risure.handler.VerisureBridgeHandler] - supportThingType(verisure:climatesensor)
verisure.log:2017-02-18 18:17:55.967 [DEBUG] [risure.handler.VerisureBridgeHandler] - trying to create handler for thing:verisure:climatesensor:b6328d8a
verisure.log:2017-02-18 18:17:55.968 [DEBUG] [risure.handler.VerisureBridgeHandler] - Created handler for typeUID: verisure:climatesensor

My verisure.things file looks like this (xxx =user name, xxx = password):
Bridge verisure:bridge:myverisure “Verisure Bridge” [authstring=“j_username:xxx&j_password:yyy”, refresh=“600”]

Any clues?

BR,

/Janne

Hi!

Solved, for some reason I used : instead of = as delimiter between j_username and j_password.

BR,

/Janne

I found an issue with the updates of sensors, please use the updated binding’https://dl.dropboxusercontent.com/u/26815772/org.openhab.binding.verisure-2.0.0-SNAPSHOT.jar

Hi!

Updates seems to work now :ok_hand:

My humidity readings are displayed as a number between 0 and 1, I use item type Number for humidity.
Is there any specific reason for using PercentType and not DecimalType as internal representation?

BR,

/Janne

No particular reason, only that humidity is normally presented as a Percent. I think this also was a legacy from the original binding author,

Hi!

This is not a question on this binding but which is the best way to convert the humidity presentation in my sitemap from 0.35% to 35.0%? Using a transformation?

BR,

/Janne