Python Forum
Send Pressure sensor data to IoT platform using WebSockets in Python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Networking (https://python-forum.io/forum-12.html)
+--- Thread: Send Pressure sensor data to IoT platform using WebSockets in Python (/thread-16707.html)



Send Pressure sensor data to IoT platform using WebSockets in Python - barry76 - Mar-11-2019

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


RE: Send Pressure sensor data to IoT platform using WebSockets in Python - snippsat - Mar-11-2019

(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


RE: Send Pressure sensor data to IoT platform using WebSockets in Python - DeaD_EyE - Mar-11-2019

Code for this sensor: https://github.com/ControlEverythingCommunity/MS5803-01BA/blob/master/Python/MS5803_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.


RE: Send Pressure sensor data to IoT platform using WebSockets in Python - barry76 - Mar-12-2019

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