# HomeyPro with KSenia Security

**URL:** <https://community.homey.app/t/homeypro-with-ksenia-security/90711>\
**Category:** Questions & Help\
**Tags:** homey-pro\
**Created:** [October 1, 2023, 7:50pm UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711 "2023-10-01T19:50:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamas\_Kovacs](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tamas_kovacs/32/80084_2.png) [@Tamas\_Kovacs](https://community.homey.app/u/Tamas_Kovacs)\
**Post date:** [October 1, 2023, 7:50pm UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/1 "2023-10-01T19:50:14Z")

</div>

Hello! I recently acquired a Homey Pro not long ago. I really like it, but I’m a complete beginner in the field.

I’m wondering if anyone here has experience with the KSenia Security alarm system with Homey.  
I want to transfer the status of my regular (wired) sensors (PIR door and sensors and smoke detector) to Homey. The KSenia central unit supports common POST/PUT/GET/DELETE commands.  
“Unfortunately, I couldn’t find an app for it in the app store, even though KSenia is quite an innovative system, similar to Satel or Ajax.”

Has anyone managed to make them work together?

Thank you!

---

<div class="post-metadata">

**Author:** ![Mike1233](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike1233/32/20991_2.png) [@Mike1233](https://community.homey.app/u/Mike1233)\
**Post date:** [October 1, 2023, 9:44pm UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/2 "2023-10-01T21:44:14Z")

</div>

There is a Logic card that can use a couple of commands.

THEN card

 ![SmartSelect_20231001_234004_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/5/050648181201b3864164aa46bd9b57172acb83cb.jpeg)  
 ![SmartSelect_20231001_233947_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/c/2c84f6f57983a39a49b17b56c24d9371af30e97b.jpeg)

And a AND card

 ![SmartSelect_20231001_234058_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/9/396eccef1a4be546c87e8261aa697de8240ee2cc.jpeg)

Don’t know if this is useful for you.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 2, 2023, 2:44am UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/3 "2023-10-02T02:44:32Z")

</div>

@Mike1233 Mike, the way I read it, I think he wants to send http request towards Homey 😉

@Tamas_Kovacs Hello, and welcome,

(Translated from posts in German)  
Make a GET request with one of these URLs:

> [@Webhook vom Smartphone an Homey schicken](https://community.homey.app/t/webhook-vom-smartphone-an-homey-schicken/90371/4):
>
> **Cloud webhook (via the internet that is, and also for the Homey Premium/cloud/bridge/beta app.):**
> 
> `https://webhook.homey.app/<homey-cloud-id>/my_event?tag=my_tag`
> 
> **Local Webhook Pro 2023:**
> 
> `http://<homey-ip>/webhook?event=my_event&tag=my_tag`
> 
> **Local Webhook Pro 2019:**
> 
> `http://<homey-ip>/api/manager/logic/webhook/my_event?tag=my_tag`

.

Since the communication probably only takes place at home, you can use the local webhooks (why use internet when you don’t need it).  
Note, all is case-sensitive

- for the Pro23  
When we have the event ‘PIR\_frontdoor’, and it sends the values alarmTrue and alarmFalse, we can use the webhook like this.  
As example Homey’s IP address (make sure it has a DHCP reserved IP!) is 192.168.2.50:  
`http://<homey-ip>/webhook?event=my_event&tag=my_tag` can be used as:  
`http://192.168.2.50/webhook?event=PIR_frontdoor&tag=alarmTrue`  
`http://192.168.2.50/webhook?event=PIR_frontdoor&tag=alarmFalse`

- for the Pro19 (all white balls)  
`http://<homey-ip>/api/manager/logic/webhook/my_event?tag=my_tag` can be used as:  
`http://192.168.2.50/api/manager/logic/webhook/PIR_frontdoor?tag=alarmTrue`  
`http://192.168.2.50/api/manager/logic/webhook/PIR_frontdoor?tag=alarmFalse`

The corresponding flow which ‘listens’ for the frontdoor PIR webhooks, should look like this:

 ![Screenshot from 2023-10-02 04-27-32](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/4/7475b4b565a49bc6256eb953d14936b4438d0afe.png)

(the yellow action cards on the left for instance can be a virtual motion sensor device, which ‘mirrors’ the frontdoor PIR state this way)

---

<div class="post-metadata">

**Author:** ![Tamas\_Kovacs](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tamas_kovacs/32/80084_2.png) [@Tamas\_Kovacs](https://community.homey.app/u/Tamas_Kovacs)\
**Post date:** [October 2, 2023, 5:29am UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/4 "2023-10-02T05:29:05Z")

</div>

Hello!  
This community is fantastic. Thanks Mike1234 and Peter!  
I’m trying to understand what you wrote, as I said, I’m a beginner (very much) 🙂  
For now, I don’t understand how a wired sensor gets into the Homey system. I’m stuck here.  
I right to add it as a virtual device? And then? How does Homey ask the device for its status (alarm/normal state)

The sensor query of the KSenia system looks something like this  
address: [https://192.168.1.88:8443/zones/1](https://192.168.1.88:8443/zones/1)  
reply:  
“id”: “1”,  
“status”: “STATUS\_VALUE”,  
“bypass”: “BYPASS\_VALUE”  
}  
Status\_Value: rest/alarm/mask/tamper  
Bypass value: on/off

Well, I still don’t see how Homey queries the status, what triggers the query.

Thanks for your help!  
Tamas

---

<div class="post-metadata">

**Author:** ![Mike1233](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike1233/32/20991_2.png) [@Mike1233](https://community.homey.app/u/Mike1233)\
**Post date:** [October 2, 2023, 5:29am UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/5 "2023-10-02T05:29:20Z")

</div>

@Peter_Kawa That is why I did write that I don’t know if this is useful for him.  
But if it works with Webhooks is that a good solution

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 2, 2023, 12:04pm UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/6 "2023-10-02T12:04:10Z")

</div>

Owh wait, it was not meant as “you are wrong” or anyting, Mike! Not at all!  
I hoped to explain clearly I just understood the question the other way round as you did (the communication was sent from KSenia _to_ Homey instead of _from_ Homey to KSenia).  
🤗

---

<div class="post-metadata">

**Author:** ![Tamas\_Kovacs](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tamas_kovacs/32/80084_2.png) [@Tamas\_Kovacs](https://community.homey.app/u/Tamas_Kovacs)\
**Post date:** [October 2, 2023, 6:19pm UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/7 "2023-10-02T18:19:25Z")

</div>

Hi!  
I tried starting a KSenia output (they called scenario) as you mentioned from Homey.  
This message is blocking me. However, the command works when I type it into my browser.  
What can I do about this “self-signed certificate” error?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/8/d8644d3c4728356e506ce13374d3e9bde8bb54be.png)  
Ty!

---

<div class="post-metadata">

**Author:** ![Mike1233](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike1233/32/20991_2.png) [@Mike1233](https://community.homey.app/u/Mike1233)\
**Post date:** [October 2, 2023, 7:29pm UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/8 "2023-10-02T19:29:06Z")

</div>

@Peter_Kawa I know, no problem. Nothing on the hand. 👍🏼

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 2, 2023, 7:48pm UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/9 "2023-10-02T19:48:35Z")

</div>

Detail: for local http requests, try to use _http_, instead of https 😉

---

<div class="post-metadata">

**Author:** ![Tamas\_Kovacs](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tamas_kovacs/32/80084_2.png) [@Tamas\_Kovacs](https://community.homey.app/u/Tamas_Kovacs)\
**Post date:** [October 2, 2023, 8:08pm UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/10 "2023-10-02T20:08:14Z")

</div>

Not works, just https…

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 2, 2023, 10:44pm UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/11 "2023-10-02T22:44:14Z")

</div>

Makes sense, with an alarm system 😉

Your browser doesn’t accept the self-signed cert, I mean, it’s not Homey imho.  
When you paste that `https://192.168.1.88....` URL from the GET flow card in your browser, and open it, do you get an option to install the certificate, besides a rejection?

But my knowledge is little on this stuff, I found this below, which makes sense.

> **You must install the self-signed cert _in the truststore(s) used by the browser(s)_.** Firefox normally uses its own truststore, so install the cert in your Firefox profile, unless your instance of Firefox has been configured to use a system store. MSIE, Edge, and Chrome on Windows all use the Windows store, so install there. Safari and Chrome on MacOS or iOS use those systems’ stores, ditto. For other clients, search for other Qs or the rest of the web …  
> [[Source]](https://stackoverflow.com/questions/74910860/my-self-signed-certificate-is-being-rejected-by-the-client)

---

<div class="post-metadata">

**Author:** ![Tamas\_Kovacs](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tamas_kovacs/32/80084_2.png) [@Tamas\_Kovacs](https://community.homey.app/u/Tamas_Kovacs)\
**Post date:** [October 3, 2023, 4:03am UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/12 "2023-10-03T04:03:39Z")

</div>

> [@Peter\_Kawa](#):
>
> Makes sense, with an alarm system 😉
> 
> Your browser doesn’t accept the self-signed cert, I mean, it’s not Homey imho.  
> When you paste that `https://192.168.1.88....` URL from the GET flow card in your browser, and open it, do you get an option to install the certificate, besides a rejection?
> 
> But my knowledge is little on this stuff, I found this below, which makes sense.

Hi Peter!

If I try with http and not with https, this is it

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/6/d6fbbee914dad89b6adf7dcf2254a833e8684826.png)  
https esetépen pedig ez  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/e/eef28041b96c08e8a0714093477538c9ee88932b.png)  
In this case I think only Homey has a problem with the certificate. Where do you think I should write about this in the forum to find a solution?

Tamás

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 3, 2023, 4:22am UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/13 "2023-10-03T04:22:33Z")

</div>

Hi Tamas, with this:

> [@Peter\_Kawa](#):
>
> When you paste that `https://192.168.1.88....` URL from the GET flow card in your browser, and open it, do you get an option to install the certificate, besides a rejection?

I meant opening the URL in your browser, apart from Homey. Maybe the translations are in our way. Hope a screenshot makes it clearer;

> ![Screenshot_20231003-062015_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/e/9e4df60687137dcae9aded139cc239edad0385ba.jpeg)

What happens when you open that page?

> [@Peter\_Kawa](#):
>
> do you get an option to install the certificate, besides a rejection?

---

<div class="post-metadata">

**Author:** ![Tamas\_Kovacs](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tamas_kovacs/32/80084_2.png) [@Tamas\_Kovacs](https://community.homey.app/u/Tamas_Kovacs)\
**Post date:** [October 3, 2023, 4:30am UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/14 "2023-10-03T04:30:06Z")

</div>

Good morning!

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/b/4bfac18badb5dd4a5101dfca23615285a38c4fd4.png)  
but the command runs … my shutter goes down … 🙂

“Nem biztonságos” means: Not secure… 🙂

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 3, 2023, 10:22pm UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/15 "2023-10-03T22:22:13Z")

</div>

Well that’s a start! To me it looks like it should work with http?  
But maybe you’re right about Homey rejecting the self-signed certificate. I’m no expert here 😛  
Did you write to Homey support already?

---

<div class="post-metadata">

**Author:** ![Tamas\_Kovacs](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tamas_kovacs/32/80084_2.png) [@Tamas\_Kovacs](https://community.homey.app/u/Tamas_Kovacs)\
**Post date:** [October 4, 2023, 4:42am UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/16 "2023-10-04T04:42:08Z")

</div>

Hello!  
Thanks, but I solved it, with Homey script app. 🙂

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 4, 2023, 1:55pm UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/17 "2023-10-04T13:55:24Z")

</div>

Nice! While this is a user forum with tips & tricks & solutions, please share the code 😉

---

<div class="post-metadata">

**Author:** ![Tamas\_Kovacs](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tamas_kovacs/32/80084_2.png) [@Tamas\_Kovacs](https://community.homey.app/u/Tamas_Kovacs)\
**Post date:** [October 4, 2023, 2:27pm UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/18 "2023-10-04T14:27:08Z")

</div>

All right! But it’s not my script, a Hungarian friend helped me, but it sure works like this 🙂  
Thank you very much for your help too!

const url = ‘[https://192.168.1.88:8443/scenarios/12/execute](https://192.168.1.88:8443/scenarios/12/execute)’;  
const reqHeaders = { “Content-Type”:“text/plain” };  
const httpsAgent = new https.Agent({ keepAlive: true, rejectUnauthorized: false });  
const reqOptions = { method: “GET”, headers: reqHeaders, agent: httpsAgent, };  
let response  
try { response = await fetch(url, reqOptions); }  
catch (err) { console.log(err); return false; }  
if (!response.ok) throw Error(‘Invalid response’);

Tamas

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 4, 2023, 3:28pm UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/19 "2023-10-04T15:28:42Z")

</div>

Great, thanks for sharing m8!

The trick is here I guess

> [@Tamas\_Kovacs](#):
>
> rejectUnauthorized: false

Maybe you found out alr, but nonetheless: Now you can use it in HS flowcards, and use the URL as argument. This way you can duplicate the card for use with other URLs, and only adjust the URL in the argument field at the top:

 ![Screenshot from 2023-10-04 17-24-59](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/3/73f0cf0853df35e768985026f79e4c2c2394bd77.png)

Homeyscript card in detail

 ![Screenshot from 2023-10-04 17-25-18](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/8/c86453a494ab00c3b878a745604cb48a810076ad.png)

I added  
`return response;`  
to the script, so the [Result] tag gets the response data

---

<div class="post-metadata">

**Author:** ![Tamas\_Kovacs](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tamas_kovacs/32/80084_2.png) [@Tamas\_Kovacs](https://community.homey.app/u/Tamas_Kovacs)\
**Post date:** [October 16, 2023, 5:28pm UTC](https://community.homey.app/t/homeypro-with-ksenia-security/90711/20 "2023-10-16T17:28:10Z")

</div>

Hello!  
I would like to report how I am with the KSenia and Homey alarm sensor connection at the moment…  
I can query the zone input of the KSenia alarm panel with the http GET command about the current status of the alarm sensor connected to the input.  
Unfortunately, due to the self-signed certificate error, I can only perform this query with HomeyScript so that the errors are discarded.  
I wanted to query a total of 6 alarm sensors, in such a way that I run the scripts written to query the sensors one by one with a 2-second cycle.  
I added the sensors to Homey as a Virtual switch.  
The problem is that something gets stuck when I want to request more than 3 queries at the same time. This is when access to Homey is interrupted. Occasionally, all previously written scripts also disappear and in such cases the Flows cannot run either, since there is no valid script card either.  
As soon as I reduce the number of concurrent queries to 3 or less, everything will be fine.  
Tamas

[Next page](https://community.homey.app/t/homeypro-with-ksenia-security/90711.md?page=2)
