GithubHelp home page GithubHelp logo

mqtt's Introduction

MaQiaTTo online broker python script

This repository contains a Python script for interacting with the MaQiaTTo online broker. Follow the instructions below to set up and use the script.

How to use

  1. Create MaQiaTTo account at maqiatto.com.
  2. Create the necessary topics. For example, you can create a topic named "door" (the provided example assumes this topic exists).

Clone the Repository

git clone https://github.com/harounabidi/mqtt.git

or download here

Install requirements

Install the required Python packages by running the following command:

pip install -r requirements.txt

Configure .env File

  1. Copy the contents of .env.example file.
  2. Create a new file named .env.
  3. Paste the copied contents into the .env file.
  4. Replace the placeholders with your actual MaQiaTTo credentials. Replace username with your MaQiaTTo username and password with your MaQiaTTo password.

Example .env file:

BROKER_USERNAME=your_username
BROKER_PASSWORD=your_password

Publisher

image info

To publish messages to a topic using an arduino RFID, run the following command:

python mqtt_publish.py

Subscriber

image info

To subscribe to a topic and receive messages, run the following command:

python mqtt_subscriber.py

This will execute the mqtt_subscriber.py script and listen for incoming messages on the subscribed topic.

Feel free to reach out if you have any further questions or issues.

mqtt's People

Contributors

harounabidi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.