marelab / rfid-door-node-red

A complete Node Red Web Control to monitor & control multiple rfid-door hardware devices
14 stars 7 forks source link

Multiple doors... #1

Open arretx opened 5 years ago

arretx commented 5 years ago

So I'm wondering about adding multiple doors to the system.

For each door, I would presume I need to set the topic to something like:

mag_door/door1 mag_door/door2

Etc...

Then, in the NodeRED flow, I would set the MQTT out nodes all to the mag_door/ topic, and the door1, door2, etc., will become the list of doors?

marelab commented 5 years ago

It should be handelt over the msg itself that contains the src ip adress of the device. This is then parsed in the flow and used in the further process logic. Sending from the flow is quite the same for openening a door the dest. IP is included. All devices recv. this message but only the one with the same IP Adress reacts. Its made like that because I wanted that the flow hasn't to to be edited when new devices are setup (adding new topic listeners to it). Surely it could be implemented like your description but the logic to setup topics automatic would be lot hard to implement under node-red.

arretx commented 5 years ago

So, all of my rfid devices can have the same topic and then the IP address and the device's host name become unique identifiers.

One of the things I've noticed is that we have one of two options in this setup. 1. Momentary. 2. Continuous. If I set the lock to momentary, I have no way to switch the relay to a "hold" position. If I set the lock to continuous, I can control timing with node red logic, but since the same messsage is used to open the lock as is used to close the lock, there doesn't seem to be a way to establish what the state of the lock is. We can determine the state of the door using a switch, but not the state of the lock. So, if I manually trip the lock from Home Assistant and it's continuous, then the RFID becomes out of sync and reverses its function. Any idea how to handle that?

marelab commented 5 years ago

I will look the next day at that issue. First idea would be to implement different messages for open and close that would solve the problem.

Am Mi., 3. Juli 2019 um 17:32 Uhr schrieb Jon Griffith < notifications@github.com>:

So, all of my rfid devices can have the same topic and then the IP address and the device's host name become unique identifiers.

One of the things I've noticed is that we have one of two options in this setup. 1. Momentary. 2. Continuous. If I set the lock to momentary, I have no way to switch the relay to a "hold" position. If I set the lock to continuous, I can control timing with node red logic, but since the same messsage is used to open the lock as is used to close the lock, there doesn't seem to be a way to establish what the state of the lock is. We can determine the state of the door using a switch, but not the state of the lock. So, if I manually trip the lock from Home Assistant and it's continuous, then the RFID becomes out of sync and reverses its function. Any idea how to handle that?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/marelab/rfid-door-node-red/issues/1?email_source=notifications&email_token=AB2OVHZ5PLPHIJOBHFTLTXDP5TBCRA5CNFSM4H3XGM72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZE2T7Q#issuecomment-508144126, or mute the thread https://github.com/notifications/unsubscribe-auth/AB2OVHY2HVVEBU2QKZJ3FITP5TBCRANCNFSM4H3XGM7Q .

arretx commented 5 years ago

I would think it would...but wouldn't there still need to be a way to sync that up? Would we need to retain the information in MQTT to keep the status update correct?

sstratford commented 4 years ago

Hey Guys,

i got it up and running today, is there a patch/fix to have diffrent keys on diffrent doors ?

Means:

key1 : door 1 Key2: door 1,2,4 key3: all key4: door 3,4

?? I could imagin how to do, but i am totaly new to node-red...

greets Steven