Network Web Socket

Allows the communication between Usine and a Web Browser, for example to send commands to Usine from a web page or create a Web server inside Usine.

Settings

port

Web Socket port, 80 by default.

Send to a remote web page

string to send

String to send to the connected Web page.

send

Process the send operation.

Receive from a remote web page

received string

String received from the Web page.

receive

Sends a trigger when a string is received.

response file

Optional, file sent as a response of the Web Socket. Can be an html, php, js, etc. For example you can create a script to communicate with Usine, like the file webSocketExample.html:

<!DOCTYPE HTML>
<html>
    <head>
        <title>WebSocket demo</title>
        <script type="text/javascript">
        var ws;
        function log(s) 
        {
            document.getElementById("log").innerHTML += s + "\n";
        }
        function sendMessage(s) 
        {
            log(">> " + s);
            ws.send(s);
        }
        function send() 
        {
            sendMessage(document.getElementById("text").value);            
        }
        function init() 
        {
            ws = new WebSocket("ws://localhost:8000"); // should be the IP address of Usine
            ws.onopen = function() 
                {
                log("WebSocket opened");
                sendMessage("Hello ?");
                }
            ws.onclose = function() 
                {
                log("WebSocket closed")
                }
            ws.onmessage = function(e) 
                {
                log("<< " + e.data)
                }
        }
        </script>
    </head>
    <body onLoad="init()">
        <input type="text" id="text"> 
        <button onclick="send()">Send</button>
        <pre id="log"></pre>
    </body>
</html>

See webSocketExample.html.

This file is optional because it can be stored on the distant server.

response string

Response as string of the Web Socket on connection.

connected

Sends 1 when the socket is connected.

trace received msg

Display all received messages in the trace-panel.

test local host

Opens the localhost page (http://127.0.0.1:80 by default) in the Web Browser in order to test the communication and the response file.

Common Settings

info

show manual

Opens the web browser to display information or help about the selected object, if it exists.

For more details about information/help creation, see create-help-file.

description

Description of the module for internal help purposes only. The description is not displayed in the interface.

ID's

visible only in god mode, see setup-panel-tab-expert.

unique ID

Current private ID for this control used to identify the object.

preset ID

Current private preset ID for this control used for presets.

recreate ID

If you experience difficulties in Polyphonic mode, try to recreate new id(s) with this button.

repair ID s

Each Patch shared on the local network uses its own ID (identification number). If you experience issues of Patches that don't send information to the good target, this button will rebuild all these id's.

Object Remote Address

absolute

Absolute remote address. see objects-address.

local

Local to the current patch remote address. see objects-address.

user addr

User defined remote address. see objects-address.

See also

version 7.0.250121

Edit All Pages