Blitzortung is a website and platform that collects live lightning data using a collection of internet-connected sensors run by volunteers.
Website
Mobile apps
Websockets
There is a WebSocket server at wss://ws1.blitzortung.org
. After you connect to it, you need to send {"a": 111}
to it in order to start streaming the messages.
Data obfuscation
The live data streamed from their WebSocket server is obfuscated. Below is a Python function that decodes it to proper JSON.
def decode(b):
e = {}
d = list(b.decode())
c = d[0]
f = c
g = [c]
h = 256
o = h
for i in range(1, len(d)):
a = ord(d[i])
a = d[i] if h > a else e[a] if e.get(a) else f + c
g.append(a)
c = a[0]
e[o] = f + c
o += 1
f = a
return ''.join(g).encode()