LinuxKoku
Posts: 75
Joined: Wed May 16, 2018 9:16 am
Location: France
Contact: Website

Raspberry PI project, your opinions and advice

Mon Sep 24, 2018 8:20 am

Hello,

I have a university project about the management of data transmission to a web server with Raspberry Pi in Python, the data are environmental data (temperature, pressure, brightness, wind, ...). This work aims to develop a Python program embedded in a Raspbery PI that detects pulses (from various sensors (data)) on an analog input.

The tasks to be performed in this project are to develop a Python script for:
1. detect and date pulses (data),
2. manage the data with an internal buffer,
3. check the good communication with the web server,
4. transmit with acknowledgment of receipt data packets,
5. at the same time store the data in text files,
6. display of system status (amount of data not transmitted, etc.),

:!: :?: Knowing, that I have already made ethernet (sockets), serial, bluetooth with python links to send and receive byte frames, I would like to have your opinion on this project, but also to advise me on what I need to learn before starting this project (documentation, ...)
Thank you all :)

Heater
Posts: 12965
Joined: Tue Jul 17, 2012 3:02 pm

Re: Raspberry PI project, your opinions and advice

Mon Sep 24, 2018 9:02 am

Your project statement says "data transmission to a web server"

Generally that implies sending data to the web server using HTTP requests (AJAX) or using web sockets.

https://plainjs.com/javascript/ajax/sen ... quests-47/

https://code.tutsplus.com/tutorials/sta ... -net-13270

LinuxKoku
Posts: 75
Joined: Wed May 16, 2018 9:16 am
Location: France
Contact: Website

Re: Raspberry PI project, your opinions and advice

Mon Sep 24, 2018 9:44 am

Hello, thank you for your answer,

According to my tutor, the server part is fully supplied and functional, I was also told that I would use python, and your WebSockets solution encourages to use other programming languages like php! I do not know more about what I will use but thank you very much for your information, I think I will base this week the first solution (Send Ajax requests).
Thank you all :)

Heater
Posts: 12965
Joined: Tue Jul 17, 2012 3:02 pm

Re: Raspberry PI project, your opinions and advice

Mon Sep 24, 2018 10:39 am

Is there only a web server to talk to?

Web servers speak HTTP and websockets. If the web server is "fully supplied and functional" and then presumably there is already a specification as to how to interact with it.

If you are using some other protocol, raw TCP/IP sockets for example, then there must be some other server involved. What is it?

One can communicate via websockets from many languages. Python for example: https://pypi.org/project/websockets/

LinuxKoku
Posts: 75
Joined: Wed May 16, 2018 9:16 am
Location: France
Contact: Website

Re: Raspberry PI project, your opinions and advice

Mon Sep 24, 2018 11:00 am

Thank you so much,
I do not have any more information on the project, as soon as I will have it I would relaunch the subject :D ! I'm going to look for the more ready websockets.
Thank you all :)

Return to “General discussion”