Bottom Page

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
Quote
#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
Quote
#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.
My code examples are always for Python >=3.6.0
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Quote
#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
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Send smtp message barry 1 95 Aug-12-2019, 03:47 PM
Last Post: barry
  Send raw string via socket with out any changes john36 18 449 Aug-01-2019, 07:54 AM
Last Post: john36
  Flask and Websockets == True? rxndy 2 320 Apr-21-2019, 04:08 PM
Last Post: rxndy
  How to send/receive data over TCP Rehan11 1 495 Feb-01-2019, 11:21 AM
Last Post: cetpaseo336
  Send data BMP180 between client and server trought module socket smalhao 0 644 Jul-30-2018, 12:56 PM
Last Post: smalhao
  Start tls - Unable to send email darunkumar 7 2,267 May-30-2018, 10:43 AM
Last Post: darunkumar
  Simple send and recive string Server/Client Epilepsy 1 956 May-01-2018, 08:17 PM
Last Post: ThiefOfTime

Forum Jump:


Users browsing this thread: 1 Guest(s)