# Node red dashboard using relays and authentication using badhe scans

**URL:** https://discourse.nodered.org/t/node-red-dashboard-using-relays-and-authentication-using-badhe-scans/95643
**Category:** Dashboard
**Tags:** node-red-dashboard, function-node, dashboard-2
**Created:** [25 February 2025 16:28 UTC](https://discourse.nodered.org/t/node-red-dashboard-using-relays-and-authentication-using-badhe-scans/95643 "2025-02-25T16:28:08Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![qureshi](https://avatars.discourse-cdn.com/v4/letter/q/e19adc/32.png) [@qureshi](https://discourse.nodered.org/u/qureshi)
#### Post date: [25 February 2025 16:28 UTC](https://discourse.nodered.org/t/node-red-dashboard-using-relays-and-authentication-using-badhe-scans/95643/1 "2025-02-25T16:28:08Z")

</div>

Hey guys.  
This is probably going to be a really simple question for most of you and i would appreciate the help.  
So I'm trying to build a simple dashboard to automate a Vending machine.  
I initially want the user to scan their badge  
if its the right length of characters, only then should it show the door number listed 1-16 and they should be able to make a selection of the door/touch the button.  
If its wrong i want it to display a message saying Please scan your badge again.  
I don't want this text to be visible until/unless the verification process deems it wrong.

I got the verification procees down using the funtion node and switch but then after that its about nothing. I am using a relay to contrl the doors in the vending machine and i have that part settled too

Ill attach what i have so far for refference

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/9/c901eb8389c8ec467cb0585e03cf7e1622eabf5f.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/4/d493a4c8734cfd35661c3d195a0e43613966b02b.png)

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [25 February 2025 16:48 UTC](https://discourse.nodered.org/t/node-red-dashboard-using-relays-and-authentication-using-badhe-scans/95643/2 "2025-02-25T16:48:26Z")

</div>

Welcome to the forum @qureshi.

It's a bit hard to tell what your two flow pictures are supposed to be doing.

I can see you have a text input "Enter Badge#" wired up to a function node and then a button.  
Can you explain what this button is for?

On the other picture you have a ui-control and 16 buttons; one for each door, and each connected to a function node. How do these buttons & functions relate to the verification flow?

Which part are you having problems with?  
Do you see any error messages?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [25 February 2025 17:05 UTC](https://discourse.nodered.org/t/node-red-dashboard-using-relays-and-authentication-using-badhe-scans/95643/3 "2025-02-25T17:05:10Z")

</div>

Is the question you are asking "How can I hide and show widgets on the dashboard"?

---

<div class="post-metadata">

### Author: ![qureshi](https://avatars.discourse-cdn.com/v4/letter/q/e19adc/32.png) [@qureshi](https://discourse.nodered.org/u/qureshi)
#### Post date: [25 February 2025 17:14 UTC](https://discourse.nodered.org/t/node-red-dashboard-using-relays-and-authentication-using-badhe-scans/95643/4 "2025-02-25T17:14:25Z")

</div>

Yes.  
I want to hide and show based on what the user inputs

---

<div class="post-metadata">

### Author: ![qureshi](https://avatars.discourse-cdn.com/v4/letter/q/e19adc/32.png) [@qureshi](https://discourse.nodered.org/u/qureshi)
#### Post date: [25 February 2025 17:17 UTC](https://discourse.nodered.org/t/node-red-dashboard-using-relays-and-authentication-using-badhe-scans/95643/5 "2025-02-25T17:17:20Z")

</div>

The button is pretty much useless right now. It it just there for the user to click/select when they enter the badge ID.  
The buttons and functions are something I want to hide until the user is verified.  
Once he is, I want the buttons to show on the dashboard and the user should be able to make the selection

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [25 February 2025 21:02 UTC](https://discourse.nodered.org/t/node-red-dashboard-using-relays-and-authentication-using-badhe-scans/95643/6 "2025-02-25T21:02:47Z")

</div>

If you are just setting out on this project you might want to consider dropping the old (deprecated) node-red-dashboard and moving to the new @flowfuse/node-red-dashboard.

For the popup message you can use a Notification node, and you can use CSS to show/hide the buttons.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [27 March 2025 21:02 UTC](https://discourse.nodered.org/t/node-red-dashboard-using-relays-and-authentication-using-badhe-scans/95643/7 "2025-03-27T21:02:58Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
