Howto run websocket from custom components?

My service is sending a dictionary via a websocket to an Arduino running a webserver.
Based on the content of the data_x variables it turns relays on or off.

When running the code below (init.py) I get: “RuntimeError: This event loop is already running”
Is there a way to get around this or to get this working?

When I copy the part below to a separate file (test.py) and run it in the terminal it works fine.
However when defining it HA as a services the loop is already running

Thank you

test.py
async def sending():
        async with websockets.connect(IP_SERVER) as websocket:
            await websocket.send(json.dumps(myDict))
            result = await websocket.recv()
            _LOGGER.info("Receive result %s", result)
    loop = asyncio.get_event_loop()
    loop.run_until_complete(sending())
    loop.close()
__init__.py
import asyncio
import logging
import json
import websockets

from homeassistant.core import callback

VERSION = '2.0'
DOMAIN = 'busclient'
IP_SERVER = 'ws://192.168.1.101'

_LOGGER = logging.getLogger(__name__)
__version__ = VERSION

global myDict

@asyncio.coroutine
def async_setup(hass, config):
    _LOGGER.info("Set up of integration %s, version %s", DOMAIN, VERSION)
    async def sending():
        async with websockets.connect(IP_SERVER) as websocket:
            await websocket.send(json.dumps(myDict))
            result = await websocket.recv()
            _LOGGER.info("Receive result %s", result)
    loop = asyncio.get_event_loop()
    loop.run_until_complete(sending())
    loop.close()

    @callback
    def turn_on(call): 
        myDict = {
            "data_1": 0,
            "data_2": 3,
        }
        sending()       

    # Register the service with Home Assistant
    hass.services.async_register(DOMAIN, "bus_on", turn_on)

    def turn_off(call):
        myDict = {
            "data_1": 0,
            "data_2": 2,
        }
        sending()       

    # Register the service with Home Assistant
    hass.services.async_register(DOMAIN, "bus_off", turn_off)

    return True