element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Community Hub
Community Hub
Member's Forum Getting own LoRa data from ttn server
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Community Hub to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 9 replies
  • Answers 3 answers
  • Subscribers 566 subscribers
  • Views 2115 views
  • Users 0 members are here
Related

Getting own LoRa data from ttn server

gypo
gypo over 6 years ago

Hi

 

I hope this reaches someone that can help, I have my fingers crossed so tight they hurt!  After more than a year of trying I'm at the point of giving up and selling my LoRa kit.

I have designed and build LoRa nodes with sensors with ease and sending data to the ttn servers.  LoRa hardware development for me is going great guns but getting at my data isn't

 

I thought I saw a way to help vulnerable people around me by designing an expandable system that can help them get the help they need locally & quickly instead of the police not turning up or the ambulance taking an age to respond.  I had mentioned it to several elderly people some who live on their own and they thought it could work for them.  But I was a little optimistic on how easy the coding was.

 

I have a ttn gateway with an external aerial on the roof of my bungalow and a few sensors (ttn node, arduino LoRa shields and home brews) they all work and can send data to the ttn servers and I can see the data on there.  As I have hit a brick wall I have switched off the gateway and sensors but can have it up and running easily and quickly if someone can help.

 

I would like to be able to store my data so that I can make use of it and respond to it when the need arises.  I have my own domain and would like to get my data from the ttn servers to a database or other medium that enables me to store it and view it on my domain.

 

I am OK with designing, building and testing LoRa hardware (electronic stuff) as I have been inventing/designing circuits for many industries for over 50+ years (OAP myself & retired now).  I can write some code but writing code to manage data and connections between web/net related things is beyond me.  I have tried to follow many instructions and videos (on the ttn web sites and around the net) to connect with ttn using MQTT but after the initial part they all get very complicated and either assume I know stuff and skip it, want to use a 3rd party web site or use a raspberry pi.  None of them help.

 

I have got through quite a few tutorials to the point where I should see my data but either things complain or nothing happens.

 

What I'm hoping for is help writing the code to get my data from the ttn servers onto either a web page or a database on my domain (or better still both).

Is there anyone willing to hold my hand for a while to get this going?

 

Fingers crossed

Best Regards

Chris

  • Sign in to reply
  • Cancel

Top Replies

  • BigG
    BigG over 6 years ago +1 suggested
    I've just picked up on this thread and trying to make sense of your difficulties. So on one hand, it appears that you have succeeded in your project "I have a ttn gateway with an external aerial on the…
  • BigG
    BigG over 6 years ago in reply to gypo +1 suggested
    Aha, your explanation is rather helpful. If you can see your data on their console then you are over the 2/3rds of the way there. The final 1/3 involves creating a "TTN Application". The TTN website has…
  • BigG
    BigG over 6 years ago in reply to gypo +1
    Hi Chris Not to worry. I suspected that this might be the case as the real work is developing the code on your own domain (web hosting site) and sometimes the webhosting sites have restrictions on server…
Parents
  • BigG
    0 BigG over 6 years ago

    I've just picked up on this thread and trying to make sense of your difficulties.

     

    So on one hand, it appears that you have succeeded in your project "I have a ttn gateway with an external aerial on the roof of my bungalow and a few sensors (ttn node, arduino LoRa shields and home brews) they all work and can send data to the ttn servers and I can see the data on there."

     

    But then you have this project goal where you've got stuck and you now need some guidance "I would like to be able to store my data so that I can make use of it and respond to it when the need arises. I have my own domain and would like to get my data from the ttn servers to a database or other medium that enables me to store it and view it on my domain."

     

    So, the issue is getting access to the ttn server from your domain in much the same way as you can "see your data on the ttn server".

     

    Well this is quite common and in order to do this requires the use of an Application Programming Interface (API) between the ttn server and your domain. But, as your own domain is external to the ttn server, the ttn server will of course want to see credentials which match it's requirements. So to start you need to get hold of their "API" documentation so that you can provide the information from you own domain. Now sometimes the ttn server might have an option already available where it "pushes" the data, when it arrives from your nodes, out to a prescribed destination. Other methods may or may not be available too. So, in order for us to help we would need to know who is the ttn server.

     

    Hope that helps.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • gypo
    0 gypo over 6 years ago in reply to BigG

    Hi

     

    Thanks for taking an interest in my problem.

     

    I have reduced the hardware running as I think as soon as I have the data from one sensor onto my domain I should be able to learn from it and add others as I go.

     

    So for now I have got a 'The Things Gateway' (TTN-GW-868)  and a 'The Things Node' (TTN-ND-868) passing data to the gateway and the gateway passes it on to The Things Network server(s).  I use the The Things Network Console to view the data that my node is sending.

     

    I hope that answers the question you asked.  The Things Network site has several API's available but that is a black art to me at present, I wouldn't know which to use or what to do with it if I did.

     

    The hardware I currently have running.

        The Gateway                                                          The node

                    imageimage

     

    I believe that the ttn server can push the data as their web site gives several options to pass the data from their server to other places.

     

    I hope that is enough info to enable you to see which way I should go and what I should use.

    If not let me know what you need.

     

    Just for info;

    If you was to look on the The Things Network Gateway Map I am the only gateway (so far) located in Spondon, Derby in the UK.

     

    Many thanks again

    Regards

    Chris

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • gypo
    0 gypo over 6 years ago in reply to BigG

    Hi

     

    Thanks for taking an interest in my problem.

     

    I have reduced the hardware running as I think as soon as I have the data from one sensor onto my domain I should be able to learn from it and add others as I go.

     

    So for now I have got a 'The Things Gateway' (TTN-GW-868)  and a 'The Things Node' (TTN-ND-868) passing data to the gateway and the gateway passes it on to The Things Network server(s).  I use the The Things Network Console to view the data that my node is sending.

     

    I hope that answers the question you asked.  The Things Network site has several API's available but that is a black art to me at present, I wouldn't know which to use or what to do with it if I did.

     

    The hardware I currently have running.

        The Gateway                                                          The node

                    imageimage

     

    I believe that the ttn server can push the data as their web site gives several options to pass the data from their server to other places.

     

    I hope that is enough info to enable you to see which way I should go and what I should use.

    If not let me know what you need.

     

    Just for info;

    If you was to look on the The Things Network Gateway Map I am the only gateway (so far) located in Spondon, Derby in the UK.

     

    Many thanks again

    Regards

    Chris

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • BigG
    0 BigG over 6 years ago in reply to gypo

    Aha, your explanation is rather helpful. If you can see your data on their  console then you are over the 2/3rds of the way there. The final 1/3 involves creating a "TTN Application".

     

    The TTN website has a useful reference. In your case, the "Data API" is what you are after as you want to send the data to your own server: https://www.thethingsnetwork.org/docs/applications/apis.html

     

    The generic method they offer for this is MQTT: https://www.thethingsnetwork.org/docs/applications/mqtt/

     

    But actually MQTT is not needed in your case.

     

    Fortunately, TTN also offer premade "Integrations": https://www.thethingsnetwork.org/docs/applications/integrations.html

     

    and buried within "integrations" is an HTTP option: https://www.thethingsnetwork.org/docs/applications/http/

     

    That should guide you. Have a read though that then get back to us with any further questions you may have.

     

    PS. Don't forget to watch their YouTube video too (just click on the graphic under the header "Getting started video")

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • gypo
    0 gypo over 6 years ago in reply to BigG

    Thanks for the pointers...

     

    But.

    I have gone round and round on these pages already (I had done before but have taken another look).  I have watched loads of videos from the ttn guys and others but I'm still at a loss of what to do.  I know what I am trying to do I just cant get there, I believe that I'm OK setting up the ttn site to send data out but I don't know how to grab it.

     

    I have had HTTP and storage integrations enabled on the ttn site for a long time. But the data from the HTTP integration needs a place to send the data to (hopefully my site but just sending it there doesn't achieve anything yet).

     

    That is where it all falls down for me.  The video examples send data to a third party site where you can see it but I'm trying to get the data onto my own domain (web site/pages or database) not on a third party site.  Being able to see it on the ttn or a third party site doesn't let me store it locally or act on it if I need to.  I'd rather have the data direct from the ttn site rather than via yet another site.

     

    I'd be appreciative of help getting my domain (web page(s) / database)  set up to receive the data from the HTTP integration... 

    I'm sorry but I don't have a clue how to do that.

     

    Best Regards

    Chris

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • BigG
    0 BigG over 6 years ago in reply to gypo

    Hi Chris

     

    Not to worry. I suspected that this might be the case as the real work is developing the code on your own domain (web hosting site) and sometimes the webhosting sites have restrictions on server to server communication, which requires some setup to get it to work. Also, most web hosting sites offer PHP as part of the preinstalled "LAMP" or "WAMP" server packages so you would need to know PHP scripting if this is what you want to do.

     

    I can give you a hand if you like as there are a number of simple things we could do quickly to helping you get what you want. Send me a direct message (you may need to connect or follow me in order to do so) if you like.

     

    Kind regards

     

    Colin

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube