Posts: 449
Threads: 94
Joined: Jun 2015
Reputation:
6
Hello,
Now i have a LM with an 1-wire rfid reader RF9092L2A-M12-13.56 to read my 13.56mhz rfid tags to do some stuff (open doors / disable alarms).
But now i like to use an Airtag to disable my alarm. Is there a reader thats i can use with my LM? or maybe another solution is to use the BLE option in the airtag?
Anyone some advice?
Posts: 111
Threads: 14
Joined: Nov 2019
Reputation:
6
28.07.2023, 13:55
(This post was last modified: 28.07.2023, 14:02 by Joep.)
(27.07.2023, 14:05)gjniewenhuijse Wrote: Hello,
Now i have a LM with an 1-wire rfid reader RF9092L2A-M12-13.56 to read my 13.56mhz rfid tags to do some stuff (open doors / disable alarms).
But now i like to use an Airtag to disable my alarm. Is there a reader thats i can use with my LM? or maybe another solution is to use the BLE option in the airtag?
Anyone some advice?
Google is your best friend
https://www.google.com/search?q=use+airtag+to+open+door
Use Automation on your iPhone and choose NFC tag to create an automation. Next you can get the info of an url. This url should be the remote protocol from your LM where you can write some value to some group address. Also you can use this automation with Siri.
Posts: 449
Threads: 94
Joined: Jun 2015
Reputation:
6
(28.07.2023, 13:55)Joep Wrote: (27.07.2023, 14:05)gjniewenhuijse Wrote: Hello,
Now i have a LM with an 1-wire rfid reader RF9092L2A-M12-13.56 to read my 13.56mhz rfid tags to do some stuff (open doors / disable alarms).
But now i like to use an Airtag to disable my alarm. Is there a reader thats i can use with my LM? or maybe another solution is to use the BLE option in the airtag?
Anyone some advice?
Google is your best friend
https://www.google.com/search?q=use+airtag+to+open+door
Use Automation on your iPhone and choose NFC tag to create an automation. Next you can get the info of an url. This url should be the remote protocol from your LM where you can write some value to some group address. Also you can use this automation with Siri.
I know that way to make an automation in IOS. But thats not what i want. I have an airtag with my keys and like to put that in front of a reader thats in my house.
Posts: 77
Threads: 20
Joined: Apr 2022
Reputation:
0
(27.07.2023, 14:05)gjniewenhuijse Wrote: Hello,
Now i have a LM with an 1-wire rfid reader RF9092L2A-M12-13.56 to read my 13.56mhz rfid tags to do some stuff (open doors / disable alarms).
But now i like to use an Airtag to disable my alarm. Is there a reader thats i can use with my LM? or maybe another solution is to use the BLE option in the airtag?
Anyone some advice?
I got the same rfid reader as you do, but nothing happens when I connect it to my Reactor IO v2, am I missing something?
Posts: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
The reader itself won't be visible in the device list. Only when an RFID is read a temporary device will appear. The ID of this device will contain the read RFID ID.
You can poll the device list via a script. Adjust the polling time as needed.
Code: require('ow')
list = ow.list()
log(list)
Posts: 77
Threads: 20
Joined: Apr 2022
Reputation:
0
(20.09.2023, 06:07)admin Wrote: The reader itself won't be visible in the device list. Only when an RFID is read a temporary device will appear. The ID of this device will contain the read RFID ID.
You can poll the device list via a script. Adjust the polling time as needed.
Code: require('ow')
list = ow.list()
log(list)
Thanks a lot, it got me started.
Now i got an ID: 01.CE6371690000
And it shows up in the 1-Wire tab, but when i click it it says: "Configuration for this device family is not implemented yet"
How do I use that info in combination with Groupaddresses?
Posts: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
You need to create a resident script that executes ow.list() every second or so. Then you can perform required action when a device with a given ID is present or not.
Posts: 77
Threads: 20
Joined: Apr 2022
Reputation:
0
(20.09.2023, 12:51)admin Wrote: You need to create a resident script that executes ow.list() every second or so. Then you can perform required action when a device with a given ID is present or not.
A bit out of my comfort zone
Do you have any example code, in that direction to get me started?
Posts: 45
Threads: 1
Joined: Dec 2020
Reputation:
19
(20.09.2023, 15:03)Novodk Wrote: (20.09.2023, 12:51)admin Wrote: You need to create a resident script that executes ow.list() every second or so. Then you can perform required action when a device with a given ID is present or not.
A bit out of my comfort zone
Do you have any example code, in that direction to get me started?
Hello Novodk.
This is resident script for you.
Code: require('ow')
function findDifferences(list, prev_list)
local new_ids = {}
local removed_ids = {}
-- Check for new IDs
if list then
for id, _ in pairs(list) do
if not prev_list or not prev_list[id] then
table.insert(new_ids, id)
end
end
end
-- Check for removed IDs
if prev_list then
for id, _ in pairs(prev_list) do
if not list[id] then
table.insert(removed_ids, id)
end
end
end
return new_ids, removed_ids
end
list = ow.list()
local new_ids, removed_ids = findDifferences(list, prev_list)
if #new_ids > 0 then
log("New IDs:")
for _, id in ipairs(new_ids) do
log(id, list[id])
end
end
if #removed_ids > 0 then
log("Removed IDs:")
for _, id in ipairs(removed_ids) do
log(id, prev_list[id])
end
end
prev_list = list
Posts: 77
Threads: 20
Joined: Apr 2022
Reputation:
0
(22.09.2023, 06:31)RomansP Wrote: (20.09.2023, 15:03)Novodk Wrote: (20.09.2023, 12:51)admin Wrote: You need to create a resident script that executes ow.list() every second or so. Then you can perform required action when a device with a given ID is present or not.
A bit out of my comfort zone
Do you have any example code, in that direction to get me started?
Hello Novodk.
This is resident script for you.
Code: require('ow')
function findDifferences(list, prev_list)
local new_ids = {}
local removed_ids = {}
-- Check for new IDs
if list then
for id, _ in pairs(list) do
if not prev_list or not prev_list[id] then
table.insert(new_ids, id)
end
end
end
-- Check for removed IDs
if prev_list then
for id, _ in pairs(prev_list) do
if not list[id] then
table.insert(removed_ids, id)
end
end
end
return new_ids, removed_ids
end
list = ow.list()
local new_ids, removed_ids = findDifferences(list, prev_list)
if #new_ids > 0 then
log("New IDs:")
for _, id in ipairs(new_ids) do
log(id, list[id])
end
end
if #removed_ids > 0 then
log("Removed IDs:")
for _, id in ipairs(removed_ids) do
log(id, prev_list[id])
end
end
prev_list = list
Thank you RomansP
Is it correct that the script adds the rfid tag ID to a table and after a short time it removes it again?
If that is the case, how do I use the information from that table?
Posts: 45
Threads: 1
Joined: Dec 2020
Reputation:
19
25.09.2023, 08:08
(This post was last modified: 25.09.2023, 08:15 by RomansP.)
You need to create a group objects that controls your door lock (the group name is 'open' in this example), then add the id (the variable open_lock is for this purposes), then each time you will scan the device it will opens the door. In the same style you can add more different id for different group objects. (After changes do not forget to disable/enable the resident script)
Code: require('ow')
function findDifferences(list, prev_list)
local new_ids = {}
local removed_ids = {}
-- Check for new IDs
if list then
for id, _ in pairs(list) do
if not prev_list or not prev_list[id] then
table.insert(new_ids, id)
end
end
end
-- Check for removed IDs
if prev_list then
for id, _ in pairs(prev_list) do
if not list[id] then
table.insert(removed_ids, id)
end
end
end
return new_ids, removed_ids
end
local temperat_sens = "28.DBCA83050000"
local open_lock = "01.CE6371690000" -- your id to open door lock
list = ow.list()
local new_ids, removed_ids = findDifferences(list, prev_list)
if #new_ids > 0 then
log("New IDs:")
for _, id in ipairs(new_ids) do
log(id, list[id])
if list[id] == temperat_sens then
grp.write('temperat', true)
elseif list[id] == open_lock then
grp.write('open', true) -- your object that controls door lock
end
end
end
if #removed_ids > 0 then
log("Removed IDs:")
for _, id in ipairs(removed_ids) do
log(id, prev_list[id])
end
end
prev_list = list
Posts: 449
Threads: 94
Joined: Jun 2015
Reputation:
6
please don't steal my topic
The original question:
Hello,
Now i have a LM with an 1-wire rfid reader RF9092L2A-M12-13.56 to read my 13.56mhz rfid tags to do some stuff (open doors / disable alarms).
But now i like to use an Airtag to disable my alarm. Is there a reader thats i can use with my LM? or maybe another solution is to use the BLE option in the airtag?
Anyone some advice?
Posts: 7758
Threads: 42
Joined: Jun 2015
Reputation:
447
AirTags have Bluetooth but the address changes constantly for privacy reasons so it's not possible to use this way. There's another solution but it requires having a Mac constantly on to proxy data: https://github.com/MartinPham/FindMySync
Posts: 1764
Threads: 6
Joined: Jul 2015
Reputation:
117
Do we have a LUA function to calculate the MAC when having the IRK (identity resolving key)?
|