
F
Publisher
freehuntx
Mqtt node
Misc
MQTT Networking WebSocket GDScript Communication Visual CrossPlatform Subscription
This is a simple implementation of mqtt 3. It adds a node that can be used entirely without code and just visually! Just ws/wss brokers are supported for cross compatibility reasons (browser support). There are no plans/needs to add tcp/udp.
This plugin has been mirrored from the Godot Asset Library.
The plugin author is in no way affiliated with Gadget.
If you are the author of this plugin and would like this mirror removed, please contact support@gadgetgodot.com.
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-nodeto 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)