aditya7196
Posts: 4
Joined: Sat Oct 22, 2016 8:20 am

Interfacing raspberry pi with website

Fri Nov 04, 2016 9:10 am

Hello. I'm doing a project which involves the user at any remote location using the website and when he performs some specific actions there, the raspberry pi connected to my PC performs some action on the hardware it is interfaced with. Is it possible? I know I've to host a website and all user data will be stored on the remote servers. I need to retrieve that data continuously and using the instructions given there, I need to control my rpi. I mean, the website is hosted my any service such a godaddy, and when I access the website from anywhere, I get access to my R-Pi.
Last edited by aditya7196 on Fri Nov 04, 2016 3:45 pm, edited 1 time in total.

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Interfacing raspberry pi with website

Fri Nov 04, 2016 9:22 am

An example of what is possible:

http://www.penguintutor.com/raspberrypi/pi-power

You don't have to use those particular switches - the Python code triggered by the website could do anything you need to complete your project.

This way the website is run by the RPi, so no added complexity from running a PC as well.

aditya7196
Posts: 4
Joined: Sat Oct 22, 2016 8:20 am

Re: Interfacing raspberry pi with website

Fri Nov 04, 2016 3:44 pm

Many thanks! But I'm curious whether I can do it from a website which has been hosted, i.e., using godaddy or some such service and the localhost isn't raspberry pi. If I access the website, I get the access to R-Pi. Is that possible?

User avatar
DougieLawson
Posts: 39300
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Interfacing raspberry pi with website

Fri Nov 04, 2016 8:45 pm

Do it with remote websockets on the GoDaddy system and MQTT 1.4.10 (or later) running on your Raspberry. You'd need to open port 1883 and use TLS/SSL with authentication.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Beginners”