How to reset the RDIF Wiegand code

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
foxejoe
Normal user
Posts: 10
Joined: 15 Oct 2017, 10:01

How to reset the RDIF Wiegand code

#1 Post by foxejoe » 23 Dec 2017, 17:41

Hi,
I have just connected an RDIF Wiegand device using the EspEasy plugin and everything is ok.
I have noticed that the code of the card is memorized on the espeasy Device page and if someone has access to the wifi he can read the code.
Is there any way to set the code at 0 after certain time so that no-one can read it?

Thanks
Lorenzo

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

Re: How to reset the RDIF Wiegand code

#2 Post by grovkillen » 23 Dec 2017, 19:14

Use rules and taskvalueset to set it to zero after successful read.
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:

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: How to reset the RDIF Wiegand code

#3 Post by enesbcs » 23 Dec 2017, 19:28

foxejoe wrote: 23 Dec 2017, 17:41 Hi,
I have just connected an RDIF Wiegand device using the EspEasy plugin and everything is ok.
I have noticed that the code of the card is memorized on the espeasy Device page and if someone has access to the wifi he can read the code.
Is there any way to set the code at 0 after certain time so that no-one can read it?
Thanks
Lorenzo
I think you can use rules:
https://www.letscontrolit.com/wiki/inde ... rial_Rules
For example: if the wiegand device named W and it is the 2nd task in device list, with rfid in the first param, named Value:

Code: Select all

On W#Value do
 if [W#Value]>0
  timerSet,1,10
 endif
endon

On Rules#Timer=1 do
  TaskValueSet 2,1,0
endon
This way after 10 seconds from the Value has a new value, it is setted to zero. I think, but not tried. :)

foxejoe
Normal user
Posts: 10
Joined: 15 Oct 2017, 10:01

Re: How to reset the RDIF Wiegand code

#4 Post by foxejoe » 23 Dec 2017, 20:37

Thanks !!
It works even if the value is not set to 0 ;-) (by the way It is set to a different value than the code)

I didn't know the TaskValueSet can be used also on all variables ... I suppose it was just for the Dummy

Regards
Lorenzo

alexander90
New user
Posts: 5
Joined: 10 Feb 2020, 22:41

Re: How to reset the RDIF Wiegand code

#5 Post by alexander90 » 10 Feb 2020, 22:43

can it be that this is no longer possible with the current mega version? I cannot change the RFID value via taskvalueset. All that's left is to change a dummy.

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

Re: How to reset the RDIF Wiegand code

#6 Post by Shardan » 11 Feb 2020, 19:11

Try to add a "taskrun <task/devicenr>" after taskvalueset
Regards
Shardan

xyh569923911
New user
Posts: 1
Joined: 10 Feb 2020, 08:00

Re: How to reset the RDIF Wiegand code

#7 Post by xyh569923911 » 12 Feb 2020, 05:16

Homekit relay

1.Hardware interface description
1.1 Pin definition
There are eight external control pins (as shown in the figure below), which are 1. Download pin (mode), 2. Download pin (mode), 3. Rx, 4. TX, 5. 5V, 6. GND, 7. Button, 8. Button.
1.2 Introduction to relay interface
The relay controls the two external interface interfaces 1 and 2, when the relay is on conductance Interface 1 and interface 2 are in the closed state. When the relay is powered off, the two interfaces are disconnected.


1.3.How to use:
When it is necessary to use the external button to control the operation of the relay, it is only necessary to connect the 5,6 pin external 5V power supply and GND, and the button control function can be realized by shorting the 7,8 button pin.

2.Update Firmware
See:
https://github.com/SmartArduino/DoHome/ ... Smart_Plug

3. Instructions
See:
https://github.com/SmartArduino/DoHome/ ... 20To%20Use

alexander90
New user
Posts: 5
Joined: 10 Feb 2020, 22:41

Re: How to reset the RDIF Wiegand code

#8 Post by alexander90 » 12 Feb 2020, 08:34

Shardan wrote: 11 Feb 2020, 19:11 Try to add a "taskrun <task/devicenr>" after taskvalueset

Code: Select all

On W#Value do
 if [W#Value]>0
  timerSet,1,10
 endif
endon

On Rules#Timer=1 do
  TaskValueSet 2,1,0
  taskrun,2
endon
This is not working

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

Re: How to reset the RDIF Wiegand code

#9 Post by grovkillen » 12 Feb 2020, 11:09

How often is the timer set? More than once per 10 seconds? If so the timer will never reach 0. Please look in the log.
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:

alexander90
New user
Posts: 5
Joined: 10 Feb 2020, 22:41

Re: How to reset the RDIF Wiegand code

#10 Post by alexander90 » 12 Feb 2020, 12:22

Something is completely weird here. If I enter the command: "TaskValueSet 1,1,0" via "Tools - Command" it doesn't change anything under my Task 1 RFID.
(In my Setup the RFID Task is 1 and not 2)

espeasy taskvalueset.jpg
espeasy taskvalueset.jpg (147.51 KiB) Viewed 12311 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to reset the RDIF Wiegand code

#11 Post by TD-er » 12 Feb 2020, 12:34

Not sure if taskvalueset can be used on more than the dummy device.
Also you must call taskrun, or the combined command for set and run.


Also some plugins are written slightly different from how the call to "PLUGIN_READ" was intended.
The general idea is that PLUGIN_READ can be called when the "interval" timer has passed or when you call "taskrun" from the rules.
The values shown in the devices page can be updated by PLUGIN_READ, but also by other calls like the 10/sec or others. But only PLUGIN_READ will send out an event when the data was updated.
Such an event can be used in the rules and is also preceded by the call to sending out data to the connected controllers.

Some plugins do update the values more often, without calling PLUGIN_READ, so if you have set the values using taskvalueset, it may be those changes are overwritten immediately. (that is, if the taskvalueset even can be used on this plugin)

alexander90
New user
Posts: 5
Joined: 10 Feb 2020, 22:41

Re: How to reset the RDIF Wiegand code

#12 Post by alexander90 » 12 Feb 2020, 12:54

Okay, but it's funny that the original threat gets a working rule.

If I create a dummy, I can also change it using the taskvalueset.

As soon as I do this in a rule it doesn't work. I don't know where to start. Can you take a look at it via anydesk?

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

Re: How to reset the RDIF Wiegand code

#13 Post by Shardan » 12 Feb 2020, 13:11

Original thread is 2017..... many things changed since then.

And i'm not sure if a "taskrun,2" works at all...
Can't test or check atm, but the command reference says "taskrun,task-nr,device-nr" if i remember right.
Regards
Shardan

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to reset the RDIF Wiegand code

#14 Post by TD-er » 12 Feb 2020, 13:33

taskrun should work on any plugin (or more exact a task)

It only expects 1 parameter, which is the task number.

Just to get the used words right:
Implementation of support for a device (e.g. a sensor or display) is called a plugin.
You may have several instances of a plugin active on the node, so a selected plugin we call a task.

The items you see in the table on the "Devices" tab in the browser is a list of tasks.

alexander90
New user
Posts: 5
Joined: 10 Feb 2020, 22:41

Re: How to reset the RDIF Wiegand code

#15 Post by alexander90 » 12 Feb 2020, 20:37

I found a solution to this problem, although it is not my favorite ...

At first I didn't know that in the new engine the rule name had to be the same as the event. So to stay with this example "W # Value". Only then is the rule actually carried out ...
This does not change the problem that the Wiegand values ​​cannot be overwritten via TaskValueSet.

Accordingly, I created a dummy that receives the same value after changing the Wiegand Reader and changes the value of the dummy to 0 after 2 seconds using TaskValueSet.

It is just a bit stupid that the Mqtt message is carried out with the dummy by an interval and not by change (as with the other plugins).
No matter an interval of 1 second is acceptable to me.

I hope I could shed some light on this if someone stumbles across this threat ...

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to reset the RDIF Wiegand code

#16 Post by TD-er » 12 Feb 2020, 23:59

Just be aware that when you store long integer numbers in a float, you will loose precision.
So there will not be an exact match on RFID strings any more after storing it in a float of a dummy task value.

It doesn't seem like you do it now, but you may end up there on future experiments.

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests