async def main(): async with websockets.connect('ws://149.56.47.168:8080/PCremote', subprotocols=['ocpp1.6']) as ws: cp = ChargePoint('CP_1', ws) await asyncio.gather(cp.start(), cp.send_boot_notification(), cp.send_authorize(), cp.send_start_transaction())
async def main(): async with websockets.connect('%s/serial123' % config.CS_URL, subprotocols=['ocpp1.6']) as ws: cp = ChargePoint('serial123', ws) await asyncio.gather(cp.start(), cp.send_boot_notification(), cp.send_heartbeat(), cp.send_start_transaction(), cp.send_stop_transaction())