About

This is a service for receiving notifications about lightning strikes. It pushes out messages to the clients as soon a lightning strikes unlike a pull service where the client periodically asks the server if anything has happened. This will enable the clients to get notified as soon as possible. There will however always be some delay while the the data flows through the system.

This service can only be used by authorized clients and usage is bound to a charge. To get authorization details, please contact SMHI Customer Service. Use the authorization details when connecting your client to the service.

Workflow

Only one client per authorization key can connect at a time. If you try to connect two clients with the same key the first one will be disconnected when the second one connects. If your client for some reason gets disconnected, then you should reconnect it again to receive further messages.

The clients workflow consists of the following steps:

  • Connect to the service at wss://data-push.smhi.se/mqtt
  • Authorize the client. This is done with basic authentication + a unique clientId.
  • Receive messages

Example

A simple example project is provided to show how to setup and connect to the WebSocket API: https://git.smhi.se/opendata/mqtt-client-example

Format

The data is raw lightning sensor data (binary), and you will need to parse the data to make sense of it. If you do have a Total Lightning Processor (TLP), it will be able to connect to the data stream.

Licence

SMHI Open Data API is published under these Terms and conditions.

Contact

Questions or inquiries can be sent to: opendata-support@smhi.se.