Skip to main content

Connexion TCP <-> MQTT ssl ou wss

Project description

#pytcpmqtt

Permet la connexion d'un microprocesseur fonctionnant en serveur TCP sur un réseau local vers un serveur MQTT.

Un fichier json de configuration "tcp_mqtt_data.json" doit être présent dans le répertoire :

Contenu du fichier "tcp_mqtt_data.json" :

{
"tcp_host":"192.168.1.26",
"tcp_port":92,
"broker_url":"url_de_votre_broker_mqtt",
"broker_protocol_mqtt_mqtts_ws_wss":"tcp",
"broker_port":8443,
"date_heure":true,
"salle":"maSalle",
"KEY":"bureau/lumiere1"
}


Le topic de réception sera : salle/KEY/out

Le topic d'envoi sera : salle/KEY/in

Si date_heure" : true alors ajoute de la date et l'heure dans le json , si non mettre à : false

Les protocoles possibles sont "wss" websockets sécurisés avec login et mot de passe ( pas de certificat) ou "tcp" pour ssl avec login et mot de passe ( pas de certificat client)

Lancement du programme :

py -m pytcpmqtt.main 
(ou sur raspberry python3 -m pytcpmqtt.main)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytcpmqtt-1.3.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytcpmqtt-1.3.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file pytcpmqtt-1.3.1.tar.gz.

File metadata

  • Download URL: pytcpmqtt-1.3.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.8 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for pytcpmqtt-1.3.1.tar.gz
Algorithm Hash digest
SHA256 afe7dccf410e5718ea0a7d3df22d3aa8fed11a338e2de92554b75079fef53a47
MD5 f012663855dda6c5f582551d8b801fff
BLAKE2b-256 492af9362bc8a056e07be2ac446deb770a8ac279c5548cd32f83bc8577536a14

See more details on using hashes here.

File details

Details for the file pytcpmqtt-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: pytcpmqtt-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.8 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for pytcpmqtt-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8749a2b1f88457fe31f6ddc02154fd0b9bc2a5bcf523b2e27a7ea2c22eaf6f94
MD5 4cd6ea77a090b5b11d542b2ebcde2b15
BLAKE2b-256 b2d342b7aa97f8a9e7dea6168915a80d99bb4ab7601fe866d8ac3ed7c179dc7f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page