# Audio out Node, error "not allowed"

**URL:** https://discourse.nodered.org/t/audio-out-node-error-not-allowed/39323
**Category:** Dashboard
**Created:** [18 January 2021 10:29 UTC](https://discourse.nodered.org/t/audio-out-node-error-not-allowed/39323 "2021-01-18T10:29:23Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![maxmueller50](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maxmueller50/32/2621_2.png) [@maxmueller50](https://discourse.nodered.org/u/maxmueller50)
#### Post date: [18 January 2021 10:29 UTC](https://discourse.nodered.org/t/audio-out-node-error-not-allowed/39323/1 "2021-01-18T10:29:24Z")

</div>

Hi

my question, when I get this Error "not allowed" and why sometimes this function works?

the alarm will be generated at the first link the date/time has the same value 3 times "no data/update" and the second link is a Alarm (false/true) "no Battery/charge"

```auto
[
    {
        "id": "637d2bdf.cba3ac",
        "type": "function",
        "z": "998f3d00.013738",
        "name": "Alarm1",
        "func": "var timebefore = flow.get('timebefore');\nvar newtime = msg.payload;\nvar count = context.get('count')||0;\n\n//node.warn(\"last time: \" + timebefore);\n//node.warn(\"time aktuell: \" + newtime);\n\nif(newtime === timebefore) {\n count += 1;\n context.set('count',count);\n}\n else {\n count = 0;\n context.set('count',count); \n }\n\nif ( count === 3 ) {\n \n msg.alarm = true;\n count = 0; \n context.set('count',count);\n}\n else {\n msg.alarm = false;\n }\n \nmsg.count = count \ntimebefore=newtime;\nflow.set('timebefore', msg.payload);\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 280,
        "y": 580,
        "wires": [
            [
                "4b631511.8bd004",
                "3daa8f10.ed8258"
            ]
        ]
    },
    {
        "id": "3daa8f10.ed8258",
        "type": "debug",
        "z": "998f3d00.013738",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "x": 470,
        "y": 520,
        "wires": []
    },
    {
        "id": "34c56514.13ff6a",
        "type": "link in",
        "z": "998f3d00.013738",
        "name": "",
        "links": [
            "ac421d25.aa4088"
        ],
        "x": 155,
        "y": 580,
        "wires": [
            [
                "637d2bdf.cba3ac"
            ]
        ]
    },
    {
        "id": "4b631511.8bd004",
        "type": "switch",
        "z": "998f3d00.013738",
        "name": "Meldung",
        "property": "alarm",
        "propertyType": "msg",
        "rules": [
            {
                "t": "true"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 440,
        "y": 580,
        "wires": [
            [
                "f9ef1873.a934d8"
            ]
        ]
    },
    {
        "id": "b0c8f61c.c78218",
        "type": "ui_toast",
        "z": "998f3d00.013738",
        "position": "dialog",
        "displayTime": "3",
        "highlight": "",
        "sendall": true,
        "outputs": 1,
        "ok": "OK",
        "cancel": "",
        "raw": false,
        "topic": "",
        "name": "WeatherData FAIL",
        "x": 830,
        "y": 640,
        "wires": [
            [
                "40b60915.6cf19"
            ]
        ]
    },
    {
        "id": "2d5fc592.6ab3e2",
        "type": "inject",
        "z": "998f3d00.013738",
        "name": "",
        "topic": "",
        "payload": "145",
        "payloadType": "num",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 130,
        "y": 760,
        "wires": [
            []
        ]
    },
    {
        "id": "4ab9d7d7.3b1c4",
        "type": "template",
        "z": "998f3d00.013738",
        "name": "Alarm1",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "Attention attention please \nno Data - update\nno Data - update any more",
        "output": "str",
        "x": 600,
        "y": 640,
        "wires": [
            [
                "a36d9476.1c27b8",
                "b0c8f61c.c78218"
            ]
        ]
    },
    {
        "id": "e9399b1b.2ce83",
        "type": "inject",
        "z": "998f3d00.013738",
        "name": "Test",
        "topic": "",
        "payload": "Test",
        "payloadType": "str",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 390,
        "y": 640,
        "wires": [
            [
                "f9ef1873.a934d8"
            ]
        ]
    },
    {
        "id": "f2903da.de4484",
        "type": "link in",
        "z": "998f3d00.013738",
        "name": "Batt Alarm",
        "links": [
            "a404769b.a1c1e"
        ],
        "x": 655,
        "y": 700,
        "wires": [
            [
                "a36d9476.1c27b8"
            ]
        ]
    },
    {
        "id": "40b60915.6cf19",
        "type": "function",
        "z": "998f3d00.013738",
        "name": "reset",
        "func": "msg.reset = true;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 1050,
        "y": 640,
        "wires": [
            [
                "f9ef1873.a934d8"
            ]
        ]
    },
    {
        "id": "f9ef1873.a934d8",
        "type": "trigger",
        "z": "998f3d00.013738",
        "op1": "Meldung",
        "op2": "0",
        "op1type": "str",
        "op2type": "str",
        "duration": "-3",
        "extend": false,
        "units": "min",
        "reset": "",
        "bytopic": "all",
        "name": "Alarm",
        "x": 590,
        "y": 580,
        "wires": [
            [
                "4ab9d7d7.3b1c4"
            ]
        ]
    },
    {
        "id": "a36d9476.1c27b8",
        "type": "ui_audio",
        "z": "998f3d00.013738",
        "name": "Alarm",
        "group": "d05bc92c.1c937",
        "voice": "en-US",
        "always": false,
        "x": 830,
        "y": 700,
        "wires": []
    },
    {
        "id": "d05bc92c.1c937",
        "type": "ui_group",
        "z": "",
        "name": "Clock in Toolbar",
        "tab": "1c488775.b324b1",
        "order": 7,
        "disp": false,
        "width": "6",
        "collapse": false
    },
    {
        "id": "1c488775.b324b1",
        "type": "ui_tab",
        "z": "",
        "name": "Weather",
        "icon": "dashboard",
        "order": 2,
        "disabled": false,
        "hidden": false
    }
]

```

---

<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: [18 January 2021 14:49 UTC](https://discourse.nodered.org/t/audio-out-node-error-not-allowed/39323/2 "2021-01-18T14:49:40Z")

</div>

I don't understand the issue, could you explain it a little more

---

<div class="post-metadata">

### Author: ![maxmueller50](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maxmueller50/32/2621_2.png) [@maxmueller50](https://discourse.nodered.org/u/maxmueller50)
#### Post date: [18 January 2021 17:14 UTC](https://discourse.nodered.org/t/audio-out-node-error-not-allowed/39323/3 "2021-01-18T17:14:04Z")

</div>

the "audio out Node" (dashboard) sometime it speak on the dashboard and sometime it give "Error: not alowed"  
I cannot determine what is causing this error or where it is coming from

 ![Node-Red_Alarm-message](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/c/0c6b3ae11d20e2d4d6d4fc033455093a1b2e20d4.png)

thank you for your help

---

<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: [18 January 2021 17:29 UTC](https://discourse.nodered.org/t/audio-out-node-error-not-allowed/39323/4 "2021-01-18T17:29:48Z")

</div>

a lot of browsers these days block audio output by default unless the users does something... it may have to be enabled, it may just require a click, depends on the browser.

---

<div class="post-metadata">

### Author: ![maxmueller50](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maxmueller50/32/2621_2.png) [@maxmueller50](https://discourse.nodered.org/u/maxmueller50)
#### Post date: [18 January 2021 18:12 UTC](https://discourse.nodered.org/t/audio-out-node-error-not-allowed/39323/5 "2021-01-18T18:12:02Z")

</div>

its MacOS 11.1 where I doing editing NodeRed is running on a Raspberry Pi4 and the dashboard is on a Android tablet... it very shadowy

---

<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: [17 February 2021 18:12 UTC](https://discourse.nodered.org/t/audio-out-node-error-not-allowed/39323/6 "2021-02-17T18:12:08Z")

</div>

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