# Ui Dashboard Notification Pop-Up PROBLEM

**URL:** <https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815>\
**Category:** Dashboard\
**Created:** [25 July 2018 19:22 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815 "2018-07-25T19:22:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [25 July 2018 19:22 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/1 "2018-07-25T19:22:16Z")

</div>

I'm viewing my dashboard on another PC besides the PC which runs Node-Red under Windows 10. The Notification Pop-Up will only display on the PC which Node-Red is hosted, Not the PC which hosts the Dashboard browser.

Please fix the references such that the Dashboard in another browser on a remote PC can display the notification properly. Or, is there something else wrong?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [25 July 2018 19:37 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/2 "2018-07-25T19:37:21Z")

</div>

In general, if (say) one dashboard presses a button that then causes a notification. The notification will go to that dashboard. If it’s generated centrally it will go to all dashboards.

There is a msg property (something like msg.sessionid but you will need a debug node to check) on any event coming from a dashboard. Deleting that (with a change node) will let the notification go to all rather than just back to that session.

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [25 July 2018 19:44 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/3 "2018-07-25T19:44:00Z")

</div>

it did not do that. I tried it again, now it's popping up on the other PC and not the Hosting PC.... Your saying it's supposed to generate a pop-up for BOTH PC's, Or is it only going to pop up on the initial PC? I'm confused as something isn't working as understood.  
Kind Regards,

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [25 July 2018 19:53 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/4 "2018-07-25T19:53:23Z")

</div>

It had actually quit working and not pop up after I attempted the Node-Red hosting PC. This was the opposite of the earlier... Then it quit popping up at all, for either PC. I then restarted Node-Red and it now at least works for the Node-Red Host PC.

Is it browser specific? I was using Firefox.

I checked the message msg. BEFORE and AFTER  
Before =  
{"templateScope":"local","topic":"Item 1","payload":"123","socketid":"lbBRMjizLziUe\_lKAAAA","\_msgid":"e1408cc9.833a8"}

After =  
{"templateScope":"local","topic":"Item 1","payload":"OK","socketid":"lbBRMjizLziUe\_lKAAAA","\_msgid":"e1408cc9.833a8"}

I deleted the "socketid" and it seems to work as you described. How do you get rid of the box on the other computer when you clicked OK on the first? Now I have a pop-up box on the PC hanging out there.  
That's a problem....

Now I do not delete the "socketid" and both PCs generate a pop-up on only one PC, Not the one which the button was pressed on... in this case the PC which is not hosting Node-Red... Notification should pop-up on both, but either PC which closes the pop-up should close the pop-up on BOTH PC's... How can this be done?

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [25 July 2018 21:13 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/5 "2018-07-25T21:13:31Z")

</div>

If I can understand things properly the ui notification runs on ui\_toast.js and then there isn't any legal option to close any opened dialog from other source than buttons if dialog is OK/CANCEL dialog or timer option for toaster type of notification.  
Some kind of external closing option might be handy at least for OK dialog type I guess?

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [26 July 2018 12:30 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/6 "2018-07-26T12:30:52Z")

</div>

toast? what? ui\_toast? are you joking?

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [26 July 2018 12:35 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/7 "2018-07-26T12:35:32Z")

</div>

There may be a way for this to work if I can get a banner object to turn RED and then click on it to cancel the alarms globally.

But, the problem is that the POP-UP does NOT present itself on the correct PC. It shows on THE OTHER ONE.

I'm not sure why or how to control it, I will need to not use the "Notification" because it is NOT predictable.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [26 July 2018 12:55 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/8 "2018-07-26T12:55:46Z")

</div>

For me, a notification shows up on all machines using the dashboard IF it is generated from an inject. However, if the same notification node is powered by say a button on the dashboard, then it only shows up on the machine that the button was pressed on.

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [26 July 2018 13:27 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/9 "2018-07-26T13:27:56Z")

</div>

zenofmud,  
Thank you for your input. I did not note these differences between flow logic and page logic. I shall try to see if I can use your advice in a test.

using the ui\_button, it needs to be flow logic. Can you give me an example of perhaps how you implemented the ui\_template code to drive the ui\_notification? or how you did it?

This might be how to use the notification. I am getting mixed and irregular results depending on when and where buttons are pressed on either machine. Currently the pop-up is done through the logic and not related to the screen actions. I'll certainly try on-screen button action type notification and apply it to reacting to a globally advised alert window.

Thank you,

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [26 July 2018 17:21 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/10 "2018-07-26T17:21:23Z")

</div>

I’ll send you my flow when I get home

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [26 July 2018 19:11 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/11 "2018-07-26T19:11:23Z")

</div>

zenofmud,  
Thanks, I really appreciate the help.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [26 July 2018 20:58 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/12 "2018-07-26T20:58:27Z")

</div>

Here you go

```auto
[{"id":"b9c85da8.f441b","type":"inject","z":"2db9913e.2559a6","name":"","topic":"","payload":"test notice","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":300,"y":160,"wires":[["5c914892.5f8b6"]]},{"id":"5c914892.5f8b6","type":"ui_toast","z":"2db9913e.2559a6","position":"dialog","displayTime":"5","highlight":"","outputs":1,"ok":"OK","cancel":"","topic":"","name":"","x":710,"y":160,"wires":[[]]},{"id":"b38eb91.22ff8c8","type":"ui_button","z":"2db9913e.2559a6","name":"","group":"b1155bbb.d9b25","order":0,"width":0,"height":0,"passthru":false,"label":"button","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":300,"y":100,"wires":[["9fcfcf98.dd3f98"]]},{"id":"9fcfcf98.dd3f98","type":"change","z":"2db9913e.2559a6","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"ALERT the sky is falling","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":100,"wires":[["5c914892.5f8b6"]]},{"id":"1c23ea91.61b095","type":"ui_form","z":"2db9913e.2559a6","name":"","label":"","group":"b1155bbb.d9b25","order":0,"width":0,"height":0,"options":[{"label":"Name","value":"name","type":"text","required":true}],"formValue":{"name":""},"payload":"","submit":"submit","cancel":"cancel","topic":"","x":450,"y":220,"wires":[["5c914892.5f8b6"]]},{"id":"b1155bbb.d9b25","type":"ui_group","z":"","name":"Default","tab":"9231c931.938578","disp":true,"width":"6","collapse":false},{"id":"9231c931.938578","type":"ui_tab","z":"","name":"Home","icon":"dashboard"}]

```

---

<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:** [27 July 2018 09:37 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/13 "2018-07-27T09:37:23Z")

</div>

> [@tree-frog](#):
>
> I am getting mixed and irregular results depending on when and where buttons are pressed on either machine.

Are you remembering to do a full browser refresh (possibly CTRL+F5) on both systems whenever you change the flow? Otherwise the browser may not be running the latest version of the page.

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [27 July 2018 13:30 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/14 "2018-07-27T13:30:44Z")

</div>

Colin, Perhaps...  
I downloaded the example from zenofmud and started it this morning. It seemed very simple and worked on both machines... I'll have to go back and see if something like updating the browser will address the apparent funkyness where pop-ups are random and seemed arbitrary.

Thanks.

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [27 July 2018 14:38 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/15 "2018-07-27T14:38:48Z")

</div>

After poking around I identified the problem !!!

the ui\_template code (replaced leading "\<" with "\>")

```
  >md-input-container style="overflow:hidden;">
      >span> 
   >input ng-model="user.input" 
          style="width:150px" 
          placeholder={{msg.topic}}>
              >button class="bluebutton" 
              ng-click="msg.payload = user.input; send(msg)" 
              ng-keypress="($event.charCode==13)?msg.payload = user.input; send(msg)" 
              ngstyle="{background-color: #008CBA;}" 
              style="color: #fff;
                  background-color: #5bc0de;
                  border-color: #46b8da;">Ok
              >/button>
         >/span>
  >/md-input-container>

```

will return the first "socketid: "ABCDE...."

Then if it is run in the other PC the ui\_template will send the exact same "socketid" value.

Then the behavior is modified. Now, if you refresh the browser, it obtains a new "socketid" and neither of the machines will show the pop-up.

I'm not sure how to get the current "socketid" from the browser which is displaying the information such that  
the correct "socketid" is maintained as if I only used the dashboard widgets and not the ui\_template?

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [27 July 2018 15:03 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/16 "2018-07-27T15:03:36Z")

</div>

dceejay,  
I found the problem. the ui\_template (look in the template HTML above) will not update the "socketid". It will do it for the first page, either one will do exactly the same on first attempt, but it will not update it thereafter.

How do I get the "socketid" information and force the update from the proper socket?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [27 July 2018 15:05 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/17 "2018-07-27T15:05:18Z")

</div>

Still on vacation so not looking at anything until 10th.

What does a “normal “ button (or other ui element) send ? The id should be on msg.socketid

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [27 July 2018 15:09 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/18 "2018-07-27T15:09:38Z")

</div>

Using a ui\_template for a widget. How do I force the proper update of "socketid" from the PC and web browser which button is being pressed?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [27 July 2018 15:37 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/19 "2018-07-27T15:37:41Z")

</div>

@tree-frog you don't need to reply to individual contributors to this thread with the same question. It's a single thread of conversation and anyone reading it will see your questions.

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [27 July 2018 16:06 UTC](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815/20 "2018-07-27T16:06:10Z")

</div>

knolleary,  
Thanks, I tried to find where to include everyone on the reply.. anyway...

I found the problem with the notification acting incorrectly from the ui\_template.  
After some googling and going back to the ui\_template form...

[.] Pass through messages from input.  
[v] Add output messages to stored state. **\<--- WRONG SETTING!**

The second item; "Add output messages to store state" was Checked....

**Unchecking it solved the problem...**

On future updates this would be fair to EXPLAIN the behavior... If it is checked and the web page is updated, then the socketid won't match and the pop-up will fail to show anywhere.

[Next page](https://discourse.nodered.org/t/ui-dashboard-notification-pop-up-problem/1815.md?page=2)
