hajekmi / myjablotron

MyJablotron Jablotron alarm JA100 - alternative API for PHP
MIT License
9 stars 7 forks source link

How to control several control panels #1

Open ghost opened 6 years ago

ghost commented 6 years ago

The library works really well, but it controls the last panel of the account. I have 3 panels in this account but I have no idea how to choose which panel I use. Any idea ? Thanks for sharing your work.

hajekmi commented 6 years ago

What is panel? Keyboard?

ghost commented 6 years ago

it's alarm system JA-100, I have 3 of them one is in office, one at home, the other at my parents. When I use the API, it controls the 1st one (I thought it was the last one, but as one of them is currently with a problem, it came first). Do you have any idea on how to choose which alarm linked to my account i can operate ?

hajekmi commented 6 years ago

I'm sorry but I don't know. For every unit separe login and username, maybe.

ghost commented 6 years ago

I'll try to find and let you know :)

ghost commented 6 years ago

Ok, if you change preg_match to preg_match_all in the login() function, you can get all panel service numbers : [0] => www.jablonet.net/app/ja100?service=557XXX [1] => www.jablonet.net/app/ja100?service=861XXX [2] => www.jablonet.net/app/ja100?service=485XXX From then it should be easy to specify which Alarm Panel we want to control...

frogale commented 6 years ago

Realy great work! It is working like a charm! Same as tozman I have several "panels" in my configuration.. But it should be easy to edit your code.. Thanks..