# Dashboard button + Wake-On-LAN

**URL:** <https://discourse.nodered.org/t/dashboard-button-wake-on-lan/49853>\
**Category:** Dashboard\
**Created:** [17 August 2021 18:20 UTC](https://discourse.nodered.org/t/dashboard-button-wake-on-lan/49853 "2021-08-17T18:20:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![daxliniere](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daxliniere/32/42187_2.png) [@daxliniere](https://discourse.nodered.org/u/daxliniere)\
**Post date:** [17 August 2021 18:20 UTC](https://discourse.nodered.org/t/dashboard-button-wake-on-lan/49853/1 "2021-08-17T18:20:45Z")

</div>

Hey gang,  
I realise this is a kinda rudimentary question, but I'm hoping to learn how to understand this.

The notes for the Wake-On-LAN module say you can use **msg.mac** to pass the MAC address. How would I set a dashboard button to transmit this, please?

My end-goal is to have several buttons all able to trigger the WOL module. (I know I could use multiple WOL modules (I currently am), but I really want to understand more about this.)

Thank you!  
Dax.

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [17 August 2021 19:10 UTC](https://discourse.nodered.org/t/dashboard-button-wake-on-lan/49853/2 "2021-08-17T19:10:20Z")

</div>

In the button properties you can enter the mac address in the payload box.  
After that you need a change node that sets the msg.mac to msg.payload.  
And your done.  
Example (not tested):

```auto
[{"id":"2d4566747e14bec3","type":"wake on lan","z":"8b114306.e05788","mac":"","host":"","udpport":9,"name":"","x":640,"y":260,"wires":[]},{"id":"0547dd749ccb5cef","type":"ui_button","z":"8b114306.e05788","name":"","group":"c010f2313b5ccc9a","order":2,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"00:12:23:45:67:89:0A:BC","payloadType":"str","topic":"topic","topicType":"msg","x":220,"y":260,"wires":[["d6bccdde09a7447c"]]},{"id":"d6bccdde09a7447c","type":"change","z":"8b114306.e05788","name":"","rules":[{"t":"set","p":"mac","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":260,"wires":[["2d4566747e14bec3"]]},{"id":"c010f2313b5ccc9a","type":"ui_group","name":"Buttons","tab":"52ab180bee78bc5a","order":2,"disp":false,"width":"4","collapse":false},{"id":"52ab180bee78bc5a","type":"ui_tab","name":"Tuin","icon":"icofont-map","order":25,"disabled":false,"hidden":false}]

```

![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/4/6452b638d1ca4e10646881b39e861fd908a2fa09.png)

---

<div class="post-metadata">

**Author:** ![daxliniere](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/daxliniere/32/42187_2.png) [@daxliniere](https://discourse.nodered.org/u/daxliniere)\
**Post date:** [18 August 2021 21:58 UTC](https://discourse.nodered.org/t/dashboard-button-wake-on-lan/49853/3 "2021-08-18T21:58:37Z")

</div>

Ahh, I see. Thank you @edje11.

> set the msg.mac to msg.payload

That is really great to know. I've run into similar problems in the past and had to figure out a different way around them. This is excellent.  
In this case I was trying to do something like setting the dashboard button's payload setting to .msg.mac, which I guess is payload.msg.mac, hence the malformed output.

Thanks again for taking the time to help me with this, I really appreciate it.

All the best!  
Dax.

---

<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:** [1 September 2021 21:58 UTC](https://discourse.nodered.org/t/dashboard-button-wake-on-lan/49853/4 "2021-09-01T21:58:53Z")

</div>

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