Bring Your Own PiUpdated: May, 2021
We have a NEW, more efficient agent! MUCH simpler to install and NO Java required (you asked, we listened)! Just make sure you are running Raspberry Pi OS. The legacy version of the agent will continue to work but updates will stop on February 1st, 2021.
The new agent simply involves cloning the binaries and setting up a cron job for execution.
git clone https://ryanbedford.visualstudio.com/RSAgent/_git/RSAgent
To register the agent, browse to your Raspberry Street Dashboard. After logging in, click on the profile picture/email at top right. A drop down menu will appear displaying a registration code.
./rsagent (registration code)
Now edit your crontab to execute the agent every 4 minutes (more frequent than 4 minutes will result in failed executions).
At the end of the crontab file insert the line below.
*/4 * * * * /home/pi/RSAgent/rsagent/rsagent >> /home/pi/RSAgent/log.txt
**LEGACY Java based agent instructions below**
1. Setting up environment and download agent:
Create a directory in the "home" directory named "raspberrystreet" (case sensitive). Agent is compatible with Raspbian Jessie, Stretch and Buster as well as the latest Raspberry Pi OS. Java is required.
sudo mkdir /home/raspberrystreet
Download the bootstrap script to the raspberrystreet directory.
sudo wget https://cdn.raspberrystreet.com/agent/bootstrap
Make the bootstrap script executable with chmod command.
sudo chmod 755 bootstrap
Add the following command just before the "exit" command in /etc/rc.local
/home/raspberrystreet/bootstrap >> /home/raspberrystreet/bootstrap.log &
Reboot the Pi. After booting bootstrap will run and automatically download the latest agent. After a minute or so confirm "rsiothub.jar" file exists in "/home/raspberrystreet" directory. Boot strap will also create a log file in the same directory.
Once the agent has been downloaded confirm that it is executable using chmod command.
sudo chmod 755 rsiothub.jar
2. Registering your Pi with Raspberry Street
Browse to your Raspberry Street Dashboard. After logging in, click on the profile picture/email at top right. A drop down menu will appear displaying a registration code.
While in the raspberrystreet directory on the Pi manually launch the agent using the following command. Substitute ****** with the registration code retrieved in previous step.
sudo java -jar rsiothub.jar ******
Once you receive the message stating registration was successful, reboot the Pi.
Upon reboot the agent will start automatically. In a moment you will see your device show up on your Raspberry Street dashboard.
Give yourself a pat on the back and welcome to Raspberry Street!