Amazing library! The repository works really well, especially with direct sendcommand, i don't have any issues.
I'm running it on my raspi 3b+. However, when trying the mqtt broker as a service, it doesn't always run as expected (usually twice after rebooting, it works fine). The messages are sent to the broker correctly, but then nothing outbound. Is the example provided for sure correct?
If yes, do you have a working example of a client? I'm new to mqtt so chances are high, that i made something wrong.
Some of my code snippets
client = mqtt.Client()client.connect("localhost",1883,600)client.subscribe("door_lock/status")client.on_publish = on_publishclient.on_message=on_messageclient.publish("door_lock/action", "open")client.loop_start()
I dunno if that's related but when locking, the status usually changes to "UNKNOWN".
Amazing library! The repository works really well, especially with direct sendcommand, i don't have any issues.
I'm running it on my raspi 3b+. However, when trying the mqtt broker as a service, it doesn't always run as expected (usually twice after rebooting, it works fine). The messages are sent to the broker correctly, but then nothing outbound. Is the example provided for sure correct? If yes, do you have a working example of a client? I'm new to mqtt so chances are high, that i made something wrong. Some of my code snippets
client = mqtt.Client()
client.connect("localhost",1883,600)
client.subscribe("door_lock/status")
client.on_publish = on_publish
client.on_message=on_message
client.publish("door_lock/action", "open")
client.loop_start()
I dunno if that's related but when locking, the status usually changes to "UNKNOWN".
Thanks for your help! Amazing work!