How to connect a Sigfox Sens'It to Wia
Tags: iot, opensource, sigfox, tutorial
Published: 2018-08-15 17:07:28

---
title: How to connect a Sigfox Sens'It to Wia
published: true
description: Connect the Sigfox Sens'It to the Wia platform
tags: #iot #opensource #sigfox #tutorial
---
In this tutorial, we will connect the Sigfox Sens'It to the [Wia platform](https://dashboard.wia.io/login). 
 
# Components 
- Wia Account. [You can create one here](https://dashboard.wia.io/login)
- Sigfox Sens'It 
- USB to Micro USB Cable 
 
# Connect the Sens'It to the Sigfox App 

First, plug in your Sens 'It to ensure it stays charged. Then, [follow this link](https://www.sensit.io/) to Sigfox's platform for the Sens 'It. In the upper right corner, click `Launch App`. 

![alt text](https://s3-eu-west-1.amazonaws.com/wia-flarum-bucket/2018-08-07/1533655169-784073-screen-shot-2018-08-07-at-41907-pm.png)


Choose to `Activate a Sens'It`. The Device ID is written on the back of the Sens'It. Enter the Device ID into the box. 

![alt text](https://s3-eu-west-1.amazonaws.com/wia-flarum-bucket/2018-08-07/1533655215-294134-screen-shot-2018-08-07-at-41958-pm.png)
![alt text](https://s3-eu-west-1.amazonaws.com/wia-flarum-bucket/2018-08-07/1533655285-442484-screen-shot-2018-08-07-at-42036-pm.png)


Continue and add your location. Follow the prompts to finish activating the Sens'It. 
  
# Get the PAC 

Once the Sens'It is activated, [launch the app](https://www.sensit.io/app/sensit). In the left side menu, select the name of your device. Then, in the upper right corner, select `Sens'It details`  

On the right bottom of the page, click the blue button for `Get my PAC`. The next display will show your PAC. You will need this later. 
  
# Connect the Sens'It to the Sigfox Backend 

[Follow this link](https://buy.sigfox.com/activate) to register your device so you can configure it in the Sigfox backend. Enter your location and click `Next`. 

You will be prompted to enter your `Device ID` and `PAC`. The Device ID is the number on the back of the Sens'It. The PAC is the sequence we found in the last step. 

Continue to the `Account` step and create an account. Finish and confirm.  

Now, [follow this link](https://backend.sigfox.com/auth/login) to the Sigfox backend. Enter your login details for the account you just created. 
  
# Send events to Wia 

Wia has a Sigfox integration available, so you can connect your sigfox device to the [Wia platform](https://dashboard.wia.io/login). 

### Create API Keys

-  In the Sigfox backend, go to `Group > [Your group name] > API Access > New`
-  Select `DEVICES_MESSAGES [R]`

![alt text](https://s3-eu-west-1.amazonaws.com/wia-flarum-bucket/2018-08-07/1533655451-320043-screen-shot-2018-08-07-at-42341-pm.png)

Once checked, an API login and password will be created for you.

### Add API Keys to Wia 

-  Go to the [Wia dashboard](https://dashboard.wia.io/login).
-  Open the Space dropdown, by clicking on the Space name in the top left corner, and click Settings. Select Integrations in the sidebar.
  
![alt text](https://s3-eu-west-1.amazonaws.com/wia-flarum-bucket/2018-08-07/1533655515-324090-screen-shot-2018-08-07-at-42441-pm.png)

-  Enter your API Access Login and Password. Note: This is not the one you use to login to the Sigfox backend dashboard, it is the one you just created.
-  You should now see your Inbound Key for Sigfox created.
  
![alt text](https://s3-eu-west-1.amazonaws.com/wia-flarum-bucket/2018-08-07/1533655560-510857-screen-shot-2018-08-07-at-42535-pm.png)


### Setup your Sigfox Callback

-  Go back to the [Sigfox backend](https://backend.sigfox.com/auth/login)
-  Select `Device Type`, then under name column of the device type list you would like to integrate
-  On the left, select Callbacks (If there are any Wia callbacks already there, remove them)
-  Click New in the top left corner to create a new callback
-  Select Custom Callback

![alt text](https://s3-eu-west-1.amazonaws.com/wia-flarum-bucket/2018-08-07/1533655632-231271-screen-shot-2018-08-07-at-42649-pm.png)
  

Enter the values below in each of the fields: 

-  Type: `DATA` `UPLINK`
-  Channel: `URL`
-  Url pattern: `https://api.wia.io/v1/events`
-  Use HTTP method: `POST`

Headers 

![alt text](https://s3-eu-west-1.amazonaws.com/wia-flarum-bucket/2018-08-07/1533655659-973650-screen-shot-2018-08-07-at-42725-pm.png)

-  Content Type: `application/json`
-  Body: Copy and paste the text below.

```
{
  "integrations":{
    "sigfox":{
      "id":"{device}"
    }
  },
  "name":"sigfoxDataUplink",
  "data":{
    "sigfoxData":"{data}",
    "time":"{time}",
    "duplicate":"{duplicate}",
    "snr":"{snr}",
    "station":"{station}",
    "avgSnr":"{avgSnr}",
    "lat":"{lat}",
    "lng":"{lng}",
    "rssi":"{rssi}",
    "seqNumber":"{seqNumber}"
  }
}
```
 
 Click `OK` to save the callback.
 
 Once your device sends an event it will automatically appear in the [Wia dashboard](https://dashboard.wia.io/login).

![alt text](https://s3-eu-west-1.amazonaws.com/wia-flarum-bucket/2018-08-07/1533656741-178661-screen-shot-2018-08-07-at-44456-pm.png)