The Raspberry Pi as an IoT node
Running Cayenne on the Raspberry Pi is certainly the simplest way to get your sensors connected to Cayenne. All you need to do is downloading the installation script:
wget
https://cayenne.mydevices.com/dl/rpi_wq6h8r0h65.sh
(see
https://cayenne.mydevices.com/cayenne/dashboard/raspberrypi/pending/6ec171e0-7ee6-11e9-ace6-4345fcc6b81e)
and running it as a super user. You must enable ssh in raspi-config->Interfacing Options before doing so.
This will download and install the Cayenne agent, which will be started through a systemd script when booting your RPi. The agent contains everything you need to send RPi OS system information to Cayenne, to allow basic operations to be performed remotely and to read out the most common sensors and send their measurements to Cayenne.
Once the agent installed, all you need to do is connecting your sensor and restarting the Pi. In most cases the sensor will be detected automatically and it will connect to Cayenne without your intervention. You have to write not a single line of code!
This is a typical example of a Raspberry Pi dashboard on Cayenne.
If you want to have the latest and the greatest Cayenne agent on your RPi then have a look at
https://github.com/myDevicesIoT/Cayenne-Agent
The README.rst file also tells you what to do if your sensor has no driver code implemented in the agent such that you must extend its functionality.
--
Uli Raich - 2019-04-09
Comments