#!/usr/bin/python3 import socket sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.sendto(b'toggle', ('192.168.1.1', 1078))