Receive Wahoo Fitness "Air Broadcaster" data
#!/usr/bin/python | |
import socket | |
import json | |
UDP_IP = "0.0.0.0" | |
UDP_PORT = 51530 | |
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # UDP | |
sock.bind((UDP_IP, UDP_PORT)) | |
while True: | |
data_str, addr = sock.recvfrom(1024) # buffer size is 1024 bytes | |
data = json.loads(data_str) | |
print addr, " -> ", data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment