oyooyo / keyble

Command line tools and library for controlling eqiva eQ-3 Bluetooth smart locks
92 stars 29 forks source link

MQTT client only working twice #31

Closed markusweibofner closed 3 years ago

markusweibofner commented 3 years ago

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!

markusweibofner commented 3 years ago

Found out this has to do with the "UNKNOWN" status, see issue #32

oyooyo commented 3 years ago

Sorry for not answering earlier by the way. I seem to have overseen this issue.