Raspberry Pi and ExoSense¶
Create a new IoT Connector¶
- Locate the ExoSense™️ Standard Connector Template in Exosite's IoT Marketplace.
- Select "CREATE IOT CONNECTOR" and pick a name for your new connector. In this example we will simply use 'myfirstconnector'
Identify connector ID and Hostname¶
In ExoSense:¶
- Inside of ExoSense, navigate to "Setup" -> "DATA SOURCES"
- Under "Device IoT Connectivity" locate your connector and note the connector id associated with it.
- Your hostname (replacing
<connector_id>
) will be :
https://<connector_id>.m2.exosite.io
Start ExoEdge¶
On Raspberry Pi¶
Configure Raspberry Pi¶
- When using Raspberry Pi, the recommended OS is Raspbian LITE
- Make sure your Raspberry Pi is on and connected to the Internet
- Make sure your Raspberry Pi will allow for SSH connection
SSH connection configuration
If it is not enabled, or you are unsure, configure using raspi-config
sudo raspi-config
- Select 'Interfacing Options'
- Select 'SSH'
- Enable SSH
Update system and install pip¶
sudo apt-get update
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
Install ExoEdge¶
pip install exoedge
pip install exoedge_simulator
Hint
if these commands don't work, try running with sudo or --user flag
Hint
if there is an error regarding psutil, run:
sudo apt-get install build-essential python-dev
Start ExoEdge¶
Run the following command, where:
<DEVICE_SERIAL_NUMBER>
is a unique identifier for the device<PRODUCT_HOST>
is the URL/hostname we found above
edged -s <DEVICE_SERIAL_NUMBER> \
-H <PRODUCT_HOST> \
-i <DEVICE_SERIAL_NUMBER>.ini \
go
Claim Device in ExoSense¶
- Navigate to the 'Devices' page from the Navigation Panel.
- Locate your device in the "Unused Devices" tab
- Select the device and a group to add the device too
- Press the "ASSIGN TO GROUP" button
Configure Device in ExoSense¶
Locate and select the device in the devices tab
Add a new channel by selecting the '+' button in the top-right corner of the channels tab.
Below is an example configuration to instruct ExoEdge to create a Sin Wave:
Where the app_specific_config
is as follows:
{
"function": "sin_wave",
"parameters": {
"period": 120,
"amplitude": 10,
"offset": 100
}
}
After selecting "done" then "save", the configuration will be pushed to ExoEdge and ExoEdge will start reporting data back in a sin wave.
NEXT¶
- Create an asset on ExoSense
- Visualize the sin wave with a dashboard on the ExoSense asset
- Utilize the ExoEdge Modbus Source
Last update: April 10, 2021