I'm beginner in integrating TTN / CayenneLPP

Hello, I’m a beginner in this world of IoT. I’m using Pycom products to learn, they are: Lopy4 (Gateway) and Fipy (node). I am using some sensors too: BME280, HC-SR04, RTC… (But I haven’t set it up yet)

My progress: I can send node data to the gateway through the community sample codes. I already have an application on TTN and already added my gateway (Dev EUI) on cayenne (Lora → The Things Network).

My node (fipy) has the codes:
→ abp_node_USP915.py
→ config.py

My gateway (Lopy4) has the codes:
→ config.py
→ main.py
→ nanogateway.py
(All the code I’m using, I adapted from the pycom libraries.)

cayenne_community-01

My doubts:

  1. On cayenneLPP.py, which microcontroller will receive this library, Node (Fipy) or Gateway (Lopy4)?

  2. How do I demonstrate the data being sent to my Cayenne account?

If I can learn to do this, it may be easier to insert my sensors.

So, thank you very much for the opportunity to learn from you!

the node device needs to send the data to NS in cayenne LPP format, so the your node will receive
the CayenneLPP.py code.

what do you mean by this?

Thank you for answering. my questions is this:

  1. Which microcontroller should I register in the * DEVICES * sector of the things networks, the node loaded with the sensors, or the gateway?

I’m confused about this.

  1. My question regarding cayenne is how to demonstrate the information on their website.

My application:

Example in tutorial:

the node as it is device you are using to send data from the gateway.

while adding device , add the device as an cayenne LPP.

Can you help me with a very descriptive cayenneLPP code example? I can’t make it work.

are you receiving any data on TTN console?

I am not receiving any packages in the *“DATA” sector in application. But I’m getting the frame up information.

can you share the link from where you got all the codes from.

I will copy the codes here:

Gateway:
config_py.txt (791 Bytes) main_py.txt (878 Bytes) nanogateway_py.txt (14.6 KB)

Node:
bme280.txt (8.2 KB) cayenneLPP.txt (18.5 KB) config.txt (908 Bytes)
main.txt (4.2 KB)

I’m in doubt too in how to send sensor data in cayenneLPP format.

did you follow any tutorial on how to add a fipy node to TTN? have a look at this and first try to get the node to TTN https://core-electronics.com.au/tutorials/your-first-lorawan-node-on-the-things-network.html
Once done we can move to Cayenne LPP.

Thanks for the answer. I performed this step successfully. Now I need to register Device EUI from my node in cayenne. Then I need to package my node data in CayenneLPP format, right?

First, you need to add the cayenne LPP format payload in your node and then add the DevEUI into cayenne by selecting the appropriate device from the list.

Hi shrink salgaonkar, I have successfully sent the data in cayenneLPP format. Thanks for helping me with this. However, I can’t keep updating the data.

erro_atom_do_carai

Thank you for helping me get so far. Do you have any idea what is going on? i’ll report to pycom forum anyway.

in your main.txt there is no while loop to send the data again and again.

Hello, I added a FOR function to send data five times and stop. but the cayenne update doesn’t work. i’ll try to solve.

I’m sorry, I solved the problem. Even so, I am very grateful for the attention!
It’s working:

Thank you very much!

1 Like

glad to hear it is working now. what was the issue?

I forgot to add the pressure (bmep) and temperature (bmet) lists in FOR. But I already changed the code to collect the data for a few hours.

I have some questions about the LoraWAN network:

  1. As a free account, I have limit to send data on a daily basis?
  2. Could you direct me to a website to read about this information?

this should solve most of your questions: Fair Use Policy explained - End Devices (Nodes) - The Things Network