|
Hello, I am trying to route MQTT through Channels. However, when fetching the # consumers.py
class MqttConsumer(SyncConsumer):
def __init__(self): # this constructor is never called ...
super().__init__()
print(self.channel_layer)
print(self.channel_name)
def mqtt_msg(self, event):
print(event)# routing.py
application = ProtocolTypeRouter({
'mqtt': MqttConsumer
})# send.py
async def send_message():
await channel_layer.send('mqtt', { 'type': 'mqtt.msg', 'text': 'test' })I have tried both |
Answered by
4f3x
Jul 2, 2021
Replies: 2 comments 2 replies
|
My issue was closed without any feedback. How am I to provide helpful information to resolve this, seeing as no error messages are produced at all? The documentation of this project is sparse at best on how to implement MQTT, even though it says so on the introductory page. |
2 replies
|
Got it to work. |
0 replies
Answer selected by
4f3x
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Got it to work.
asgirefneeded to be downgraded, the worker didn't instantiate properly.