3

I created an API in Node.js to connect my iOS app to my database.

In my app, I have a button to start an action which will be connected to my Raspberry Pi. This action will happened after verifications in my database.

I don't know what I should use or do, do I need to create a separate server to handle my actions? How should I use the AWS IoT service?

What should I insert into my Raspberry? I read about sockets, but is it the right solution?

I'm a little bit lost and I hope you could help me.

  • There is app, API and database. Then there is app, button and pi. What is the connection between the two? – cogitoergosum Jan 30 '18 at 13:39
  • That's what I would like to know, what is the best practise for that. My API is hosted by Heroku, my database on mLab and the app on the AppStore. I don't know how to connect them with my Raspberry Pi. I would send messages to my Raspberry from my API to handle some actions (like put a Led on), and my Raspberry to be able to answer or send messages to my API (like a POST). Is there any chance to do that? How to do it? – cusmar Jan 31 '18 at 10:06
  • Well, you could try invoking the API from Pi, parse result and accordingly turn on off the LED. Or, you could expose LED functions on Pi as API to be invoked from Heroku. – cogitoergosum Jan 31 '18 at 15:27
  • How should I do this? – cusmar Jan 31 '18 at 15:33
  • To expose LED functions as API you can use web.py if you are using python libraries to handle LED. You can look for REST client in python to invoke API on Heroku. – cogitoergosum Jan 31 '18 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.