Jablotron Alarm Binding for OpenHAB

I find it useful as MVP i am happy to test your new versions.
I am testing your latest version now i see a bit speed up but it is still not fast enough.
Just let me now if you have a new version.

Hi Ondrej, can you please give me example of command controling PGM1 on Jablotron 100?
I am using :
Switch ArmControlPGX “PGX” (Alarm) { channel=“jablotron:ja100:20893add:452166:statusPGM_1” }

but it doesnt work.

Thanks. Jarda

Hi,
this should be working:

sendCommand( ArmControlPGX, ON )

If not, please make sure you are running the latest binding version and if so, please PM me the debug log when sending a control command so I can find out, what’s wrong.

Thanks.
Ondrej

Still I confused. How can I set PG1 or PG2?

If you create a bridge with the correct login & password, it should autodiscover your alarms.
Moreover it autedetects all relevant channels for JA-100. It depends how many sections, PGM switches and thermostats you have.

for instance the sections channel convention is:

jablotron:ja100:20893add:452166:STATE_1
jablotron:ja100:20893add:452166:STATE_2
...

and the PGM switches naming convention is:

jablotron:ja100:20893add:452166:PGM_1
jablotron:ja100:20893add:452166:PGM_2
...

and the thermostats naming convention is:

jablotron:ja100:20893add:452166:HEAT_1
jablotron:ja100:20893add:452166:HEAT_2
...

Back to your original question:
Now I see

Switch ArmControlPGX “PGX” (Alarm) { channel=“jablotron:ja100:20893add:452166:statusPGM_1” }

is definitely wrong it should look like

Switch ArmControlPGM1 “PGM1” (Alarm) { channel=“jablotron:ja100:20893add:452166:PGM_1” }
Switch ArmControlPGM2 “PGM2” (Alarm) { channel=“jablotron:ja100:20893add:452166:PGM_2” }

There’s no need to define it manually by guessing, just copy the right channel definition from the PaperUI to clipboard and use it in your .items file…

Thanks.
Ondrej

Autodiscovering works only for these channels:
Alarm Last Check Time Channel
Alarm Last Event Text Description Channel
Alarm Last Event Section Channel
Alarm Last Event Class Channel
Alarm Last Event Time Channel

I cannot see any Sections and PGs.

Here is my log with error:
20:59:29.925 [INFO ] [blotron.handler.JablotronJa100Handler] - getStatus response: {“status”:200,“termostaty”:[],“elektromery”:[],“sekce”:[{“stav”:0,“nazev”:“Sekce 1”,“stateName”:“STATE_1”,“time”:“today - 19:56”,“active”:1}],“pgm”:{“31”:{“stav”:1,“nazev”:“PG 32 celk.zaji\u0161t\u011bno”,“stateName”:“PGM_32”,“ts”:1549823538,“time”:“10.02.2019 - 19:32”,“active”:1},“30”:{“stav”:0,“nazev”:“PG 31 \u010d\u00e1s.zaji\u0161t\u011bno”,“stateName”:“PGM_31”,“ts”:1549787123,“time”:“10.02.2019 - 09:25”,“active”:1},“29”:{“stav”:0,“nazev”:“PG 30 odji\u0161t\u011bno”,“stateName”:“PGM_30”,“ts”:1549823538,“time”:“10.02.2019 - 19:32”,“active”:1},“28”:{“stav”:0,“nazev”:“PG 29 doma”,“stateName”:“PGM_29”,“ts”:1549823538,“time”:“10.02.2019 - 19:32”,“active”:1},“27”:{“stav”:0,“nazev”:“PG 28 puls skl\u00edpek”,“stateName”:“PGM_28”,“ts”:1549823538,“time”:“10.02.2019 - 19:32”,“active”:1},“26”:{“stav”:0,“nazev”:“PG 27 puls skl\u00edpek”,“stateName”:“PGM_27”,“ts”:1549823538,“time”:“10.02.2019 - 19:32”,“active”:1},“25”:{“stav”:0,“nazev”:“PG 25 a 27”,“stateName”:“PGM_26”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“24”:{“stav”:0,“nazev”:“PG kalen 25”,“stateName”:“PGM_25”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“23”:{“stav”:0,“nazev”:“PG Ventilace 24”,“stateName”:“PGM_24”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“22”:{“stav”:0,“nazev”:“PG v\u00fdstup 23”,“stateName”:“PGM_23”,“ts”:1549823538,“time”:“10.02.2019 - 19:32”,“active”:1},“21”:{“stav”:1,“nazev”:“PG v\u00fdstup 22”,“stateName”:“PGM_22”,“ts”:1549703138,“time”:“9.02.2019 - 10:05”,“active”:1},“20”:{“stav”:0,“nazev”:“PG v\u00fdstup 21”,“stateName”:“PGM_21”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“19”:{“stav”:0,“nazev”:“PG v\u00fdstup 20”,“stateName”:“PGM_20”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“18”:{“stav”:0,“nazev”:“PG v\u00fdstup 19”,“stateName”:“PGM_19”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“17”:{“stav”:0,“nazev”:“PG v\u00fdstup 18”,“stateName”:“PGM_18”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“16”:{“stav”:0,“nazev”:“PG v\u00fdstup 17”,“stateName”:“PGM_17”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“15”:{“stav”:0,“nazev”:“PG v\u00fdstup 16”,“stateName”:“PGM_16”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“14”:{“stav”:0,“nazev”:“PG v\u00fdstup 15”,“stateName”:“PGM_15”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“13”:{“stav”:0,“nazev”:“PG v\u00fdstup 14”,“stateName”:“PGM_14”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“12”:{“stav”:0,“nazev”:“PG v\u00fdstup 13”,“stateName”:“PGM_13”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“11”:{“stav”:0,“nazev”:“PG v\u00fdstup 12”,“stateName”:“PGM_12”,“ts”:1548791983,“time”:“29.01.2019 - 20:59”,“active”:1},“10”:{“stav”:0,“nazev”:“PG v\u00fdstup 11”,“stateName”:“PGM_11”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“9”:{“stav”:0,“nazev”:“test”,“stateName”:“PGM_10”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“8”:{“stav”:0,“nazev”:“PG v\u00fdstup 9”,“stateName”:“PGM_9”,“ts”:1549279489,“time”:“4.02.2019 - 12:24”,“active”:1},“7”:{“stav”:0,“nazev”:“PG v\u00fdstup 8”,“stateName”:“PGM_8”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“6”:{“stav”:0,“nazev”:“PG v\u00fdstup 7”,“stateName”:“PGM_7”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“5”:{“stav”:0,“nazev”:“PG v\u00fdstup 6”,“stateName”:“PGM_6”,“ts”:1546796265,“time”:“6.01.2019 - 18:37”,“active”:1},“4”:{“stav”:0,“nazev”:“PG v\u00fdstup 5”,“stateName”:“PGM_5”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“3”:{“stav”:0,“nazev”:“Blokace \u017deb\u0159\u00edk koupelna”,“stateName”:“PGM_4”,“ts”:1546795729,“time”:“6.01.2019 - 18:28”,“active”:1},“2”:{“stav”:0,“nazev”:"\u017deb\u0159\u00edk koupelna",“stateName”:“PGM_3”,“ts”:1550156401,“time”:“today - 16:00”,“active”:1},“1”:{“stav”:1,“nazev”:“Sv\u011btlo skl\u00edpek”,“stateName”:“PGM_2”,“ts”:1550160001,“time”:“today - 17:00”,“active”:1},“0”:{“stav”:0,“nazev”:“Sv\u011btlo gar\u00e1\u017e”,“stateName”:“PGM_1”,“ts”:1550173452,“time”:“today - 20:44”,“active”:1}},“moduly”:{“60823011”:{“1”:{“id”:60823026,“stateName”:“PGM_1”,“control”:0,“value”:null,“fce”:“PGOnOff”,“ts”:1550174363,“controlsComponent”:null,“stav”:0},“2”:{“id”:60823023,“stateName”:“PGM_2”,“control”:0,“value”:null,“fce”:“PGOnOff”,“ts”:1550174363,“controlsComponent”:null,“stav”:1},“3”:{“id”:60823020,“stateName”:“PGM_3”,“control”:0,“value”:null,“fce”:“PGOnOff”,“ts”:1550174363,“controlsComponent”:null,“stav”:0},“4”:{“id”:60823017,“stateName”:“STATE_1”,“control”:0,“value”:null,“fce”:“PartialArm_Arm”,“ts”:1550174363,“controlsComponent”:null,“stav”:0},“5”:{“id”:60823014,“stateName”:“STATE_1”,“control”:0,“value”:null,“fce”:“Arm”,“ts”:1550174363,“controlsComponent”:null,“stav”:0}}},“alarm”:[],“sdc”:[],“common”:[],“trouble”:[],“service”:[],“teplomery”:[],“pir”:{“9”:{“stateName”:“PPIR_60823056”,“nazev”:“PIR Chodba”,“active”:1,“last_pic”:-1,“type”:“JA-120PC (90)”}},“tz”:“Europe/Prague”,“prava”:0,“permissions”:{“STATE_1”:1,“PGM_1”:1,“PGM_2”:1,“PGM_3”:1,“PGM_4”:1,“PGM_5”:1,“PGM_6”:1,“PGM_7”:1,“PGM_8”:1,“PGM_9”:1,“PGM_10”:1,“PGM_11”:1,“PGM_12”:1,“PGM_13”:1,“PGM_14”:1,“PGM_15”:1,“PGM_16”:1,“PGM_17”:1,“PGM_18”:1,“PGM_19”:1,“PGM_20”:1,“PGM_21”:1,“PGM_22”:1,“PGM_23”:1,“PGM_24”:1,“PGM_25”:1,“PGM_26”:1,“PGM_27”:1,“PGM_28”:1,“PGM_29”:1,“PGM_30”:1,“PGM_31”:1,“PGM_32”:1},“timeStamp”:1550174363,“vypis”:[]}
20:59:31.157 [INFO ] [blotron.handler.JablotronJa100Handler] - Last event: Switched OFF is of class: OFF has section: SvÄlo garĂĄĹž
20:59:31.165 [ERROR] [blotron.handler.JablotronJa100Handler] - Error during alarm status update
java.lang.IllegalStateException: Not a JSON Object: [{“stav”:0,“nazev”:“Sekce 1”,“stateName”:“STATE_1”,“time”:“today - 19:56”,“active”:1}]
at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:90) ~[?:?]
at org.openhab.binding.jablotron.internal.model.ja100.Ja100StatusResponse.getSectionsCommon(Ja100StatusResponse.java:168) ~[?:?]
at org.openhab.binding.jablotron.internal.model.ja100.Ja100StatusResponse.getSections(Ja100StatusResponse.java:158) ~[?:?]
at org.openhab.binding.jablotron.handler.JablotronJa100Handler.processSections(JablotronJa100Handler.java:226) ~[?:?]
at org.openhab.binding.jablotron.handler.JablotronJa100Handler.updateAlarmStatus(JablotronJa100Handler.java:183) ~[?:?]
at org.openhab.binding.jablotron.handler.JablotronAlarmHandler.lambda$3(JablotronAlarmHandler.java:237) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:?]
at java.util.concurrent.FutureTask.runAndReset(Unknown Source) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
at java.lang.Thread.run(Unknown Source) [?:?]

Thanks for the log.
It seems that the Jablotron server is sending different format in case you have only one section.
Please redownload the binding jar, I hope it is fixed…
https://www.dropbox.com/s/k2wofy4zdj8fysg/org.openhab.binding.jablotron-2.5.0-SNAPSHOT.jar?dl=1
Thanks.
Ondrej

Great! It works. Thank you very much Ondrej.

One last question regarding Arming and disarming. Which code have I send to STATE_1?
0 = disarm
2 = partialy armed

You mentioned e.g. 1234. This is PIN? I dont understand.

Great to hear it!
Regarding your questing - I am using the same user code like if I’m entering on the alarm keypad.
I am having two codes for partial arming (garage only and first floor), one code for full arming and one for disarming.
Ondrej

Hmm, it seems there are difference between JA-80 and JA-100.
I have gor on my keypad extra keys for controlling PGMs or SECTIONs.

It might be, but if you use the control from web (http://jablonet.net), how does the control widget look like? can you send me a snapshot of it?
The ja80 control widget is attached…
Thanks
Ondrej

After clicking on DisArmed it needs auth code.
Only for first time. Next Armed/Disarmed operation is without promt for auth code.

Ok,

thanks for the info - and what sort of code are you engering? Is it some master/universal or a code relating to the required activity - e.g. arming/disarming?

why i am asking - if you use the universal code, the kind of action must be sent with the code as well, otherwise the alarm cannot recognize the requred action…

Thanks

O.

You are right. I am entering only auth code. JA-100 has only auth code.
I am choosing button for PG / Section and than entering auth code on the web. JA-100 dosnt support code for operation.

My question is how can I set status of section and the same time send auth code?
Thanks.

Good job, termostat log:
getStatus response: {“status”:200,“termostaty”:{“017”:{“value”:“9.1”,“minTemp”:“4.0”,“maxTemp”:“40.0”,“setTemp”:“4.0”,“state”:0,“comfortTemp”:“22.0”,“economicTemp”:“19.0”,“mode”:“standby”,“nextTemperatureChange”:1550559600,“blocked”:0,“prevMode”:“manual”,“actMode”:0,“PermissionReadState”:1,“PermissionReadHistory”:1,“PermissionReadPhotos”:1,“PermissionSetName”:1,“PermissionControl”:1,“PermissionConfigure”:1,“PermissionSetNotification”:1,“PermissionPositionState”:1,“PermissionPositionHistory”:1,“PermissionShowLivestream”:1,“PermissionShowStreamHistory”:1,“PermissionShowVideoclip”:1,“PermissionCreateVideoclip”:1}},“elektromery”:[],“sekce”:{“4”:{“stav”:1,"n
SET - UNSET

Hi,

if you can sniff the communication between https://jablonet.net in Chrome debug (F12 key, network tab), it would be great.
I need to see the parameters sent via PUT command to ovladani2.php endpoint (ja80 oasis has ovladani.php endpoint)

Afterwards we can move further.
Thanks.
Ondrej

Hi Ondrej.

did you mean this?

Form Data:
section=STATE_1&status=1&code=1234

Thanks.

yes,

how does this form DATA differ for arming, disarming and partial arming?
the section parameter is clear - it means the section name, but I do not understand the status parameter (it really sets the state of a section to 0,1,2?) and need to confirm, whether the code is always the same - the master code or not. If the master code is always the same, the solution might be to have this code as an optional configuration parameter of JA100 alarm thing and let the user only to send 0,1,2 to a section…
Thanks.
Ondrej

yes, me only 0 or 1

0 is disarm
1 is arm

and you do not use partial arming?
Thanks
Ondrej