Mqtt node
by freehuntx
0
mqtt-node
Overview
A simple mqtt (v3) implementation in gdscript.
For cross-platform compatibility its just working with websocket. There are no plans to support tcp/udp!
Installation
- Copy
addons/mqtt-node
to your godot project - Done! You can use the MqttNode component now!
Usage
Example (Using just code)
extends Node2D
@onready var mqtt := MqttNode.new()
func _ready() -> void:
mqtt.broker = 'wss://broker.hivemq.com:8884/mqtt'
mqtt.auto_connect = true
mqtt.connecting.connect(func():
print("Connecting...")
)
mqtt.connecting_failed.connect(func():
print("Connecting failed!")
)
mqtt.connected.connect(func():
print("Connected!")
mqtt.subscribe("test/#")
)
mqtt.disconnected.connect(func():
print("Disonnected!")
)
mqtt.message.connect(func(topic, msg):
print("Message (%s): %s" % [topic, msg])
)
add_child(mqtt)
Download
Version0.0.1
Download Now
Support
If you need help or have questions about this plugin, please contact the author.
Contact Author