Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Make sure that you have SSH enabled, and redirected ports (look above in this page)
  2. From chrome extenstion download "Browser WebSocket Client"
  3. URL and Protocol can be taken from "thunder-wifimanager-test.js", when creating this instruction it was:

    Code Block
    ws = new WebSocket('ws://localhost:9998/jsonrpc', 'notification');


  4. Going with this example our URL should be 'ws://localhost:9000/jsonrpc' (NOTICE: port is different as we redirected it before), and Protocol should be 'notification'. All those fields should not have [ ' ] characters.

  5. Now we can register to get some message, In Send a Message field just paste request, i.e.


    Code Block
    {
        "jsonrpc": "2.0",
        "id": 123123123,
        "method": "Controller.1.register",
        "params": {
            "event": "all",
            "id": "client.events.1"
        }
    }


    and press Send. In reveived Messages should be shown response.

  6. Then we can check if we will get new message if registered even appeard. We can do it be i.e.


    Code Block
    {
        "jsonrpc": "2.0",
        "id": 1234567890,
        "method": "Controller.1.deactivate",
        "params": {
            "callsign": "DeviceInfo"
        }
    }


    We should get 2 messages. One about success of this operation and second about event that we are registered.

Getting events from desired service

...