Skip to content

HTTP Pusher

HTTP Pusher

Where can you find it
LoRaWan Server is placed under the Data Connector menu.

Find

Definition A HTTP Pusher is used to forward all communication received from your connectors to a url of your choice. You can eventually filter the type of communication you want to send to the url.

  1. All
  2. RX
  3. TX
  4. TX Confirmation
  5. GW Alive
  6. Join
  7. Other
  8. TX Sent
  9. Unknown

The sent data is a JSON of the same format as the one used in the [websocket communication][1]. The post field that contains the JSON is "data".

Required and Extra fields
- Name*: the Name of the HTTP Pusher; - URL*: the URL to visit to send the post data;
- Enabled: check if Enabled;
- Comm Filter*: the filter with previous listed values;

Here's a php file that handles the http pusher calls and logs them in the 'pusherlog.txt' file.

<?php
    $data = $_REQUEST['data'];
    file_put_contents('pusherlog.txt', $data."\n", FILE_APPEND);
?>

You can also select a 'content-type: application/json' output. You can simply handle the output liks this in php:

<?php
    $data = file_get_contents('php://input');
    file_put_contents('pusherlog2.txt', $data."\n", FILE_APPEND);
?>