Cayenne is a free IOT dashoard provided by MyDevices.com. It supports many micro controller boards like Arduino ESP8266. etc. You can easily configure you devices in the dashboard. You can choose different gauges, value, symbols, or data charts.
In this tutorial we are going to connect the LoRa PCB with a DHT22 sensor to the TheThingsnetwork and let it log on the Cayenne dashboard.
Assuming you got your PCB running with a DHT22 sensor or another sensor.
To get the script working properly with the Cayenne dashboard, you must install the CayenneLPP library. Download it here https://github.com/sabas1080/CayenneLPP
After installing the Cayenne_LPP library you can download a sample script from our Github page.
https://github.com/Diycon/LoRa_Cayenne_LPP
Open ttn_sensor_Cayenne_LPP.ino
Enter your:
Netwrok session key, Application session key, Device address
From TheThingsNework or other LoRa network.at line 43
At line 61 you can change the time between Payload updates
//Setup the interval between Payload updates in seconds
const unsigned TX_INTERVAL = 600;
At line 148 you find a example list how to configure different sensors and channels
//lpp.addDigitalInput(CHANNEL, uint8_t value);
//lpp.addDigitalOutput(CHANNEL, uint8_t value);
//lpp.addAbalogInput(CHANNEL, float value);
//lpp.addAnalogOutput(CHANNEL, float value);
//lpp.addLuminosity(CHANNEL, uint16_t lux);
//lpp.addPresence(CHANNEL, uint8_tvalue);
//lpp.addTemperature(CHANNEL, float celcius);
//lpp.addRelativeHumidity(CHANNEL, float rh);
//lpp.addAccelerometer(CHANNEL, float x, float y, float z);
//lpp.addBarometricPressure(CHANNEL, float hpa);
//lpp.addGyrometer(CHANNEL, floatx, float y, float z);
//lpp.addGPS(CHANNEL, float latitude, float longitude, float meters);
At line 162 you can see how the sensor data is linked to te Cayenne channels for this script we use the DHT as working example feel free to edit and try other sensors.
Upload the ascript to the LoRa board and check the serial monitor to see if your node and sensor is working properly.
Next configure your LoRa device in TheThingsNetwork console to connect to the Cayenne dashboard
Select integrations in your applications overview
Click on add integration.
Select the Cayenne icon.
Create a procces ID .
Select the acces key you want to use.
Click in add integration to seve the Cayenne settings.
Go to the Cayenne dashboard from mydevices https://cayenne.mydevices.com login or create a account.
After logging in you can add a device click on the LoRa icon.
Select The ThingsNetwork
Scroll down to select the Cayenne LPP
Copy the DevEUI from your device overview in The Thingsnetwork dashboard.
Paste this in the Cayenne configuration
Click add device and wait for an update from your LoRa device.
If everything goes well you will see the updates from yorr node appear in the dashboard you can add different gauges line chart icons etc.
Cayenne is a free IOT dashoard provided by MyDevices.com. It supports many micro controller boards like Arduino ESP8266. etc. You can easily configure you devices in the dashboard. You can choose different gauges, value, symbols, or data charts. In this tutorial we are going to connect the LoRa PCB with a DHT22 sensor to […]