Security panel K2000

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
remko2000
Normal user
Posts: 68
Joined: 28 Dec 2017, 15:56

Security panel K2000

#1 Post by remko2000 » 02 Feb 2019, 16:13

I've bought a K2000 security keypad and connect it with a Wemos D1 with ES Easy (build mega-20181026).
7360c700-890b-4533-9900-ba57adeeac81.JPG
7360c700-890b-4533-9900-ba57adeeac81.JPG (154.59 KiB) Viewed 12331 times
I connect the two "BEL' contacts of the panel to Ground and GPIO12 of my wemos. With this switchinput I want to set my alarm ' IN'.This works fine.

The contact ' NO (normally in)/push' the panel I've connected to GPIO13.
With this switchinput I want to set my alarm 'OUT'.
When I enter the correct alarmcode on the panel to set, sometimes it works and sometimes it does not work. The signal on GPIO13 is very instable.
The output in the log when enter the correct code (setting: normal switch /no logic and pull up):
93787: SW : Switch state 1 Output value 0
93795: EVENT: NOAlarmuit#Switch=0.00
93987: SW : Switch state 0 Output value 1
93990: EVENT: NOAlarmuit#Switch=1.00
94187: SW : Switch state 1 Output value 0
94190: EVENT: NOAlarmuit#Switch=0.00
94687: SW : Switch state 0 Output value 1
94690: EVENT: NOAlarmuit#Switch=1.00
94987: SW : Switch state 1 Output value 0
94990: EVENT: NOAlarmuit#Switch=0.00
95687: SW : Switch state 0 Output value 1
95690: EVENT: NOAlarmuit#Switch=1.00
95787: SW : Switch state 1 Output value 0
95790: EVENT: NOAlarmuit#Switch=0.00
95887: SW : Switch state 0 Output value 1
95890: EVENT: NOAlarmuit#Switch=1.00
95987: SW : Switch state 1 Output value 0
95990: EVENT: NOAlarmuit#Switch=0.00
96097: SW : Switch state 0 Output value 1
96100: EVENT: NOAlarmuit#Switch=1.00
96287: SW : Switch state 1 Output value 0
96290: EVENT: NOAlarmuit#Switch=0.00
96787: SW : Switch state 0 Output value 1
96790: EVENT: NOAlarmuit#Switch=1.00
I think because it is a pushcontact that I get multiple switch changes. I do not want that.

I have experimented with the different switch settings in esp easy from my wemos but nothing helps.
Another setting maybe? Maybe a rull? Or can I set a delay after the first Switch state change so the rest is ignored?

I need a stable response to be able to set up follow-up actions in domoticz to enable the alarm out (for example.)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Security panel K2000

#2 Post by grovkillen » 02 Feb 2019, 16:21

Tried debounced?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Security panel K2000

#3 Post by Shardan » 02 Feb 2019, 17:24

How did you connect the "Bell" contacts.
From GPIO to GND?

In that case try a 10 KOhm resistor from GPIO to +3.3V and a capacitor of 47... 100 nF from GPIO to GND.
Regards
Shardan

remko2000
Normal user
Posts: 68
Joined: 28 Dec 2017, 15:56

Re: Security panel K2000

#4 Post by remko2000 » 02 Feb 2019, 17:27

grovkillen wrote: 02 Feb 2019, 16:21 Tried debounced?
yes but that doesn't help.

remko2000
Normal user
Posts: 68
Joined: 28 Dec 2017, 15:56

Re: Security panel K2000

#5 Post by remko2000 » 02 Feb 2019, 17:31

Shardan wrote: 02 Feb 2019, 17:24 How did you connect the "Bell" contacts.
From GPIO to GND?

In that case try a 10 KOhm resistor from GPIO to +3.3V and a capacitor of 47... 100 nF from GPIO to GND.
The bell contacts I connect to GPIO and GND indeed. This contact gives a good stabile state 0 or 1 signal.

The problem is the other NO pushcontact which gives multiple signals (one wire from GPIO13 to the securitypanel NO-contact).Does help the resistors you mentioned for this problem?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Security panel K2000

#6 Post by Shardan » 02 Feb 2019, 21:38

remko2000 wrote: 02 Feb 2019, 17:31
Shardan wrote: 02 Feb 2019, 17:24 How did you connect the "Bell" contacts.
From GPIO to GND?

In that case try a 10 KOhm resistor from GPIO to +3.3V and a capacitor of 47... 100 nF from GPIO to GND.
The bell contacts I connect to GPIO and GND indeed. This contact gives a good stabile state 0 or 1 signal.

The problem is the other NO pushcontact which gives multiple signals (one wire from GPIO13 to the securitypanel NO-contact).Does help the resistors you mentioned for this problem?
That is difficult to say without any knowledge about what the system does behind the scenes.
Multiple signals sounds a bit like data being sent, a resistor/capacitor combination wont help in that case.
If it is just contact bouncing, a very long debounce time or a 10KOhm and a fat capacitor may help.
But that depends a bit on what "NO" says. Is that a mechanical contact, Relay or such or an
open collector output with a transistor? In the second case this might damage the switching transistor.

It's difficult to find a resolution without hands on.. a view with an oscilloscope on the signal would be a good idea.
Regards
Shardan

remko2000
Normal user
Posts: 68
Joined: 28 Dec 2017, 15:56

Re: Security panel K2000

#7 Post by remko2000 » 02 Feb 2019, 22:16

Maybe this picture explains more. I found it on internet. It's explains the possibilities of the K2000 panel and in yellow how I use the contacts now.
e826b7bf-20a0-4ce6-9cb7-30590bc93928.JPG
e826b7bf-20a0-4ce6-9cb7-30590bc93928.JPG (164.48 KiB) Viewed 12286 times

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Security panel K2000

#8 Post by Shardan » 02 Feb 2019, 22:58

I can't find any manual or at least info what "NO" is really.

Following this short manual
https://cdn.shopify.com/s/files/1/0248/ ... TimTec.pdf
the NO is a pushbutton input - that won't work as an output to a ESP-GPIO.

As said, it needs some hands-on.....
Regards
Shardan

remko2000
Normal user
Posts: 68
Joined: 28 Dec 2017, 15:56

Re: Security panel K2000

#9 Post by remko2000 » 02 Feb 2019, 23:59

thx for helping me. Indeed, I think it's a pushbutton input.

I came up with the idea because I have read that this panel works with a Fiabaro binary sensor. See this scheme:
Image-1.png
Image-1.png (116.74 KiB) Viewed 12273 times
There the use the NO-contact.

Maybe can I use an other contact?
A relay also switches when I enter the code code. Maybe I can do something with ESP in this contact?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Security panel K2000

#10 Post by Shardan » 03 Feb 2019, 01:42

I've looked up some documentation.
Mostly that pin is called "Push/NO". I guess that means "Push button, normaly open".
Definitely that naming is a bit misleading.
Regards
Shardan

remko2000
Normal user
Posts: 68
Joined: 28 Dec 2017, 15:56

Re: Security panel K2000

#11 Post by remko2000 » 03 Feb 2019, 08:44

Shardan wrote: 03 Feb 2019, 01:42 I've looked up some documentation.
Mostly that pin is called "Push/NO". I guess that means "Push button, normaly open".
Definitely that naming is a bit misleading.
So no other solutions to connect the wemos in your opinion?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Security panel K2000

#12 Post by Shardan » 03 Feb 2019, 11:58

Hm... it should be possible to use the NC contact instead.

It is the inverted signal of an NO contact so you would have to configure ESPEasy accordingly.
As this contact uses 12V and drives a coil for lock opening it is necessary to use a kind of level converting:
A resistor 1KOhm/0,25W from NC to the GPIO, a zener diode of 3.3V from GPIO to GND, that should do the job.
See the schematic at https://www.letscontrolit.com/wiki/inde ... _Converter
The second schematic in the wiki post.
Do not use 330 ohm as shown, that is calculated for 5V, not for 12V.

The zener diode limits the voltage to 3.3V. Even voltage spikes from the coil are eliminated.
Regards
Shardan

remko2000
Normal user
Posts: 68
Joined: 28 Dec 2017, 15:56

Re: Security panel K2000

#13 Post by remko2000 » 03 Feb 2019, 18:12

Yes! THX for the great help.

The NC-contact do the job.
I connect it with GROUND and my GPIO13 connected on the 12V. I use a LM1117 in between to convert the 12V to 3,3V (max V GPIO).This works great.

I'm no stuggling with rules to set a timer. I want a delay of 30 secondes when I set my alarmin. After 30 secondes I want to set GPIO 0 (with timer 1) on low (0) like this:
23915337: SW : Switch state 1 Output value 1
23915339: EVENT: belalarmin#alarmin=1.00
I use this rule:
on belalarmin#state do
if [belalarmin#state]=1.00
timerSet,1,30
endon

on Rules#Timer=1 do
gpio,0,0
endon
What do I missing?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Security panel K2000

#14 Post by grovkillen » 03 Feb 2019, 18:42

If segments need a closing "EndIf".
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

remko2000
Normal user
Posts: 68
Joined: 28 Dec 2017, 15:56

Re: Security panel K2000

#15 Post by remko2000 » 03 Feb 2019, 19:37

thx I changed it to:
on alarmin#state do
if [alarmin#state]=1.00
timerSet,1,30 // 30 second timer
endon

on Rules#Timer=1 do
gpio,0,0
endif
endon
but no change. No response at all.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Security panel K2000

#16 Post by grovkillen » 03 Feb 2019, 20:26

Please review your rule ;)

Code: Select all

on alarmin#state do
if [alarmin#state]=1.00
timerSet,1,30 // 30 second timer
EndIf
endon

on Rules#Timer=1 do
gpio,0,0 
endon
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

remko2000
Normal user
Posts: 68
Joined: 28 Dec 2017, 15:56

Re: Security panel K2000

#17 Post by remko2000 » 04 Feb 2019, 18:21

I don't understand. I change my rule but still nothing happened.
My rule is now:
on belalarmin#state do
if [belalarmin#state]=1.00
timerSet,1,30 // 30 second timer
EndIf
endon

on Rules#Timer=1 do
gpio,0,0
endon
My switch is called ' belalarmin'

If I push it I get in my log:
200525: SW : Switch state 0 Output value 0
200532: EVENT: belalarmin#alarmin=0.00
200725: SW : Switch state 1 Output value 1
200727: EVENT: belalarmin#alarmin=1.00
I want that GPIO0 get low after 30 secondes but nothing happening. What am I doing wrong?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Security panel K2000

#18 Post by grovkillen » 04 Feb 2019, 19:37

Where do you set the GPIO to be high?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

remko2000
Normal user
Posts: 68
Joined: 28 Dec 2017, 15:56

Re: Security panel K2000

#19 Post by remko2000 » 09 Feb 2019, 11:31

remko2000 wrote: 03 Feb 2019, 18:12 Yes! THX for the great help.

The NC-contact do the job.
I connect it with GROUND and my GPIO13 connected on the 12V. I use a LM1117 in between to convert the 12V to 3,3V (max V GPIO).This works great.

I'm no stuggling with rules to set a timer. I want a delay of 30 secondes when I set my alarmin. After 30 secondes I want to set GPIO 0 (with timer 1) on low (0) like this:
23915337: SW : Switch state 1 Output value 1
23915339: EVENT: belalarmin#alarmin=1.00
I use this rule:
on belalarmin#state do
if [belalarmin#state]=1.00
timerSet,1,30
endon

on Rules#Timer=1 do
gpio,0,0
endon
What do I missing?
I do not understand it any more. This solution only works if my wemos is being fed through my computer via USB. As soon as I have my wemos fed by external power supply such as 12V (from my panel) that I convert to 5V, I get no response in esp easy when I enter the correct code on my panel. how can this be explained?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Security panel K2000

#20 Post by Shardan » 09 Feb 2019, 13:09

First:
Check if you have a reliable ground connection.
K2000 GND and WeMos GND must be properly connected.

Second:
Use a standard 5V/1A Wall Plug Type power supply with USB pluig and test with that.
The voltage regulators like LM1117-%, LM7805, LF-50 and so on are always good for
some surprises, for example oscillationg voltage on output.
Regards
Shardan

remko2000
Normal user
Posts: 68
Joined: 28 Dec 2017, 15:56

Re: Security panel K2000

#21 Post by remko2000 » 09 Feb 2019, 16:00

thx for your response.

I checked ground; if I connect ground K2000 with ground Wemos the voltage no longer falls away (normaly a couple of seconds) when activate the NC-contact.

So I tried a separate wall plug 5V3A. Even then nothing happens. As soon as I reconnect my wemos to my computer, I get a signal on activation of the nc:
5776: SW : Switch state 0 Output value 1
38776: SW : Switch state 1 Output value 0
This is the response I want but without connecting to my computer (I want to use a external powersupply).

A summary of how I connected it:

Wemos GPIO 13 to LM1117 Vout +
Wemos GROUND to LM1117 GND

LM1117 Vin+ to 12V K2000
LM1117 GND to NC contact K2000

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests