Python Forum
Send Pressure sensor data to IoT platform using WebSockets in Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Send Pressure sensor data to IoT platform using WebSockets in Python
#1
Hi, I need to know the best way which helps me to send the pressure sensor data to the IoT platform using Websockets

It would be a great help if you provide the sample example suggest the package which I should use for WebSockets
Reply
#2
(Mar-11-2019, 11:50 AM)barry76 Wrote: IoT platform using Websockets
Can be okay to look at more finished solution for this Top 20 IoT Platforms

For a homemade soultion i would have used Flask | Flask-SocketIO running at DO.
To show something i posted before.
Here i do eg 10-sec update of data with Ajax,in this case just random value,could eg be pressure sensor data.
So have to think of need real time data(Websockets Flask-SocketIO) or can get data them in interval as i do here.
An other post with APScheduler,show also database setup with Flask-SQLAlchemy.

Other link to look at:
Building an IoT Server with Flask and Python - Part 1 Motivation
Welcome to Flask-MQTT’s
Quote:MQTT integration in a Flask application.
MQTT is a machine-to-machine (M2M)/”Internet of Things” (IoT) protocol,
which is designed as a lightweight publish/subscribe messaging transport.
INTERNET OF THINGS WITH PYTHON AND FLASK
Reply
#3
Code for this sensor: https://github.com/ControlEverythingComm...03_01BA.py
A package which may work: https://pypi.org/project/ms5803py/

For a standalone websocket server I use websockets, which is async and uses asyncio.

But for IoT stuff are many different ways to communicate. I guess the most used type are Message Queues.
MQTT, Rabbit MQ, ZMQ and the 100 others.

Websockets usually used for persistent Server <> Webbrowser communication.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#4
Thanks for your, Well I am trying to create the homemade solution which helps me to connect with AWS IoT core and create the analytics dashboard to work with these Machine to machine or WebSocket protocol
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Listen TCP and send data to websockets neoboby 3 2,898 Feb-13-2023, 09:47 PM
Last Post: Vadanane
  Asyncio | Websockets - general problem starting the server dreamer 5 3,185 Oct-26-2022, 11:55 AM
Last Post: dreamer
  websockets help :/ kimblee 3 5,486 Feb-15-2021, 01:26 AM
Last Post: kimblee
  Help send email by Python using smtplib hangme 6 6,116 Jan-25-2020, 03:31 AM
Last Post: shapeg
  Slow websockets server -> client pattagghiu 0 2,366 Sep-17-2019, 09:28 AM
Last Post: pattagghiu
  Flask and Websockets == True? rxndy 2 2,784 Apr-21-2019, 04:08 PM
Last Post: rxndy
  How to send/receive data over TCP Rehan11 1 3,658 Feb-01-2019, 11:21 AM
Last Post: cetpaseo336
  Send data BMP180 between client and server trought module socket smalhao 0 2,805 Jul-30-2018, 12:56 PM
Last Post: smalhao

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020