Interesting, are you testing in an IDE or in a production system?
Commit used for the build: a5a989fdbdc7ea3c7a179024c7f0cc7bd6362de3
That is correct commit.
The ID for the Yale Doorman Smartlock does not contain an _ as you’ve noted, but all other IDs for Verisure things does, hence to generate similar IDs when using auto detetction I decided to add an _ to have a uniform ID for all detected things (that has an ID visible in Verisure homepage).’
Hence it is necessary to add an _ if you define the smartLock in a things-file.
Since I use auto detection for all things, I’ve not tested to actually define things in a things-file before, just the Bridge. However, Mike has done that and I’ve now tested in my IDE and it works fine, so something must be fooling us.
I’ve tested both with and without pin, and it works to see status for both configurations, example of my verisure.things
file without specifying pin:
Bridge verisure:bridge:1 "Versiure Bridge" [ username="test@gmail.com", password="mysecret", refresh="300", numberOfInstallations="2"] {
Thing smartLock 2XYZ_8XYZ "Verisure Entrance Yale Doorman" [ ID="2XYZ_8XYZ" ]
}
Running in the IDE both Bridge and thing gets online, and when I link channel in Paper UI, I see the values populated under Control.
If you test in an IDE, could you try to remove the folder:
Your path/openhab2-master/git/openhab-distro/launch/home/userdata
so that we make sure to start clean, and then only define the bridge in the verisure.things file:
Bridge verisure:bridge:1 "Versiure Bridge" [ username="test@gmail.com", password="mysecret", refresh="300", numberOfInstallations="1"]
The make sure that the Bridge comes online and then let auto discovery find all the Verisure things.
If you run in a production system, I would like to see what the following command sequence using the Karaf console gives:
openhab@openhab2:~ $ openhab-cli console
Logging in as openhab
__ _____ ____
____ ____ ___ ____ / / / / | / __ )
/ __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __ |
/ /_/ / /_/ / __/ / / / __ / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/ |_/_____/
/_/ 2.4.0
Release Build
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.
openhab> bundle:list -s |grep verisure
259 │ Active │ 80 │ 2.5.0.201901131614 │ org.openhab.binding.verisure
If this shows more that one bundle installed, then that old bundle must be stopped and uninstalled.
Use Karaf console and the ID and the following commands to stop and uninstall:
openhab> bundle:stop 257
openhab> bundle:uninstall 257
if the ID is 257 for the old binding that should be uninstalled.
Note that the version of the listed binding, it shall be 2.5.0.201901131614
.
If you want to restart the binding in the production environment to make sure you run the correct jar-file, you can also do that using Karaf console. If I would to do it with my example above with ID 259 I would use the following commands:
openhab> bundle:stop 259
openhab> bundle:uninstall 259
openhab> bundle:install -s file:/usr/share/openhab2/addons/org.openhab.binding.verisure-2.5.0-SNAPSHOT.jar
Bundle ID: 263
openhab> bundle:list -s |grep verisure
263 │ Active │ 80 │ 2.5.0.201901131614 │ org.openhab.binding.verisure
The log (with log level DEBUG) will then contain (NOTE: Since I have 2 instances, your log will be slightly deifferent):
2019-01-22 20:42:22.641 [DEBUG] [risure.handler.VerisureBridgeHandler] - Stop immediate refresh for job java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@f61f78
2019-01-22 20:42:22.644 [DEBUG] [ng.verisure.internal.VerisureSession] - Should dispose allocated stuff here in session
2019-01-22 20:42:22.659 [DEBUG] [sure.internal.VerisureHandlerFactory] - unsetHttpClientFactory this: org.openhab.binding.verisure.internal.VerisureHandlerFactory@13d24cf
2019-01-22 20:42:22.668 [DEBUG] [org.openhab.binding.verisure ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=446, service.bundleid=259,
service.scope=bundle, component.name=org.openhab.binding.verisure.internal.VerisureHandlerFactory, component.id=270} - org.openhab.binding.verisure
2019-01-22 20:42:22.719 [DEBUG] [org.openhab.binding.verisure ] - BundleEvent STOPPING - org.openhab.binding.verisure
2019-01-22 20:42:22.741 [DEBUG] [org.openhab.binding.verisure ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=447, service.bundleid=259, servi
ce.scope=singleton} - org.openhab.binding.verisure
2019-01-22 20:42:22.748 [DEBUG] [org.openhab.binding.verisure ] - BundleEvent STOPPED - org.openhab.binding.verisure
2019-01-22 20:42:33.664 [DEBUG] [org.openhab.binding.verisure ] - BundleEvent UNRESOLVED - org.openhab.binding.verisure
2019-01-22 20:42:34.699 [DEBUG] [org.openhab.binding.verisure ] - BundleEvent UNINSTALLED - org.openhab.binding.verisure
2019-01-22 20:42:50.569 [DEBUG] [org.openhab.binding.verisure ] - BundleEvent INSTALLED - org.openhab.binding.verisure
2019-01-22 20:42:50.888 [DEBUG] [org.openhab.binding.verisure ] - BundleEvent RESOLVED - org.openhab.binding.verisure
2019-01-22 20:42:50.894 [DEBUG] [org.openhab.binding.verisure ] - BundleEvent STARTING - org.openhab.binding.verisure
2019-01-22 20:42:51.062 [DEBUG] [sure.internal.VerisureHandlerFactory] - setHttpClientFactory this: org.openhab.binding.verisure.internal.VerisureHandlerFactory@10e498c
2019-01-22 20:42:51.092 [DEBUG] [org.openhab.binding.verisure ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=461, service.bundleid=263, ser
vice.scope=bundle, component.name=org.openhab.binding.verisure.internal.VerisureHandlerFactory, component.id=275} - org.openhab.binding.verisure
2019-01-22 20:42:51.094 [DEBUG] [org.openhab.binding.verisure ] - BundleEvent STARTED - org.openhab.binding.verisure
2019-01-22 20:42:51.419 [DEBUG] [sure.internal.VerisureHandlerFactory] - createHandler this: org.eclipse.smarthome.core.thing.internal.BridgeImpl@9dd770e5
2019-01-22 20:42:51.423 [DEBUG] [sure.internal.VerisureHandlerFactory] - Create VerisureBridgeHandler
2019-01-22 20:42:51.529 [DEBUG] [org.openhab.binding.verisure ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=462, service.bundleid=263, service.
scope=singleton} - org.openhab.binding.verisure
2019-01-22 20:42:51.591 [DEBUG] [risure.handler.VerisureBridgeHandler] - Initializing Verisure Binding
2019-01-22 20:42:51.599 [DEBUG] [ng.verisure.internal.VerisureSession] - VerisureSession:initialize
2019-01-22 20:42:51.601 [DEBUG] [ng.verisure.internal.VerisureSession] - Attempting to log in to mypages.verisure.com
2019-01-22 20:42:52.509 [DEBUG] [ng.verisure.internal.VerisureSession] - HTTP Response (200) Body:{"status":"ok","redirectUrl":"/","message":null}
2019-01-22 20:42:52.510 [DEBUG] [ng.verisure.internal.VerisureSession] - Login URL: https://mypages.verisure.com/j_spring_security_check?locale=en_GB
2019-01-22 20:42:52.511 [DEBUG] [ng.verisure.internal.VerisureSession] - Login result: {}{"status":"ok","redirectUrl":"/","message":null}
2019-01-22 20:42:52.512 [DEBUG] [ng.verisure.internal.VerisureSession] - VerisureSession:handleInstallations
2019-01-22 20:42:52.513 [DEBUG] [ng.verisure.internal.VerisureSession] - Attempting to configure installation instance
2019-01-22 20:42:52.514 [DEBUG] [ng.verisure.internal.VerisureSession] - Start URL: https://mypages.verisure.com/uk/start.html?inst=1
2019-01-22 20:42:53.745 [DEBUG] [ng.verisure.internal.VerisureSession] - Got CSRF: 7826379bb2d21b34cc49ccff794c72bf9b358621d1686473c73161d4d8a1002e
2019-01-22 20:42:53.910 [DEBUG] [ng.verisure.internal.VerisureSession] - Attempting to configure installation instance
2019-01-22 20:42:53.911 [DEBUG] [ng.verisure.internal.VerisureSession] - Start URL: https://mypages.verisure.com/uk/start.html?inst=2
2019-01-22 20:42:54.476 [DEBUG] [ng.verisure.internal.VerisureSession] - Got CSRF: 7826379bb2d21b34cc49ccff794c72bf9b358621d1686473c73161d4d8a1002e
2019-01-22 20:42:54.525 [DEBUG] [risure.handler.VerisureBridgeHandler] - Start automatic refresh null
2019-01-22 20:42:54.528 [DEBUG] [risure.handler.VerisureBridgeHandler] - Scheduling at fixed delay refreshjob java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@100e04c
2019-01-22 20:43:04.528 [DEBUG] [risure.handler.VerisureBridgeHandler] - VerisureBridgeHandler - Polling thread is up'n running!
2019-01-22 20:43:06.538 [DEBUG] [ng.verisure.internal.VerisureSession] - Attempting to log in to mypages.verisure.com
2019-01-22 20:43:07.129 [DEBUG] [ng.verisure.internal.VerisureSession] - HTTP Response (200) Body:{"status":"ok","redirectUrl":"/","message":null}
2019-01-22 20:43:07.131 [DEBUG] [ng.verisure.internal.VerisureSession] - Login URL: https://mypages.verisure.com/j_spring_security_check?locale=en_GB
2019-01-22 20:43:07.133 [DEBUG] [ng.verisure.internal.VerisureSession] - Login result: {}{"status":"ok","redirectUrl":"/","message":null}
2019-01-22 20:43:07.134 [DEBUG] [ng.verisure.internal.VerisureSession] - areWeLoggedIn() - Checking if we are logged in
2019-01-22 20:43:07.405 [DEBUG] [ng.verisure.internal.VerisureSession] - HTTP HEAD response:
2019-01-22 20:43:07.406 [DEBUG] [ng.verisure.internal.VerisureSession] - Status code 200. Probably logged in
2019-01-22 20:43:07.817 [DEBUG] [ng.verisure.internal.VerisureSession] - Page type: start-page no-js
2019-01-22 20:43:07.820 [DEBUG] [ng.verisure.internal.VerisureSession] - VerisureSession:updateStatus
2019-01-22 20:43:07.820 [DEBUG] [ng.verisure.internal.VerisureSession] - Attempting to configure installation instance
2019-01-22 20:43:07.822 [DEBUG] [ng.verisure.internal.VerisureSession] - Start URL: https://mypages.verisure.com/uk/start.html?inst=1
2019-01-22 20:43:08.177 [DEBUG] [ng.verisure.internal.VerisureSession] - Got CSRF: 5b79193176d71122b624f99ef1b91bb04526536a585300e2aecfae5e17d79909
2019-01-22 20:43:08.186 [DEBUG] [ng.verisure.internal.VerisureSession] - HTTP GET: https://mypages.verisure.com/remotecontrol
The last row contains the URL used for quering the Alarm and SmartLock status, if you still have problems it would be great if you could log into Verisures webpage with your credentials, and the paste:
https://mypages.verisure.com/remotecontrol
in your web browser. You should then see a JSON containing two objects:
[
{
date: "Idag 19:26",
disarmed: true,
notAllowedReason: "",
image: "locked",
operational: true,
changeAllowed: true,
label: "Låst",
type: "DOOR_LOCK",
name: "",
location: "Ytterdörr",
id: "2XYZ8XYZ",
secureMode: false,
status: "locked"
},
{
date: "Igår 08:40",
notAllowedReason: "",
name: "John Doe",
changeAllowed: true,
id: 1,
label: "Avlarmat",
type: "ARM_STATE",
status: "unarmed"
}
The Verisure binding uses the first object for SmartLock and the second for Alarm things status.
That was a long post, bear with me, but I am eager to find out what the root-cause for your problem is.
BR,
/Janne