logo elektroda
logo elektroda
X
logo elektroda

Zigbee Key Fob for Hotel Room Circuit Control: Alternatives to RFID Cards?

austin007 1314 18
Best answers

How can I detect a small wireless key fob or beacon so I can switch off room circuits when the user leaves, instead of using an RFID card slot?

A BLE beacon/key fob read by an ESP32 is the most practical option here: the tag advertises periodically, typically about once per second, so in a 3×3 m room presence detection should be reliable and absence can usually be detected after about 15–30 seconds [#19632524][#19632599][#19634328] No radio solution will switch off circuits immediately; there is always some delay before the system can conclude the tag is gone [#19632250] If you want to recognize only your own devices, note that most simple tags transmit a fixed unique MAC address, but that is easy to spoof; proper authentication requires a more specialized beacon with encrypted/authenticated pairing [#19633088][#19634328] Simple BLE beacons do not need any button press to transmit, while some anti-lost tags only broadcast when a button is used, so that behavior should be checked before buying [#19632599][#19633088]
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 19631499
    austin007
    Level 17  
    Posts: 759
    Help: 6
    Rate: 271
    Hi,

    I need to install a device used in hotels, switching off certain circuits when the user leaves the house. Hotels use hotel switches in the form of cards, RFID cards, magnetic cards. The user has them clipped in together with the room keys. Upon entering the room, he inserts the card into the slot. Circuits (AC, TV etc.) are switched on. When leaving to lock the room, the user removes the card from the slot, disconnecting the circuits.

    As I have Zigbee, it would be more convenient to use a key fob that would be polled periodically by the network . Advantages , small size (with keys) and no need to place in the slot. WiFi solutions are power hungry. BLE would be ok but I have no way to integrate .

    Maybe a colleague has an idea or has linked some inexpensive solution.
    The idea is to cut the circuit when the user leaves the room. I know I could do detection using a door sensor + PIR, but maybe there are some low energy key fobs that would take care of the issue. In the 21st century, I don't want to put a large card under the keys. Especially as there is zigbee 3.0 (tuya) at home. The advantage of a physical rally is the reliability and wired connection. There are UHF RFID solutions. The usb programmer I have, but the readers are expensive. RFID on the lower bands require proximity, and I would like to eliminate this (it appears in the room brelko, the sytem detects it by itself, without user action)

    I would be grateful for suggestions of sensible, viable solutions / products.

    Regards :) .
  • ADVERTISEMENT
  • #2 19632047
    TvWidget
    Level 38  
    Posts: 4386
    Help: 471
    Rate: 691
    At what time after leaving the room should "certain circuits" be switched off ?
    How big is the room ?
  • ADVERTISEMENT
  • #3 19632228
    yanes
    Level 33  
    Posts: 1590
    Help: 204
    Rate: 597
    austin007 wrote:
    off certain circuits when the user leaves the house.
    Immediately, because this is how cards and keys work, I myself am curious about such a solution, because for the time being I am going to make a switch on the key from the front door, the only sensible and convenient solution at this time
  • ADVERTISEMENT
  • #4 19632250
    TvWidget
    Level 38  
    Posts: 4386
    Help: 471
    Rate: 691
    yanes wrote:
    Immediately
    .
    No radio solution will work immediately. The presence of a key fob can be detected quite quickly. Its absence can be detected at the earliest after 15-30 sec.
  • ADVERTISEMENT
  • #5 19632263
    yanes
    Level 33  
    Posts: 1590
    Help: 204
    Rate: 597
    That's enough, seconds don't play a major role here. Now what do you propose?
  • #6 19632288
    TvWidget
    Level 38  
    Posts: 4386
    Help: 471
    Rate: 691
    You did not answer the question of how big the room is.
  • Helpful post
    #7 19632320
    yanes
    Level 33  
    Posts: 1590
    Help: 204
    Rate: 597
    The size of the room doesn't matter at all, you can see that you don't understand what the author of the post is referring to.
  • #8 19632329
    TvWidget
    Level 38  
    Posts: 4386
    Help: 471
    Rate: 691
    austin007 wrote:
    Hi,
    As I have Zigbee it would be more convenient to use a key fob that would be polled periodically over the network . Advantages , small size (with keys) and no need to place in the slot. WiFi solutions are power hungry. BLE would be ok but I have no way to integrate.
    .
    My guess is that it is all about detecting the presence of the key fob/user in the room.
  • #9 19632431
    austin007
    Level 17  
    Posts: 759
    Help: 6
    Rate: 271
    TvWidget wrote:
    At what time after leaving the room should "certain circuits" be switched off ?
    How big is the room ?
    .

    Usually such devices have an adjustable delay or a fixed approx. 30-60 sec - hold after card removal. Once inserted, the circuit is immediately closed. The room is approx. 3mx3m but this is rather only relevant for PIR/US/MW detection.
    The switch-on time does not play a major role here - up to, say, 30s is ok. Lighting circuits will not be switched on, but if the delay were shorter (a few sec), the functionality could be used to automatically switch on the lighting (when needed).
  • Helpful post
    #10 19632524
    TvWidget
    Level 38  
    Posts: 4386
    Help: 471
    Rate: 691
    As far as radio solutions are concerned, in my opinion with such a small room a BLE key fob would be most convenient. With a broadcast period of 1 sec, the chances of it not being detected for 30 sec are negligible. Of course, there could always be strong radio interference lasting those 30 sec. The question is whether the very occasional detection of absence will be threatening.
    However, the radio solution will be hardly selective. In practice, the user will already be uprooted when approaching the door from the outside. I don't know whether this will not be disruptive.
    Then there is the security aspect. There are solutions using user authentication that are very difficult to bypass. You have not written whether this is relevant in this case.
  • #11 19632561
    austin007
    Level 17  
    Posts: 759
    Help: 6
    Rate: 271
    TvWidget wrote:
    As far as radio solutions are concerned, in my opinion with such a small room a BLE pendant would be most convenient. With a broadcast period of 1 second, the chances of it not being detected for 30 seconds are negligible. Of course, there could always be strong radio interference lasting those 30 sec. The question is whether the very occasional detection of absence will be threatening.
    However, the radio solution will be hardly selective. In practice, the user will already be uprooted when he approaches the door from the outside. I don't know if this will not be a nuisance.


    Detection through the door should not be a problem. I don't associate such BLE key fobs that don't require user interaction. Something always has to be pressed there I think. And then there's the receiver. Do you have an idea for a BLE receiver ?
    As for the unreliability of detection , it loses some functionality, but it's not an alarm system so it's not critical. It's not an alarm system, so it's not critical.
  • Helpful post
    #12 19632599
    TvWidget
    Level 38  
    Posts: 4386
    Help: 471
    Rate: 691
    BLE devices, as a rule, periodically send information about their existence. Nothing needs to be pressed. If security considerations are not important then any beacon can be used. The cheapest ones admittedly have a rather low transmitter power. With a 3x3m room, however, this should not be a problem.
    I don't know what exactly you expect from the receiver and how you want to connect it to these "certain circuits" ?
    You wrote in the section " ESP8266 and ESP32 and IoT". Acct ESP32 can receive BLE broadcast frames.
  • #13 19633053
    austin007
    Level 17  
    Posts: 759
    Help: 6
    Rate: 271
    Keys usually hang by the door and you can confidently limit the detection area to a radius of 1m from the receiver. ESP32 has BT in the structure so you could indeed write under it. However, I have not yet worked out BT support in ESP32. Security considerations are less important, but I would still prefer to only recognise registered devices (e.g. MAC_adr) :) I have something like the ITag Tracker key locator. He has a button to share, it is aesthetically pleasing and not large. The question is whether it would be suitable.

    Zigbee Key Fob for Hotel Room Circuit Control: Alternatives to RFID Cards? .
  • Helpful post
    #14 19633088
    TvWidget
    Level 38  
    Posts: 4386
    Help: 471
    Rate: 691
    austin007 wrote:
    Security considerations are less important, but I would still prefer to recognise only registered devices (e.g. MAC_adr)
    .
    Most tags have a fixed unique MAC address. The standard also allows dynamic addresses. These are used, for example, in the Android system. It is all about user privacy considerations.
    It is relatively easy to impersonate a device transmitting a fixed frame. It is similar to RFID with a fixed ID. As I have already written in more demanding systems, connection mode and authentication using encryption, passwords etc. are used.
    A classic beacon is constantly broadcasting. These 'anti-lost' devices probably work like that too. However, there is no certainty. Sometimes a different functionality is used. A connection is established with the tag and maintained. When the connection is broken, an alarm is sounded. The connection does require broadcasting. However, this can only be done by pressing a button.
  • #15 19634214
    austin007
    Level 17  
    Posts: 759
    Help: 6
    Rate: 271
    Thanks . From what I have read there is iBeacon technology, but more expensive because it is for Mac. There is an alternative , opensourc but I have not found cheap , convenient devices . I have read and found some solutions on github to support the antlost- tag I have. It works as a server. Two-way transmission. I just don't know if such a tag by itself will connect to a listening ESP32 (after authentication). So far it's a rekonensans, but the chances of implementation are there. I have no experience with BT/BLE and it's not that trivial. Fortunately there are some repositories on GH.
  • #16 19634328
    TvWidget
    Level 38  
    Posts: 4386
    Help: 471
    Rate: 691
    As a rule, devices with a BLE interface such as a sensor, key fob, etc., periodically (e.g. every 1 second) sound themselves, i.e. send a broadcast frame. Turning on BT scanning searches for all devices that are in the vicinity. In the case of the ESP32, an event will occur after each frame is received. In its handling, you can retrieve the contents of the frame (a sequence of bytes). Among other things, there will be the unique MAC address of the sender.
    Only specialised beacons allow authentication. Simple ones transmit a fixed frame and that's it.
    Hardware-wise, an iBeacon is a simple beacon. The content of the transmitted frame is only what Apple came up with. In the case of the ESP32, it doesn't matter.
  • #17 19792920
    Szaryczlowiek83
    Level 7  
    Posts: 69
    Rate: 2
    One question. How many people are to use the room. And how often are they supposed to change. Because if it is to be 1-2-5 regular people then maybe by BT authentication on the phone. You pair the ESP device with the phone. Phone comes into range-connection occurs(lights come on, door opens)-ESP loses range (cuts off light, closes door) BT activation on phone is 3-5 finger movements. The downside is a sudden lack of power on the phone. The only other option is a bicon with BT transmission encryption.

    Edit.
    If you have access to wifi then you will embrace this with sonoff mini, RPI3/4 and HA switches
  • #18 19854859
    austin007
    Level 17  
    Posts: 759
    Help: 6
    Rate: 271
    Szaryczlowiek83 wrote:
    Because if it is to be 1-2-5 regular people then maybe by BT authentication on the phone
    BT yes, but not on the phone. This is supposed to be a device not assigned to the teleofn etc and dependent on it. Hardware solution. Ew RFID tag UHF 13, 56Mhz. I usually insert keys in the door lock from the inside. According to the info, such RFID has a range of approx. 30 cm. A receiver in the wall near the handle would do the job. However, such a BT beacon which broadcasts every 1 sec would be a good solution. Especially as I have one. Just a matter of a receiver on the ESP32, which has natively BT
  • #19 19855287
    szaryczlowiek831
    Level 4  
    Posts: 54
    You have the ESP 32-wroom tiles. With wifi and BT only it costs a bit🙂

Topic summary

✨ The discussion revolves around the implementation of a Zigbee key fob as an alternative to traditional RFID cards for controlling hotel room circuits. The user seeks a solution that allows circuits to be switched off when leaving the room, similar to existing card systems. Various responses highlight the feasibility of using BLE (Bluetooth Low Energy) key fobs, which can periodically broadcast their presence, thus allowing for circuit control without the need for physical interaction. Concerns about detection reliability, security, and the integration of devices like the ESP32 for receiving BLE signals are also addressed. Suggestions include using beacons and considering the iBeacon technology, while emphasizing the importance of user authentication and the potential for low-energy solutions.
Generated by the language model.

FAQ

TL;DR: Use a BLE key‑fob plus an ESP32 scanner; absence is detected after 15–30 s, and "No radio solution will work immediately." Plan a short off‑delay for hotel‑style cutoffs. [Elektroda, TvWidget, post #19632250] Why it matters: This FAQ helps smart‑home DIYers replace bulky hotel card slots with reliable, low‑energy presence sensing to cut non‑essential circuits.

Quick Facts

What’s the simplest alternative to hotel RFID cards for auto-cutting power?

Use a BLE key fob that advertises every ~1 s and an ESP32 as the scanner. In a small room, presence is detected quickly; absence can be confirmed after about 30 s. Expect limited selectivity near doors. "With a broadcast period of 1 sec, the chances of it not being detected for 30 sec are negligible." [Elektroda, TvWidget, post #19632524]

Will it shut off instantly when I leave?

No. Radio presence can be detected quickly, but absence should be confirmed after 15–30 seconds. "No radio solution will work immediately." Build in a short off‑delay to avoid false cuts. [Elektroda, TvWidget, post #19632250]

How do I implement this with an ESP32?

Use BLE scanning and a whitelist.
  1. Enable BLE scanning and handle each advertising event.
  2. Filter by the tag’s MAC; update a last‑seen timer.
  3. On timeout, drive a relay/actor to cut circuits; on sighting, re‑energize. ESP32 exposes the sender MAC in advertisement data. [Elektroda, TvWidget, post #19632599]

Do I need to press a button on the BLE fob?

Not for beacons. "BLE devices, as a rule, periodically send information about their existence. Nothing needs to be pressed." Just scan for their advertising frames. [Elektroda, TvWidget, post #19632599]

Will anti‑lost iTag trackers work for this use?

Sometimes. Some anti‑lost tags only connect after you press a button, or maintain a connection and alarm on disconnect. Simple beacons are easier because they just advertise. Check your tag’s behavior before building. [Elektroda, TvWidget, post #19633088]

How can I limit detection to the door area?

Place the ESP32 receiver near the handle, where keys usually hang. That keeps the effective detection zone to about a 1 m radius, which reduces false presence deeper in the room. [Elektroda, austin007, post #19633053]

What off‑delay should I configure for cutting circuits?

Use approx. 30–60 seconds after the tag leaves. On arrival, energize immediately. This matches hotel key‑slot behavior and avoids nuisance cutoffs. You can shorten it when auto‑lighting is desired. [Elektroda, austin007, post #19632431]

What failure modes should I consider?

Two edge cases: strong RF interference might cause a rare 30 s miss, and approaching from outside can look like presence. Design with a delay and door‑area placement to mitigate both. [Elektroda, TvWidget, post #19632524]

Is filtering by MAC address secure enough?

It’s minimal security. Many tags use fixed MACs and fixed frames, which are easy to spoof. Some devices randomize addresses. Use authenticated connections and encryption if security is important. [Elektroda, TvWidget, post #19633088]

Can I just use my phone as the Bluetooth key?

Yes for 1–5 regular users. Pair the ESP device with the phone; when it connects, power on; when it leaves, cut off. BT activation takes about 3–5 taps. Risk: dead phone battery. Home Assistant with Sonoff Mini over Wi‑Fi is another option. [Elektroda, Szaryczlowiek83, post #19792920]

Does room size matter for BLE presence detection?

Small rooms are ideal for BLE beacons. With a short advertising interval and door‑area placement, presence is detected quickly. Be aware that approaching the door from outside can also register presence. [Elektroda, TvWidget, post #19632524]

What about using RFID instead of BLE?

HF RFID at 13.56 MHz can reach about 30 cm. A reader near the handle could work when keys are in the lock. The thread author still leans toward a 1 s BLE beacon plus ESP32 since it needs no action. [Elektroda, austin007, post #19854859]

Will ESP32 only see registered devices?

No. Scanning discovers all nearby devices and raises an event per advertising frame. Each frame includes the sender’s unique MAC, which you can whitelist in firmware. Only specialized beacons add authentication. [Elektroda, TvWidget, post #19634328]

Does iBeacon formatting matter on ESP32?

Not much for scanning. An iBeacon is just a specific advertising frame. ESP32 scans and parses frames regardless; authentication is not inherent to iBeacon. Use specialized beacons if you require auth. [Elektroda, TvWidget, post #19634328]
Generated by the language model.
ADVERTISEMENT