Ws

ws

request: reset_obniz_on_ws_disconnection

path type conditions description
ws.reset_obniz_on_ws_disconnection boolean
  • required
 
// Json Example
[
    {
        "ws": {
            "reset_obniz_on_ws_disconnection": false
        }
    }
]

response: ready

all things ready

path type conditions description
ws.ready boolean
  • required
  • const true
 
//Response Example
[
    {
        "ws": {
            "ready": true
        }
    }
]

response: obniz

target device information

path type conditions description
ws.obniz.hw string
  • required
Hardware Identifier String of target device 
ws.obniz.firmware string
  • required
Installed firmware version of target device 
ws.obniz.metadata string   device metadata user set on cloud 
ws.obniz.connected_network.online_at number
  • required
Epoch Unix Timestamp (seconds) at device become online on the cloud 
ws.obniz.connected_network.net string   Current connected network type. Defined in setting json 
ws.obniz.connected_network.local_ip string   Local IP if exist 
ws.obniz.connected_network.global_ip string   Global IP if exist 
ws.obniz.connected_network.wifi.ssid string
  • required
Current connected Accespoint SSID 
ws.obniz.connected_network.wifi.mac_address string
  • required
Current connected Accespoint MacAddress 
ws.obniz.connected_network.wifi.rssi number
  • required
Current RSSI for connected Accesspoint. RSSI is mesured only on connection timing 
ws.obniz.connected_network.wifimesh.meshid string   MESH ID of Currently joined MESH network 
ws.obniz.connected_network.wifimesh.parent_obniz_id string
  • required
Id of parent node 
ws.obniz.connected_network.wifimesh.root_obniz_id string
  • required
Id of parent node 
ws.obniz.connected_network.wifimesh.layer number
  • required
Depth of MESH network. layer=1 is root node of a network. 
ws.obniz.connected_network.wifimesh.rssi number
  • required
Current RSSI for connected Accesspoint. 
//Response Example
[
    {
        "ws": {
            "obniz": {
                "hw": "obnizb1",
                "firmware": "2.0.0",
                "metadata": "{\"description\":\"At My Office\"}",
                "connected_network": {
                    "online_at": 1637685862,
                    "net": "wirelesslan",
                    "local_ip": "192.168.0.100",
                    "global_ip": "201.200.199.198",
                    "wifi": {
                        "ssid": "obniz-wifi",
                        "mac_address": "0123456789AB",
                        "rssi": "-40"
                    },
                    "wifimesh": {
                        "meshid": "012345678901",
                        "parent_obniz_id": "0000-0000",
                        "root_obniz_id": "0000-0000",
                        "layer": 1,
                        "rssi": "-40"
                    }
                }
            }
        }
    }
]

response: redirect

If the server required you to connect other endpoint to communicate with your obniz. This json will be sent.

path type conditions description
ws.redirect string
  • required
The url you should redirect to. 
//Response Example
[
    {
        "ws": {
            "redirect": "wss://ws1.obniz.io"
        }
    }
]