Testers for Verisure openHAB 2 binding

OK, then I got work to do during midsummer :slight_smile:

1 Like

Same here.
Good way to spend your holiday… .:wink: (if the familiy agrees :grin:)

(if the familiy agrees :grin:)

Fortunately my kids are grown up, so me and my better half have got plenty of time to spend on our hobbies. :slight_smile:

But since I made a temp. fix for the issue, it looks like verisure has decided to change to another API server from today around 14.00 (so it was an easy fix this time), I will perhaps have some time for herring and snaps on Friday :slight_smile:

The binding should probably implement automatic handling of this since we now know the failure code for when this happens. Hopefully the change will be done for some time to come, but you never know.

New jar-file

openhab@openhab2:/usr/share/openhab2/addons $ md5sum org.openhab.binding.verisure-2.5.0-SNAPSHOT.jar 
6d2ad9237f100674f8daeb4fbb812a06  org.openhab.binding.verisure-2.5.0-SNAPSHOT.jar
1 Like

Thanks! And have a nice midsommar!

Same to you! :beers:

New jar-file up for test.

openhab@openhab2:/usr/share/openhab2/addons $ md5sum org.openhab.binding.verisure-2.5.0-SNAPSHOT.jar 
a5b12e83b0120f9dbd31a765dd658d3f  org.openhab.binding.verisure-2.5.0-SNAPSHOT.jar

This version handles 2 different API servers, m-api01 and m-api02.

2 Likes

Hi Jan,
Just installed the new binding and will be esting the coming days.
Thanks!

I had the updated binding running for 2 days without issues. Status is reported properly, alarm on.off works. I noticed just two small hickups in openhab.log, most likely due to failure on VeriSure webservice:

11:00:35.003 [WARN ] [ng.verisure.internal.VerisureSession] - Failed to set session cookie and auth login, HTTP result code: 500
11:10:35.717 [WARN ] [ng.verisure.internal.VerisureSession] - Failed to set session cookie and auth login, HTTP result code: 500

I would say it is stable and earns its place in the openhab-addons ‘hall of fame’. :grin:

BTW, I didn’t run with debug log level.

Hi, anybody knows if this works for the spanish site?

Works in different countries, so give it a try. :grinning:

Thanks! :slight_smile:

Got a few of these lately.
Perhaps need to throttle down?

2019-07-01 23:20:58.873 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:01.798 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:01.809 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:01.863 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:02.102 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:02.120 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:02.363 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:02.429 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:03.104 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:03.108 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-03 22:37:03.157 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-05 22:29:25.637 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-05 22:29:26.546 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-05 22:29:26.938 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429

I might have something here.
I have a goodnight process that among other things closes all locks. Maybe I have to introduce a sleep statement or something to slow down API access?

/t

2019-07-06 22:50:53.366 [INFO ] [ipse.smarthome.model.script.Wallmote] - Close all locks
2019-07-06 22:50:54.533 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-06 22:50:55.142 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-06 22:50:55.235 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-06 22:50:55.518 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429

OK, that might be the triggering cause, maybe the binding should throttle how fast commands are scheduled. I’ve not seen the 429 logs in my production, but I will try to reproduce it from some rule.

It would be interesting to know if the 429’s are gone if you introduce a sleep.

200ms didn’t make a difference but a Thread::sleep(500) seems to have removed the issue for now.

/t

OK,cool! :slight_smile:
Maybe that is a better solution than to try to implement throttling in the binding. I’ll update the README with information about this behaviour.

No, it came back last night again :confused:
I’ll increase to 1000 ms and will see if that will help.

/t

Hi,

Now I have been stutting the documentaion a bit and I found something I’m not sure about

In items-file:

  • I see UserLocationStatus but I don’t see it in the “Verisure User Presence channel” table
  • channel="verisure:broadbandConnection:1:bc123456789:status". the :1: is that an alternative to the bridge name?
  • AlarmStatus and AlarmAlarmStatus. What are the diffrence? Also I don’t see AlarmAlarmStatus in the “Verisure Alarm channel” table

I think that’s what I’m not that sure about. But really nice work champ :slight_smile:

Keep up the good work

No still the same issue. 1 sec delay is still not the solution.
However the warnings are not 1 sec apart, so I really don’t know what’s going on.

2019-07-14 22:16:42.606 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-14 22:16:42.613 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-14 22:16:42.920 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-14 22:16:45.969 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429
2019-07-14 22:16:51.842 [WARN ] [nternal.handler.VerisureThingHandler] - Failed to send command, HTTP result code 429

Hi, just found out that some item tables won’t be created if you are using mysql and your database is created with utf8 character set. I altered my database to latin1 character set and then every thing was much better :slight_smile:

I don’t know if this is of any help?

alter database openhab character set=latin1;

The error I got was:

java.sql.SQLException: Column length too big for column 'value' (max = 21845); use BLOB or TEXT instead Query: CREATE TABLE IF NOT EXISTS verisure_user_email_00333 (time TIMESTAMP(3) NOT NULL, value VARCHAR(65500), PRIMARY KEY(time)) Parameters: []