You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: Users.


You can view and copy the source of this page.

Return to Code Examples/LastHeard/Python.

Requirements[edit]

  1. pip install socketIO-client

Example[edit]

``` import socketio

sio = socketio.Client()

@sio.event def connect():

  1. print('connected to server')

@sio.event def disconnect():

  1. print('disconnected from server')

@sio.on("mqtt") def on_mqtt(data):

  1. print (data)
  2. return

sio.connect(url='https://api.brandmeister.network', socketio_path="/lh/socket.io", transports="websocket") sio.wait() ```