8000 GitHub - Everaldo-Gomes/SDAS: Sensor data acquisition system
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Everaldo-Gomes/SDAS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

SDAS - Sensor Data Acquisition System

This application is used for measuring different values from a variety of sensors and send them to a server via MQTT.


Platform

All application is being developed in a Raspberry Pi 4b, using the Raspbery Pi operating system.


Files and directories

.env

The .env is where important configurations that can be changed are.


Using the application

Dependencies

Enable I2C: sudo raspi-config -> Interfacing Options -> I2C -> Enable.

sudo apt install i2c-tools python3-rpi.gpio
sudo pip install paho-mqtt smbus2 RPI.GPIO python-dotenv


MQTT configuration

In the /etc/mosquitto/conf.d/default.conf set the values below
listener 1883 means that it is listening for any MQTT clients on TCP port 1883 on all interfaces (0.0.0.0:1883).

If you want to listen for a specific client set: listener 1883 <your_client_ip>

allow_anonymous true means the broker will allow clients to connect without a username or password, and any MQTT client can publish or subscribe without restriction. (For the initial development, it's ok)

Then, restart the service sudo systemctl restart mosquitto

Check if it is listening to the right IP and port: sudo netstat -tulnp | grep 1883


Executing

python3 main.py


Commands

The application is publishing to the sensores/medicoes topic to send the measured sensor data.

The application is subscribed to the topics sensors/status and sensors/read_now.

With sensors/status, you can obtain the application's uptime.
With sensors/read_now, you can access the measured data immediately.

About

Sensor data acquisition system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0