Пример #1
0
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())
Пример #2
0
async def main():
    async with websockets.connect('ws://localhost:9000/CP_1',
                                  subprotocols=['ocpp1.6']) as ws:

        cp = ChargePoint('CP_1', ws)

        await asyncio.gather(cp.start(), cp.send_boot_notification(),
                             cp.send_authorize())