Anytime Help Center

Muse Automator HTTP Example

Rating

​​Question:

​​How can Muse Automator be used to create a web page?


Answer:​

Import the code snippet​ below into Muse Automator to see an example project.​




[
    {
        "id": "2813caf20c766246",
        "type": "tab",
        "label": "Main",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "afbf01ed9f19065d",
        "type": "group",
        "z": "2813caf20c766246",
        "name": "WebSocket",
        "style": {
            "label": true
        },
        "nodes": [
            "3971443558d6f473",
            "7eecabf004488be9",
            "024a8036698609b5",
            "d1f09c36e49d811d",
            "4140eec62cde52d7",
            "b0c87b02ee69502e",
            "9de9e4edda4a0f04",
            "6136cd14cc83e9b4",
            "058ead1c80c9c06d",
            "49d126c290c7b0f7",
            "35c64704761ca8f2",
            "3ccbd527455376e1",
            "4f29fc422a43af1f",
            "a43395bf3f201467",
            "a267d0d36a06d1fb",
            "253f1a2e71aad1cc",
            "43331ec4199e4fb4"
        ],
        "x": 74,
        "y": 299,
        "w": 892,
        "h": 682
    },
    {
        "id": "355ed91389a40e9e",
        "type": "group",
        "z": "2813caf20c766246",
        "name": "Host HTML GUI web page",
        "style": {
            "label": true
        },
        "nodes": [
            "9328b81587f9c26c",
            "c3d2de102273175e",
            "9be0ef251ac41482",
            "26873b319cb636f8",
            "cd559cb4dca34dce"
        ],
        "x": 74,
        "y": 99,
        "w": 752,
        "h": 162
    },
    {
        "id": "c1a4cfc3de0f0bfd",
        "type": "group",
        "z": "2813caf20c766246",
        "name": "Temperature increment / decrement",
        "style": {
            "label": true
        },
        "nodes": [
            "d5acc87fffa23247",
            "560b068f31b3c825",
            "adc0fab356e27555",
            "c7073fd6e67190c1",
            "327eea42a6ec4788",
            "c3e1f84467e16d47",
            "0f21a278b2ef1d0c",
            "837160be48ee9d7c",
            "f1d801be317a88fd",
            "8f8dd7f98dda3614",
            "1048ae6661c58d49",
            "7035bb46556d13aa",
            "1dd503e9325d5ecf"
        ],
        "x": 74,
        "y": 1019,
        "w": 892,
        "h": 242
    },
    {
        "id": "16d3a0681b023325",
        "type": "websocket-listener",
        "path": "/ws/myui",
        "wholemsg": "true"
    },
    {
        "id": "9328b81587f9c26c",
        "type": "http in",
        "z": "2813caf20c766246",
        "g": "355ed91389a40e9e",
        "name": "",
        "url": "/myui",
        "method": "get",
        "upload": false,
        "swaggerDoc": "",
        "x": 160,
        "y": 180,
        "wires": [
            [
                "9be0ef251ac41482",
                "26873b319cb636f8"
            ]
        ]
    },
    {
        "id": "c3d2de102273175e",
        "type": "http response",
        "z": "2813caf20c766246",
        "g": "355ed91389a40e9e",
        "name": "",
        "statusCode": "",
        "headers": {},
        "x": 750,
        "y": 180,
        "wires": []
    },
    {
        "id": "9be0ef251ac41482",
        "type": "debug",
        "z": "2813caf20c766246",
        "g": "355ed91389a40e9e",
        "name": "debug HTTP GET",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 410,
        "y": 220,
        "wires": []
    },
    {
        "id": "26873b319cb636f8",
        "type": "template",
        "z": "2813caf20c766246",
        "g": "355ed91389a40e9e",
        "name": "AI Generated UI (Human Modified)",
        "field": "payload",
        "fieldType": "msg",
        "format": "handlebars",
        "syntax": "mustache",
        "template": "\n\n    \n        \n        \n        Conference Room Control\n    \n\n    \n        
\n
\n

Conference Room A

\n
\n
\n\n \n\n
\n
\n

Current Meeting

\n
\n

Title: Project Alpha Review

\n

Organizer: Jane Doe

\n

Time Remaining: 1h 30m

\n \n \n
\n

Upcoming Meetings

\n
    \n
  • \n 10:00 AM - 11:00 AM: Team Standup\n \n
  • \n
  • \n 11:30 AM - 1:00 PM: Client Presentation\n \n
  • \n
\n
\n\n
\n

Audio Visual Control

\n
\n
\n

Display Source

\n \n \n
\n
\n

Volume

\n \n
\n \n \n
\n
\n
\n

Camera Control

\n \n \n \n \n
\n
\n

Microphones

\n \n \n
\n
\n
\n\n
\n

Room Settings

\n
\n
\n

Lighting

\n \n \n \n
\n
\n

Shades

\n \n \n
\n
\n

Temperature

\n \n \n

--°F

\n
\n
\n
\n
\n
\n \n\n \n\n \n", "output": "str", "x": 460, "y": 180, "wires": [ [ "c3d2de102273175e" ] ] }, { "id": "3971443558d6f473", "type": "websocket in", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "WS from GUI", "server": "16d3a0681b023325", "client": "", "x": 170, "y": 340, "wires": [ [ "7eecabf004488be9", "35c64704761ca8f2" ] ] }, { "id": "7eecabf004488be9", "type": "debug", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "debug WebSocket", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 830, "y": 340, "wires": [] }, { "id": "024a8036698609b5", "type": "switch", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "AV Control", "property": "type", "propertyType": "msg", "rules": [ { "t": "eq", "v": "Source", "vt": "str" }, { "t": "eq", "v": "Volume", "vt": "str" }, { "t": "eq", "v": "Mute", "vt": "str" }, { "t": "eq", "v": "Camera", "vt": "str" }, { "t": "eq", "v": "Microphone", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 5, "x": 410, "y": 520, "wires": [ [ "4140eec62cde52d7" ], [ "d1f09c36e49d811d" ], [ "b0c87b02ee69502e" ], [ "058ead1c80c9c06d" ], [ "49d126c290c7b0f7" ] ] }, { "id": "d1f09c36e49d811d", "type": "debug", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "Volume", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "true", "targetType": "full", "statusVal": "value", "statusType": "msg", "x": 800, "y": 460, "wires": [] }, { "id": "4140eec62cde52d7", "type": "debug", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "Source", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "true", "targetType": "full", "statusVal": "value", "statusType": "msg", "x": 800, "y": 400, "wires": [] }, { "id": "b0c87b02ee69502e", "type": "debug", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "Mute", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "true", "targetType": "full", "statusVal": "value", "statusType": "msg", "x": 790, "y": 520, "wires": [] }, { "id": "9de9e4edda4a0f04", "type": "websocket out", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "", "server": "16d3a0681b023325", "client": "", "x": 810, "y": 900, "wires": [] }, { "id": "6136cd14cc83e9b4", "type": "inject", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "Update Temperature Text", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "TemperatureText", "payload": "102", "payloadType": "str", "x": 230, "y": 900, "wires": [ [ "9de9e4edda4a0f04" ] ] }, { "id": "058ead1c80c9c06d", "type": "debug", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "Camera", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "true", "targetType": "full", "statusVal": "value", "statusType": "msg", "x": 800, "y": 580, "wires": [] }, { "id": "49d126c290c7b0f7", "type": "debug", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "Microphone", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "true", "targetType": "full", "statusVal": "value", "statusType": "msg", "x": 810, "y": 640, "wires": [] }, { "id": "35c64704761ca8f2", "type": "switch", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "Page", "property": "page", "propertyType": "msg", "rules": [ { "t": "eq", "v": "AV Control", "vt": "str" }, { "t": "eq", "v": "Room Settings", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 210, "y": 640, "wires": [ [ "024a8036698609b5" ], [ "3ccbd527455376e1" ] ] }, { "id": "3ccbd527455376e1", "type": "switch", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "Room Settings", "property": "type", "propertyType": "msg", "rules": [ { "t": "eq", "v": "Lighting", "vt": "str" }, { "t": "eq", "v": "Shades", "vt": "str" }, { "t": "eq", "v": "Temperature", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 3, "x": 420, "y": 760, "wires": [ [ "4f29fc422a43af1f" ], [ "a43395bf3f201467" ], [ "253f1a2e71aad1cc", "a267d0d36a06d1fb" ] ] }, { "id": "4f29fc422a43af1f", "type": "debug", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "Lighting", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "true", "targetType": "full", "statusVal": "value", "statusType": "msg", "x": 800, "y": 700, "wires": [] }, { "id": "a43395bf3f201467", "type": "debug", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "Shades", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "true", "targetType": "full", "statusVal": "value", "statusType": "msg", "x": 800, "y": 760, "wires": [] }, { "id": "a267d0d36a06d1fb", "type": "debug", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "Temperature", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "true", "targetType": "full", "statusVal": "value", "statusType": "msg", "x": 810, "y": 820, "wires": [] }, { "id": "d5acc87fffa23247", "type": "switch", "z": "2813caf20c766246", "g": "c1a4cfc3de0f0bfd", "name": "Bound to range", "property": "payload", "propertyType": "msg", "rules": [ { "t": "btwn", "v": "60", "vt": "num", "v2": "85", "v2t": "num" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 620, "y": 1080, "wires": [ [ "adc0fab356e27555" ] ] }, { "id": "560b068f31b3c825", "type": "change", "z": "2813caf20c766246", "g": "c1a4cfc3de0f0bfd", "name": "Increment Temperature", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "temperature", "tot": "flow", "dc": true }, { "t": "set", "p": "payload", "pt": "msg", "to": "payload + 1", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 390, "y": 1060, "wires": [ [ "d5acc87fffa23247" ] ] }, { "id": "adc0fab356e27555", "type": "change", "z": "2813caf20c766246", "g": "c1a4cfc3de0f0bfd", "name": "Store new value", "rules": [ { "t": "set", "p": "temperature", "pt": "flow", "to": "payload", "tot": "msg" }, { "t": "set", "p": "topic", "pt": "msg", "to": "TemperatureText", "tot": "str" }, { "t": "set", "p": "temperature", "pt": "msg", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 810, "y": 1080, "wires": [ [ "f1d801be317a88fd" ] ] }, { "id": "c7073fd6e67190c1", "type": "change", "z": "2813caf20c766246", "g": "c1a4cfc3de0f0bfd", "name": "Decrement Temperature", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "temperature", "tot": "flow" }, { "t": "set", "p": "payload", "pt": "msg", "to": "payload - 1", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 390, "y": 1100, "wires": [ [ "d5acc87fffa23247" ] ] }, { "id": "327eea42a6ec4788", "type": "switch", "z": "2813caf20c766246", "g": "c1a4cfc3de0f0bfd", "name": "", "property": "value", "propertyType": "msg", "rules": [ { "t": "eq", "v": "up", "vt": "str" }, { "t": "eq", "v": "down", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 200, "y": 1080, "wires": [ [ "560b068f31b3c825" ], [ "c7073fd6e67190c1" ] ] }, { "id": "c3e1f84467e16d47", "type": "inject", "z": "2813caf20c766246", "g": "c1a4cfc3de0f0bfd", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": "1", "topic": "", "payload": "true", "payloadType": "bool", "x": 170, "y": 1220, "wires": [ [ "0f21a278b2ef1d0c" ] ] }, { "id": "0f21a278b2ef1d0c", "type": "change", "z": "2813caf20c766246", "g": "c1a4cfc3de0f0bfd", "name": "", "rules": [ { "t": "set", "p": "temperature", "pt": "flow", "to": "72", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 380, "y": 1220, "wires": [ [] ] }, { "id": "253f1a2e71aad1cc", "type": "link call", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "", "links": [ "837160be48ee9d7c" ], "linkType": "static", "timeout": "30", "x": 550, "y": 860, "wires": [ [ "9de9e4edda4a0f04" ] ] }, { "id": "837160be48ee9d7c", "type": "link in", "z": "2813caf20c766246", "g": "c1a4cfc3de0f0bfd", "name": "To Temperature inc/dec", "links": [], "x": 115, "y": 1080, "wires": [ [ "327eea42a6ec4788" ] ] }, { "id": "f1d801be317a88fd", "type": "link out", "z": "2813caf20c766246", "g": "c1a4cfc3de0f0bfd", "name": "From Tempoerature inc/dec", "mode": "return", "links": [], "x": 925, "y": 1080, "wires": [] }, { "id": "8f8dd7f98dda3614", "type": "status", "z": "2813caf20c766246", "g": "c1a4cfc3de0f0bfd", "name": "WS status", "scope": [ "3971443558d6f473" ], "x": 160, "y": 1160, "wires": [ [ "1048ae6661c58d49" ] ] }, { "id": "1048ae6661c58d49", "type": "switch", "z": "2813caf20c766246", "g": "c1a4cfc3de0f0bfd", "name": "WS is online", "property": "status.fill", "propertyType": "msg", "rules": [ { "t": "eq", "v": "green", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 350, "y": 1160, "wires": [ [ "7035bb46556d13aa" ] ] }, { "id": "7035bb46556d13aa", "type": "change", "z": "2813caf20c766246", "g": "c1a4cfc3de0f0bfd", "name": "Build msg object", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "temperature", "tot": "flow" }, { "t": "set", "p": "topic", "pt": "msg", "to": "TemperatureText", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 520, "y": 1160, "wires": [ [ "1dd503e9325d5ecf" ] ] }, { "id": "1dd503e9325d5ecf", "type": "link out", "z": "2813caf20c766246", "g": "c1a4cfc3de0f0bfd", "name": "To WS", "mode": "link", "links": [ "43331ec4199e4fb4" ], "x": 635, "y": 1160, "wires": [] }, { "id": "43331ec4199e4fb4", "type": "link in", "z": "2813caf20c766246", "g": "afbf01ed9f19065d", "name": "From Temperature inc/dec", "links": [ "1dd503e9325d5ecf" ], "x": 645, "y": 940, "wires": [ [ "9de9e4edda4a0f04" ] ] }, { "id": "b3556b412137bc68", "type": "comment", "z": "2813caf20c766246", "name": "local test URL: localhost:49152/myui", "info": "", "x": 220, "y": 40, "wires": [] }, { "id": "886700b5bc0db13a", "type": "comment", "z": "2813caf20c766246", "name": "MUSE test URL: :1880/myui", "info": "", "x": 560, "y": 40, "wires": [] }, { "id": "321011a938aa0bf2", "type": "Controller", "z": "2813caf20c766246", "name": "Controller", "mojo": { "controller": "192.168.1.246:443", "protocol": "https", "host": "192.168.1.246", "port": 443, "username": "admin", "password": "password" }, "x": 920, "y": 40, "wires": [] }, { "id": "cd559cb4dca34dce", "type": "comment", "z": "2813caf20c766246", "g": "355ed91389a40e9e", "name": "Comment/uncomment lines 303/304 and 308/309 as appropriate!", "info": "", "x": 470, "y": 140, "wires": [] } ]

​​

Downloads

Product

 

Topic

Programming

Related Articles

Last modified at 8/29/2025 11:43 AM by PRO Knowledge Base
Top