Add new device on Cayenne

I have device registed on TTN and i can recevice data from it as in photo

how i can create new device and show sensor data on Cayenne?
Is it easy to do it by myself ? or i will need help from manufacture of the sensor to make some change in code of the senor ,i do not have access to code of the sensor right now , but i can ask the supplier to help if it is not easy to do it by my self

which device are using?

This node , and we connect with it water Level sensor and temperature sensor and Tilt sensor and float switch

if you can program it then you need to send data to cayenne in the cayenne LPP format so that cayenne can read the raw data and show it the respective data type Cayenne Docs

It is already programmed and can see the data in the TTN , is there is other code we need to add it specially for cayenne , or we can date the data from TTN and show it on cayenne ?

Here

Hi, I am using the sensor Dragino LSE 01 SOIL Moisture
How Can I program it into cayenne platform? I have this code in TTN

This is the code that I have in my PAYLOAD FORMATS
function Decoder(bytes, port) {
// Decode an uplink message from a buffer
// (array) of bytes to an object of fields.
var value=(bytes[0]<<8 | bytes[1]) & 0x3FFF;
var batV=value/1000;//Battery,units:V

value=bytes[2]<<8 | bytes[3];
if(bytes[2] & 0x80)
{value |= 0xFFFF0000;}
var temp_DS18B20=(value/10).toFixed(2);//DS18B20,temperature,units:℃

value=bytes[4]<<8 | bytes[5];
var water_SOIL=(value/100).toFixed(2);//water_SOIL,Humidity,units:%

value=bytes[6]<<8 | bytes[7];
var temp_SOIL;
if((value & 0x8000)>>15 === 0)
temp_SOIL=(value/100).toFixed(2);//temp_SOIL,temperature,units:°C
else if((value & 0x8000)>>15 === 1)
temp_SOIL=((value-0xFFFF)/100).toFixed(2);//temp_SOIL,temperature,units:°C

value=bytes[8]<<8 | bytes[9];
var conduct_SOIL=(value);//conduct_SOIL,conductivity,units:uS/cm

return {
Bat:batV +" V",
TempC_DS18B20:temp_DS18B20+" °C",
water_SOIL:water_SOIL+" %“,
temp_SOIL:temp_SOIL+” °C",
conduct_SOIL:conduct_SOIL+" uS/cm"
};
}
This is the data that I can see in TTN,


However I have connected this device to Cayenne my device, and this doesn’t show any information at all.
What code do I need for this sensor to use in cayenne?
The code that I can see that you recomended is in C++, and in TTN this is not acepted,
class CayenneLPP {
public:
CayenneLPP(uint8_t size);
~CayenneLPP();

    void reset(void);
    uint8_t getSize(void);
    uint8_t* getBuffer(void);
    uint8_t copy(uint8_t* buffer);

    uint8_t addDigitalInput(uint8_t channel, uint8_t value);
    uint8_t addDigitalOutput(uint8_t channel, uint8_t value);

    uint8_t addAnalogInput(uint8_t channel, float value);
    uint8_t addAnalogOutput(uint8_t channel, float value);

Thanks

you need to add the cayenne integeration Cayenne Docs

Thanks shramik_salgaonkar for replying my question.
I did the integration, However It doesn’t show any information. I have no idea what else to do, I am stuck for a week already :frowning:


i followed the instructions to integrate and I did ad the KEY. Do you know where could be the mistake? The code that I have in TTN is the one that I copied previously.

Thanks a lot!!

On the dashboard on top right corner you can see that the network is Ackilo which is the issue. You need to delete and re-add the device by first selecting TTN and then searching for the device.

1 Like