# MQTT

**URL:** <https://discuss.88.io/t/mqtt/894>\
**Category:** home network\
**Tags:** network\
**Created:** [January 22, 2023, 3:05am UTC](https://discuss.88.io/t/mqtt/894 "2023-01-22T03:05:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![admin](https://discuss.88.io/user_avatar/discuss.88.io/admin/32/38_2.png) [@admin](https://discuss.88.io/u/admin)\
**Post date:** [January 22, 2023, 3:05am UTC](https://discuss.88.io/t/mqtt/894/1 "2023-01-22T03:05:10Z")

</div>

# Introduction

[MQTT](https://mqtt.org/) is one of the 3 default protocols supported on the Virtual Private Mesh (the other 2 are HTTP (web) and SMTP (email).

The asynchronous nature of MQTT is used as to complement the synchronous nature of HTTP in communications between Console Devices.

If possible [MQTT 3.1.1](https://webstore.iec.ch/preview/info_isoiec20922%7Bed1.0%7Den.pdf) should be used, although earlier MQTT versions 3 and 3.1 are also supported.

# References

- [GitHub - awesome-mqtt/awesome-mqtt: Curated list of MQTT brokers, clients, tools, resources and more. · GitHub](https://github.com/hobbyquaker/awesome-mqtt)
- [GitHub - HighVoltages/MQTTwebapp: In this video we will make MQTT web application or MQTT web dashboard using HTML, CSS and Java Script using the Paho mqtt library for Java script. Also this video explains how we can use the MQTT broker over websockets. · GitHub](https://github.com/HighVoltages/MQTTwebapp)
- [http://www.steves-internet-guide.com/mqtt-websockets](http://www.steves-internet-guide.com/mqtt-websockets)

---

<div class="post-metadata">

**Author:** ![admin](https://discuss.88.io/user_avatar/discuss.88.io/admin/32/38_2.png) [@admin](https://discuss.88.io/u/admin)\
**Post date:** [April 24, 2023, 1:36am UTC](https://discuss.88.io/t/mqtt/894/2 "2023-04-24T01:36:14Z")

</div>

# 1. Python MQTT

The [paho library](https://www.eclipse.org/paho/) seem quite standard for MQTT in python.

## 1.1. paho

- [https://www.eclipse.org/paho/index.php?page=clients/python/index.php](https://www.eclipse.org/paho/index.php?page=clients/python/index.php)
- [paho-mqtt · PyPI](https://pypi.org/project/paho-mqtt/)

Usage Example

- [GitHub - djoamersfoort/mqtt-to-http-post: A tool that subscribes to a MQTT topic and sends a HTTP POST request to a endpoint for every received message.](https://github.com/djoamersfoort/mqtt-to-http-post)

# 2. PHP MQTT

There are a number of PHP MQTT libraries available.

## 2.1. php-mqtt

- [GitHub - php-mqtt/client: An MQTT client written in and for PHP.](https://github.com/php-mqtt/client)

Usage Examples

- [How to Use MQTT with PHP: A Guide for Real-Time Messaging | EMQ](https://www.emqx.com/en/blog/how-to-use-mqtt-in-php)
- [https://dzone.com/articles/how-to-use-mqtt-in-php](https://dzone.com/articles/how-to-use-mqtt-in-php)
- [php-mqtt/client - Packagist.org](https://packagist.org/packages/php-mqtt/client)

## 2.2. phpMQTT

- [https://github.com/bluerhinos/phpMQTT](https://github.com/bluerhinos/phpMQTT)

Usage Examples

- [PHP MQTT Documentation - CloudAMQP](https://www.cloudamqp.com/docs/php_mqtt.html)

## 2.3. Other PHP MQTT Libraries:

- [workerman/mqtt - Packagist.org](https://packagist.org/packages/workerman/mqtt)
- [simps/mqtt - Packagist.org](https://packagist.org/packages/simps/mqtt)

---

<div class="post-metadata">

**Author:** ![admin](https://discuss.88.io/user_avatar/discuss.88.io/admin/32/38_2.png) [@admin](https://discuss.88.io/u/admin)\
**Post date:** [April 24, 2023, 1:37am UTC](https://discuss.88.io/t/mqtt/894/3 "2023-04-24T01:37:25Z")

</div>

# MQTT Gateway

- [https://docs.openmqttgateway.com/](https://docs.openmqttgateway.com/)
- [https://compatible.openmqttgateway.com/](https://compatible.openmqttgateway.com/)

---

<div class="post-metadata">

**Author:** ![admin](https://discuss.88.io/user_avatar/discuss.88.io/admin/32/38_2.png) [@admin](https://discuss.88.io/u/admin)\
**Post date:** [April 24, 2023, 2:52am UTC](https://discuss.88.io/t/mqtt/894/4 "2023-04-24T02:52:52Z")

</div>

# MQTT Logging

> **[Storing MQTT Messages (Sensor Data) in a SQLite DataBase With Python](http://www.steves-internet-guide.com/logging-mqtt-sensor-data-to-sql-database-with-python/)**
>
> In the project we look at how to store our MQTT messages (Sensor.Data) to a Sqlite Database using Python. Storing messages in a database makes them far more accessible.

[http://ediy.com.my/blog/item/143-store-messages-from-mosquitto-mqtt-broker-into-sql-database](http://ediy.com.my/blog/item/143-store-messages-from-mosquitto-mqtt-broker-into-sql-database)

> **[Client Challenge](https://pypi.org/project/mqtt-logger/)**
